refactor(ui): per-table action-submission track — unblock multi-tabling (blocks #833)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
Direzione di ricerca
Start with src/hooks/playerActions/transportAction.ts, then trace the GameMessageBus, ActionSubmitController, and auto-action hooks named in the issue. Check how GameStateProvider scopes state and how Table receives active-table status. Done means tests mount multiple tables and verify snapshot isolation, background tables do not auto-submit, and single-table behavior remains unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Overview
Blocker found while building multi-tabling PR 2 (block52/ui#833, part of block52/ui#55). The live workspace mounts up to 4 tables at once, each in its own GameStateProvider, and that works — but the outbound action-submission path is not table-scoped, so with more than one live table it can submit with the wrong state. This ticket is the submission-layer refactor that makes multi-tabling safe. Blocks #833.
The problem
- The logical-track snapshot used when submitting an action lives in a module-level singleton (
src/hooks/playerActions/transportAction.ts). Every mounted table'sGameMessageBuswrites to that one singleton. - With 2+ live tables, the active table's
ActionSubmitControllercan read another table's snapshot → submits with the wrong action index (a real-money misfire risk). - Background tables also keep running their auto-action hooks (auto-post-blinds, auto-muck, auto-fold, etc.), so a table you're not looking at can act on its own.
Single-table play is unaffected — today there's only ever one table, so the singleton is fine. This only bites once multiple tables are mounted.
The fix (two parts)
- Per-table logical track — scope the submission snapshot per table (per
GameStateProviderinstance) instead of a module-level singleton, so each table'sActionSubmitControllerreads only its own state. Thread the table id / an instance-scoped store throughtransportAction.tsand theGameMessageBus. background/activegating onTable— add a prop so a table that isn't the active one pauses its auto- submission hooks*; only the visible/active table may auto-act (or submit) on the player's behalf.
Acceptance criteria
- AC-1 With 4 live tables open, submitting an action on the active table always uses that table's own action index/state — never another table's.
- AC-2 Background (non-active) tables keep their auto-actions (deal, blinds, armed pre-actions), each acting only on its own table (changed per review on #893).
- AC-3 Single-table behaviour is unchanged (no regression to the current path).
- AC-4 Covered by tests that mount multiple tables and assert isolation of the submission snapshot.
References
src/hooks/playerActions/transportAction.ts(the singleton), theGameMessageBus,ActionSubmitController, and the auto-* hooks undersrc/hooks/playerActions/.- Unblocks block52/ui#833 (multi-tabling PR 2); part of block52/ui#55.
🤖 Generated with Claude Code
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 5
- Merge medio
- 22h 3m
- PR unite (30g)
- 103
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di block52/ui
-
enhancement tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug: next-to-act flash stuck on the last folder when their fold closes a called all-in (fold + runout + hand_ended in one snapshot)Forse già presa @bitcoinbrisbane l’ha presa 1 giorno fa. Apertaanimation bug game-flow sit-and-go UI Week 2
block52/ui#968 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(ui): player language setting and translated player screensForse già presa @Dzeezbtc l’ha presa 3 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillForse già presa @Dzeezbtc l’ha presa 5 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
architecture refactor tech debt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
binding:python bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
coollabsio/orbit#72 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage potential-regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aws/aws-sdk-js-v3#8408 ·
I maintainer di solito rispondono entro 1 giorno