Fix Texas Hold'em dealer page: script timing crash and seat overlap #11

Merged
jheaps merged 1 commits from feature/casino-texas-holdem into master 2026-08-31 15:03:37 -06:00
Owner

main.js ran an IIFE immediately, but the layout renders @section Scripts
inside <head> 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 [email protected]
Claude-Session: https://claude.ai/code/session_018CmAti1baCjidbJM2HeJfk

main.js ran an IIFE immediately, but the layout renders @section Scripts inside <head> before <body> 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 <[email protected]> Claude-Session: https://claude.ai/code/session_018CmAti1baCjidbJM2HeJfk
jheaps added 1 commit 2026-08-31 15:03:31 -06:00
main.js ran an IIFE immediately, but the layout renders @section Scripts
inside <head> before <body> 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 <[email protected]>
Claude-Session: https://claude.ai/code/session_018CmAti1baCjidbJM2HeJfk
jheaps merged commit 8e7d94e6f9 into master 2026-08-31 15:03:37 -06:00
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#11