|
|
@ -3410,11 +3410,6 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({ |
|
|
nodes: restoredExecutionState.nodes, |
|
|
nodes: restoredExecutionState.nodes, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
logSmartImage7Snapshot( |
|
|
|
|
|
"loadWorkflow:after-reset-transient", |
|
|
|
|
|
(hydratedWorkflow.nodes as WorkflowNode[]).find((node) => node.id === "smartImage-7"), |
|
|
|
|
|
{ changed: restoredExecutionState.changed } |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const normalizedGroups = normalizeNativeGroupNodes( |
|
|
const normalizedGroups = normalizeNativeGroupNodes( |
|
|
hydratedWorkflow.nodes as WorkflowNode[], |
|
|
hydratedWorkflow.nodes as WorkflowNode[], |
|
|
@ -3427,11 +3422,6 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({ |
|
|
groups: normalizedGroups.groups, |
|
|
groups: normalizedGroups.groups, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
logSmartImage7Snapshot( |
|
|
|
|
|
"loadWorkflow:after-normalize-groups", |
|
|
|
|
|
(hydratedWorkflow.nodes as WorkflowNode[]).find((node) => node.id === "smartImage-7"), |
|
|
|
|
|
{ changed: normalizedGroups.changed } |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Load cost data for this workflow
|
|
|
// Load cost data for this workflow
|
|
|
const costData = workflow.id ? loadWorkflowCostData(workflow.id) : null; |
|
|
const costData = workflow.id ? loadWorkflowCostData(workflow.id) : null; |
|
|
@ -3448,10 +3438,6 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({ |
|
|
loadedNodes.push(nextNode); |
|
|
loadedNodes.push(nextNode); |
|
|
return loadedNodes; |
|
|
return loadedNodes; |
|
|
}, []); |
|
|
}, []); |
|
|
logSmartImage7Snapshot( |
|
|
|
|
|
"loadWorkflow:before-store-set", |
|
|
|
|
|
nextLoadedNodes.find((node) => node.id === "smartImage-7") |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
set({ |
|
|
set({ |
|
|
// Clear selected state - selection should not be persisted across sessions
|
|
|
// Clear selected state - selection should not be persisted across sessions
|
|
|
@ -3472,10 +3458,6 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({ |
|
|
viewedCommentNodeIds: new Set<string>(), |
|
|
viewedCommentNodeIds: new Set<string>(), |
|
|
hasUnsavedChanges: restoredExecutionState.changed || normalizedGroups.changed, |
|
|
hasUnsavedChanges: restoredExecutionState.changed || normalizedGroups.changed, |
|
|
}); |
|
|
}); |
|
|
logSmartImage7Snapshot( |
|
|
|
|
|
"loadWorkflow:after-store-set", |
|
|
|
|
|
get().nodes.find((node) => node.id === "smartImage-7") |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Clear snapshot unless explicitly preserving (e.g., AI workflow generation)
|
|
|
// Clear snapshot unless explicitly preserving (e.g., AI workflow generation)
|
|
|
if (!options?.preserveSnapshot) { |
|
|
if (!options?.preserveSnapshot) { |
|
|
|