Repository navigation
Conversation
This was referenced Oct 18, 2026
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
throughrequest contractProblem
The old poll sent the timestamp of the oldest loaded notification back to the server. Each extra page made every later poll query, serialize, transfer, and replace a larger result.
This change keeps polling work bounded no matter how far someone has scrolled.
Safety and behavior
The new endpoint is inside the authenticated route group. It validates the filter and a maximum of 20 distinct visible group IDs before acknowledging reads, scopes every row to the signed-in recipient, and returns
Cache-Control: private, no-store.The client compares both the stable group ID and the current representative event ID. It applies a response only when that exact boundary, or an unchanged prefix, proves continuity. Reconciliation runs against Inertia's current page props so a page loaded while the poll was in flight is not overwritten.
Ambiguous changes leave the current list untouched and show New notifications. That button performs a normal page-one reload. Complete responses also check Inertia's live
InfiniteScrollRef.hasNext()state, so an error-bearing pagination response cannot leave an obsolete internal cursor behind.Polls run every 30 seconds, pause in hidden tabs and during navigation, reject overlap, abort stale requests, and time out after 10 seconds.
Verification
composer test: 2,098 PHP tests and 12,447 assertions; 100% PHP line coverage and type coverageLocal database verification used PostgreSQL 17. The component tests model Inertia lifecycle callbacks and use its public scroll handle; they do not execute a real browser pagination request. Full TSX test discovery remains covered separately by #300.
Limits
Offscreen historical rows can remain stale until they become visible or the page is refreshed. A delayed transaction that becomes visible below a previously proven boundary has the same limitation. Stronger guarantees would require a persistent mutation version or change feed.
This work is separate from #264, which optimizes the global unread count rather than inbox polling depth.