diff --git a/TODO.md b/TODO.md index 278e9e3..36bc468 100644 --- a/TODO.md +++ b/TODO.md @@ -152,10 +152,38 @@ REWORK_PLAN.md. - Baseline (my changes removed) also exit=1. Pre-existing, not regression. - Crashes whole FE test run (process dies). +### BUG-13: reorderParticipants crossing current pointer = ambiguous acted-semantics +- Discovered 7/1 replay. `reorderParticipants` (shared/turn.js:522) = pure + drag, no pointer logic. Swapping two actors across current pointer mid-round + = ambiguous who-acted-this-round. Earlier replay arbitrary swaps showed + skip/double (R9 Summon3 2x, R11 Goblin1 2x) before fix restricted swaps to + upcoming-only. +- Replay now avoids crossing (adjacent upcoming pair only, commit af165f4). + Real app untested: if DM drags actor past current pointer mid-round, skip/ + double behavior undefined. +- Decide: block cross-pointer reorder, or define acted-semantics. RED needed. + +### BUG-14: addParticipant init-insertion breaks after drag-reorder +- Discovered 7/1 replay. `computeTurnOrderAfterAddition` scans for first id + with init < addedInit, assumes list init-sorted. After drag, list NOT sorted + → scan hits wrong slot. +- Trace turn 30→31: list `[Goblin1:20,Goblin2:22,...]` (drag moved Goblin1 + before Goblin2). Add Reinforce3 init 21 → scan hits Goblin1:20 (idx 0, <21) + first → insert at 0. Should slot after Goblin2:22. WRONG. +- Root conflict: 1-list model = drag source of truth (no re-sort); addParticipant + = init-based insertion (needs sorted list). After ANY drag, add-insertion + meaningless. +- Proposed fix: append to end always (option A). DM drags to position. Matches + drag = source of truth. Makes `computeTurnOrderAfterAddition` trivial. +- Related: FEAT-3 (initiative first-class field). + ## Pipeline (bugs only --- milestones live in REWORK_PLAN.md) - [ ] BUG-4: fix setDoc→updateDoc for all 5 activeDisplay sites - [x] BUG-5: fixed (1-list model, 500 rounds clean) - [x] BUG-6: fixed structurally (1-list model) +- [x] BUG-12: fixed — campaign selection follows activeDisplay - [ ] BUG-8: ws adapter reconnect - [ ] BUG-10: deact+reactivate double-act - [ ] BUG-11: FE Combat.scenario crash +- [ ] BUG-13: reorder cross-pointer semantics (RED + decide block/allow) +- [ ] BUG-14: addParticipant init-insert breaks post-drag (append? + RED)