v0.5.6 — seats counted from 1, a name you can read, and a line that stops repeating

Three things off the first proper look at a live table.

The lobby listed chairs as Seat 0 to Seat 3. Zero-based is right inside —
it indexes seating, the seats array and every route, and none of that
changes — but nobody sitting at a table calls their chair "seat 0". There
were four of these rather than one: the lobby list, the topline's Seat N
for a remote session, the presence banner's fallback name, and the admin
summary's. All go through a single seatLabel now, and a test fails the
build if any "Seat ${...}" interpolates a raw seat again, since the
conversion has to happen in exactly one place or the two conventions drift
apart. Verified by mutation — putting the raw seat back fails the suite.

seatLabel lives in sim/view.ts, not web/game.ts. Putting it in game.ts was
the first attempt and test/session.test.ts caught it: the page may not
import values from that module, because they are the local engine by
another name and importing one reopens the Phase 1 boundary. The test was
right and the placement was wrong.

.bs-name.bs-turn carried font-weight:700 over a base of 600. At 11px a
monospace face has to be synthesised the rest of the way and the extra ink
lands as blur, so the one name you most need to read was the one you could
not. The bump is gone; amber against #e6e9ee was always doing the work, and
blue "(you)" and amber "their move" stay clearly distinct without it.

The west-to-east chain under the Division map now shows only during Day 1
Stage 1. It answers who is where and why, which is a question you have once
— at the start, when the chain has just been rolled and the names are new.
By Stage 2 the map has been answering it for a while and the line is
something to read past.

675 tests pass (673 + 2).
This commit is contained in:
Jesse
2026-08-21 20:53:17 -04:00
parent bfd2708ecc
commit 51710498f5
8 changed files with 106 additions and 10 deletions
+16
View File
@@ -275,6 +275,22 @@ export type RunningCardView = {
trains: TrainChip[];
};
/**
* A seat as a PERSON counts them, from 1.
*
* Seats are zero-based everywhere inside — `PlayerIndex`, `seating`, the seats array, every route
* — and that must not change, since it is what indexes into all of them. But nobody sitting down
* at a table calls their chair "seat 0", so the number on screen is the one they would say out
* loud. Every user-facing seat goes through here, so the two conventions cannot drift apart.
*
* It lives here rather than in `web/game.ts` because the page may not import values from that
* module — they are the local engine by another name, and `test/session.test.ts` fails the build
* for it. This is presentation, which is what `view.ts` is for.
*/
export function seatLabel(seat: number): number {
return seat + 1;
}
export type DivisionView = {
kind: string;
label: string;