fix(wintermute): retract notifications when their record is deleted - #227
Open
afbase wants to merge 1 commit into
Open
fix(wintermute): retract notifications when their record is deleted#227afbase wants to merge 1 commit into
afbase wants to merge 1 commit into
Conversation
5 tasks
Deleting a record left its notification rows in place. The appview's listNotifications gates on the subject's existence and never on the notified record's, so a notification outlives the like or repost that caused it and keeps rendering; the unread count does gate on that record, so the badge and the list disagree. Delete notifications keyed on the removed record, matching the reference indexer's notifsForDelete.
afbase
force-pushed
the
fix/wintermute-notification-retraction
branch
from
August 11, 2026 20:49
8a1bacf to
a0ac6f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deleting a record left its notification rows behind. The appview's
listNotificationsgates on the subject's existence and never on the notified record's, so a notification outlives the like or repost that caused it and keeps rendering — while the unread count does gate on that record, so the badge and the list disagree. Deletes now remove notifications keyed on the removed record, matching the reference indexer'snotifsForDelete.Applies to every collection that produces notifications, so unlikes, un-reposts and unfollows all retract correctly.
Test plan
cargo clippy -p rsky-wintermute --all-targetsis cleancargo test -p rsky-wintermute --libagainst a schema-loaded Postgres, including the two added cases: retraction on like delete, and retraction on repost delete with the boilerplate record skip enabledcargo llvm-cov -p rsky-wintermutecargo build --release -p rsky-wintermute