Repository navigation
fix(app): anchor revealed tools under the sticky headers - #53832
Merged
Merged
Conversation
Hona
enabled auto-merge (squash)
October 8, 2026 01:47
Hona
disabled auto-merge
October 8, 2026 01:48
Hona
enabled auto-merge (squash)
October 8, 2026 02:26
Hona
disabled auto-merge
October 8, 2026 02:48
3 of 6 tasks
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.
Picking a shell in the N running menu opens its Used group and the shell, then scrolls to it. When the group was far above or taller than the screen, the shell landed off-screen.
Why it missed
revealPartaimed at the wrong thing at the wrong time:scrollToIndexaims once. The group expands, the shell loads output, and rows above get measured after that, so the target moved after the scroll ended.Fix: anchor the shell's top edge
The shell's top edge is the one stable point: its own growth (expanding, streaming output) extends downward. The reveal sets a scroll anchor on it, the same idea as CSS scroll anchoring, but for a tool inside a virtualized row.
Synchronous first jump. The anchored row is forced into the virtualizer range, like the active message row already is. Changing
rangeExtractorre-runssolid-virtual'ssetOptionscomputed, so the shell renders in the same tick, wherever it is.Real geometry before aiming. Until its
ResizeObserverdelivers, the opened row keeps its collapsed size. The timeline may not scroll at all yet (unpin()ignores a timeline that cannot scroll) or ends above the shell. Committing the measured size first fixes both:Event-driven, not timed. Every committed row size change re-pins the anchor in the
resizeItemmicrotask, before paint. It covers rows above being measured and siblings above the shell inside the group growing.Reaching the end does not resume following. Aiming at a shell near the end lands on the end of the timeline.
handleListScrollwould treat that as "follow new content again", and the next streamed part would scroll the shell away:Released by intent. User scroll input, other navigation (
prepareNavigation), or any explicit pin (for example, a session switch) releases it. The anchor never fights the user.Where "top" is.
scroll-margin-top: var(--sticky-accordion-top)ontool-part-wrapper. The page header and the stuck Used N header already set that variable, so the shell lands just under them, not behind them.Route reveals (picking the parent's shell from inside a subagent) use the same path.