Keep the list of who's next, instead of leaving it on a napkin #110

Closed
jheaps wants to merge 1 commits from feat/casino-holdem-waiting-list into feat/casino-holdem-misdeal
Owner

A full home game always has two or three people standing behind the chairs, and the list of who's next lives on a napkin or in the dealer's head. That's where the argument an hour later comes from. The tool had just learned to open a chair — somebody cashes out and the seat is free — and had nothing to say about who should sit in it.

The Session panel keeps the list in order of arrival, which is the only ordering anybody has ever agreed to. Whoever is at the front is offered the first open chair by number; everybody else waits their turn, because a list that isn't kept in order is a pile of names and jumping the queue is the thing a dealer gets shouted at for. With the table full it says "table full" rather than offering a seat that doesn't exist. The same offer appears on the empty chair's own menu — Seat Priya — since tapping the chair somebody is about to sit in is what a dealer's hand does anyway.

Sitting somebody down puts their name on the chair and nothing else. No stack, no buy-in, not dealt in: they haven't paid yet, and inventing chips for them would put money on the table nobody has handed over — the one thing the bank check exists to catch. Add chips is the next thing the dealer does and it's one tap away in the same menu.

Two people called Mike are two people: the list is keyed by id, not by name. Names are trimmed, blanks refused, and a saved table that never had a list comes back with an empty one rather than undefined.

Validated

  • Walked through the browser: two names added to a full table (front of the queue reads "table full"), a player cashed out to open seat 2, the queue then offering Seat 2, the front of the list seated there with stack: null, buyIns: 0, inHand: false, bank still balanced, toast offering Undo — and the second name taken off the list.
  • The empty chair's menu carries Seat Priya between Deal in and Give the button.
  • 156 audits across 13 viewports, mouse and thumb, with the list populated — including a name long enough to stress the row — plus a rake and a cash-out on the books: clean, no console errors.
  • 15 new tests, suite at 541, 0 failures. The occupied-chair guard was removed and a stack handed to the new player on purpose, to confirm the tests catch both.
A full home game always has two or three people standing behind the chairs, and the list of who's next lives on a napkin or in the dealer's head. That's where the argument an hour later comes from. The tool had just learned to **open** a chair — somebody cashes out and the seat is free — and had nothing to say about who should sit in it. The Session panel keeps the list **in order of arrival**, which is the only ordering anybody has ever agreed to. Whoever is at the front is offered the first open chair by number; everybody else waits their turn, because a list that isn't kept in order is a pile of names and jumping the queue is the thing a dealer gets shouted at for. With the table full it says *"table full"* rather than offering a seat that doesn't exist. The same offer appears on the empty chair's own menu — **Seat Priya** — since tapping the chair somebody is about to sit in is what a dealer's hand does anyway. **Sitting somebody down puts their name on the chair and nothing else.** No stack, no buy-in, not dealt in: they haven't paid yet, and inventing chips for them would put money on the table nobody has handed over — the one thing the bank check exists to catch. *Add chips* is the next thing the dealer does and it's one tap away in the same menu. Two people called Mike are two people: the list is keyed by id, not by name. Names are trimmed, blanks refused, and a saved table that never had a list comes back with an empty one rather than `undefined`. ### Validated - Walked through the browser: two names added to a **full** table (front of the queue reads *"table full"*), a player cashed out to open seat 2, the queue then offering **Seat 2**, the front of the list seated there with `stack: null, buyIns: 0, inHand: false`, bank still balanced, toast offering Undo — and the second name taken off the list. - The empty chair's menu carries **Seat Priya** between *Deal in* and *Give the button*. - **156 audits** across 13 viewports, mouse and thumb, with the list populated — including a name long enough to stress the row — plus a rake and a cash-out on the books: clean, no console errors. - 15 new tests, suite at **541, 0 failures**. The occupied-chair guard was removed and a stack handed to the new player on purpose, to confirm the tests catch both.
jheaps added 1 commit 2026-09-02 08:38:12 -06:00
A full home game always has two or three people standing behind the chairs, and
the list of who's next lives on a napkin or in the dealer's head. That is where
the argument an hour later comes from. The tool had just learned to open a chair
— somebody cashes out and the seat is free — and had nothing to say about who
should sit in it.

The Session panel keeps the list in order of arrival, which is the only ordering
anybody has ever agreed to. Whoever is at the front is offered the first open
chair by number, and everybody else waits their turn: a list that isn't kept in
order is a pile of names, and jumping the queue is the thing a dealer gets
shouted at for. With the table full it says so rather than offering a seat that
doesn't exist. The same offer appears on the empty chair's own menu — "Seat
Priya" — because tapping the chair somebody is about to sit in is what a dealer's
hand does anyway.

Sitting somebody down puts their name on the chair and nothing else. No stack, no
buy-in, not dealt in: they haven't paid yet, and inventing chips for them would
put money on the table nobody has handed over, which is the one thing the bank
check exists to catch. Add chips is the next thing the dealer does, and it is one
tap away in the same menu.

Two people called Mike are two people — the list is keyed by id, not by name.
Names are trimmed, blanks are refused, and a saved list from a table that never
had one comes back empty rather than undefined.

15 new tests, with the occupied-chair guard removed and a stack handed to the new
player on purpose to confirm they fail. Walked through the browser: two names
added to a full table, a player cashed out to open seat 2, the front of the queue
seated there with nothing in front of them, the bank still balanced, and the
second name taken off the list. 156 audits with the list populated, including a
name long enough to test the row.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-02 09:58:07 -06:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#110