The unasked council leaves with the turn

Advice offered on a first turn stayed on the sidebar until dismissed,
as advice a player asked for should. Offered advice now clears when
the turn passes; asking again keeps it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-04 16:00:09 -04:00
co-authored by Claude Fable 5.1
parent 2d98393010
commit b92016db51
+8
View File
@@ -1312,6 +1312,7 @@
let councilHints = $state<import("./hints").TableHint[] | null>(null);
async function askCouncil() {
if (!view) return;
if (councilHints !== null) councilUnasked = false; // asked again: theirs to keep
const { tableHints } = await import("./hints");
councilHints = tableHints(view);
}
@@ -1383,11 +1384,18 @@
/** On a first turn the council speaks unasked, once — a newcomer will
* 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;
$effect(() => {
if (!view || !isYourTurn || prefs.coached || view.turn.round !== 1 || counciled || councilHints !== null) return;
counciled = true;
councilUnasked = true;
void askCouncil();
});
$effect(() => {
if (!councilUnasked || !view) return;
if (!isYourTurn || view.turn.round !== 1) { councilHints = null; councilUnasked = false; }
});
/** Arrow keys and WASD walk on the board, as they do in the first-person
* pane — that pane takes the keys itself while it is up. */