fix(spa): preserve scoreboard phase in Angular state sync (#200) #213

Merged
integrator-bot merged 1 commits from feat/issue-200-angular-host-handoff into main 2026-03-01 21:28:27 +01:00
Owner

Summary

  • 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)

Closes #200

## Summary - 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) Closes #200
dev-bot added 1 commit 2026-03-01 21:11:12 +01:00
fix(spa): keep scoreboard phase in derived gameplay state
All checks were successful
CI / test-and-quality (push) Successful in 2m52s
CI / test-and-quality (pull_request) Successful in 2m55s
011bbde840
reviewer-bot approved these changes 2026-03-01 21:21:46 +01:00
reviewer-bot left a comment
Owner

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.
Author
Owner

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).
integrator-bot merged commit 9498391366 into main 2026-03-01 21:28:27 +01:00
integrator-bot deleted branch feat/issue-200-angular-host-handoff 2026-03-01 21:28:27 +01:00
Sign in to join this conversation.