From 68e263f3252d090408abee9460fdd2aea4e052e2 Mon Sep 17 00:00:00 2001 From: JoshHeaps Date: Mon, 31 Aug 2026 17:15:23 -0600 Subject: [PATCH 1/3] Add a persistent hand history log to the Texas Hold'em dealer tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Give the dealer a running record of resolved pots — hand number, total pot, who got paid what, and the time — instead of losing that information the moment the pot wizard closes. It's the kind of audit trail a real dealer needs when a chip count gets disputed after the fact. - state.js tracks state.handNumber and state.handHistory (capped at 200 entries) and persists both through the existing localStorage save/load path, with backfill defaults for tables saved before this change. - potWizard.js now hands its final payouts back to the caller instead of discarding them once "Start Next Hand" is clicked. - main.js records a history entry (skipping hands where nobody actually won anything) before advancing to the next hand, and wires up a "Clear history" control that also resets the hand counter. - A new sidebar panel lists history entries newest-first; the header shows a running "Hand #N" badge next to the existing subtitle. Verified via Playwright MCP: seated two players, resolved a pot, and confirmed the header's hand counter incremented, the history panel listed the payout, the entry survived a full page reload (localStorage persistence), and Clear History reset both the log and the counter. No console errors during the flow. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01C3NiiUDimoKDJ8GjC3KL3x --- JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml | 21 +++++++ JoshHeaps.Net/wwwroot/css/casino/holdem.css | 56 +++++++++++++++++++ .../wwwroot/js/casino/holdem/main.js | 10 +++- .../wwwroot/js/casino/holdem/potWizard.js | 6 +- .../wwwroot/js/casino/holdem/render.js | 34 +++++++++++ .../wwwroot/js/casino/holdem/state.js | 31 ++++++++++ 6 files changed, 156 insertions(+), 2 deletions(-) diff --git a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml index 46cb7f5..2390d12 100644 --- a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml +++ b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml @@ -10,6 +10,7 @@

Texas Hold'em Dealer

Seat your players, track the action, split the pot.

+ Hand #1
@@ -84,6 +85,15 @@
+ +
+ Hand History +
+
+

Resolved pots show up here as you play, in case a chip count is disputed later.

+ +
+
@@ -156,6 +166,17 @@ + +