LocalMatchClient only invokes onPhaseTransition from the Tick loop when a Tick produces phase === "finished". Resign (and any other dispatch that finishes the match) updates reducer state via emit() but never calls onPhaseTransition.
Impact
Solo resign leaves HexTowerDefenceComponent.viewPhase on "playing" while state.phase is already "finished", so the finished HUD / activity match-end track never run.
Expected
Any transition into finished (Tick or Resign / defeat via action) should notify onPhaseTransition once.
Repro (unit)
hex-tower-defence.match-hud.spec.ts — "solo resign finishes reducer state but leaves viewPhase on playing".
Suggested fix
In LocalMatchClient.dispatch (or after emit), if next.phase === "finished" && !finishedNotified, set the flag and call onPhaseTransition?.(next).
## Summary
`LocalMatchClient` only invokes `onPhaseTransition` from the Tick loop when a Tick produces `phase === "finished"`. Resign (and any other `dispatch` that finishes the match) updates reducer state via `emit()` but never calls `onPhaseTransition`.
## Impact
Solo resign leaves `HexTowerDefenceComponent.viewPhase` on `"playing"` while `state.phase` is already `"finished"`, so the finished HUD / activity `match-end` track never run.
## Expected
Any transition into `finished` (Tick **or** Resign / defeat via action) should notify `onPhaseTransition` once.
## Repro (unit)
`hex-tower-defence.match-hud.spec.ts` — "solo resign finishes reducer state but leaves viewPhase on playing".
## Suggested fix
In `LocalMatchClient.dispatch` (or after emit), if `next.phase === "finished" && !finishedNotified`, set the flag and call `onPhaseTransition?.(next)`.
Already present on spikersoft-angularmaster. LocalMatchClient.dispatch notifies onPhaseTransition when Resign (or any action) moves the match to finished, so solo resign flips viewPhase and runs match-end. Closing.
Already present on `spikersoft-angular` `master`. `LocalMatchClient.dispatch` notifies `onPhaseTransition` when Resign (or any action) moves the match to `finished`, so solo resign flips `viewPhase` and runs match-end. Closing.
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
LocalMatchClientonly invokesonPhaseTransitionfrom the Tick loop when a Tick producesphase === "finished". Resign (and any otherdispatchthat finishes the match) updates reducer state viaemit()but never callsonPhaseTransition.Impact
Solo resign leaves
HexTowerDefenceComponent.viewPhaseon"playing"whilestate.phaseis already"finished", so the finished HUD / activitymatch-endtrack never run.Expected
Any transition into
finished(Tick or Resign / defeat via action) should notifyonPhaseTransitiononce.Repro (unit)
hex-tower-defence.match-hud.spec.ts— "solo resign finishes reducer state but leaves viewPhase on playing".Suggested fix
In
LocalMatchClient.dispatch(or after emit), ifnext.phase === "finished" && !finishedNotified, set the flag and callonPhaseTransition?.(next).Already present on
spikersoft-angularmaster.LocalMatchClient.dispatchnotifiesonPhaseTransitionwhen Resign (or any action) moves the match tofinished, so solo resign flipsviewPhaseand runs match-end. Closing.