From c044bc36e9c7ee83a1bf23883c98a0f854af6c1b Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Thu, 24 Jul 2025 15:52:48 +0300 Subject: [PATCH] fix(editor): Use nodes and connection from passed in workflow in RunData (no-changelog) (#17628) --- .../frontend/editor-ui/src/components/RunData.vue | 4 ++-- .../editor-ui/src/utils/nodeViewUtils.test.ts | 12 ++++++------ .../frontend/editor-ui/src/utils/nodeViewUtils.ts | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/frontend/editor-ui/src/components/RunData.vue b/packages/frontend/editor-ui/src/components/RunData.vue index deab751589..3be1647dd4 100644 --- a/packages/frontend/editor-ui/src/components/RunData.vue +++ b/packages/frontend/editor-ui/src/components/RunData.vue @@ -807,8 +807,8 @@ function getNodeHints(): NodeHint[] { node: node.value, nodeType: nodeType.value, nodeOutputData, - nodes: workflowsStore.allNodes, - connections: workflowsStore.connectionsBySourceNode, + nodes: props.workflow.nodes, + connections: props.workflow.connectionsBySourceNode, hasNodeRun: hasNodeRun.value, hasMultipleInputItems, }); diff --git a/packages/frontend/editor-ui/src/utils/nodeViewUtils.test.ts b/packages/frontend/editor-ui/src/utils/nodeViewUtils.test.ts index 0084f17289..8129049ba2 100644 --- a/packages/frontend/editor-ui/src/utils/nodeViewUtils.test.ts +++ b/packages/frontend/editor-ui/src/utils/nodeViewUtils.test.ts @@ -61,7 +61,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); @@ -87,7 +87,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); @@ -126,7 +126,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); @@ -151,7 +151,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); @@ -176,7 +176,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); @@ -202,7 +202,7 @@ describe('getGenericHints', () => { nodeOutputData: mockNodeOutputData, hasMultipleInputItems, hasNodeRun, - nodes: [], + nodes: {}, connections: {}, }); diff --git a/packages/frontend/editor-ui/src/utils/nodeViewUtils.ts b/packages/frontend/editor-ui/src/utils/nodeViewUtils.ts index 4457f480fb..98bf7d1eb0 100644 --- a/packages/frontend/editor-ui/src/utils/nodeViewUtils.ts +++ b/packages/frontend/editor-ui/src/utils/nodeViewUtils.ts @@ -14,6 +14,7 @@ import type { IConnections, INode, INodeExecutionData, + INodes, INodeTypeDescription, NodeHint, } from 'n8n-workflow'; @@ -381,7 +382,7 @@ export function getGenericHints({ nodeType: INodeTypeDescription; nodeOutputData: INodeExecutionData[]; hasMultipleInputItems: boolean; - nodes: INode[]; + nodes: INodes; connections: IConnections; hasNodeRun: boolean; }) {