From 9f98a4fc5913e20a42370c1f7640d6aa63582b0a Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Fri, 4 Sep 2026 17:22:39 -0400 Subject: [PATCH] The unasked council's clearing effect watches the turn It checked its own plain flag first and returned, so the turn was never read and never tracked; the effect ran once and slept. The turn is read first now, and the flag is reactive. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- packages/web/src/App.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte index 4a3bfd9..2a0b7d8 100644 --- a/packages/web/src/App.svelte +++ b/packages/web/src/App.svelte @@ -1397,7 +1397,7 @@ * not know to ask, and a minute's silence is how they leave. */ let counciled = false; /** The unasked advice is for that one turn: it leaves when the turn does. */ - let councilUnasked = false; + let councilUnasked = $state(false); $effect(() => { if (!view || !isYourTurn || prefs.coached || view.turn.round !== 1 || counciled || councilHints !== null) return; counciled = true; @@ -1405,8 +1405,12 @@ void askCouncil(); }); $effect(() => { - if (!councilUnasked || !view) return; - if (!isYourTurn || view.turn.round !== 1) { councilHints = null; councilUnasked = false; } + // Read the turn before anything else: an early return that never + // touches it would leave this effect with nothing to wake it. + const stillFirstTurn = isYourTurn && view?.turn.round === 1; + if (!councilUnasked || stillFirstTurn) return; + councilHints = null; + councilUnasked = false; }); /** Arrow keys and WASD walk on the board, as they do in the first-person