The app now respects phone safe areas and launches without a white… #2

Merged
cmoriarty merged 4 commits from osf/192-ux-and-visual-review-21-tasks-from into main 2026-11-11 08:30:06 -05:00
Owner

What was done

  • The app now respects phone safe areas and launches without a white flash: a dark background is painted before load, splash images and a separate maskable icon are added, and no interactive element sits under the home indicator or the status bar.
  • The table keeps a fixed size for the whole round — the bid control renders as an overlay in the table's empty centre while bidding and the hand's height no longer depends on how many cards remain — and opponents now sit around the felt at fixed positions by player count, each card flying in from its owner's side, with my seat as a slim bar directly above the hand.
  • Every key moment is now explained: seats show a labelled bid and tricks-won figure with a per-seat status that is never conveyed by colour alone, a total of all bids against the tricks available sits beside the round pill, trump is a labelled badge with gold corner tabs on trump cards in the hand, each trick ends with the winning card lifted and a caption naming the winner, and each round ends with a summary panel over the table before the next deal.
  • Bidding is now one chip per legal bid with a single confirm button that stays disabled until a chip is chosen, and playing a card is explained — a play button appears above the hand while a card is selected, tapping elsewhere deselects, a card can be dragged onto the table, and an optional tap-once setting is stored per device.
  • Cards gain character (larger corner index, distinct court-card art, proper pip layouts, a paper texture, a designed back, and an optional four-colour deck), the fonts are self-hosted with the script logo kept for the logo only, the winner screen sorts by rank with numbered places and a crowned winner, and the waiting room now shows bots as a horizontal row of avatar chips with a pinned start button and a copy/share control beside the room code.
  • A game speed setting (Relaxed, Normal, Fast) chosen when the room is created scales bot think time and animation length for everyone at the table, bots get short speech bubbles at key moments, my seat and hand pulse when it becomes my turn with a vibration where supported, and the aggressive bot's bid is capped so the total of all bids stops always exceeding the tricks available.
  • The unit suite and the browser smoke test both pass, and a judge opened the served app in a real browser, played two complete games on desktop and phone, and confirmed every new moment and the overall look.
  • Not done: Four missing spec tags in two test files were left as recorded, non-blocking lint findings rather than fixed, and the red "that card is not in your hand" toast seen in one judge screenshot was the judge's own driver issuing an invalid play, not an app defect, so no code change was made for it.

How to review

  1. Check out the work branch osf/192-ux-and-visual-review-21-tasks-from.
  2. Install dependencies with npm install.
  3. Run the unit suite with npm test — it should pass.
  4. Run the browser smoke test with npx playwright test (it builds the client and starts a seeded server itself) — it should pass.
  5. Start the app with npm start, open http://127.0.0.1:3000, and play a game against the bots to see the seats around the felt, the round summary, and the winner screen.
  6. Read packages/client/src/components/Table.tsx and packages/client/src/styles.css first — they hold the table layout, the trick and round moments, and the safe-area and speed rules.

Code review

Reviewed the full diff of the 21-task UX/visual change against its four delta specs (game-bots, game-lobby, game-table, pwa) and the proposal/design/tasks. Verified the implementations: server-side speed scaling and SCRATCH_SEED, the aggressive bot's capped-but-legal bid, the installable manifest with a distinct maskable icon, dark pre-paint shell with splash images, safe-area layout, 44px touch targets, reduced-motion fallbacks, and self-hosted WOFF2 faces; confirmed the one left-untested scenario (bidding must not move the table) is genuinely covered by the e2e smoke's bounding-box comparison plus the markup test; confirmed each changed test file still asserts what it asserted before. Fixed three minor findings: removed the bid-stepping helper nextLegalBid and its dedicated test file, orphaned when the split-flap stepper was replaced by bid chips; added the 'no external font link remains' assertion that task 6.1 asks for in game-lobby.test.tsx; and updated the README's stale client-tests line. Left one pre-existing minor finding (unused lowestLegalCard) untouched as it predates the change.

Left for you

  • minor, packages/client/src/moves.ts:53: lowestLegalCard is exported but referenced nowhere in production or tests (its comment says it labels hints). It predates this change — it is present in HEAD and untouched by the diff — so it was left as-is rather than refactored here; noted for a future cleanup.

Fixed before the commit

  • minor, packages/client/src/moves.ts:45: nextLegalBid was dead after this change: its only production user, the split-flap bid stepper in BidPanel.tsx, was replaced by the chip-based panel, leaving the helper referenced only by moves.test.ts (whose header still described the removed 'split-flap bid counter'). Removed the function and deleted the test file; the remaining moves.ts exports are all used by BidPanel, Hand, and App.
  • minor, packages/client/src/game-lobby.test.tsx:159: Task 6.1 asks game-lobby.test.tsx to assert 'no external font link remains', but the self-hosted typography block only checked the @font-face files and the logo, leaving the index.html half of the task untested (the e2e font check covers it in a browser, but the unit-level assertion the task names was missing). Added a test reading index.html and asserting it contains no fonts.googleapis.com or fonts.gstatic.com reference.
  • minor, README.md:183: The Tests section, which this change extended with a Playwright paragraph, still described the client unit tests as only 'the Web Audio sound module' although the suite now also covers sound, hand sorting, lobby and table markup, and the PWA artifacts. Updated the line to match the actual client test files.

