Skip to content

Conversation

@RobTF9
Copy link
Contributor

@RobTF9 RobTF9 commented Jan 6, 2026

Summary

Related Linear tickets, Github issues, and Community forum posts

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 core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jan 6, 2026
@RobTF9 RobTF9 changed the base branch from master to ado-4284-autosave-collaboration January 6, 2026 17:12
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 98.18841% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...flowHistory/components/WorkflowHistoryListItem.vue 96.61% 4 Missing ⚠️
...s/MainHeader/WorkflowHeaderDraftPublishActions.vue 99.32% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@currents-bot
Copy link

currents-bot bot commented Jan 6, 2026

E2E Tests: n8n tests passed after 5m 42.2s

🟢 618 · 🔴 0 · ⚪️ 26 · 🟣 3

View Run Details

Run Details

  • Project: n8n

  • Groups: 2

  • Framework: Playwright

  • Run Status: Passed

  • Commit: c9ca926

  • Spec files: 140

  • Overall tests: 644

  • Duration: 5m 42.2s

  • Parallelization: 16

Groups

GroupId Results Spec Files Progress
multi-main:e2e 🟢 561 · 🔴 0 · ⚪️ 26 · 🟣 3 131 / 131
multi-main:e2e:isolated 🟢 57 · 🔴 0 · ⚪️ 0 9 / 9


This message was posted automatically by currents.dev | Integration Settings

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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue">

<violation number="1" location="packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue:237">
P2: The indicator will be rendered but invisible. With `showIndicator: true` and `indicatorClass: ''`, the dot element is created but has no background color since neither `indicatorPublished` nor `indicatorChanges` CSS classes are applied. Consider setting `indicatorClass: 'published'` to match the similar `'published-node-issues'` state, or keep `showIndicator: false` if no visual indicator is intended.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue">

<violation number="1" location="packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue:292">
P2: Removing `isWorkflowSaving` check allows clicking publish during ongoing manual saves. The `saveBeforePublish` function only handles autosave states but doesn't wait for manual saves in progress, which could lead to concurrent save operations. Consider either keeping this check or updating `saveBeforePublish` to await ongoing manual saves.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

<N8nButton
:loading="autoSaveForPublish"
:disabled="!publishButtonEnabled || isWorkflowSaving"
:disabled="!publishButtonConfig.enabled || readOnlyForPublish"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 7, 2026

Choose a reason for hiding this comment

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

P2: Removing isWorkflowSaving check allows clicking publish during ongoing manual saves. The saveBeforePublish function only handles autosave states but doesn't wait for manual saves in progress, which could lead to concurrent save operations. Consider either keeping this check or updating saveBeforePublish to await ongoing manual saves.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue, line 292:

<comment>Removing `isWorkflowSaving` check allows clicking publish during ongoing manual saves. The `saveBeforePublish` function only handles autosave states but doesn't wait for manual saves in progress, which could lead to concurrent save operations. Consider either keeping this check or updating `saveBeforePublish` to await ongoing manual saves.</comment>

