From 61356da3dc28523075a2f0ee89ece7f4fc8cdd03 Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Mon, 4 May 2026 19:27:30 +0800 Subject: [PATCH] fix(dashboard): suppress TourFitView overlay flicker after fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up on the Codex P2: now that `useNodes` is in the effect deps, every node update during a step that already timed out re-enters the poll, sets `tourFitPending=true`, runs RAF for 4s, hits the silent fallback path, and clears the flag. Visually the "Locating tour highlight…" overlay would flash on every reflow even though the user has already given up waiting. Skip the pending flag once `fallbackKeyRef` matches the current step — the retry still runs silently so a late Stage 2 can still upgrade to the proper fit. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../packages/dashboard/src/components/GraphView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx index a4a3989..891d997 100644 --- a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx +++ b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx @@ -123,7 +123,11 @@ function TourFitView() { let frame = 0; let cancelled = false; let rafId = 0; - setTourFitPending(true); + // After we've already shown the fallback for this step, suppress the + // "Locating tour highlight…" overlay on subsequent re-fires (each + // `nodes` change re-enters the effect, but the user has already given + // up waiting). The retry still runs silently in case Stage 2 lands. + if (fallbackKeyRef.current !== targetKey) setTourFitPending(true); const tick = () => { if (cancelled) return;