From 85609825f7f6a572686e7548f6f21ca7f79a04df Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 8 Mar 2026 17:08:55 +0000 Subject: [PATCH] fix(graph): load graph before sigma refresh Staged files:\n- graph-frontend/src/components/Graph.tsx\n\nMove loadGraph(graph) before sigma.refresh() to avoid refreshing stale graph state, and include sigma in the useEffect dependency array so the effect re-runs if the Sigma instance changes. Co-authored-by: cdxker --- graph-frontend/src/components/Graph.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph-frontend/src/components/Graph.tsx b/graph-frontend/src/components/Graph.tsx index c3c4aa9..e6073bf 100644 --- a/graph-frontend/src/components/Graph.tsx +++ b/graph-frontend/src/components/Graph.tsx @@ -36,10 +36,10 @@ export function Graph({ layout, isDark }: { layout: LayoutMode; isDark: boolean useEffect(() => { if (graph) { - sigma.refresh() loadGraph(graph) + sigma.refresh() } - }, [graph, layout, loadGraph]) + }, [graph, layout, loadGraph, sigma]) const maxMetric = useMemo(() => { if (!nodeMetrics) return 1