From 2f01976ced16d56e3deaa560083c0bdb401894cb Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Fri, 18 Sep 2026 18:17:49 +0200 Subject: [PATCH] fix(editor): Tokenize the progress arc thickness and correct its contract docs Use `--spacing--5xs` for the arc thickness instead of a hardcoded 2px. The token is the same 2px, and the chat package's override of it is scoped to `.n8n-chat`, so the arc is unchanged. Correct the push payload docs. `currentNodeIndex` counts the distinct child nodes reached; it is not an execution-order index, and it parks while a loop iterates. `totalNodes` is an upper bound, and the editor no longer renders it as a denominator. Co-Authored-By: Claude Opus 5 (1M context) --- packages/@n8n/api-types/src/push/execution.ts | 8 ++++++-- .../elements/nodes/render-types/_canvasNodeStyles.scss | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/@n8n/api-types/src/push/execution.ts b/packages/@n8n/api-types/src/push/execution.ts index 8a9d943cfa1..398281e03c9 100644 --- a/packages/@n8n/api-types/src/push/execution.ts +++ b/packages/@n8n/api-types/src/push/execution.ts @@ -152,7 +152,7 @@ export type SubworkflowExecutionStarted = { parentNodeName: string; /** Child sub-execution id. */ executionId: string; - /** Total nodes in the child workflow — used to render "X / Y". */ + /** Upper bound on the child nodes that can run. Branches make it an over-estimate. */ totalNodes: number; }; }; @@ -169,8 +169,12 @@ export type SubworkflowNodeProgress = { executionId: string; /** Currently-running node name in the child workflow. */ currentNodeName: string; - /** 1-based index of the node in the child workflow's execution order. */ + /** + * Count of distinct child nodes reached so far, not an execution-order index. + * A loop re-runs the same nodes, so the count parks while it iterates. + */ currentNodeIndex: number; + /** Upper bound on the child nodes that can run. Branches make it an over-estimate. */ totalNodes: number; /** 'running' on nodeExecuteBefore; 'success' | 'error' on nodeExecuteAfter. */ phase: 'running' | 'success' | 'error'; diff --git a/packages/frontend/editor-ui/src/features/workflows/canvas/components/elements/nodes/render-types/_canvasNodeStyles.scss b/packages/frontend/editor-ui/src/features/workflows/canvas/components/elements/nodes/render-types/_canvasNodeStyles.scss index 79f058a8f32..92295d774b4 100644 --- a/packages/frontend/editor-ui/src/features/workflows/canvas/components/elements/nodes/render-types/_canvasNodeStyles.scss +++ b/packages/frontend/editor-ui/src/features/workflows/canvas/components/elements/nodes/render-types/_canvasNodeStyles.scss @@ -84,7 +84,7 @@ $status-shimmer-gradient: conic-gradient( inset: 0; // Follows the node's shape, so per-variant radius overrides aren't repeated here. border-radius: inherit; - padding: 2px; // arc thickness + padding: var(--spacing--5xs); // arc thickness // A conic gradient's 0deg is already at 12 o'clock and advances clockwise, so // no `from` offset — adding one would start the arc off the top edge. background: conic-gradient(