fix(game): clear nudges on game completion #148
Reference in New Issue
Block a user
Delete Branch "feature/nudge-clear-on-completion"
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?
Nudge badges lingered in the lobby on games that ended by turn-timeout, resignation or forfeit — those paths commit the finish directly, bypassing the move path's per-mover
NudgeClearer, so the awaited seat's nudge was never marked read.A wired
NudgeExpirer(social.ExpireNudges) is now called from the sharedcommitfinish block (covering every completion path: closing move, resign, forfeit, turn-timeout) and from thevoidGamerecovery path. It clears every seat's nudge bits for the game and leaves chat messages unread; unlikeClearNudgesit records no publish-to-read latency (a completion is an expiry, not a read).Integration test
TestGameCompletionExpiresNudgesKeepsChatreproduces the timeout case (nudge cleared, chat kept). Docs updated: ARCHITECTURE §9.1, FUNCTIONAL (+_ru), backend/README.