Repository navigation
fix(mobile): prevent markdown and file tab reload and screen flicker on retap and revisit - #30033
Merged
nwparker merged 3 commits intoOct 17, 2026
Conversation
…on retap and revisit
Contributor
Author
|
@coderabbitai review |
Contributor
|
9 tasks done
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.
ELI5
On mobile, tapping an already-open Markdown or file tab could replace the document with a loading spinner and reset the editor. Retapping now preserves the view. Returning to a cached tab displays its content immediately while checking the host for updates.
What Changed
Skip activation and reads when the active document is already loaded or loading. Keep clean cached documents visible during refreshes, retain them on refresh failure, and ignore replies from superseded reads or closed tabs. Markdown refreshes also preserve edits and saves made while a read is pending, and apply changes to editing permissions, desktop draft status, and preview truncation even when the text and version match.
Why
Reusing the existing document cache and keeping readers mounted avoids resetting the caret and showing a blank loading state. Refreshing cached tabs in the background still picks up desktop changes; skipping every revisit would leave them stale. Explicitly discarding a phone draft still reloads it.
Linked Issue
Fixes #30031
Visual Proof
Maintainer comparison of the actual mobile readers, rich editor, and tab-switching hooks in a hidden Electron renderer on macOS, with controlled 1.2-second host replies. This is a component harness, not a newly tested Android/iOS build.
Before: retapping the active Markdown tab removes the editor and displays a spinner.
After: retapping retains the same editor and caret, sends no read or activation request, and preserves the measured scroll position (450 px).
Cached Markdown and file content remain visible while revisit reads are pending. A changed host document updates the existing editor, and a failed refresh retains the visible document.
Testing
verify/PR checks passed) and Mobile Checks passed on20f362f8a4e72cb211244da97663e5d91381a90f.Review
Reproduced and corrected two additional issues: unchanged text could hide permission/status changes, and a delayed refresh could overwrite a newer completed phone save. Regression tests failed before those corrections and pass afterward. Existing RPC methods and execution-host routing remain in use, including headless disk fallback and folder workspaces.
Agent skill upstream boundary
Checklist