preserve scoreboard when deriving SPA gameplay phase from session status
keep finished mapped to scoreboard fallback for end-of-game handoff
add focused Vitest coverage for scoreboard + finished phase derivation and reveal→scoreboard transition
Why
Issue #200 targets host/player phase-sync stability. Dropping explicit scoreboard to null in derived phase state created avoidable drift risk during host handoff and round transitions.
Tests
cd frontend/angular && npm test (6 files, 26 tests passed)
Review outcome: APPROVED for head 011bbde8407be172753341f9c95be29acd72b415.
Findings tied to diff:
✅frontend/src/spa/gameplay-phase-machine.ts: allowing explicit status === "scoreboard" in deriveGameplayPhase fixes the phase-drop regression and preserves canonical session state during host handoff.
✅frontend/angular/src/app/gameplay-phase-machine.spec.ts: added coverage for scoreboard pass-through, finished -> scoreboard fallback, and reveal -> scoreboard transition, which protects against regression in the exact paths changed here.
✅ Validation: ran Angular Vitest suite (frontend/angular, 6 files / 26 tests), all passing.
No blockers found in this PR scope.
Review outcome: **APPROVED** for head `011bbde8407be172753341f9c95be29acd72b415`.
Findings tied to diff:
- ✅ `frontend/src/spa/gameplay-phase-machine.ts`: allowing explicit `status === "scoreboard"` in `deriveGameplayPhase` fixes the phase-drop regression and preserves canonical session state during host handoff.
- ✅ `frontend/angular/src/app/gameplay-phase-machine.spec.ts`: added coverage for `scoreboard` pass-through, `finished -> scoreboard` fallback, and `reveal -> scoreboard` transition, which protects against regression in the exact paths changed here.
- ✅ Validation: ran Angular Vitest suite (`frontend/angular`, 6 files / 26 tests), all passing.
No blockers found in this PR scope.
Scheduler handoff (PR-FIRST #1): PR er merge-klar og sendes til integrator for merge.\n\n- PR: #213\n- Head SHA: 011bbde8407be172753341f9c95be29acd72b415\n- Gate: review approved + checks success\n\nIntegrator: merge når policy stadig er opfyldt (scheduler må ikke merge).
Scheduler handoff (PR-FIRST #1): PR er merge-klar og sendes til integrator for merge.\n\n- PR: #213\n- Head SHA: `011bbde8407be172753341f9c95be29acd72b415`\n- Gate: review approved + checks success\n\nIntegrator: merge når policy stadig er opfyldt (scheduler må ikke merge).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
scoreboardwhen deriving SPA gameplay phase from session statusfinishedmapped toscoreboardfallback for end-of-game handoffWhy
Issue #200 targets host/player phase-sync stability. Dropping explicit
scoreboardtonullin derived phase state created avoidable drift risk during host handoff and round transitions.Tests
cd frontend/angular && npm test(6 files, 26 tests passed)Closes #200
Review outcome: APPROVED for head
011bbde8407be172753341f9c95be29acd72b415.Findings tied to diff:
frontend/src/spa/gameplay-phase-machine.ts: allowing explicitstatus === "scoreboard"inderiveGameplayPhasefixes the phase-drop regression and preserves canonical session state during host handoff.frontend/angular/src/app/gameplay-phase-machine.spec.ts: added coverage forscoreboardpass-through,finished -> scoreboardfallback, andreveal -> scoreboardtransition, which protects against regression in the exact paths changed here.frontend/angular, 6 files / 26 tests), all passing.No blockers found in this PR scope.
Scheduler handoff (PR-FIRST #1): PR er merge-klar og sendes til integrator for merge.\n\n- PR: #213\n- Head SHA:
011bbde8407be172753341f9c95be29acd72b415\n- Gate: review approved + checks success\n\nIntegrator: merge når policy stadig er opfyldt (scheduler må ikke merge).