fix: race condition when moving to exact line/col - #2856
Merged
Conversation
Contributor
Greptile SummaryThis PR makes project-search result navigation resilient to overlapping asynchronous file opens.
Confidence Score: 5/5The PR appears safe to merge; the prior navigation-blocking issue is resolved, and the loader fix addresses the remaining overlapping-open feedback issue. The previously resolved obsolete-request finding remains fixed because newer navigation starts immediately and stale work is prevented from activating or revealing a file. The outstanding loader finding is now fully fixed by reference-counting active loaders and making cancellation release idempotent, so an obsolete open cannot hide the latest operation’s indicator. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Nav as navigateToResult
participant Open as openFile
participant Filesystem
participant Editor
User->>Nav: Select search result
Nav->>Nav: Abort previous navigation
Nav->>Open: Open target with AbortSignal
Open->>Filesystem: Stat/read target
User->>Nav: Select newer result
Nav->>Nav: Abort obsolete signal
Nav->>Open: Open newer target
Open-->>Nav: Newer target activated
Nav->>Editor: Load and verify active file
Nav->>Editor: Reveal exact range
Filesystem-->>Open: Obsolete operation settles
Open-->>Nav: Discard obsolete result
Reviews (3): Last reviewed commit: "fix(search): preserve loader during conc..." | Re-trigger Greptile |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
No description provided.