-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
Closed
Description
Bug
When a user scrolls up in the WebChat UI to read older messages, new incoming messages (including streaming chunks) force-scroll them back to the bottom. This makes it impossible to read conversation history while the agent is responding.
Root Causes
- Threshold too tight —
distanceFromBottom < 200means a single long message puts you "near bottom" again refreshChat()force-scrolls — callsscheduleChatScroll(host, true)which ignores user scroll position- Streaming chunks retrigger scroll — rapid
scheduleChatScrollcalls during streaming constantly reset position
Expected Behavior
- If the user has deliberately scrolled up (more than ~450px from bottom), new messages should NOT auto-scroll
- A "new messages below" indicator should appear instead
- Auto-scroll should only be forced on initial page load, not during active use
- When user scrolls back to bottom, normal auto-scroll behavior resumes
Proposed Fix
- Increase near-bottom threshold from 200px to 450px (extracted to named constant)
- Make
force=trueonly effective on initial load (!chatHasAutoScrolled) - Add
chatNewMessagesBelowflag for future UI indicator - Remove force-scroll from
refreshChat()
Environment
- OpenClaw 2026.2.1
- macOS WebChat (Brave app mode)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels