mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
fix(dashboard): suppress TourFitView overlay flicker after fallback
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user