Repository navigation
Fix unread navigation loading entire message history - #740
Merged
Merged
Conversation
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.
Merge decision: ready — unread navigation seeks directly to a bounded window instead of loading the entire exchange, preserving scoped access and history navigation.
User outcome
“Jump to first unread” no longer walks every historical page. In the matched 1,000-message browser fixture it falls from 2.08–2.62 seconds (19 requests, 1,000 rendered messages) to 66–77 ms (one request, 50 rendered messages). Native task:
#V#task_agent_43536ba9d1dd211b359a0cf4709f8707.Material changes
The existing exchange endpoint locates the earliest unread using the same actor/group/organisation/deletion scope, then returns a bounded chronological window with earlier/later cursors. The pane preserves pending position and retry, suppresses disconnected latest-page polling while reading an earlier window, and supports explicit return to Latest message. No schema/index migration or represented write.
Evidence
docs/engineering/unread_message_latency_2026_09_17.md.Ship boundary
Minimum ship criteria are removal of full-history traversal, correct chronological target and preserved bounded navigation/read state. Wrong actor/group visibility, skipped message ranges or broken retry would block shipment; tests found none.
Public database/network latency remains unmeasured: these browser timings use synthetic HTTP responses with 50 ms latency. There is no prepared live browser profile bound to this checkout. This limits the public under-one-second claim, not the demonstrated client traversal improvement. No deployment is requested or included. No secrets or runtime data committed.