F020 — Deal Button / Auto-deal on Load
| Field | Value |
|---|---|
| ID | F020 |
| Phase | 3 — UI |
| Jira | HEDGE-134 |
| Status | TS ✅ fixed · JS ✅ verified · UMA ⬜ |
Business Rule
The game must start at the hole stage immediately on load — hole cards face-up, community cards face-down, hand odds visible, betting UI active. No player action is required to initiate the first deal. After river is resolved, a DEAL button appears so the player can start the next game. The DEAL button is hidden at all other times.JavaScript Reference
JS Source:HedgeEmJavaScriptClient/odobo/src/js/control.js
AdvanceGameState() loops through:
CC_ALLOW_BETS_1 are CC_AUTO_ADVANCE — they run without player input.
The loop stops at CC_ALLOW_BETS_1 which is CC_AWAIT_INPUT (hole betting window).
JS Live: hedgeem.qeetoto.com — loads directly at hole stage.
Between games (JS)
After river resolution the JS state machine auto-advances:TypeScript Implementation
File:standalone_reference_client/src/scenes/GameScene.ts
Fix applied (HEDGE-134)
Addedthis._onDeal() call at the end of GameScene.create():
_onDeal() handles:
- Hides DEAL button
- Loads local game (
engine.loadLocalGame()) - Advances to hole (
engine.advance()→ dealStatus=0) - Renders the hole stage
- Shows advance button
Between games (TS — design difference)
Unlike JS (fully automatic), TS shows the DEAL button after river so the player explicitly starts the next game. This is a deliberate UX difference — considered acceptable for v5.Acceptance Criteria
| # | Criterion | JS | TS | UMA |
|---|---|---|---|---|
| AC1 | Page load shows hole stage — cards dealt, odds visible | ✅ | ✅ | ⬜ |
| AC2 | DEAL button hidden on initial load | N/A | ✅ | ⬜ |
| AC3 | DEAL button appears after river resolved | N/A | ✅ | ⬜ |
| AC4 | Playwright confirms dealStatus === 0 without player interaction | ✅ | ✅ | ⬜ |
Version Parity
| Version | Status | Notes |
|---|---|---|
| JS (reference) | ✅ Verified | Auto-deals via InitialiseGame() → AdvanceGameState() |
| TS | ✅ Fixed | _onDeal() called from create() — HEDGE-134 |
| UMA | ⬜ Not audited | Phase 5 |
Test Coverage
| Test | Location |
|---|---|
| Auto-deal on load | tests/features/F020-deal-button.spec.ts (to add) |
| Smoke — page loads at hole stage | standalone_reference_client/tests/e2e/smoke.spec.ts |
