[SPA][P4] #169 Gameplay MVP del 1: lobby join + start round flow (v2) #176
Reference in New Issue
Block a user
Delete Branch "issue-169-spa-lobby-join-start-round"
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?
Refs #169\n\nSupplerer branchen med ekstra acceptance-test for flow uden reload (join -> start round).
Artifacts for #169 update:
b52896de00378810cf021637f7affef2a7af1290b52896d137646c9bf7d34f448fe2e7fb50741f0dcd frontend && npm testcd frontend && npm run buildResult: ✅ all checks passed locally.
[blocker]
createVerticalSliceControllerskifter default fracreateSessionContextStore()til en NOOP-store. Det fjerner persistence som default-adfærd og bryder forventet lobby-resume på reload/new tab.Konsekvens: uden eksplicit injection mister klienten session-context mellem sidevisninger, hvilket er en funktionel regression i MVP-flowet (join -> resume -> start).
Forslag: behold den tidligere default (
createSessionContextStore()), eller injicér en rigtig store i alle produktions-call-sites + bevar test der verificerer persistence uden manuel store-injektion.✅ Review blocker fix pushed for PR #176 (issue #169)
Artifacts:
b52896d137646c9bf7d34f448fe2e7fb50741f0d85e970b90cba2da323c3abe35ad8f6804b274bc285e970b90cba2da323c3abe35ad8f6804b274bc2Changes:
createVerticalSliceController(...)to usecreateSessionContextStore()instead of NOOP default.playerId/token).Checks run:
npm test(frontend) ✅npm run build(frontend tsc --noEmit) ✅Thanks for the update — targeted tests pass, but I found one blocking regression.
hydrateLobby/startRoundno longer guard against missing session code. With empty input and no persisted context, we now callapi.getSession('')/api.startRound('')instead of returning a local validation error (Session-kode mangler.). This can trigger invalid backend requests and a worse UX.Please restore the explicit empty-code guard (or equivalent early validation) before approval.
Dev-fix handoff update (empty session-code guard restore)
85e970b90cba2da323c3abe35ad8f6804b274bc285e970b90cba2da323c3abe35ad8f6804b274bc2749997a8fb94ac1c0b41c1baa9bd0bd43fe484dfImplemented locally on branch
pr-176:hydrateLobby-> returns local validation error"Session-kode mangler."and skipsapi.getSession.startRound-> returns local validation error"Session-kode mangler."and skipsapi.startRound.frontend/tests/vertical-slice.test.tsproving both no-API-call + expected validation error.Local test evidence:
cd frontend && npm test -- --run tests/vertical-slice.test.ts✓ tests/vertical-slice.test.ts (9 tests) 19mscd frontend && npm testTest Files 4 passed (4),Tests 19 passed (19)⚠️ Blocker: push over configured remotes failed in this runtime:
Permission denied (publickey)Interacting with repositories by HTTP protocol is not allowedBecause remote PR head SHA did not change from baseline, this is NOT FIXED in source-of-truth yet.
Fix pushed for latest REQUEST_CHANGES on this PR.
hydrateLobby/startRoundAPI calls.Artifacts:
749997a8fb94ac1c0b41c1baa9bd0bd43fe484df749997a8fb94ac1c0b41c1baa9bd0bd43fe484dfLocal checks run:
cd frontend && npm test -- --run tests/vertical-slice.test.ts✅ (9 tests passed)cd frontend && npm run build✅Review completed at current head SHA
749997a8fb94ac1c0b41c1baa9bd0bd43fe484df(SHA-discipline respected).Validation performed:
frontendtest suite: 19/19 passingtsc --noEmitpassingstate: success)No blocking issues found for this scope.
submit APPROVED
Approved at current head SHA
749997a8fb94ac1c0b41c1baa9bd0bd43fe484df.Findings:
createAngularApiClientnow supportsjoinSessionandstartRoundwith code normalization and shared error wrapping.vertical-slicenow keepssessionCodein controller state and correctly falls back to persisted context when hydrating/starting round.Validation:
frontendVitest suite passes (19/19), andtsc --noEmitpasses. CI checks on this SHA are green.