fix(editor): Changes to workflow after execution should not affect logs (#14703)

This commit is contained in:
Suguru Inoue
2025-04-24 12:24:26 +02:00
committed by GitHub
parent 92e2a8e61a
commit 84cee1d12d
21 changed files with 1029 additions and 443 deletions

View File

@@ -30,6 +30,7 @@ import type {
import type {
ICredentialsResponse,
IExecutionResponse,
INodeUi,
INodeUpdatePropertiesInformation,
NodePanelType,
@@ -542,12 +543,14 @@ export function useNodeHelpers() {
}
}
function getNodeTaskData(nodeName: string, runIndex = 0) {
return getAllNodeTaskData(nodeName)?.[runIndex] ?? null;
function getNodeTaskData(nodeName: string, runIndex = 0, execution?: IExecutionResponse) {
return getAllNodeTaskData(nodeName, execution)?.[runIndex] ?? null;
}
function getAllNodeTaskData(nodeName: string) {
return workflowsStore.getWorkflowRunData?.[nodeName] ?? null;
function getAllNodeTaskData(nodeName: string, execution?: IExecutionResponse) {
const runData = execution?.data?.resultData.runData ?? workflowsStore.getWorkflowRunData;
return runData?.[nodeName] ?? null;
}
function hasNodeExecuted(nodeName: string) {
@@ -577,9 +580,10 @@ export function useNodeHelpers() {
outputIndex = 0,
paneType: NodePanelType = 'output',
connectionType: NodeConnectionType = NodeConnectionTypes.Main,
execution?: IExecutionResponse,
): INodeExecutionData[] {
if (!node) return [];
const taskData = getNodeTaskData(node.name, runIndex);
const taskData = getNodeTaskData(node.name, runIndex, execution);
if (taskData === null) {
return [];
}