Repository navigation
Fix "Jump to File" menu showing only half of the entries, in some rare cases - #6136
Merged
Merged
Conversation
Some actions read the content of the main view to the end before they act on it. For example, the jump-to-file menu lists the files of the diff. If the task reading the content is replaced by a re-render while it reads, these actions act on the part that has been read so far, so the menu shows only some of the files. A background fetch re-renders the main view, so this happens now and then. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Some actions read the content of the main view to the end before they act on it: the jump-to-file menu, going to the bottom, searching, and jumping to a file from the diffstat. If a re-render replaces the task while it reads, these actions are told that the content has been read although only a part of it has, so the menu lists only the files in that part. A background fetch re-renders the main view once a minute, so now and then the menu is incomplete. The same happens if a read is asked for after a render has been asked for but before its task has started. These actions act on the content of the task asked for last, so leave the reads waiting for content to that task. Hold them from the moment the task is asked for, hand over the ones a replaced task hasn't answered, including the one it was reading for, and answer them once the task asked for last has given the view all of its content. The replacing task still reads its own first lines first, so that the reads it takes over don't delay its first paint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 task
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.
When opening the
<ctrl+g>files menu exactly at the moment where a background fetch finishes, it could sometimes only show some of its entries. The same could happen when pressing>to jump to the end of a long diff at that moment.