Skip to content

Fix auto-scroll that hijacks the scrollback during streaming #99

Description

@lucastononro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityarea:frontendFrontend (Next.js)uxUser-experience improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions