Skip to content

WebChat: new messages force-scroll to bottom even when user has scrolled up #92386

Description

@DrtyMorty

Summary

In the WebChat conversation view, every new incoming message force-scrolls the view to the bottom — even when the user has deliberately scrolled up to read earlier messages. This makes it impossible to read backscroll while an agent is actively replying (each new chunk yanks you back down).

Steps to reproduce

  1. Open a WebChat direct conversation with an active agent.
  2. Scroll up to read a message from several minutes ago.
  3. Have the agent send any new message (or stream a reply).
  4. The view jumps to the bottom, losing your reading position.

Expected

Standard "stick to bottom" behavior: only auto-scroll to the newest message if the user is already at (or near) the bottom. If the user has scrolled up, preserve their scroll position and (optionally) show a "new messages ↓" affordance.

Actual

The view auto-scrolls to the bottom on every new message regardless of the user's current scroll position.

Environment

  • OpenClaw 2026.6.5 (5181e4f)
  • Surface: WebChat (direct conversation)
  • OS: macOS (Darwin 25.5.0)

Suggested fix

Before auto-scrolling on a new message, check whether the scroll container is within a small threshold of the bottom (e.g. scrollHeight - scrollTop - clientHeight < ~80px). Only scroll if true; otherwise leave the position untouched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions