Fixed all seven playtest defects: nothing now sits under the status… #17

Merged
cmoriarty merged 4 commits from osf/189-ux-and-visual-review-21-tasks-from into main 2026-11-10 23:58:45 -05:00
Owner

What was done

  • Fixed all seven playtest defects: nothing now sits under the status bar or home indicator, the table no longer jumps when the bid panel appears, the turn indicator is fully visible at every seat, touch targets are at least 44 pt, the scoreboard fits a phone, the selected card's highlight follows its rounded corners, and the app launches dark with iOS splash images and a separate maskable icon.
  • Made the table readable: each seat shows its bid and tricks won with labels and a state (on target, needs more, over, or cannot reach), the running total of bids against the tricks available sits next to the round pill, trump is a labelled badge with a large suit glyph, and trump cards in the hand carry a gold corner tab.
  • Made tricks and rounds end visibly: a finished trick holds with the winning card lifted and a caption naming the winner, each seat's trick tally is countable pips, and every round ends with a per-player result panel (bid, tricks won, Hit or Scratch) that holds the next deal until it is dismissed.
  • Cut the taps: bidding is one chip per legal bid plus a single confirm button (the dealer's forbidden bid is greyed out), and playing a card is a button above the hand, tapping the card again, or dragging it onto the table, with an optional tap-once setting.
  • Rebuilt the look and the screens: seats take fixed positions around the felt with the player's seat as a slim bar above the hand, cards have distinct court-card art and a larger corner index (with an optional four-colour deck), fonts are self-hosted with one typographic voice, and the lobby, waiting room (bot picker as avatar chips, pinned Start, shareable room code), and winner screen (sorted places, Rematch) were reworked.
  • Added three room settings — game speed, four-colour deck, tap-once-to-play — where speed scales bot think time on the server so every player sees the same pacing, and bots now show short one-line speech bubbles at key moments that never delay play.
  • Unit tests were extended across the shared, server, and client packages and a new Playwright smoke test drives the built app through a full game against a seeded, zero-delay server; both lanes were run after implementation and after each fix round and pass, and a judge played the game end-to-end as a person would (create, ten rounds, end screen, rematch, plus bot, pacing, and disconnect games) and passed it.
  • Not done: bot strategies are unchanged (the note that Aggressive Archie always bids his whole hand sits outside the 21 tasks) and no CI workflow was added (the project is checked by its local tests, and CI is off for this run).

How to review

  1. Get the branch and install: git checkout osf/189-ux-and-visual-review-21-tasks-from && npm install.
  2. Run the unit tests: npm test — all Vitest lanes (shared rules, server, client) should pass.
  3. Run the browser smoke test: npx playwright test --config packages/client/e2e/playwright.config.ts — it builds the client, starts a seeded zero-delay server, and drives a full game through the app's test surface; it should pass (installs its browser on first run if needed).
  4. Play it: SCRATCH_SEED=7 npm run dev, open http://127.0.0.1:3000, create a game, fill the seats with bots, and start — you should see the bid chips, the labelled trump badge, the trick caption before each sweep, and the round-end panel holding the next deal.
  5. Read first: packages/client/src/components/Table.tsx and packages/client/src/styles.css — the stable table geometry, the round-end panel, and the seat layout live there.

Code review

Reviewed the run's code against the four delta specs (game-bots, game-lobby, game-pwa, game-table) and the base game-rules spec. Fixed four bugs: the end screen counted over-bid rounds as hits (the game scratches on over-bid as well as under-bid), a reload/reconnect in the game-over state left the player stuck on the table because the final round summary never opened, the service worker's precache omitted the manifest's icon.svg, and a non-creator saw 'Accept rematch' before the creator offered because bots auto-accept at game-over. Verified the two scenarios left untested on purpose (drag-to-table, vibrate) hold against the code, and that no generated artifacts are committed. All 254 tests and the typecheck pass.

Fixed before the commit

  • major, packages/client/src/components/EndScreen.tsx:42: roundStatsFor counted a bid as 'hit' when tricks won >= bid, but the game scratches on over-bid as well as under-bid (game-rules/Round scoring), so an over-bid round was shown as a hit and extended the best run. Fixed to won === bid and added an over-bid round to the per-player colour-line test.
  • major, packages/client/src/components/Table.tsx:602: On reload or reconnect in the game-over state the final round summary never opened: the state-diff effect needs a previous view and the event batch is null on rejoin, so App held the winner screen back forever and the player was stuck on the table. Added a mount-time effect that opens the final summary when the view is game-over with history.
  • minor, packages/client/public/sw.js:25: The service worker's SHELL precache list omitted /icons/icon.svg, which the manifest lists as an icon; the spec requires the precache to include every manifest icon. Added it and extended the precache test to assert every manifest icon src is in SHELL.
  • major, packages/client/src/components/EndScreen.tsx:112: offerExists was room.rematchAccepted.length > 0, but the server auto-accepts every bot at game-over, so in any room with a bot a non-creator saw 'Accept rematch' before the creator offered, violating game-table/Rematch label. Fixed to check the creator's id (added creatorId to RoomView and set it in the server's roomView) and added a bot-auto-accept regression test.

Tests

94 of 115 scenarios of ux-and-visual-review-21-tasks-from-deskt-4qt8qy have a tagged test. No test carries the spec: tag of these:

  • game-bots/A full table of bots plays to completion
  • game-bots/A game with one bot plays to completion
  • game-bots/All players see the same pacing
  • game-bots/Disconnected humans keep the safe fallback
  • game-table/Consistent card design
  • game-table/Deal animation
  • game-table/Dealer forbidden bid shown
  • game-table/No card clipped at the bottom
  • game-table/Play and trick sweep
  • game-table/Rematch offered
  • game-table/Scratch effect
  • game-table/Sole winner shown
  • and 2 more

Left untested on purpose:

  • game-table/Drag to table plays: The drop handler maps dnd-kit's drop event (over = the table's centre zone) to the same onPlay the play-button and tap tests already exercise (they assert the card is played); its only logic is 'drop on the table zone + legal card -> onPlay', a direct mapping of the drop event, so a dedicated test would restate it, and the drag detection itself is dnd-kit's behaviour.
  • game-table/Vibrate where supported: navigator.vibrate is a device haptic side effect; asserting that it fires would require a mock-only assertion (banned), and the guard ('vibrate' in navigator) is a trivial environment check. On a device without vibrate the pulse is the fallback cue, and that is covered by the game-table/Pulse on turn test.

The test lint found, in the run's tests on the last check:

Recorded, not decided

  • packages/client/src/pwa.test.ts:108 B11 in declares viewport-fit=cover in the viewport meta: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/pwa.test.ts:131 B11 in requests a black-translucent status bar for standalone: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/pwa.test.ts:174 B11 in sizes the app to the dynamic viewport height with a 100vh fallback: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/styles.test.ts:81 B11 in uses the full screen width and wraps to two rows only if a single row cannot: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/styles.test.ts:101 B11 in opens a larger gap between suits than within a suit: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/styles.test.ts:125 B11 in styles the bottom strip as the table rail: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/styles.test.ts:154 B11 in loads no third-party font service: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/client/src/styles.test.ts:161 B11 in uses tabular numerals for the scores: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect
  • packages/server/src/seed.test.ts:107 B6 in deals identical round 1 and round 2 for the same seed, differently for another: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/shared/src/settings.test.ts:32 B6 in keeps the provided fields and defaults only the missing ones: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/shared/src/settings.test.ts:40 B6 in rejects unknown values field by field instead of passing them through: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/shared/src/settings.test.ts:56 B6 in gives the same sequence for the same seed and a different one for another: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top

Braid run

  • Workflow: Braid's OpenSpec flow, change ux-and-visual-review-21-tasks-from-deskt-4qt8qy (37 steps, 1 retried)
  • Issue: cmoriarty/scratch-vllm-fp8#16
  • Model: vLLM · qwen3.8-27b
  • Time: 10 h 59 m from start to this pull request, 10 h 56 m of it in the model
  • Tokens: 225.3M input, 530k output, 1.9M reasoning, over 2,147 model calls
  • Pre-flight estimate: fits-flagged, p50 1.1M / p80 1.6M tokens against a 224k-token step allowance
  • CI: no CI ran on the checked code: the project has no CI (no workflow under .forgejo/workflows, .gitea/workflows or .github/workflows); what only CI tests went unverified
  • Run: run_01M739SHHJF7V8J6XYCJ4QT8QY

Opened by Braid.