<file context>
@@ -289,7 +289,7 @@ defineExpose({
 				<N8nButton
 					:loading="autoSaveForPublish"
-					:disabled="!publishButtonConfig.enabled || isWorkflowSaving || readOnlyForPublish"
+					:disabled="!publishButtonConfig.enabled || readOnlyForPublish"
 					type="secondary"
 					data-test-id="workflow-open-publish-modal-button"
</file context>
Suggested change
:disabled="!publishButtonConfig.enabled || readOnlyForPublish"
:disabled="!publishButtonConfig.enabled || isWorkflowSaving || readOnlyForPublish"
Fix with Cubic

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.

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/frontend/editor-ui/src/features/workflows/workflowHistory/components/WorkflowHistoryListItem.vue">

<violation number="1" location="packages/frontend/editor-ui/src/features/workflows/workflowHistory/components/WorkflowHistoryListItem.vue:121">
P2: Missing condition check in `mainTooltipDate` for the "Current Changes" case (`index === 0 && !isVersionActive`). If `versionPublishInfo.value` exists, the tooltip will incorrectly show a TimeAgo date, which is a regression from the old behavior where no date was shown for "Current Changes".</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

const publishedByUserName = computed(() => {
const userId = lastPublishInfo.value?.userId;
if (!userId) {
const mainTooltipDate = computed(() => {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 7, 2026

Choose a reason for hiding this comment

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

P2: Missing condition check in mainTooltipDate for the "Current Changes" case (index === 0 && !isVersionActive). If versionPublishInfo.value exists, the tooltip will incorrectly show a TimeAgo date, which is a regression from the old behavior where no date was shown for "Current Changes".

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/features/workflows/workflowHistory/components/WorkflowHistoryListItem.vue, line 121:

<comment>Missing condition check in `mainTooltipDate` for the "Current Changes" case (`index === 0 && !isVersionActive`). If `versionPublishInfo.value` exists, the tooltip will incorrectly show a TimeAgo date, which is a regression from the old behavior where no date was shown for "Current Changes".</comment>

<file context>
@@ -98,21 +98,40 @@ const versionPublishInfo = computed(() => {
-const publishedByUserName = computed(() => {
-	const userId = lastPublishInfo.value?.userId;
-	if (!userId) {
+const mainTooltipDate = computed(() => {
+	if (props.isGrouped) {
 		return null;
</file context>
Fix with Cubic

@RobTF9 RobTF9 removed the core Enhancement outside /nodes-base and /editor-ui label Jan 7, 2026
@RobTF9
Copy link
Contributor Author

RobTF9 commented Jan 7, 2026

@claude review

@claude
Copy link
Contributor

claude bot commented Jan 7, 2026

Claude finished @RobTF9's task —— View job


PR Review: Improve published state clarity

Review Tasks

  • Read and analyze all changed files
  • Review WorkflowHeaderDraftPublishActions.vue changes
  • Review WorkflowHistoryListItem.vue changes
  • Review WorkflowCard.vue changes
  • Validate cubic-dev-ai findings
  • Check i18n changes
  • Provide comprehensive feedback

Overview

This PR refactors the published state logic across workflow components to provide clearer visual indicators. The changes are well-structured and improve the user experience around workflow publishing states.

Detailed Review

WorkflowHeaderDraftPublishActions.vue - Excellent refactoring

The complete rewrite with a proper WorkflowPublishState enum is a significant improvement:

Strengths:

  • Clear state mapping: The 6 distinct states (not-published-not-eligible, not-published-eligible, etc.) cover all edge cases
  • Centralized configuration: The publishButtonConfig computed properly maps states to UI configuration
  • Better UX: Different visual indicators (dots with colors) for different states
  • Improved logic: Proper separation of permission checks, new workflow handling, and state-specific configurations

Minor concern from cubic-dev-ai review:

  • Line 297: Removing isWorkflowSaving check might allow concurrent operations, but saveBeforePublish() should handle this

⚠️ WorkflowHistoryListItem.vue - Good refactoring with one issue

Strengths:

  • Better tooltip logic: Cleaner separation between content, date, and user information
  • Improved readability: The computed properties are more focused and easier to understand

Issues to address:

  • Line 128-142: Missing condition check for "Current Changes" case as noted by cubic-dev-ai
    const mainTooltipDate = computed(() => {
      if (props.isGrouped) {
        return null;
      }
      
      // Missing: if (props.index === 0 && !props.isVersionActive) return null;
      
      if (props.isVersionActive && lastPublishInfo.value) {
        return lastPublishInfo.value.createdAt;
      }
      // ...
    });
    The "Current Changes" case should not show a date tooltip.

WorkflowCard.vue - Clean simplification

Strengths:

  • Simplified logic: isWorkflowPublished computed is more readable than checking nested properties
  • Consistent styling: Reused CSS classes and proper spacing
  • Better maintainability: Cleaner template structure

i18n Changes - Proper localization

The added translations are appropriate:

  • generic.notPublished: "Not published"
  • workflows.publishModal.changes: "Changes"

These support the new state indicators properly.

Validation of AI Review Comments

  1. Issue 1ADDRESSED - Invisible indicator (fixed in 99ec33a)
  2. Issue 2 ⚠️ PARTIALLY VALID - isWorkflowSaving removal concern is valid but may be handled by saveBeforePublish()
  3. Issue 3VALID - "Current Changes" tooltip date regression needs fixing

Recommendations

Priority Issues to Fix

  1. WorkflowHistoryListItem.vue:128 - Add missing condition for "Current Changes":
    const mainTooltipDate = computed(() => {
      if (props.isGrouped) {
        return null;
      }
      
      // Add this check to prevent showing date for "Current Changes"
      if (props.index === 0 && !props.isVersionActive) {
        return null;
      }
      
      if (props.isVersionActive && lastPublishInfo.value) {
        return lastPublishInfo.value.createdAt;
      }
      // ...
    });

Minor Suggestions

  1. Consider adding unit tests for the new state machine logic in WorkflowHeaderDraftPublishActions.vue
  2. Verify concurrent save handling - While saveBeforePublish() should handle it, consider adding explicit checks if this becomes a problem

Code Quality Assessment

  • Architecture: ✅ Excellent - proper separation of concerns and clear state management
  • Readability: ✅ Very good - well-structured computed properties and clear naming
  • Maintainability: ✅ Good - centralized configuration makes future changes easier
  • Testing: ⚠️ Consider adding tests for the complex state logic

Conclusion

This is a solid refactoring that significantly improves the published state clarity. The main architectural decisions are sound, and the code is well-structured. Fix the tooltip date issue and this will be ready for merge.


@scdekov scdekov merged commit 62d6788 into ado-4284-autosave-collaboration Jan 8, 2026
33 checks passed
@scdekov scdekov deleted the ado-4587-clearer-published-state branch January 8, 2026 07:33
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.

3 participants