Skip to content

Commit c438166

Browse files
bchapuisclaude
andcommitted
Fix node persistence not flushing after drag ends
The isDraggingRef skip in useGraphPersistence was never re-evaluated after drag ended because refs don't trigger re-renders. Force a nodes identity change in onNodeDragStop so the persistence effect re-runs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae8aaef commit c438166

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/app/src/components/workflow/use-graph-operations.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,8 @@ export function useGraphOperations({
760760
}, []),
761761
onNodeDragStop: useCallback(() => {
762762
isDraggingRef.current = false;
763-
}, []),
763+
setNodes((nodes) => [...nodes]);
764+
}, [setNodes]),
764765
isDraggingRef,
765766
isValidConnection,
766767
handleAddNode,

0 commit comments

Comments
 (0)