Problem. The effect at page.tsx:303-305 calls bottomRef.current?.scrollIntoView({ behavior: 'smooth' }) on every chatItems change. During streaming this fires many times per second.
Why it matters. It animates constantly and makes it impossible to scroll up to read earlier output — the view keeps yanking back to the bottom.
Suggested fix. Track whether the user is pinned near the bottom (scroll listener + threshold) and only auto-scroll when pinned; use behavior: 'auto' during active streaming.
Problem. The effect at
page.tsx:303-305callsbottomRef.current?.scrollIntoView({ behavior: 'smooth' })on everychatItemschange. During streaming this fires many times per second.Why it matters. It animates constantly and makes it impossible to scroll up to read earlier output — the view keeps yanking back to the bottom.
Suggested fix. Track whether the user is pinned near the bottom (scroll listener + threshold) and only auto-scroll when pinned; use
behavior: 'auto'during active streaming.