[SPA][P7] #172 Gameplay MVP-del 2: Lie -> guess -> reveal -> scoreboard wired flow #181
Reference in New Issue
Block a user
Delete Branch "dev/issue-172-spa-gameplay-flow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
round_question.answers/host/...and/player/...shell paths in Angular route configAcceptance evidence (#172)
Flow log (SPA actions):
startRound-> session enterslieshowQuestion->round_questionis availablesubmitLie-> accepted with existingplayer_id + session_token + textpayloadmixAnswers-> session entersguessround_question.answers,submitGuess-> accepted with existing payloadcalculateScores-> session entersrevealloadScoreboard-> scoreboard payload shown in SPA (no page reload)Error/retry state coverage:
Validation
cd frontend && npm test -- --runcd frontend/angular && npm ci && npm run buildCloses #172
Review findings for current head
2f6a21de9c54af8760e506c1c106f51fa48cc220:HostShellComponent/PlayerShellComponenttransitions (startRound/showQuestion/mixAnswers/calculateScores,submitLie/submitGuess, retry/error paths). Please add focused tests (component/service-level) that assert request payloads and state transitions for lie/guess/reveal/scoreboard to prevent contract regressions.Løgnwith multiple English labels/messages). Consider aligning to a single locale and/or moving strings to the project i18n pattern for consistency.Validation notes from review run:
frontend:npm test -- --run✅ (20 tests)frontend/angular:npm run build✅Requesting changes for missing automated coverage on the new gameplay wiring.
Addressed requested test coverage for Angular shell wiring (core transitions + retry/error paths).
Added tests
HostShellComponentstartRound()transition wiring: verifies POST to start round, then session refresh GET, and state update (roundQuestionId, loading reset).loadScoreboard()error/retry path: verifies failing scoreboard request setsscoreboardErrorfor retry affordance.PlayerShellComponentselectedGuesswhen status is no longerguess.submitError.kind=lie; second attempt succeeds and refreshes to updated session status.Minimal test harness changes
vitesttest script/dependency infrontend/angular/package.json.frontend/angular/vitest.config.ts(src/**/*.spec.ts+ setup file).frontend/angular/src/test-setup.tswithimport "@angular/compiler"for Angular JIT in Vitest.Verification run
frontend/angular:npm test✅ (4 tests passing)frontend/angular:npm run build✅Commit:
acc3420a863c39298d68dc07e21533f961f8c716Update: pushed the same test fix onto PR #181 source branch
dev/issue-172-spa-gameplay-flowso the PR head is now updated.Current commit on PR branch:
89870f45f3c1ff693f6ba273984f4af3f7f7fa05.Review (head
de4302622b0af7b1c07ba36b2db3c99d8ca34699)When CI status is green on this same SHA (or a new SHA is pushed), I will update review-state accordingly.
Re-review on head
de4302622b: CI quality gates are green, and local Angular checks pass (vitest: 6 tests, ng build successful). No blockers found. APPROVED.CI green + local Angular checks passed on this SHA.