From 91d17694b394692a9832ae93693148c583102861 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 23 Jun 2026 08:46:03 +0100 Subject: [PATCH] =?UTF-8?q?fix(graphrag):=20graph=20view=20rendered=20blan?= =?UTF-8?q?k=20=E2=80=94=20measure=20container=20after=20load?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ResizeObserver/size effect ran once on mount with [] deps while loading=true, so containerRef was null (the graph container isn't in the DOM yet) and size.width stayed 0, gating out ForceGraph2D (blank canvas) even though the data loaded. Re-run the measure effect on [loading, data.nodes.length] so it attaches + measures once the container actually mounts. --- frontend/src/components/GraphView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/GraphView.tsx b/frontend/src/components/GraphView.tsx index 7028b1ed..f995779c 100644 --- a/frontend/src/components/GraphView.tsx +++ b/frontend/src/components/GraphView.tsx @@ -78,7 +78,7 @@ const GraphView: React.FC = ({ observer.observe(element); setSize({ width: element.clientWidth, height: 480 }); return () => observer.disconnect(); - }, []); + }, [loading, data.nodes.length]); const maxNodeDegree = useMemo(() => maxDegree(data.nodes), [data.nodes]);