Preview for the owner to try. No pull request.
TanStack keeps the offset that it wrote, not the one that the element reached.
In a transcript that fits the view its scroll to the end goes nowhere, so its
offset stays 84 px ahead of the element's. A view that follows corrects that
with its next scroll. A view that a press left where it was did not: rows in
its first 84 px counted as above it, and what the next press opened there
scrolled the view by its whole height. The Compacted divider of a real session
moved 5,139 px.
Preview for the owner to try. No pull request.
A small opening, such as a shell's two lines of output, left the view 119 px
from the end and no longer following, with nothing on screen that said so:
Jump to latest shows only when the end is a screen away.
It now shows whenever a press on a control took the view off its end, at any
distance, until the view follows again.
A press that opens a row at the end leaves the view as far from the end as
what opened. Closing it again shortens the transcript by the same distance,
so the view is at the end without its offset moving, and no scroll event told
the follow state: the reply that streamed next stayed 413 px out of view.
The size flush tells it. Not for a view that navigation sent somewhere.
A long summary under the Compacted divider rendered more than a frame after
the press, so the row was no taller by the next frame and the view went on to
the new end: the divider moved 4,594 px in a real session.
A control that says it opened (aria-expanded, and not a menu's button) keeps
the press for three seconds, until its row's new size is measured.
Preview for the owner to try. No pull request.
A timeline that follows its end scrolls to the new end when a row grows. A
control that the reader presses at the end, such as a thinking header or a
tool group's header, then moves up by what it opened, off the screen for a
long thought.
A press on a control in a row is heard before the control's own handlers.
When the row is taller by the next frame, the timeline lets the end go before
it applies the row's new size, as it does for the reader's scroll up: the
control stays under the pointer, Jump to latest shows once the end is a screen
away, and a scroll back to the end follows again. A row that closes at the end
leaves the view at the end, and the timeline goes on following.
Deep inside an open file its header sticks to the top of the timeline. Closing
the file from there sent the header back to its own place in the row, which can
be screens above, and left the reader past the file.
- FileAccordionItem reads where the header is before and after the change, and
scrolls the difference back through holdScroll, so a timeline that follows its
end does not take the scroll for the reader leaving it.
- The New timeline's patch tool had its own copy of the item. It now uses the
shared one, so both timelines hold the header.
The session header, Jump to latest, the scrollbar's thumb and the desktop
window's drag area lie over the timeline, outside its scroll element. For a
wheel over them the browser goes by the layers it composites, not by the
element under the pointer: it scrolled the timeline while the rows were text,
and nothing once a row held a scroller of its own, such as a shell's output.
An upward wheel that moved nothing still stopped the timeline from following.
- handleOverWheel takes that wheel from the browser and scrolls the timeline
by the wheel's distance, once. Its listener is not passive, so it is on
those elements only: over the rows the browser still does not wait for the
page.
- The thumb of ScrollView does the same for its viewport.
- A wheel with the control key zooms. It sends no intent and ends no seek.
- A wheel over a marked box that holds all of its content, or one at a
scroller's limit, ends a seek as a wheel over the rows does.
The finger drifts down a few pixels while it drags a code block or a table
sideways. The timeline took any downward movement of the finger for a drag of its
own content and stopped following, though the browser moved only the block.
handleListTouchMove sends a drag only when the finger has gone further up or
down than sideways since it went down. A drag that does move the timeline still
shows as its scroll under the held finger.
A wheel over a scroller inside a row, such as a shell's output, scrolls that
scroller while it has room. The timeline took every upward wheel for the reader
leaving the end, so it stopped following and the reply that streamed next stayed
out of view.
- handleViewWheel sends no intent for a wheel that the scroller under it takes.
- At the scroller's limit the wheel does not stop following by itself: the
browser passes it on to the timeline only when the gesture began there, and
the scroll that it then makes is what tells.
- The input and the error of a Code Mode call and the error cards scroll but had
no data-scrollable mark, which is how the timeline knows a scroller in a row.