mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Replace the Agents chat's inverse scroll container and sticky user-message overlays with the stock MessageScroller from `@shadcn/react@0.3.0`. Transcript rows now render as direct MessageScroller Items with stable server-backed identities. Only the latest active user turn is a scroll anchor, older history preserves the reading position when prepended, and the package owns follow mode, prompt navigation, and the `Scroll to bottom` control. The integration uses the upstream component hierarchy without patches, bridges, or application-owned scroll correction. Depends on #28079. <details> <summary>Implementation notes</summary> - Use `MessageScroller.Provider`, `Root`, `Viewport`, `Content`, `Item`, and `Button` directly. - Keep durable row IDs stable across pagination; the live assistant uses an ephemeral row until its durable message arrives. - Load additional history from MessageScroller's start-edge state, including underfilled transcripts and retry after a page error. - Remove inverse scrolling, sticky message copies, scroll refs, forced scroll commands, and `react-infinite-scroll-component`. </details> Generated by Coder Agents on behalf of @DanielleMaywood.