Problem
When the assistant is streaming a response in the Control UI chat, the page continuously auto-scrolls to the bottom. If the user scrolls up to review previous messages during streaming, they get pulled back down almost immediately.
This makes it impossible to reference earlier messages while the assistant is still generating output.
Expected Behavior
Once the user manually scrolls up during streaming, auto-scroll should pause until the user scrolls back to the bottom (or clicks a "scroll to bottom" button).
Current Behavior
The Yn (scrollToBottom) function does check chatUserNearBottom, but during streaming the content height keeps growing, which appears to re-trigger scroll logic repeatedly. The 450px (zi) threshold for "near bottom" detection also seems too generous — a small upward scroll still counts as "near bottom" and gets overridden.
Relevant code in dist/control-ui/assets/index-Qb3PJV7U.js:
const zi = 450; // threshold
function sg(e, t) {
const n = t.currentTarget;
const s = n.scrollHeight - n.scrollTop - n.clientHeight;
e.chatUserNearBottom = s < zi;
e.chatUserNearBottom && (e.chatNewMessagesBelow = false);
}
Suggested Fix
- Lock auto-scroll off when user scrolls up during streaming — once the user initiates an upward scroll during active streaming, set a flag to suppress auto-scroll until streaming ends or the user scrolls back to the bottom.
- Reduce the threshold — 450px is quite large; something like 100-150px would better match user intent.
- Do not re-trigger scroll on streaming content growth — only auto-scroll when a new message chunk arrives AND the user has not scrolled away.
Environment
- OpenClaw Control UI (webchat)
- macOS / Chrome
Problem
When the assistant is streaming a response in the Control UI chat, the page continuously auto-scrolls to the bottom. If the user scrolls up to review previous messages during streaming, they get pulled back down almost immediately.
This makes it impossible to reference earlier messages while the assistant is still generating output.
Expected Behavior
Once the user manually scrolls up during streaming, auto-scroll should pause until the user scrolls back to the bottom (or clicks a "scroll to bottom" button).
Current Behavior
The
Yn(scrollToBottom) function does checkchatUserNearBottom, but during streaming the content height keeps growing, which appears to re-trigger scroll logic repeatedly. The 450px (zi) threshold for "near bottom" detection also seems too generous — a small upward scroll still counts as "near bottom" and gets overridden.Relevant code in
dist/control-ui/assets/index-Qb3PJV7U.js:Suggested Fix
Environment