Files
archie/ui
sam db20d12f6d feat(webui): scroll the chat transcript with MessageScroller
The transcript scrolled itself with a watcher that set
`scrollTop = scrollHeight` on every new message and streamed token, reaching
into ScrollArea's internals through `[data-slot="scroll-area-viewport"]` to find
the element that actually scrolls.

That follows the tail and nothing else. It has no notion of the reader having
scrolled away, so every streamed token yanked them back, and no way down for
someone who had deliberately scrolled up.

shadcn-vue's MessageScroller is the component for exactly this, so the surface
is composed from it instead: the provider owns autoscroll, the viewport reports
its edges, the content is a `role="log"` region, and the item carries the scroll
anchor. It buys the part the watcher could not express: once the reader
scrolls, autoscroll stops rather than fighting them, and a "Scroll to end"
button appears.

Verified in the browser: at the tail the root reports `data-scrollable="start"`
and the button is inert; after a wheel scroll it reports `data-scrollable="end"`,
autoscroll disengages, and the button is visible at opacity 1 and reachable. A
programmatic scrollTop does not count as intent, which is right: autoscroll
reclaims the tail unless a person asked for something else.
2026-09-20 20:08:00 +10:00
..
2026-08-04 01:45:36 +10:00
2026-09-20 18:14:37 +10:00