fix(editor): improve mobile scrolling, highlighting, and keyboard behavior - #2864
Open
bajrangCoder wants to merge 4 commits into
Open
fix(editor): improve mobile scrolling, highlighting, and keyboard behavior#2864bajrangCoder wants to merge 4 commits into
bajrangCoder wants to merge 4 commits into
Conversation
…avior - Cache highlighting and preload languages for restored files - Preserve scroll position through keyboard transitions - Open the keyboard only for deliberate editing interactions - Restore native text selection in read-only mode - Add regression tests and reproducible upstream patches
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Greptile SummaryThis PR improves the mobile CodeMirror experience and vendors the supporting CodeMirror changes.
Confidence Score: 5/5The PR appears safe to merge; both previously reported failures are resolved and no actionable new regression remains. The restored-file language wait is now bounded without discarding its pending provider, and ambiguous diagonal gestures retain vertical scrolling instead of entering the prior dead zone. Both previous threads are resolved, and the follow-up changes include focused regression coverage. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Touch[Mobile touch gesture] --> Classify{Gesture direction}
Classify -->|Clearly horizontal| NativePan[Native horizontal pan]
Classify -->|Vertical or ambiguous| ControlledScroll[Controlled vertical scroll]
ControlledScroll --> BufferedRender[Bounded viewport rendering]
Restore[Restore foreground file] --> Preload[Start language provider]
Preload --> Wait{Settles within 250 ms?}
Wait -->|Yes| OpenHighlighted[Open with prepared language]
Wait -->|No| OpenText[Open text without blocking]
OpenText --> LateLanguage[Reuse pending provider when editor initializes]
EditAction[Explicit editable focus] --> Focus[Focus editor]
Focus --> ShowIME[Request Android virtual keyboard]
ShowIME --> Reveal{User browsing viewport?}
Reveal -->|No| Caret[Reveal caret]
Reveal -->|Yes| Preserve[Preserve browsed position]
Reviews (2): Last reviewed commit: "fix(editor): bound startup language wait..." | Re-trigger Greptile |
- Open restored text after a 250 ms language preparation timeout - Keep late language loading available for highlighting - Route near-diagonal swipes to vertical scrolling - Add regression tests and refresh the vendored CodeMirror patch
This comment was marked as outdated.
This comment was marked as outdated.
bajrangCoder
requested review from
Elitex07,
RohitKushvaha01,
UnschooledGamer and
deadlyjack
September 8, 2026 07:09
This comment has been minimized.
This comment has been minimized.
|
Preview Release for this, has been built. |
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: #2318