From f5151a0c9912fa211a8fc85d4c8790c5fbff0a93 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Sun, 23 Aug 2026 21:01:25 -0400 Subject: [PATCH] Turn zero's eyes belong to the first player, even in the whole tale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eric caught the whole-game reel opening in the wrong head: turn zero's turnStarted fires in the deal, before any step, so the boundary scan found nothing and fell back to the share's pov prop — the WINNER, whose eyes then watched the first player's whole turn from across the maze. When no boundary precedes the current step, the owner is now read from the reel's first turnEnded, which turn zero always contains. Co-Authored-By: Claude Fable 5 --- packages/web/src/Replay.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/web/src/Replay.svelte b/packages/web/src/Replay.svelte index 74ab34e..c0234f0 100644 --- a/packages/web/src/Replay.svelte +++ b/packages/web/src/Replay.svelte @@ -68,6 +68,15 @@ } } } + // No boundary yet: these are the FIRST turn's steps, whose opening + // turnStarted fired in the deal before any command. Its owner is + // whoever the reel's first turnEnded names. + for (const st of steps) { + for (const e of st.events) { + if (e.type === "turnEnded" && "player" in e) return (e as { player: string }).player; + if (e.type === "turnStarted" || e.type === "extraTurnStarted") break; + } + } return pov ?? steps[0]!.view.you; }); const step = $derived(steps[Math.min(idx, steps.length - 1)]!);