Skip to content

lobby: one game picker from a catalog - #399

Merged
aaylward merged 2 commits into
mainfrom
claude/game-picker
Oct 1, 2026
Merged

aaylward merged 2 commits into
mainfrom
claude/game-picker

Conversation

@aaylward

@aaylward aaylward commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

First step on #389. The lobby panel's four "Open a … table" buttons, each with its own blurb, become one picker that scales as the catalog grows.

  • lobby/catalog.ts: one list of what a room can play. Each entry has its family (Cards or Board), seat range, blurb, and any variants chosen at the table. The panel, the command menu and seatsOf all read it, so a new game is one entry here plus its table hook.
  • Panel: one game <select> grouped by family, one "Open a {game} table" button, and under them the picked game's blurb and seats line ("2 players", "2–4 players · 7-card, 10-card or gin, chosen at the table").
  • Command menu: still lists one entry per game, because the menu is searched; the entries now come from the catalog.
  • Joining an existing table is unchanged.

Tests: the catalog's order, seats and seats line, and the picker's groups, options, single button and blurb for each pick. Vitest, typecheck and lint are clean. I checked it visually at 390×844.

Left for later on #389:

  • Who picks the game (dealer, room vote or host) and when.
  • Hub-side "card table, game chosen at the table".
  • Play-testing each game on desktop and phone.

Refs #389


Generated by Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 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 8f7a2d8 Commit Preview URL

Branch Preview URL
Oct 01 2026, 02:17 AM

@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown

Blocking

None. One catalog feeds the panel picker, the command menu, and seatsOf; join offers and seat counts are unchanged. Default pick is castle (first in the list); the button still calls tableFor for the chosen game. CI green.

Nits

  • The picker <select> only sets padding / radius / font: inherit, so it inherits the panel’s color: white without the room-code field’s dark .input chrome (border, background, color). On a desktop UA that keeps a light field fill, the closed control can wash out. Give it the same tokens as .input (or share a class).
  • catalogEntry’s last resort is ?? CATALOG[1] — golf only while golf stays at index 1. Prefer find by 'golf' (or throw) so a catalog reorder cannot silently rehome an unknown name.

Fine

Right altitude for the first cut of #389: one select grouped by family, one open button, blurb + seats line under it; command menu still lists every game for search. Variants stay a table concern (seatsLine says so for rummy). Tests pin order, seats, groups, and each pick’s create. Merge when ready; the later #389 questions (who chooses, hub-side card table) stay out of this diff.


Review of #399

aaylward commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Both nits are fixed in 8f7a2d8:

  • Select styling: the picker now uses the room-code field's tokens (border, dark fill, white text, 1rem). Options and optgroups get dark text, so the browser's open menu stays readable.
  • Catalog lookup: catalogEntry now finds golf by name and throws on a name that isn't in the catalog. It no longer depends on golf sitting at index 1.

Generated by Claude Code

@aaylward
aaylward merged commit f0d7147 into main Oct 1, 2026
2 checks passed
@aaylward
aaylward deleted the claude/game-picker branch October 1, 2026 02:19
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