Tests

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

  • game-bots/Reactions never delay play
  • game-lobby/Bots as chips
  • game-lobby/Room at a glance
  • game-table/Compact seats on a phone
  • game-table/Deal animation
  • game-table/Final round to winner
  • game-table/Legible on a phone
  • game-table/Neighbours stay readable
  • game-table/Never blocks long
  • game-table/No card clipped at the bottom
  • game-table/Play and trick sweep
  • game-table/Portrait play
  • and 6 more

Left untested on purpose:

  • game-table/Bidding does not move the table: Covered by the e2e smoke test (task 7.1), which compares table, round pill and trump card bounding boxes across bid turns, and by the markup test asserting the bid panel sits inside .table-center with a fixed hand-area min-height.

The e2e lane took 122 s, past its target of about a minute.

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

Recorded, not decided

  • packages/client/src/game-table.test.tsx:1812 B6 in renders the felt behind the panel and the confetti celebration: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/server/src/session.test.ts:850 B6 in deals identical first hands to two servers started with the same seed: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/server/src/session.test.ts:866 B6 in deals different first hands when the seeds differ: test has no // spec: <capability>/<scenario> tag, on itself, its describe or its file's top
  • packages/server/src/session.test.ts:880 B6 in falls back to the SCRATCH_SEED env var when no seed option is given: 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-c51d6z (43 steps, 1 retried)
  • Issue: braid-testing/scratch-parallel-190#1
  • Model: vLLM · qwen3.8-27b
  • Time: 6 h 43 m from start to this pull request, 7 h 20 m of it in the model
  • Tokens: 158.9M input, 413k output, 1.1M reasoning, over 1,639 model calls
  • Pre-flight estimate: fits, p50 646k / p80 1.0M 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_01M74NQPP7FZJQGQZ00JC51D6Z

Opened by Braid.

