Repository navigation
fix: exclude retired notifications from inbox counts - #774
Merged
thomasluizon merged 1 commit intoOct 19, 2026
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes in the notification query handler and regression tests, including the matching retirement policy in orbit-ui-mobile.
- Consistent visibility: Items, unread counts, and total counts share the same account-scoped filter for retired URLs, applied before pagination while retaining null URLs.
- Preserved behavior: Response contracts, stored rows, soft-delete filtering, and bulk mark-read/delete behavior remain unchanged.
- Regression coverage: Verified the 51-row case, mixed notification counts, filtered paging, retained URLs, and PostgreSQL query translation. All 22 focused Application tests and 6 relational repository tests passed; no live PostgreSQL execution or full-suite rerun was performed.
gpt-6.1-sol | 𝕏
|
thomasluizon
deleted the
thomasluizon/ticket-1551-retired-notification-count
branch
October 19, 2026 07:55
thomasluizon
added a commit
that referenced
this pull request
Oct 19, 2026
…d cancellations and the Play renewal notice (#746) (#778) * Deprecate AI memory HTTP contracts for ORB-229 (part 1) (#771) (cherry picked from commit f8abd02) * Deprecate challenge and accountability routes for ORB-212 (#772) (cherry picked from commit 572b8de) * Deprecate social API routes and required profile fields (ORB-233 part 1) (#773) (cherry picked from commit 9c414c7) * fix: exclude retired notifications from inbox counts (#774) (cherry picked from commit f5df366) * fix: retain owed cancellations after account erasure (#775) * fix: retain provider cancellation obligations after account erasure * fix: preserve erasure for accounts without billing obligations * fix: claim owed cancellations before provider calls * fix: alert owed cancellation exhaustion only after a failed attempt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c369535) * fix: notify returning Play subscribers about renewal (#776) * fix: explain Play renewal recovery on account reactivation * test: register reactivation service in sign-in retry fixture * fix: verify Play renewal before reactivation notice (cherry picked from commit 96023f9) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.




Fixes thomasluizon/orbit-tickets#1551.
Accounts with 51 unread retired notifications could have an empty client inbox and an unread badge they could not clear.
GetNotificationsQueryHandlernow excludes URLs starting with/social,/public-profileor/u/from items, unread count and total count before database paging.The shared expression and its prefix list live in
src/Orbit.Application/Notifications/Queries/GetNotificationsQuery.cs, with a linked comment naming the client constantRETIRED_NOTIFICATION_URL_PREFIXES. Keeping the filter in this read handler preserves mark-all-read and delete-all behavior for every account row. Null URLs remain visible. Stored rows and response contracts are unchanged; no migration is needed.tests/Orbit.Application.Tests/Queries/Notifications/GetNotificationsQueryHandlerTests.cscovers the 51-row regression for each prefix, active unread rows beyond the first page, filtered totals, offset/limit paging, account ownership, soft deletes and retained active URLs. The tests use the real repository with EF InMemory. A separate test runs all three query predicates and paging through the installed Npgsql translator without opening a database connection.Assumptions
en_US.UTF-8) and Brazilian Portuguese (pt_BR.UTF-8), matchingLocaleHelper, rather than additional regional variants.Test evidence
At baseline
a7d1cf2e, before changing tests or implementation,dotnet test tests/Orbit.Application.Tests --filter FullyQualifiedName~GetNotificationsQueryHandlerTests --verbosity minimalpassed all 5 existing tests with the defect present.With the new regression tests and the unchanged implementation, the same command failed 5 of 17 cases.
Handle_FiftyOneUnreadRetiredNotifications_ReturnsEmptyInboxfailed for all three prefixes: unread and total counts were 51 instead of 0, and retired items were returned.Handle_MixedNotifications_CountsActiveUnreadRowsBeyondThePagereported unread 56 instead of 53 and total 58 instead of 55.Handle_OffsetAndLimit_PageOverActiveNotificationsreturned/chat,/public-profile/userinstead of/progress,/profile.After the fix, the same command passed all 17 cases. After adding
Handle_FiltersAndPaging_TranslateToPostgresWithoutConnecting, the following focused command passed all 22 cases, including the existing bulk-action tests:Both builds exited 0 with zero errors:
Generated OpenAPI documents remain unchanged. Builds report existing dependency, obsolete API and versioning warnings.
Each command below passed under both locale environments above, with 10,103 tests per locale:
No external response fields were introduced. PostgreSQL translation is exercised directly by the installed provider in the focused test above. No server, browser, live database or mutation testing was started.