Ask before a smaller table deletes the players sitting in it #41

Closed
jheaps wants to merge 0 commits from feature/casino-holdem-seat-count-safety into master
Owner

The most destructive interaction in the tool, and it took one mistyped digit.

Typing a smaller number into Seats at table silently threw away every seat past the new count. Measured on a live nine-handed table: going to six removed three players instantly — names, stacks and buy-ins gone, no confirmation, no undo.

It also quietly falsified the settle-up. Those players keep their rows in the session standings, because the hand log remembers who won what, but the seat those figures are read from no longer exists. A player who had just won a pot showed as bought in: $0, chips now: $0 — a number a dealer would settle up from.

Shrinking now names who it is about to remove and asks; either way the change is undoable like the rest of the tables actions.

Validation (Playwright, headed)

  • Before: 9 players → 6 removed three, no prompt, no undo, and Ivy — who had won a hand — was left in the standings reading bought:0 chips:0.
  • After, four paths checked: the dialog names them ("Remove 3 players? … takes Gus, Hana, Ivy off the table along with their chips and buy-ins"); Cancel restores everything including the inputs own value; Confirm removes them and offers Undo; Undo brings all nine back with stacks and buy-ins intact (Gus:210/200, Hana:220/200, Ivy:230/200).
  • No false alarms, which matters as much as the warning: growing the table and shrinking onto chairs nobody is sitting in both happen without a word. Out-of-range input is still clamped to 2–24.
  • No console errors. git merge-tree reports zero conflicts against all eight other open PRs.
The most destructive interaction in the tool, and it took one mistyped digit. Typing a smaller number into **Seats at table** silently threw away every seat past the new count. Measured on a live nine-handed table: going to six **removed three players instantly** — names, stacks and buy-ins gone, **no confirmation, no undo**. It also **quietly falsified the settle-up**. Those players keep their rows in the session standings, because the hand log remembers who won what, but the seat those figures are read from no longer exists. A player who had just won a pot showed as `bought in: $0, chips now: $0` — a number a dealer would settle up from. Shrinking now names who it is about to remove and asks; either way the change is undoable like the rest of the tables actions. ## Validation (Playwright, headed) - **Before**: 9 players → 6 removed three, no prompt, no undo, and Ivy — who had won a hand — was left in the standings reading bought:0 chips:0. - **After**, four paths checked: the dialog names them (*"Remove 3 players? … takes Gus, Hana, Ivy off the table along with their chips and buy-ins"*); **Cancel** restores everything including the inputs own value; **Confirm** removes them and offers Undo; **Undo** brings all nine back with stacks and buy-ins intact (`Gus:210/200`, `Hana:220/200`, `Ivy:230/200`). - **No false alarms**, which matters as much as the warning: growing the table and shrinking onto chairs nobody is sitting in both happen without a word. Out-of-range input is still clamped to 2–24. - No console errors. `git merge-tree` reports **zero conflicts against all eight other open PRs**.
jheaps added 1 commit 2026-09-01 02:33:25 -06:00
Typing a smaller number into "Seats at table" silently threw away every seat past
the new count. Nine players down to six removed three of them — names, stacks and
buy-ins gone, no confirmation, no way back.

It also quietly falsified the settle-up. Those players keep their rows in the
session standings, because the hand log remembers who won what, but the seat they
were read from no longer exists — so a player who had just won a pot showed as
having bought in for nothing and holding nothing.

Shrinking now says who it is about to remove and asks, and either way the change
is undoable like the rest of the table's actions. Growing the table, and
shrinking onto chairs nobody is sitting in, still happen without a word.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-01 02:42:19 -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#41