## What was done - The app now respects phone safe areas and launches without a white flash: a dark background is painted before load, splash images and a separate maskable icon are added, and no interactive element sits under the home indicator or the status bar. - The table keeps a fixed size for the whole round — the bid control renders as an overlay in the table's empty centre while bidding and the hand's height no longer depends on how many cards remain — and opponents now sit around the felt at fixed positions by player count, each card flying in from its owner's side, with my seat as a slim bar directly above the hand. - Every key moment is now explained: seats show a labelled bid and tricks-won figure with a per-seat status that is never conveyed by colour alone, a total of all bids against the tricks available sits beside the round pill, trump is a labelled badge with gold corner tabs on trump cards in the hand, each trick ends with the winning card lifted and a caption naming the winner, and each round ends with a summary panel over the table before the next deal. - Bidding is now one chip per legal bid with a single confirm button that stays disabled until a chip is chosen, and playing a card is explained — a play button appears above the hand while a card is selected, tapping elsewhere deselects, a card can be dragged onto the table, and an optional tap-once setting is stored per device. - Cards gain character (larger corner index, distinct court-card art, proper pip layouts, a paper texture, a designed back, and an optional four-colour deck), the fonts are self-hosted with the script logo kept for the logo only, the winner screen sorts by rank with numbered places and a crowned winner, and the waiting room now shows bots as a horizontal row of avatar chips with a pinned start button and a copy/share control beside the room code. - A game speed setting (Relaxed, Normal, Fast) chosen when the room is created scales bot think time and animation length for everyone at the table, bots get short speech bubbles at key moments, my seat and hand pulse when it becomes my turn with a vibration where supported, and the aggressive bot's bid is capped so the total of all bids stops always exceeding the tricks available. - The unit suite and the browser smoke test both pass, and a judge opened the served app in a real browser, played two complete games on desktop and phone, and confirmed every new moment and the overall look. - **Not done:** Four missing spec tags in two test files were left as recorded, non-blocking lint findings rather than fixed, and the red "that card is not in your hand" toast seen in one judge screenshot was the judge's own driver issuing an invalid play, not an app defect, so no code change was made for it. ## How to review 1. Check out the work branch `osf/192-ux-and-visual-review-21-tasks-from`. 2. Install dependencies with `npm install`. 3. Run the unit suite with `npm test` — it should pass. 4. Run the browser smoke test with `npx playwright test` (it builds the client and starts a seeded server itself) — it should pass. 5. Start the app with `npm start`, open http://127.0.0.1:3000, and play a game against the bots to see the seats around the felt, the round summary, and the winner screen. 6. Read `packages/client/src/components/Table.tsx` and `packages/client/src/styles.css` first — they hold the table layout, the trick and round moments, and the safe-area and speed rules. ## Code review Reviewed the full diff of the 21-task UX/visual change against its four delta specs (game-bots, game-lobby, game-table, pwa) and the proposal/design/tasks. Verified the implementations: server-side speed scaling and SCRATCH_SEED, the aggressive bot's capped-but-legal bid, the installable manifest with a distinct maskable icon, dark pre-paint shell with splash images, safe-area layout, 44px touch targets, reduced-motion fallbacks, and self-hosted WOFF2 faces; confirmed the one left-untested scenario (bidding must not move the table) is genuinely covered by the e2e smoke's bounding-box comparison plus the markup test; confirmed each changed test file still asserts what it asserted before. Fixed three minor findings: removed the bid-stepping helper nextLegalBid and its dedicated test file, orphaned when the split-flap stepper was replaced by bid chips; added the 'no external font link remains' assertion that task 6.1 asks for in game-lobby.test.tsx; and updated the README's stale client-tests line. Left one pre-existing minor finding (unused lowestLegalCard) untouched as it predates the change. **Left for you** - minor, `packages/client/src/moves.ts:53`: lowestLegalCard is exported but referenced nowhere in production or tests (its comment says it labels hints). It predates this change — it is present in HEAD and untouched by the diff — so it was left as-is rather than refactored here; noted for a future cleanup. **Fixed before the commit** - minor, `packages/client/src/moves.ts:45`: nextLegalBid was dead after this change: its only production user, the split-flap bid stepper in BidPanel.tsx, was replaced by the chip-based panel, leaving the helper referenced only by moves.test.ts (whose header still described the removed 'split-flap bid counter'). Removed the function and deleted the test file; the remaining moves.ts exports are all used by BidPanel, Hand, and App. - minor, `packages/client/src/game-lobby.test.tsx:159`: Task 6.1 asks game-lobby.test.tsx to assert 'no external font link remains', but the self-hosted typography block only checked the @font-face files and the logo, leaving the index.html half of the task untested (the e2e font check covers it in a browser, but the unit-level assertion the task names was missing). Added a test reading index.html and asserting it contains no fonts.googleapis.com or fonts.gstatic.com reference. - minor, `README.md:183`: The Tests section, which this change extended with a Playwright paragraph, still described the client unit tests as only 'the Web Audio sound module' although the suite now also covers sound, hand sorting, lobby and table markup, and the PWA artifacts. Updated the line to match the actual client test files. ## Tests 96 of 115 scenarios of `ux-and-visual-review-21-tasks-from-deskt-c51d6z` have a tagged test. No test carries the `spec:` tag of these: - `game-bots/Reactions never delay play` - `game-lobby/Bots as chips` - `game-lobby/Room at a glance` - `game-table/Compact seats on a phone` - `game-table/Deal animation` - `game-table/Final round to winner` - `game-table/Legible on a phone` - `game-table/Neighbours stay readable` - `game-table/Never blocks long` - `game-table/No card clipped at the bottom` - `game-table/Play and trick sweep` - `game-table/Portrait play` - and 6 more Left untested on purpose: - `game-table/Bidding does not move the table`: Covered by the e2e smoke test (task 7.1), which compares table, round pill and trump card bounding boxes across bid turns, and by the markup test asserting the bid panel sits inside .table-center with a fixed hand-area min-height. The `e2e` lane took 122 s, past its target of about a minute. The test lint found, in the run's tests on the last check: **Recorded, not decided** - `packages/client/src/game-table.test.tsx:1812` B6 in `renders the felt behind the panel and the confetti celebration`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/server/src/session.test.ts:850` B6 in `deals identical first hands to two servers started with the same seed`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/server/src/session.test.ts:866` B6 in `deals different first hands when the seeds differ`: test has no `// spec: <capability>/<scenario>` tag, on itself, its describe or its file's top - `packages/server/src/session.test.ts:880` B6 in `falls back to the SCRATCH_SEED env var when no seed option is given`: 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-c51d6z` (43 steps, 1 retried) - **Issue:** braid-testing/scratch-parallel-190#1 - **Model:** vLLM · qwen3.8-27b - **Time:** 6 h 43 m from start to this pull request, 7 h 20 m of it in the model - **Tokens:** 158.9M input, 413k output, 1.1M reasoning, over 1,639 model calls - **Pre-flight estimate:** fits, p50 646k / p80 1.0M 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_01M74NQPP7FZJQGQZ00JC51D6Z](http://openspecflow.internal.underthere.xyz/run/run_01M74NQPP7FZJQGQZ00JC51D6Z) _Opened by Braid._
cmoriarty deleted branch osf/192-ux-and-visual-review-21-tasks-from 2026-11-11 08:30:06 -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
braid-testing/scratch-parallel-190!2
No description provided.