Rework backend #1

Merged
robert merged 86 commits from rework-backend into main 2026-07-01 19:29:34 -04:00
Showing only changes of commit d48ecf1460 - Show all commits
+13
View File
@@ -50,6 +50,19 @@
- Test: `shared/tests/turn.characterization.test.js` 'addParticipant rejects
duplicate id' — GREEN.
### BUG-4: hide-player-HP breaks display view (preexisting)
- Toggle "hide player HP" in admin → display view flips to "Game Session Paused".
- Toggling back does NOT recover. Must re-activate encounter in encounters
panel to restore display.
- Expected: hide-HP toggle updates one field on activeDisplay/status doc,
display stays live on current encounter.
- Likely cause: toggle writes to wrong path, or clobbers activeCampaignId/
activeEncounterId with null (setDoc replace vs updateDoc patch).
- Fix: use updateDoc (patch) not setDoc (replace); or include all existing
fields when writing.
- Test: render App + DisplayView, toggle hide-HP, assert display still shows
encounter (not paused).
## Pipeline
- [ ] Red test: dead participant still in turnOrderIds, turn still advances to them
- [ ] Fix `shared/turn.js`: don't drop dead from turn order