From 2898cf2e17e68d4a6e3989e507ed044917b525f9 Mon Sep 17 00:00:00 2001 From: stijnpotters Date: Tue, 30 Jun 2026 12:30:13 +0200 Subject: [PATCH] Update flow store methods to enhance node management and clear history --- src/main/frontend/app/routes/studio/canvas/flow.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/app/routes/studio/canvas/flow.tsx b/src/main/frontend/app/routes/studio/canvas/flow.tsx index becde7dc..49aa5619 100644 --- a/src/main/frontend/app/routes/studio/canvas/flow.tsx +++ b/src/main/frontend/app/routes/studio/canvas/flow.tsx @@ -691,7 +691,7 @@ function FlowCanvas({ onOpenInEditor }: { onOpenInEditor: () => void }) { node.type === 'frankNode' || node.type === 'exitNode' ? { ...node, position: { x: 0, y: 0 } } : node, ) const laidOutNodes = layoutGraph(nodesWithResetPositions, flowStore.edges, 'LR') - flowStore.setNodes(laidOutNodes) + flowStore.setNodesWithoutHistory(laidOutNodes) if (pendingSelection) { applySelectionToNodes(pendingSelection) @@ -702,6 +702,9 @@ function FlowCanvas({ onOpenInEditor }: { onOpenInEditor: () => void }) { reactFlowRef.current?.setViewport(freshViewport) }) } + + flowStore.setHistory([]) + flowStore.setFuture([]) }, [ nodesInitialized, relayoutNonce,