fix(ui): let edge jumps supersede pending reveals - #928
Merged
Conversation
(cherry picked from commit 0ad4c65)
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThe PR prevents pending selected-hunk reveal and file-top alignment work from overriding explicit top or bottom jumps.
Confidence Score: 5/5The PR appears safe to merge, with explicit edge jumps consistently taking authority over pending viewport-alignment work. The cancellation occurs before the edge scroll, clears both scheduled reveal retries and resettling state, and the viewport-follow selection path does not issue a reveal token that could restore the superseded scroll. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Commands
participant DiffPane
participant PendingReveal
User->>Commands: Press G or gg
Commands->>DiffPane: Request edge scroll
DiffPane->>PendingReveal: Cancel reveal timers and resettling
DiffPane->>DiffPane: Clear pending file-top alignment
DiffPane->>DiffPane: Scroll to requested edge
Reviews (1): Last reviewed commit: "chore: add edge jump fix changeset" | Re-trigger Greptile |
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.
Problem
A
Gorggcommand issued during selected-hunk settling could briefly reach the requested edge and then be overridden by the pending reveal retry. Greptile identified this race while reviewing the 0.20.x backport in #926 after #922 had already merged.Fix
]followed immediately byGThe matching 0.20.x fix is included in #926.
Verification
bun test src/ui/AppHost.interactions.test.tsx: 76 passedbun run typecheckbun run lintbun run format:checkbun run deps:check