Repository navigation
Keep turn rows keyed and scroll requests distinct in the virtual lists - #482
Merged
Merged
Conversation
Owner
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Owner
Author
benschac
changed the base branch from
viewer/virtual-lists
to
graphite-base/482
December 1, 2026 17:01
Review of #481 found four problems the virtualized lists brought in: - Session rows were not keyed by turn ID, so a focused tool button could move to another turn when the rendered window changed. - Clearing the turn scroll on a link reset its request ID to 1, which a list still in the page ignored. The request count is now its own field, turnScrollRequest, and is never reset. - A turn asked for in one visit to the code view was scrolled to again when the code view opened later. Opening the code view clears the ask. - Ordered lists renumbered from 1 as rows left the page. Event and revision rows now carry their place in the whole list as value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benschac
force-pushed
the
viewer/virtual-lists-review-fixes
branch
from
December 1, 2026 17:02
02f5b93 to
418a7da
Compare
benschac
added a commit
that referenced
this pull request
Dec 1, 2026
When a pending link resolves again because its patch or session arrived, every step is applied again, and the turn step asked the session's turn list to scroll once more. With a cached session the list had already scrolled to the turn, so the second ask pulled the pane back to it even if the reader had moved while the diff loaded. A link resolved again now keeps turnScrollRequest when it names the same turn: the list waits for the turn, so the first ask is enough. Found by Codex's second review of #482. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 what Codex's first review of #481 found:
turnScrollRequest, which is never reset. Before, clearing the ask on link navigation reset the ID to 1, and a list still in the page ignored the repeat.valueto their place in the whole list, so the numbers don't restart at 1 as rows leave the page.Tests
codeOn.Review by Codex, round 2 (open, not fixed)
update.tsturnHighlighted: when a deep link names both a diff file and a turn in a session that is already cached,ReceivedPatchapplies the link again and bumpsturnScrollRequest. The list then scrolls back to the turn even if the reader has scrolled away while the diff loaded. Suggested fix: keep the request ID when the same pending link resolves again, and issue a new ID only for a new navigation or a different target. I stopped at two rounds, so this is left to the owner.🤖 Generated with Claude Code