Skip to content

Fix "Jump to File" menu showing only half of the entries, in some rare cases - #6136

Merged
stefanhaller merged 2 commits into
masterfrom
keep-read-requests-across-re-renders
Oct 16, 2026
Merged

stefanhaller merged 2 commits into
masterfrom
keep-read-requests-across-re-renders

Conversation

@stefanhaller

Copy link
Copy Markdown
Collaborator

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.

stefanhaller and others added 2 commits October 16, 2026 07:14
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>
@stefanhaller stefanhaller added the bug Something isn't working label Oct 16, 2026
@stefanhaller
stefanhaller merged commit 5e244a9 into master Oct 16, 2026
14 checks passed
@stefanhaller
stefanhaller deleted the keep-read-requests-across-re-renders branch October 16, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant