Repository navigation
Render only the visible rows of long viewer lists with VirtualList - #481
Merged
Merged
Conversation
The session pane's turns, a task's events in the detail drawer and a PRD's revision history now render through @effect/ui-kit's VirtualList, so a long session or history puts only the rows near the visible part in the page. The session list scrolls to a turn itself. A hunk's mark or a link records a TurnScroll request in the model, which the list passes as scrollTo by the turn's key, so a turn that is not yet in the page is rendered and scrolled to. ScrollTurn and the link's turn scroll target go, since both looked for an element that may no longer exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Owner
Author
benschac
added a commit
that referenced
this pull request
Dec 1, 2026
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
added a commit
that referenced
this pull request
Dec 1, 2026
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>
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.

Renders three long viewer lists through
@effect/ui-kit'sVirtualList, already in the pinned Effect UI build (87a704b), so only the rows near the visible part are in the page:apps/viewer/src/view/sessionView.ts): sessions can have hundreds to thousands of turns, each rendering markdown. The list is keyed by turn ID and scrolls with the session pane (scrollContainer: "nearest").apps/viewer/src/view/detailView.ts).apps/viewer/src/hosted/view/historyView.ts), one list per kind.Jumping to a turn can no longer look up its element, which may not be rendered. A hunk's mark or a link now records the turn in the model, and the list scrolls to it with
scrollToby key.ScrollTurnand the link's turn scroll target are removed.Tests
initialCount: 10_000, which renders every row.scrollTo.aria-setsizefor the full count instead of a link for every revision.Not covered
fetchRevisions) still returns every revision. Paging it is separate work.test/demo.test.tsfails three tests onmaintoo (CI has been red since "bump manifest"). Unrelated.Review by Codex
Round 1 found four problems, all fixed in #482: rows not keyed by turn ID, scroll request IDs reset on link navigation, an old turn scroll replayed when the code view reopened, and ordered-list numbers restarting at 1.
🤖 Generated with Claude Code