Re-designed the New Game pane so its three settings are visual… #9

Merged
cmoriarty merged 4 commits from osf/177-re-design-new-game-pane into main 2026-11-06 19:58:40 -05:00
Owner

What was done

  • Re-designed the New Game pane so its three settings are visual controls instead of prose-labeled radio buttons and a checkbox — round schedule and first lead became segmented two-button controls and dealer restriction became a toggle switch (CreateRoom.tsx).
  • Each option is now labeled with its name only (Down, Down-and-Up, Left of dealer, Highest bidder), and the per-option rule sentences were removed because the How to play help screen already documents all three rules.
  • The settings, their defaults (Down, dealer restriction off, first lead left of dealer), and the create-a-room flow are unchanged — a presentation-only change with no server, protocol, or settings-model changes.
  • The re-design is limited to the New Game pane; the landing page, waiting room, and open-games list are untouched.
  • Added client tests asserting the new control markup, the stable option-name text, the defaults-selected case, and that the rule prose is gone (game-lobby.test.tsx).
  • The unit suite (npm test) passed, and a judge opened the app served and confirmed the pane is clean with the correct defaults and that a full scripted game ran end to end with no console errors.

How to review

  1. Check out the branch: git checkout osf/177-re-design-new-game-pane.
  2. Run the client tests: npm test — the new "new game settings pane" cases should pass alongside the existing suite.
  3. Start the app: npm start — when it prints Scratch server listening on http://127.0.0.1:3000, open that URL.
  4. Open the New Game pane (enter a display name, pick an avatar, choose Create game) — you should see round schedule and first lead as segmented two-button controls and dealer restriction as a toggle switch, with Down / Left of dealer / restriction off selected and no rule prose under any option.
  5. Read the pane first: packages/client/src/components/CreateRoom.tsx, then its styling in packages/client/src/styles.css.

Code review

Reviewed the New Game pane re-design: CreateRoom.tsx now renders the round schedule and first lead as segmented two-button radiogroups and the dealer restriction as a checkbox-based toggle switch, all matching the spec (name-only labels, no rule prose, defaults Down/off/left-of-dealer, same onCreate flow) and mirroring the existing avatar-picker pattern. The new tests in game-lobby.test.tsx assert the control markup, the stable option names, the defaults-selected case, and the absence of the old prose, and the CSS gives the controls distinct selected/unselected states using the app's existing variables. One fix: the change orphaned the .radio-row/.check-row/.radio-group CSS rules (their only use was the old markup), so I removed them from styles.css; the touched test file and typecheck pass.

Fixed before the commit

  • minor, packages/client/src/styles.css:127: The .radio-row, .check-row and .radio-group rules were orphaned dead CSS: their only usage was the old radio/checkbox markup this change removed from CreateRoom.tsx. Removed the three rules.

Tests

All 3 scenarios of re-design-new-game-pane-the-new-game-pan-2rc480 have a tagged test.

The test lint recorded nothing in the run's tests.

Braid run

  • Workflow: Braid's OpenSpec flow, change re-design-new-game-pane-the-new-game-pan-2rc480 (29 steps)
  • Issue: cmoriarty/scratch-vllm-fp8#8
  • Model: vLLM · qwen3.8-27b
  • Time: 53 m from start to this pull request, 1 h 0 m of it in the model
  • Tokens: 10.9M input, 46k output, 125k reasoning, over 218 model calls
  • Pre-flight estimate: fits, p50 57k / p80 87k tokens against a 240k-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_01M6SN4YJ9ERR1CQK8PN2RC480

Opened by Braid.

## What was done - Re-designed the New Game pane so its three settings are visual controls instead of prose-labeled radio buttons and a checkbox — round schedule and first lead became segmented two-button controls and dealer restriction became a toggle switch (`CreateRoom.tsx`). - Each option is now labeled with its name only (Down, Down-and-Up, Left of dealer, Highest bidder), and the per-option rule sentences were removed because the How to play help screen already documents all three rules. - The settings, their defaults (Down, dealer restriction off, first lead left of dealer), and the create-a-room flow are unchanged — a presentation-only change with no server, protocol, or settings-model changes. - The re-design is limited to the New Game pane; the landing page, waiting room, and open-games list are untouched. - Added client tests asserting the new control markup, the stable option-name text, the defaults-selected case, and that the rule prose is gone (`game-lobby.test.tsx`). - The unit suite (`npm test`) passed, and a judge opened the app served and confirmed the pane is clean with the correct defaults and that a full scripted game ran end to end with no console errors. ## How to review 1. Check out the branch: `git checkout osf/177-re-design-new-game-pane`. 2. Run the client tests: `npm test` — the new "new game settings pane" cases should pass alongside the existing suite. 3. Start the app: `npm start` — when it prints `Scratch server listening on http://127.0.0.1:3000`, open that URL. 4. Open the New Game pane (enter a display name, pick an avatar, choose **Create game**) — you should see round schedule and first lead as segmented two-button controls and dealer restriction as a toggle switch, with Down / Left of dealer / restriction off selected and no rule prose under any option. 5. Read the pane first: `packages/client/src/components/CreateRoom.tsx`, then its styling in `packages/client/src/styles.css`. ## Code review Reviewed the New Game pane re-design: CreateRoom.tsx now renders the round schedule and first lead as segmented two-button radiogroups and the dealer restriction as a checkbox-based toggle switch, all matching the spec (name-only labels, no rule prose, defaults Down/off/left-of-dealer, same onCreate flow) and mirroring the existing avatar-picker pattern. The new tests in game-lobby.test.tsx assert the control markup, the stable option names, the defaults-selected case, and the absence of the old prose, and the CSS gives the controls distinct selected/unselected states using the app's existing variables. One fix: the change orphaned the .radio-row/.check-row/.radio-group CSS rules (their only use was the old markup), so I removed them from styles.css; the touched test file and typecheck pass. **Fixed before the commit** - minor, `packages/client/src/styles.css:127`: The .radio-row, .check-row and .radio-group rules were orphaned dead CSS: their only usage was the old radio/checkbox markup this change removed from CreateRoom.tsx. Removed the three rules. ## Tests All 3 scenarios of `re-design-new-game-pane-the-new-game-pan-2rc480` have a tagged test. The test lint recorded nothing in the run's tests. ## Braid run - **Workflow:** Braid's OpenSpec flow, change `re-design-new-game-pane-the-new-game-pan-2rc480` (29 steps) - **Issue:** cmoriarty/scratch-vllm-fp8#8 - **Model:** vLLM · qwen3.8-27b - **Time:** 53 m from start to this pull request, 1 h 0 m of it in the model - **Tokens:** 10.9M input, 46k output, 125k reasoning, over 218 model calls - **Pre-flight estimate:** fits, p50 57k / p80 87k tokens against a 240k-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_01M6SN4YJ9ERR1CQK8PN2RC480](http://openspecflow.internal.underthere.xyz/run/run_01M6SN4YJ9ERR1CQK8PN2RC480) _Opened by Braid._
cmoriarty deleted branch osf/177-re-design-new-game-pane 2026-11-06 19:58:40 -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!9
No description provided.