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