From 25bf67062a036d2d415f8ae8f9b3f6cadc0da4f3 Mon Sep 17 00:00:00 2001 From: JoshHeaps Date: Mon, 31 Aug 2026 15:01:18 -0600 Subject: [PATCH] Fix Texas Hold'em dealer page: script timing crash and seat overlap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main.js ran an IIFE immediately, but the layout renders @section Scripts inside before exists, so every getElementById() call hit null. Wrapped init in DOMContentLoaded, matching the rest of the codebase (e.g. ChessScripts/chessMain.js). Separately, the original seat cards packed a full data-entry form (name, toggles, 2 cards, 5 chip counters, $ override, custom fields) into each of up to 24 positions around a circle — at any screen size, adjacent seats overlapped badly. Replaced with compact seat "pucks" for the table view (name, cards, total, blind/dealer badges) plus a dedicated seat editor panel in the sidebar that opens for whichever seat is clicked. Verified via Playwright MCP: load with no console errors, drag-and-drop seat swap, and a 3-way side-pot resolution (short all-in capped correctly, remainder awarded to the next-best hand) end to end. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_018CmAti1baCjidbJM2HeJfk --- JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml | 70 ++-- JoshHeaps.Net/wwwroot/css/casino/holdem.css | 121 ++++--- .../wwwroot/js/casino/holdem/main.js | 4 +- .../wwwroot/js/casino/holdem/render.js | 309 +++++++++++------- 4 files changed, 315 insertions(+), 189 deletions(-) diff --git a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml index 6559825..d440d65 100644 --- a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml +++ b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml @@ -34,6 +34,13 @@