Call who shows first at the showdown, instead of leaving the dealer to remember #90

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-showdown-order into fix/casino-holdem-hand-log-filter
Owner

Every showdown that isn't a fold needs somebody to turn over first, and it is the one call at the table nobody volunteers for — everyone would rather see a hand than show one. The tool held both facts the rule needs, who last raised and who sits left of the button, and said neither. The dealer worked it out from memory while five people waited, every hand.

What changed

The action bar names the seat and the reason, above the resolve button:

Dee shows first — last to bet or raise.
Ben shows first — checked round, first left of the button.
Dee shows first — last to put money in; nobody could bet the river.

The reason is there so the call can be repeated to whoever argues with it, which is half of what makes it stick.

Three cases, in the order the rule asks them:

  1. Somebody bet or raised on the final round → they show.
  2. Nobody did → first live player left of the button.
  3. Nobody could, because the chips were already in → whoever last put money in, on whichever street that was. "No bet on the final round" isn't a choice anybody made when there was no round to bet in, so the seat left of the button hasn't earned the obligation.

Aggression is tracked per street and per hand, because those two answers differ exactly when it matters — leading the flop and checking the river obliges nobody. A short all-in counts: not reopening the betting is a rule about who may raise and says nothing about who shows. Posting a blind doesn't — a hand limped and checked all the way down has no aggressor at all, which is the case that goes to the button.

A matching section goes in Common rulings, since the dealer will be asked.

Verification

13 new tests in tests/holdem/showdownOrder.test.js: river bet, re-raise (last one, not first), short all-in, checked-through, an earlier street's raiser not carrying over, a folded seat being skipped, both all-in variants, one player left, a stale or out-of-range aggressor index, and that the tracking resets between hands. Suite at 350 tests, 0 failures.

Two of those tests failed first time and both were my setup, not the rule: shoving $15 into a $40 bet is a short call, not a short raise, so the bettor really was still the aggressor; and $2 stacks against a $2 blind aren't all-in. Fixed the scenarios rather than the rule.

Playwright MCP, all four shapes played through the real UI: river checked round → "Ben shows first — checked round, first left of the button"; river bet → "Ben shows first — last to bet or raise"; four players all-in pre-flop, board run out street by street → "Dee shows first — last to put money in; nobody could bet the river"; everyone folds to one → no call at all, just Award pot to Ann. Checked at 390/768/1280 — two lines on a phone, no overflow, no sideways scroll, contrast and layout audit clean, no console errors.

Stacked on fix/casino-holdem-hand-log-filter.

🤖 Generated with Claude Code

https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb

Every showdown that isn't a fold needs somebody to turn over first, and it is the one call at the table nobody volunteers for — everyone would rather see a hand than show one. The tool held both facts the rule needs, who last raised and who sits left of the button, and said neither. The dealer worked it out from memory while five people waited, every hand. **What changed** The action bar names the seat and the reason, above the resolve button: > Dee shows first — last to bet or raise. > Ben shows first — checked round, first left of the button. > Dee shows first — last to put money in; nobody could bet the river. The reason is there so the call can be repeated to whoever argues with it, which is half of what makes it stick. Three cases, in the order the rule asks them: 1. Somebody bet or raised on the final round → **they show**. 2. Nobody did → **first live player left of the button**. 3. Nobody *could*, because the chips were already in → **whoever last put money in**, on whichever street that was. "No bet on the final round" isn't a choice anybody made when there was no round to bet in, so the seat left of the button hasn't earned the obligation. Aggression is tracked per street *and* per hand, because those two answers differ exactly when it matters — leading the flop and checking the river obliges nobody. A **short all-in counts**: not reopening the betting is a rule about who may raise and says nothing about who shows. **Posting a blind doesn't** — a hand limped and checked all the way down has no aggressor at all, which is the case that goes to the button. A matching section goes in Common rulings, since the dealer will be asked. **Verification** 13 new tests in `tests/holdem/showdownOrder.test.js`: river bet, re-raise (last one, not first), short all-in, checked-through, an earlier street's raiser not carrying over, a folded seat being skipped, both all-in variants, one player left, a stale or out-of-range aggressor index, and that the tracking resets between hands. Suite at 350 tests, 0 failures. Two of those tests failed first time and both were my setup, not the rule: shoving $15 into a $40 bet is a short *call*, not a short raise, so the bettor really was still the aggressor; and $2 stacks against a $2 blind aren't all-in. Fixed the scenarios rather than the rule. Playwright MCP, all four shapes played through the real UI: river checked round → *"Ben shows first — checked round, first left of the button"*; river bet → *"Ben shows first — last to bet or raise"*; four players all-in pre-flop, board run out street by street → *"Dee shows first — last to put money in; nobody could bet the river"*; everyone folds to one → no call at all, just *Award pot to Ann*. Checked at 390/768/1280 — two lines on a phone, no overflow, no sideways scroll, contrast and layout audit clean, no console errors. Stacked on `fix/casino-holdem-hand-log-filter`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-01 22:53:42 -06:00
Every showdown that isn't a fold needs somebody to turn over first, and it is the one
call at the table nobody volunteers for — everyone would rather see a hand than show
one. The tool held both facts the rule needs, who last raised and who sits left of
the button, and said neither. The dealer worked it out from memory while five people
waited, every hand.

The action bar now names the seat and the reason above the resolve button:

    Dee shows first — last to bet or raise.
    Ben shows first — checked round, first left of the button.
    Dee shows first — last to put money in; nobody could bet the river.

The reason is there so the call can be repeated to whoever argues with it, which is
half of what makes it stick.

Three cases, in the order the rule asks them. Somebody bet or raised on the final
round: they show. Nobody did: first live player left of the button. Nobody *could*,
because the chips were already in: it falls to whoever last put money in, on whichever
street that was — "no bet on the final round" isn't a choice anybody made when there
was no round to bet in, so the seat left of the button hasn't earned it.

Aggression is tracked per street and per hand, because those two answers differ
exactly when it matters. A short all-in counts: not reopening the betting is a rule
about who may raise, and says nothing about who shows. Posting a blind doesn't — a
hand limped and checked all the way down has no aggressor at all, which is the case
that goes to the button.

A matching ruling goes in Common rulings, since the dealer will be asked.

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:00 -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#90