fix(game): clear nudges on game completion #148

Merged
developer merged 1 commits from feature/nudge-clear-on-completion into development 2026-07-01 11:23:39 +00:00
Owner

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 shared commit finish block (covering every completion path: closing move, resign, forfeit, turn-timeout) and from the voidGame recovery path. It clears every seat's nudge bits for the game and leaves chat messages unread; unlike ClearNudges it records no publish-to-read latency (a completion is an expiry, not a read).

Integration test TestGameCompletionExpiresNudgesKeepsChat reproduces the timeout case (nudge cleared, chat kept). Docs updated: ARCHITECTURE §9.1, FUNCTIONAL (+_ru), backend/README.

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 shared `commit` finish block (covering every completion path: closing move, resign, forfeit, turn-timeout) and from the `voidGame` recovery path. It clears every seat's nudge bits for the game and **leaves chat messages unread**; unlike `ClearNudges` it records no publish-to-read latency (a completion is an expiry, not a read). Integration test `TestGameCompletionExpiresNudgesKeepsChat` reproduces the timeout case (nudge cleared, chat kept). Docs updated: ARCHITECTURE §9.1, FUNCTIONAL (+_ru), backend/README.
developer added 1 commit 2026-06-30 20:52:05 +00:00
fix(game): clear nudges on game completion
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Has been skipped
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m19s
f9acea1d9a
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 finished game's nudges are stale, so clear them all.

Add a wired NudgeExpirer (social.ExpireNudges) called from the shared
commit finish block — covering every completion path — and from the
voidGame recovery path. It clears every seat's nudge bits for the game
and leaves chat messages unread; unlike ClearNudges it records no
publish-to-read latency, since a completion is an expiry, not a read.

An integration test reproduces the timeout case (nudge cleared, chat
kept). Docs: ARCHITECTURE §9.1, FUNCTIONAL (+_ru), backend/README.
owner approved these changes 2026-07-01 11:21:24 +00:00
developer merged commit 41f26da9a7 into development 2026-07-01 11:23:39 +00:00
developer deleted branch feature/nudge-clear-on-completion 2026-07-01 11:23:39 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#148