Skip to content

Conversation

@autologie
Copy link
Contributor

Summary

This PR updates the format used for showing execution time in editor UI to make it more commonly used one

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/SUG-71/feature-adjust-time-formatting-to-xh-xm-xs-in-the-log-view

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 Jun 6, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic found 1 issue across 4 files. Review it in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Comment on lines -204 to +216
const nodeType = activeNodeType ? this.shortNodeType(activeNodeType) : ''; // unused in eventTriggerDescription
const initialKey = `n8n-nodes-base.nodes.${nodeType}.nodeView`;
const shortNodeType = activeNodeType ? this.shortNodeType(activeNodeType) : ''; // unused in eventTriggerDescription
const initialKey = `n8n-nodes-base.nodes.${shortNodeType}.nodeView`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just fixing shadowed variable name

@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@autologie autologie requested a review from mutdmour June 10, 2025 10:24
expect(new I18nClass().displayTimer(1120, true)).toBe('1.12s');
expect(new I18nClass().displayTimer(1234, true)).toBe('1.234s');
expect(new I18nClass().displayTimer(600000, true)).toBe('10m 0s');
expect(new I18nClass().displayTimer(601234, true)).toBe('10m 1.234s');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not we handle ms separately here and follow the general pattern? As in 1s 1ms instead of 1.001s?

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 is a bit tricky, I think we want to keep 1.234s format in places like this:
Screenshot 2025-06-10 at 13 58 33

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha. Might be worth discussing with David where this should show fully or partial?

@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@autologie autologie merged commit cd6e510 into master Jun 10, 2025
34 checks passed
@autologie autologie deleted the sug-71-duration-format branch June 10, 2025 12:17
@janober
Copy link
Member

janober commented Jun 11, 2025

Got released with n8n@1.98.0

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 Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants