Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editor): Logs overview panel #14045

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

autologie
Copy link
Contributor

@autologie autologie commented Mar 19, 2025

Summary

This PR implements the new design of logs overview panel behind feature flag.

Screenshot from 2025-03-27 16-06-34

To try out, set local storage key N8N_LOGS_2025_SPRING to true and refresh the browser.
Note that the logs overview works only for workflows with AI agent node for now.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/SUG-23/feature-logs-overview-panel

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Mar 19, 2025
Comment on lines +448 to +450
startedAt: Date | string;
createdAt: Date | string;
stoppedAt?: Date | string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing type to match the actual behavior (happens when the execution data is received from BE)

@@ -59,6 +59,7 @@
"core-js": "^3.40.0",
"curlconverter": "^4.12.0",
"dateformat": "^3.0.3",
"element-plus": "2.4.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library has been already in use. I'm adding it as an explicit dependency.

@autologie autologie marked this pull request as ready for review March 27, 2025 15:19
Copy link
Contributor

@OlegIvaniv OlegIvaniv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Left a few minor comments

workflowId,
data: parse(rawData),
status,
startedAt: workflowsStore.workflowExecutionData?.startedAt as Date,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do a typeguard here instead of coercing it? Something like:

function ensureDate(value: string | Date | undefined): Date | undefined {
		if (!value) return new Date();
		if (value instanceof Date) return value;
		return new Date(value);
	}
	

}

function handleClickToggleButton() {
props.node.expanded = !props.node.expanded;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we emit an event here to not mutate the prop directly?

Comment on lines +45 to +46
{ label: 'Details', value: 'details' },
{ label: 'Overview', value: 'overview' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n 👁️

:icon="props.node.expanded ? 'chevron-down' : 'chevron-up'"
:style="{
visibility: props.data.children.length === 0 ? 'hidden' : '',
color: 'var(--color-text-base)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put this to toggleButton class? Also perhaps use v-show instead of visibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants