david raistrick
ab9f8fa2e7
fix(turn): log reorder + deathSave (BUG-7)
reorderParticipants returned log:null → handler skipped logAction → drag
invisible in combat log, no undo payload. Now returns
log:{ message, undo:{ participants, turnOrderIds, currentTurnParticipantId }}.
App.js handleDrop calls logAction on logged reorders.
Found second gap: deathSave also returned null log (both branches).
Fixed — message + undo (participants snapshot).
Added logging contract test (turn.logging.test.js):
- all mutating ops logged (start/next/pause/add/remove/toggle/hp/deathsave/
condition/reorder/end)
- no-ops return null log (same-id, cross-init, cross-pointer blocks)
- undo payloads valid + restore prior state
- documents addParticipants + updateParticipant gaps (null log, intentional)
235 tests green.
2026-07-04 17:22:52 -04:00
..
2026-07-04 15:40:39 -04:00
2026-07-04 17:22:52 -04:00
2026-07-04 17:06:07 -04:00
2026-07-04 17:12:13 -04:00
2026-07-04 17:18:29 -04:00
2026-07-01 11:42:43 -04:00
2026-07-03 17:59:41 -04:00
2026-07-01 14:22:02 -04:00
2026-07-04 17:12:13 -04:00
2026-07-04 17:22:52 -04:00
2026-06-29 16:02:22 -04:00
2026-07-01 16:00:00 -04:00
2026-07-04 17:12:13 -04:00
2026-07-01 16:00:00 -04:00
2026-07-01 11:42:43 -04:00
2026-07-04 15:40:39 -04:00
2026-07-01 16:00:00 -04:00