Skip to content

rummy: dealer's-choice tables (MoonBase#1609) - #388

Merged
aaylward merged 9 commits into
mainfrom
claude/rummy-dealers-choice
Sep 29, 2026
Merged

aaylward merged 9 commits into
mainfrom
claude/rummy-dealers-choice

Conversation

@aaylward

Copy link
Copy Markdown
Contributor

UI for MoonBase#1609 (muchq/MoonBase#1612). Needs that deployed first.

  • Start: "Start table" seats the table; before the first deal a seat is just a name.
  • Dealing: the dealer gets a button per variant offered ("Deal Basic rummy"); others see "Waiting for X to deal." A dealer the room shows away lets anyone deal. A deal asked for is disabled until the hub answers.
  • Deal's end: a sheet with the winner, each seat's points left and who deals next; the dealer deals from it. "See the hands" leaves every hand face up on the felt, small screens included.
  • Standings: hands won on each seat; the header says the deal number and variant.
  • Table's end: a dialog with the hands each seat won; play again or back to the room.
  • Lobby: passes the room's away seats to the table; a table between deals reads "between deals".
  • Focus: a new deal puts focus on the hand; a sheet whose button goes keeps focus inside it.
  • Felt: the ending card sets its own text colour. It is portaled to the body, so castle's ending was dark on dark too.

Checks: typecheck, lint, 1167 tests, build. Played end to end against a local hub in headless Chromium: start, deal, a deal won, the sheet at both chairs, the next dealer dealing from it, deal 2, a leave closing the table; screenshots at desktop and 390px.

The review panel ran on the first push; its UI survivors are the later commits.


Generated by Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
muchq c3fe69a Commit Preview URL

Branch Preview URL
Sep 29 2026, 12:47 AM

@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Blocking

None. Wire shapes match MoonBase#1612 (choosing / lastDeal / chooseVariant / table-level gameEnded); canDeal follows the room’s away list; deal sheet vs under-hand deal buttons don’t double up; dealing gates a second ask; focus after a new deal and when an away dealer returns is covered by tests. Felt color on the portaled ending card and data-showdown for between-deal hands are the right fixes.

Nits

  • gameJoined clears opening but not dealing. Symmetric with clear / gameState / handleRejected would be setDealing(false) there too — only matters if a join lands while a choose is in flight.
  • While the deal sheet is up and the dealer goes away (mayDeal flips true), deal buttons appear but focus stays on “See the hands” (the keep-in-sheet effect only runs when focus has left the dialog). A move to the first Deal button on that transition would match the “dealer came back” path.
  • Between deals, opponents still get “N in hand” next to face-up cards and “pts left”. Harmless; the count is redundant once handsShown.
  • LobbyGame adds useMemo for away. Fine if intentional; the repo’s React Compiler guidance usually skips that unless the identity already mattered.

Fine

Start table → choosing with no cards; dealer / away-dealer copy; deal sheet with next dealer + Deal from the sheet; standings + “Deal N · variant”; table-closed dialog on hands won; lobby “between deals” for status choosing; stock-empty “turn the discard over” copy from the #382 nits. Merge after MoonBase#1612.


Review of #388

Copy link
Copy Markdown
Contributor Author

Nits in c3fe69a:

  • gameJoined clears dealing.
  • The dealer going away while the sheet is open moves focus to the Deal button it now offers.
  • Face-up seats between deals drop the "in hand" count.
  • away in LobbyGame is plain: nothing it feeds depends on its identity.

Each has a test; the first three failed before the change.


Generated by Claude Code

@aaylward
aaylward merged commit b0af634 into main Sep 29, 2026
2 checks passed
@aaylward
aaylward deleted the claude/rummy-dealers-choice branch September 29, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants