Let the dealer find one hand in the log instead of scrolling the night #89

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

The hand log exists for one moment: somebody at the rail says they won a pot an hour ago and wants it looked up. A night runs to sixty hands or more, the panel showed five at a time in a box fixed at 260px — the same five whether the dealer is on a phone or a 27" screen with room for twenty — and there was no way to ask for a hand. Only to scroll and read every row.

What changed

A filter box over the list, taking a name, an amount, or a hand number:

typed finds
fay hands Fay won, any case
190 a $190 pot or a $190 payout
$1,90 the same, typed badly
#12 hand 12 exactly — and #1 gives 1, 12, 120

Beside it, how much of the night is hidden — "8 of 60" — because a filter matching one hand otherwise looks like a table that only played one. No matches says so and says the log still has all of them.

The list also takes the room it has: clamp(200px, 42vh, 560px) instead of a flat 260, which measures seven or eight rows on a desktop and no fewer on a phone.

Export stays the whole night, always. A CSV quietly missing the hands scrolled past would be a record with holes in it and nothing on the file to say so. If a filter is up when it's exported, the toast says how many actually went in.

A measurement changed the design. Matching originally covered the hand's full ledger as well as the row, so the hand that broke somebody could be found under the loser's name. But the ledger holds everyone who put a chip in: measured on a seven-handed night where nobody folded, Fay returned 60 of 60. Matching is now limited to what the row actually displays — searching text the panel doesn't show is a filter that looks broken even when it's right. Fay now returns the 8 hands she won.

The filter is view state: not saved, not undoable, doesn't reach the other tab, and cleared along with the history.

Verification

17 new tests in tests/holdem/handHistoryFilter.test.js — by name, by amount (partial, with punctuation, payouts that aren't the whole pot), by hand number (bare is exact, # is a prefix), and that odd input can't make it match everything or throw on an entry with pieces missing. Suite at 337 tests, 0 failures.

Playwright MCP on a 60-hand night: unfiltered 60 rows, Fay → 8 of 60, $190 → the one hand, #42 → the one hand, zed → the no-match line, cleared → 60 again. Checked at 390/768/1280/1600 plus a real touch context — 44px box and 16px text on touch (16px so iOS doesn't zoom the page and throw the felt off screen mid-hand), no sideways scroll, contrast and layout audit clean at every size, no console errors.

Stacked on fix/casino-holdem-posting-in.

🤖 Generated with Claude Code

https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb

The hand log exists for one moment: somebody at the rail says they won a pot an hour ago and wants it looked up. A night runs to sixty hands or more, the panel showed **five at a time** in a box fixed at 260px — the same five whether the dealer is on a phone or a 27" screen with room for twenty — and there was no way to ask for a hand. Only to scroll and read every row. **What changed** A filter box over the list, taking a name, an amount, or a hand number: | typed | finds | |---|---| | `fay` | hands Fay won, any case | | `190` | a $190 pot or a $190 payout | | `$1,90` | the same, typed badly | | `#12` | hand 12 exactly — and `#1` gives 1, 12, 120 | Beside it, how much of the night is hidden — **"8 of 60"** — because a filter matching one hand otherwise looks like a table that only played one. No matches says so and says the log still has all of them. The list also takes the room it has: `clamp(200px, 42vh, 560px)` instead of a flat 260, which measures seven or eight rows on a desktop and no fewer on a phone. **Export stays the whole night, always.** A CSV quietly missing the hands scrolled past would be a record with holes in it and nothing on the file to say so. If a filter is up when it's exported, the toast says how many actually went in. **A measurement changed the design.** Matching originally covered the hand's full ledger as well as the row, so the hand that broke somebody could be found under the loser's name. But the ledger holds everyone who put a chip in: measured on a seven-handed night where nobody folded, `Fay` returned **60 of 60**. Matching is now limited to what the row actually displays — searching text the panel doesn't show is a filter that looks broken even when it's right. `Fay` now returns the 8 hands she won. The filter is view state: not saved, not undoable, doesn't reach the other tab, and cleared along with the history. **Verification** 17 new tests in `tests/holdem/handHistoryFilter.test.js` — by name, by amount (partial, with punctuation, payouts that aren't the whole pot), by hand number (bare is exact, `#` is a prefix), and that odd input can't make it match everything or throw on an entry with pieces missing. Suite at 337 tests, 0 failures. Playwright MCP on a 60-hand night: unfiltered 60 rows, `Fay` → 8 of 60, `$190` → the one hand, `#42` → the one hand, `zed` → the no-match line, cleared → 60 again. Checked at 390/768/1280/1600 plus a real touch context — 44px box and 16px text on touch (16px so iOS doesn't zoom the page and throw the felt off screen mid-hand), no sideways scroll, contrast and layout audit clean at every size, no console errors. Stacked on `fix/casino-holdem-posting-in`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-01 22:40:24 -06:00
The hand log exists for one moment: somebody at the rail says they won a pot an hour
ago and wants it looked up. A night runs to sixty hands or more and the panel showed
five of them at a time, in a box fixed at 260px whether the dealer was on a phone or
a 27" screen with room for twenty. There was no way to ask for a hand — only to
scroll and read every row.

A filter box over the list now takes a name, an amount or a hand number. Matching is
loose on purpose: "fay" whatever case it's typed in, "190" for a $190 pot or a $190
payout, "$1,90" for the same typed badly, "#12" when the dealer knows the hand and
wants that exact one. Beside it, how much of the night is hidden — "8 of 60" — since
a filter matching one hand otherwise looks like a table that only played one.

The list also takes the room it has: clamp(200px, 42vh, 560px) rather than a flat
260, which is seven or eight rows instead of five on a desktop and no worse on a
phone.

Export stays the whole night, always. A CSV quietly missing the hands scrolled past
would be a record with holes in it and nothing on the file to say so — if a filter is
up when it's exported, the toast says how many went in.

Matching deliberately covers only what the row displays. Searching the full ledger as
well was the first attempt, so the hand that broke somebody could be found under the
loser's name — but the ledger holds everyone who put a chip in, and measured on a
seven-handed night where nobody folded, "Fay" returned 60 of 60. A filter that
searches text the panel doesn't show looks broken even when it's right.

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:57:59 -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#89