## What was done - Fixed all seven playtest defects: nothing now sits under the status bar or home indicator, the table no longer jumps when the bid panel appears, the turn indicator is fully visible at every seat, touch targets are at least 44 pt, the scoreboard fits a phone, the selected card's highlight follows its rounded corners, and the app launches dark with iOS splash images and a separate maskable icon. - Made the table readable: each seat shows its bid and tricks won with labels and a state (on target, needs more, over, or cannot reach), the running total of bids against the tricks available sits next to the round pill, trump is a labelled badge with a large suit glyph, and trump cards in the hand carry a gold corner tab. - Made tricks and rounds end visibly: a finished trick holds with the winning card lifted and a caption naming the winner, each seat's trick tally is countable pips, and every round ends with a per-player result panel (bid, tricks won, Hit or Scratch) that holds the next deal until it is dismissed. - Cut the taps: bidding is one chip per legal bid plus a single confirm button (the dealer's forbidden bid is greyed out), and playing a card is a button above the hand, tapping the card again, or dragging it onto the table, with an optional tap-once setting. - Rebuilt the look and the screens: seats take fixed positions around the felt with the player's seat as a slim bar above the hand, cards have distinct court-card art and a larger corner index (with an optional four-colour deck), fonts are self-hosted with one typographic voice, and the lobby, waiting room (bot picker as avatar chips, pinned Start, shareable room code), and winner screen (sorted places, Rematch) were reworked. - Added three room settings — game speed, four-colour deck, tap-once-to-play — where speed scales bot think time on the server so every player sees the same pacing, and bots now show short one-line speech bubbles at key moments that never delay play. - Unit tests were extended across the shared, server, and client packages and a new Playwright smoke test drives the built app through a full game against a seeded, zero-delay server; both lanes were run after implementation and after each fix round and pass, and a judge played the game end-to-end as a person would (create, ten rounds, end screen, rematch, plus bot, pacing, and disconnect games) and passed it. - **Not done:** bot strategies are unchanged (the note that Aggressive Archie always bids his whole hand sits outside the 21 tasks) and no CI workflow was added (the project is checked by its local tests, and CI is off for this run). ## How to review 1. Get the branch and install: `git checkout osf/189-ux-and-visual-review-21-tasks-from && npm install`. 2. Run the unit tests: `npm test` — all Vitest lanes (shared rules, server, client) should pass. 3. Run the browser smoke test: `npx playwright test --config packages/client/e2e/playwright.config.ts` — it builds the client, starts a seeded zero-delay server, and drives a full game through the app's test surface; it should pass (installs its browser on first run if needed). 4. Play it: `SCRATCH_SEED=7 npm run dev`, open http://127.0.0.1:3000, create a game, fill the seats with bots, and start — you should see the bid chips, the labelled trump badge, the trick caption before each sweep, and the round-end panel holding the next deal. 5. Read first: `packages/client/src/components/Table.tsx` and `packages/client/src/styles.css` — the stable table geometry, the round-end panel, and the seat layout live there. ## Code review Reviewed the run's code against the four delta specs (game-bots, game-lobby, game-pwa, game-table) and the base game-rules spec. Fixed four bugs: the end screen counted over-bid rounds as hits (the game scratches on over-bid as well as under-bid), a reload/reconnect in the game-over state left the player stuck on the table because the final round summary never opened, the service worker's precache omitted the manifest's icon.svg, and a non-creator saw 'Accept rematch' before the creator offered because bots auto-accept at game-over. Verified the two scenarios left untested on purpose (drag-to-table, vibrate) hold against the code, and that no generated artifacts are committed. All 254 tests and the typecheck pass. **Fixed before the commit** - major, `packages/client/src/components/EndScreen.tsx:42`: roundStatsFor counted a bid as 'hit' when tricks won >= bid, but the game scratches on over-bid as well as under-bid (game-rules/Round scoring), so an over-bid round was shown as a hit and extended the best run. Fixed to won === bid and added an over-bid round to the per-player colour-line test. - major, `packages/client/src/components/Table.tsx:602`: On reload or reconnect in the game-over state the final round summary never opened: the state-diff effect needs a previous view and the event batch is null on rejoin, so App held the winner screen back forever and the player was stuck on the table. Added a mount-time effect that opens the final summary when the view is game-over with history. - minor, `packages/client/public/sw.js:25`: The service worker's SHELL precache list omitted /icons/icon.svg, which the manifest lists as an icon; the spec requires the precache to include every manifest icon. Added it and extended the precache test to assert every manifest icon src is in SHELL. - major, `packages/client/src/components/EndScreen.tsx:112`: offerExists was room.rematchAccepted.length > 0, but the server auto-accepts every bot at game-over, so in any room with a bot a non-creator saw 'Accept rematch' before the creator offered, violating game-table/Rematch label. Fixed to check the creator's id (added creatorId to RoomView and set it in the server's roomView) and added a bot-auto-accept regression test. ## Tests 94 of 115 scenarios of `ux-and-visual-review-21-tasks-from-deskt-4qt8qy` have a tagged test. No test carries the `spec:` tag of these: - `game-bots/A full table of bots plays to completion` - `game-bots/A game with one bot plays to completion` - `game-bots/All players see the same pacing` - `game-bots/Disconnected humans keep the safe fallback` - `game-table/Consistent card design` - `game-table/Deal animation` - `game-table/Dealer forbidden bid shown` - `game-table/No card clipped at the bottom` - `game-table/Play and trick sweep` - `game-table/Rematch offered` - `game-table/Scratch effect` - `game-table/Sole winner shown` - and 2 more Left untested on purpose: - `game-table/Drag to table plays`: The drop handler maps dnd-kit's drop event (over = the table's centre zone) to the same onPlay the play-button and tap tests already exercise (they assert the card is played); its only logic is 'drop on the table zone + legal card -> onPlay', a direct mapping of the drop event, so a dedicated test would restate it, and the drag detection itself is dnd-kit's behaviour. - `game-table/Vibrate where supported`: navigator.vibrate is a device haptic side effect; asserting that it fires would require a mock-only assertion (banned), and the guard ('vibrate' in navigator) is a trivial environment check. On a device without vibrate the pulse is the fallback cue, and that is covered by the game-table/Pulse on turn test. The test lint found, in the run's tests on the last check: **Recorded, not decided** - `packages/client/src/pwa.test.ts:108` B11 in `declares viewport-fit=cover in the viewport meta`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/pwa.test.ts:131` B11 in `requests a black-translucent status bar for standalone`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/pwa.test.ts:174` B11 in `sizes the app to the dynamic viewport height with a 100vh fallback`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/styles.test.ts:81` B11 in `uses the full screen width and wraps to two rows only if a single row cannot`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/styles.test.ts:101` B11 in `opens a larger gap between suits than within a suit`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/styles.test.ts:125` B11 in `styles the bottom strip as the table rail`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/styles.test.ts:154` B11 in `loads no third-party font service`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/client/src/styles.test.ts:161` B11 in `uses tabular numerals for the scores`: every assertion is on the text of a file the test reads; it passes whether or not that text takes effect - `packages/server/src/seed.test.ts:107` B6 in `deals identical round 1 and round 2 for the same seed, differently for another`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/shared/src/settings.test.ts:32` B6 in `keeps the provided fields and defaults only the missing ones`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/shared/src/settings.test.ts:40` B6 in `rejects unknown values field by field instead of passing them through`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/shared/src/settings.test.ts:56` B6 in `gives the same sequence for the same seed and a different one for another`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top ## Braid run - **Workflow:** Braid's OpenSpec flow, change `ux-and-visual-review-21-tasks-from-deskt-4qt8qy` (37 steps, 1 retried) - **Issue:** cmoriarty/scratch-vllm-fp8#16 - **Model:** vLLM · qwen3.8-27b - **Time:** 10 h 59 m from start to this pull request, 10 h 56 m of it in the model - **Tokens:** 225.3M input, 530k output, 1.9M reasoning, over 2,147 model calls - **Pre-flight estimate:** fits-flagged, p50 1.1M / p80 1.6M tokens against a 224k-token step allowance - **CI:** no CI ran on the checked code: the project has no CI (no workflow under `.forgejo/workflows`, `.gitea/workflows` or `.github/workflows`); what only CI tests went unverified - **Run:** [run_01M739SHHJF7V8J6XYCJ4QT8QY](http://openspecflow.internal.underthere.xyz/run/run_01M739SHHJF7V8J6XYCJ4QT8QY) _Opened by Braid._
cmoriarty deleted branch osf/189-ux-and-visual-review-21-tasks-from 2026-11-10 23:58:45 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/scratch-vllm-fp8!17
No description provided.