Chop a side pot on the screen that worked it out, and fix Quick Split's contrast #96

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-quicksplit-chop into fix/casino-holdem-buildable-bet-sizes
Owner

Quick Split — the standalone page for chopping a pot without setting up a table — had never been looked at in these rounds. Its arithmetic turns out to be solid: I checked the even split across odd-chip counts ($7/2, $101/3, $103/4, $104/5, $100/4) and the all-in mode against the classic 40/120/300/300 shape (main $160, sides $240 and $360, uncalled returned), and every one was right, with correct plurals and the odd chips going "one each to the first N players left of the button".

The gap was workflow. The page lists the pots when somebody is all-in and then leaves the dealer there. Two players tying for a side pot is ordinary, and working out each share meant switching to the other mode and retyping an amount the screen had just calculated — a transcription error waiting to happen with money on it, when the number was already on screen.

Each pot with two or more people who can win it now carries a Chop, opening underneath its own row: as many ways as there are contenders by default, a stepper for a chop between fewer of them, and the same odd-chip and dust wording the main split uses — it's the same rule, and a dealer shouldn't have to notice they're reading a different screen. Per-row state, so opening the main pot's chop doesn't disturb what the side pot below it says. Not offered on the uncalled row, which goes back to one player, nor on the total.

And a second finding while I was there. This page has never been through the layout audit the dealer table gets every round, and it was carrying nine contrast failures:

element ratio what it is
.unevenCurrency 4.11:1 the $ beside every amount typed
.unevenRemoveBtn 3.66:1 the ✕ that deletes a player's entry
.splitFootnote 3.94:1 the instruction for what to do with the pot list

All under the 4.5:1 small-text minimum, the worst of them on a destructive control. Lifted to pass. The large $ on the even-mode pot input is deliberately left alone: at 1.6rem it is large text, where 3:1 is the bar and 4.11:1 clears it.

Verification

Playwright MCP at 390/768/1280. Chop verified on the 40/120/300/300 table: side pot 2 ($360, two contenders) opens at "2 ways · $180 each"; the main pot ($160, four contenders) stepped down to three reads "$53 each plus one odd $1 chip to the first player left of the button" — and side pot 2 stays at 2 ways while that happens. No chop control on the uncalled or total rows. Contrast now 0 offenders in both modes at all three sizes, down from 9; 44px chop target on touch, no sideways scroll.

One layout bug of my own, caught by measuring rather than looking: the chop panel came out 328px inside a 309px row, because padding is added on top of a flex-basis: 100%. Fixed with box-sizing: border-box and re-measured at 309/309.

Existing suite unchanged at 387 tests, 0 failures — this page's logic is already covered by splitCalculator and potCalculator tests.

Stacked on fix/casino-holdem-buildable-bet-sizes.

🤖 Generated with Claude Code

https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb

Quick Split — the standalone page for chopping a pot without setting up a table — had never been looked at in these rounds. Its arithmetic turns out to be solid: I checked the even split across odd-chip counts ($7/2, $101/3, $103/4, $104/5, $100/4) and the all-in mode against the classic 40/120/300/300 shape (main $160, sides $240 and $360, uncalled returned), and every one was right, with correct plurals and the odd chips going *"one each to the first N players left of the button"*. **The gap was workflow.** The page lists the pots when somebody is all-in and then leaves the dealer there. Two players tying for a side pot is ordinary, and working out each share meant switching to the other mode and **retyping an amount the screen had just calculated** — a transcription error waiting to happen with money on it, when the number was already on screen. Each pot with two or more people who can win it now carries a **Chop**, opening underneath its own row: as many ways as there are contenders by default, a stepper for a chop between fewer of them, and the same odd-chip and dust wording the main split uses — it's the same rule, and a dealer shouldn't have to notice they're reading a different screen. Per-row state, so opening the main pot's chop doesn't disturb what the side pot below it says. Not offered on the uncalled row, which goes back to one player, nor on the total. **And a second finding while I was there.** This page has never been through the layout audit the dealer table gets every round, and it was carrying **nine contrast failures**: | element | ratio | what it is | |---|---|---| | `.unevenCurrency` | 4.11:1 | the `$` beside every amount typed | | `.unevenRemoveBtn` | **3.66:1** | the `✕` that deletes a player's entry | | `.splitFootnote` | 3.94:1 | the instruction for what to do with the pot list | All under the 4.5:1 small-text minimum, the worst of them on a destructive control. Lifted to pass. The large `$` on the even-mode pot input is deliberately left alone: at 1.6rem it is large text, where 3:1 is the bar and 4.11:1 clears it. **Verification** Playwright MCP at 390/768/1280. Chop verified on the 40/120/300/300 table: side pot 2 ($360, two contenders) opens at *"2 ways · $180 each"*; the main pot ($160, four contenders) stepped down to three reads *"$53 each plus one odd $1 chip to the first player left of the button"* — and side pot 2 stays at 2 ways while that happens. No chop control on the uncalled or total rows. Contrast now **0 offenders in both modes at all three sizes**, down from 9; 44px chop target on touch, no sideways scroll. One layout bug of my own, caught by measuring rather than looking: the chop panel came out 328px inside a 309px row, because padding is added on top of a `flex-basis: 100%`. Fixed with `box-sizing: border-box` and re-measured at 309/309. Existing suite unchanged at 387 tests, 0 failures — this page's logic is already covered by `splitCalculator` and `potCalculator` tests. Stacked on `fix/casino-holdem-buildable-bet-sizes`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-02 00:24:38 -06:00
Quick Split lists the pots when somebody is all-in — main, sides, uncalled — and then
leaves the dealer there. Two players tying for a side pot is ordinary, and working out
each one's share meant switching to the other mode and retyping an amount the screen
had just calculated. Retyping a number with money on it is a transcription error
waiting to happen, and the number was already on screen.

Each pot with two or more people who can win it now carries a Chop, opening underneath
its own row: as many ways as there are contenders by default, a stepper for a chop
between fewer of them, and the same odd-chip and dust wording the main split uses,
because it is the same rule and the dealer shouldn't have to notice they are reading a
different screen. Per-row state, so opening the main pot's chop doesn't disturb what
the side pot below it says. Not offered on the uncalled row, which goes back to one
player, nor on the total.

Separately, this page had never been through the layout audit the dealer table gets
every round, and it was carrying nine contrast failures:

    .unevenCurrency   4.11:1   the $ beside every amount typed
    .unevenRemoveBtn  3.66:1   the ✕ that deletes a player's entry
    .splitFootnote    3.94:1   the instruction for what to do with the pot list

All under the 4.5:1 small-text minimum, the worst of them on a destructive control.
Lifted to pass. The large $ on the even-mode pot input is left alone: at 1.6rem it is
large text, where 3:1 is the bar and 4.11:1 clears it.

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:02 -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#96