Stop the tool from throwing a pot away without saying so #49
Closed
jheaps
wants to merge 0 commits from
feature/casino-holdem-fewer-taps into master
pull from: feature/casino-holdem-fewer-taps
merge into: :master
:master
:feature/socialism
:polish/holdem-seats-one-size
:fix/holdem-dealer-chip-eats-its-seat
:polish/holdem-game-night-ready
:polish/holdem-round-next
:polish/holdem-seat-collisions
:polish/holdem-offline-and-render
:fix/naming-a-blind-deals-the-hand
:release/casino-holdem-polish
:fix/casino-holdem-phone-look
:fix/casino-holdem-sidebar-crowding
:fix/casino-holdem-contribution-rule
:fix/casino-holdem-one-stack-rule
:fix/casino-holdem-default-stack-buyin
:feat/casino-holdem-waiting-list
:feat/casino-holdem-misdeal
:feat/casino-holdem-cash-out
:feat/casino-holdem-clock
:feat/casino-holdem-rake
:fix/casino-holdem-stadium-ring
:fix/casino-holdem-phone-felt-shape
:fix/casino-holdem-audit-runs-everything
:feat/casino-holdem-straddle
:fix/casino-holdem-landscape-ring
:feat/casino-holdem-table-file
:fix/casino-holdem-touch-targets
:fix/casino-holdem-audit-modal-blindspot
:fix/casino-holdem-quicksplit-chop
:fix/casino-holdem-buildable-bet-sizes
:fix/casino-holdem-pot-sized-raise
:fix/casino-holdem-chips-to-count-out
:fix/casino-holdem-first-buy-in
:fix/casino-holdem-seating-a-table
:fix/casino-holdem-showdown-order
:fix/casino-holdem-hand-log-filter
:fix/casino-holdem-posting-in
:fix/casino-holdem-dead-button
:fix/casino-holdem-discarded-pot
:fix/casino-holdem-honest-tank-clock
:fix/casino-holdem-export-the-notes
:fix/casino-holdem-stacks-in-chips
:fix/casino-holdem-close-audit-blind-spots
:fix/casino-holdem-readable-dim-states
:fix/casino-holdem-drop-broken-watermark
:fix/casino-holdem-two-tabs
:fix/casino-holdem-unreadable-save
:fix/casino-holdem-say-when-not-saving
:fix/casino-holdem-shortcut-discovery
:fix/casino-holdem-rulings-index-compact
:fix/casino-holdem-rulings-index
:fix/casino-holdem-payout-in-chips
:fix/casino-holdem-move-seat-on-touch
:fix/casino-holdem-amount-fields-select
:fix/casino-holdem-touch-targets-by-pointer
:fix/casino-holdem-button-box-model
:fix/casino-holdem-blind-badge-placement
:fix/casino-holdem-buyin-deals-in
:fix/casino-holdem-bet-vs-raise
:fix/casino-holdem-deal-around-broke
:fix/casino-holdem-settle-up
:fix/casino-holdem-allin-and-bar
:fix/casino-holdem-one-dealer-button
:fix/casino-holdem-manual-deal
:fix/casino-holdem-less-guessing
:feature/casino-holdem-seat-editor
:fix/casino-holdem-landscape-table
:feature/casino-holdem-acting-seat
:feature/casino-holdem-raise-guard
:feature/casino-holdem-first-run
:feature/casino-holdem-contrast-audit
:feature/casino-holdem-layout-audit
:feature/casino-holdem-blind-fairness
:feature/casino-holdem-rulings-depth
:feature/casino-holdem-bank-audit
:feature/casino-holdem-fewer-taps
:feature/casino-holdem-render-perf
:feature/casino-holdem-keyboard-focus
:feature/casino-holdem-resilience
:feature/casino-holdem-messy-tables
:feature/casino-holdem-touch-mobile
:chore/casino-holdem-tech-debt
:feature/casino-holdem-dealer-batch
:feature/casino-holdem-seat-count-safety
:feature/casino-holdem-odd-chip
:feature/casino-holdem-button-moves
:feature/casino-holdem-allin-runout
:feature/casino-holdem-heads-up
:feature/casino-holdem-contrast
:feature/casino-holdem-touch-audit
:feature/casino-holdem-wizard-polish
:feature/casino-quicksplit-side-pots
:feature/casino-holdem-rebuys
:feature/casino-holdem-rulings
:feature/casino-holdem-sidebar-polish
:feature/casino-holdem-keyboard
:feature/casino-holdem-action-undo
:feature/casino-holdem-pace
:feature/casino-holdem-side-pot-breakdown
:feature/casino-holdem-gestures
:feature/casino-holdem-card-picker
:feature/casino-holdem-live-betting
:feature/casino-holdem-bet-chips
:feature/casino-holdem-seat-legibility
:feature/casino-holdem-undo-toasts
:feature/casino-holdem-quick-split
:feature/casino-holdem-mobile-table
:feature/casino-holdem-hand-history
:feature/casino-texas-holdem
:feature/casino-holdem-dealer-mode-polish
:feature/fractional-learned-weights
:fix/stockfish-dispose-hang
:fix/blog-cache-staleness
:fix/workflows
:gitea/workflows
:echo-acoustic-ranging
:chess-ui-overhaul
:feature/customChessEngine
:feature/blog
:AddProject
:feature/generalUpdate
:tech-debt/chess-cleanup
:tests/CreatePlaywrightTests
:UpdateParticleSimulatorButton
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two ways to lose a hand's money by accident, both found by walking the settle flow and checking the chip count afterwards. Stacked on #48.
1. Next Hand destroyed an unresolved pot silently
Starting the next hand clears every seat's contribution, so money still in the middle simply vanished.
Measured at a four-handed table with $8 in the pot: the table went from 800 chips to 792, and the toast said "Next hand — button on seat 3. Blinds posted." — not a word about the eight chips that had just left.
It now asks, names the amount, and says what will happen to it:
Confirming still works and the toast now reports what went. The undo was always there, but a dealer can't undo something they were never told about.
2. The wizard's "Close" abandoned a payout that looked finished
After picking winners and confirming, the wizard shows "Final Payouts — Ann $8" above two buttons: Start Next Hand and Close. Close pays nobody.
Under that heading, with a name and an amount beside it, a dealer taps Close believing the pot has been pushed — and walks away with the chips still in the middle and the hand unlogged. The button now reads "Cancel — don't pay yet", with a line underneath spelling out that nothing has been paid.
The warning had to measure the right thing
My first version counted the pot badge, which was wrong in a way the tests caught before it shipped.
The table-wide base pot is a standing ante — the mode for a dealer who isn't tracking stacks at all — and it re-applies to the next hand rather than being lost with this one. Quoting it would have put a confirmation in front of exactly those dealers before every single hand, for money that wasn't going anywhere.
HoldemState.unresolvedContributions()measures precisely the fieldsstartNextHandclears: banked contributions, chip counts, and whatever is still in front of players on this street. Verified both ways in the browser — a base-pot table showing a $100 pot is not asked at all; a stack-tracking table with $8 live is.Validation
6 new tests (115 total, all passing): the quoted number equals what actually leaves the table, mid-street chips are included, a settled hand leaves nothing to warn about, five settled hands conserve every chip, an empty table has no phantom pot, and a standing ante is never warned about.
Playwright end to end: warning fires and cancels cleanly (800 chips kept, hand not advanced); confirming discards and reports it; base-pot table not nagged; the wizard's Cancel leaves the pot intact and unlogged while Start Next Hand still pays correctly and conserves the chip count. No console errors.
Checked and left alone
I also probed dedicated-dealer mode, counterclockwise play (blinds, first to act, button orbit fairness, repost-on-button-move) and
save()scaling. All correct — save is bounded at ~1.2ms by the 200-hand history cap, so the persistence cost I flagged on #48 isn't worth chasing. The fold-to-one-player settle is already a single "Award pot to Dee" tap, so there was nothing to win there either.Pull request closed