Restore synced Home positions beyond the local timeline cache#6
Merged
masonasons merged 2 commits intoJul 25, 2026
Merged
Conversation
Co-Authored-By: OpenAI Codex <noreply@openai.com>
johanntan
marked this pull request as ready for review
July 25, 2026 04:08
Co-Authored-By: OpenAI Codex <noreply@openai.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.
Summary
Root cause
Home-position sync only searched rows already loaded by the normal cache and refresh paths. If another client saved a position older than the local device’s cached timeline, the marker could not be resolved and the UI fell back to the newest post.
On iOS, automatic focus on that first post could also be interpreted as user navigation, canceling the asynchronous marker restore.
After an app had been backgrounded, its first refresh still carried the previous “user moved” state and therefore skipped pulling the other client’s marker. macOS also did not request a refresh when it became active again. This made a full relaunch appear necessary before either Apple client would adopt the new position.
Behavior
The existing fast path remains unchanged when the marker is already loaded.
When it is missing, the shared timeline core loads up to 25 pages—roughly 1,000 posts—until it finds the marker. Genuine user navigation still cancels the restore, so an active reader is not moved unexpectedly.
When a frontend resumes, the shared core starts a fresh sync window and refreshes the current timeline. Movement made after resuming still cancels an in-flight restore. Native activation hooks provide the same behavior on iOS, macOS, Windows, and Android.
Validation
git diff --check