fix(agents): keep the reader's place when streamed content reflows above or below (#6863)

Scrolled away from the end while a reply streams, the view jumped when rows
changed height (a reasoning folding once the next tool call arrives, a lone
call joining a folded run): WebKit has no scroll anchoring. Away from the
end, Stream now keeps the row at the top of the view in place after every
render, row resize and scroll; content that gets shorter below leaves blank
room (now an ::after spacer) instead of pulling the view down. Following
the end is unchanged.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-30 01:25:34 +08:00
1 джерело f220ceb117
коміт 97598641be
3 files changed
+213 -10

No files matched your search

+8 -2
Переглянути файл
@@ -229,12 +229,18 @@
overflow-x: hidden;
overflow-anchor: none;
padding: var(--space-3);
/* Room below the end that keeps the header of a section folded there in place (`Stream`). */
padding-bottom: calc(var(--space-3) + var(--stream-slack, 0px));
display: flex;
flex-direction: column;
font-size: var(--agent-fs-ui, var(--fs-ui));
}
/* Room below the end that keeps the reader's place when the content above it gets shorter
(`Stream`). Not padding: a flex item is never shorter than its padding, so room taller than
the view would make the stream taller than its area. */
.stream::after {
content: "";
flex: none;
height: var(--stream-slack, 0px);
}
/* Actual row heights keep WebKit's scrollbar and cross-message selections anchored. */
.stream > * {
flex: none;