UI: harden chat scroll interrupts#72957
Conversation
Greptile SummaryThis PR hardens chat scroll auto-follow in the Control UI by adding an explicit Confidence Score: 4/5Safe to merge — well-scoped UI-only change with comprehensive test coverage and no regressions to existing behavior. No P0 or P1 issues found. Logic is correctly implemented: chatFollowLocked, chatSmoothAutoScrolling, and chatLastScrollTop form a sound state machine, all key transitions are covered by deterministic unit tests, and the nested-scrollable ancestor walk correctly guards against false releases. Score reflects P2-only quality with no blocking concerns. No files require special attention. Reviews (1): Last reviewed commit: "UI: refine chat wheel follow handling" | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: current main already carries the central WebChat backscroll/follow-lock fix from #92622, with regression coverage and beta release notes, so this older branch is no longer the landing path. Canonical path: Keep the merged current-main follow-lock implementation from #92622; open a fresh narrow PR only if a wheel-specific edge still reproduces after that fix. So I’m closing this here and keeping the remaining discussion on #92622. Review detailsBest possible solution: Keep the merged current-main follow-lock implementation from #92622; open a fresh narrow PR only if a wheel-specific edge still reproduces after that fix. Do we have a high-confidence way to reproduce the issue? No current-main failing path remains: the original bug is source-reproducible in the latest stable-era helper, but current main now locks follow on upward user scroll and has regression tests for the near-bottom streaming cases. Is this the best way to solve the issue? No, this PR is no longer the best way to solve it; the narrower merged replacement changes the central scroll helper and tests without carrying this branch's extra wheel/smooth-scroll path or release-owned changelog entry. Security review: Security review cleared: The reviewed diff is limited to Control UI scroll state, tests, app/view wiring, and one changelog line; no dependency, workflow, permission, network, credential, or secret-handling change was found. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against b5999bc6a07d; fix evidence: release v2026.6.8-beta.1, commit d3e7e0366907. |
a21f3a5 to
88360ac
Compare
|
Thanks for the review. I addressed the missing changelog item in Local validation is green for I also tried to run the requested Testbox changed gate, but Blacksmith auth reports: "You don't have any GitHub organizations with Blacksmith installed. Install the Blacksmith GitHub App first." My GitHub account therefore cannot start an OpenClaw Testbox from here. Since the remaining required gate is specifically One note: because this PR now touches |
|
Related maintainer note: #81629 has now landed a separate persisted WebChat auto-scroll mode selector on This PR is still a distinct bug-fix lane for manual-scroll follow-lock / sticky-bottom behavior, not a duplicate of the setting work. Before any further review or merge attempt, please rebase against latest Thanks for the work on the follow-lock edge cases; this remains useful, just separate from the preference that shipped today. |
|
Thanks, done. I rebased this PR onto latest This PR now keeps #81629's auto-scroll mode selector/settings path intact and only carries the separate manual-scroll follow-lock / sticky-bottom fix:
Verification:
I also updated the PR body with a |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Describe the problem and fix in 2-5 bullets:
If this PR fixes a plugin beta-release blocker, title it
fix(<plugin-id>): beta blocker - <summary>and link the matchingBeta blocker: <plugin-name> - <summary>issue labeledbeta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.ui/src/ui/app-scroll.test.ts.mainafter feat(ui): add WebChat auto-scroll mode selector #81629 landed the separate persisted WebChatchatAutoScrollmode selector. This PR remains the manual-scroll follow-lock / sticky-bottom bug-fix lane, not a duplicate of the setting work.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write
N/A.ui/src/ui/app-scroll.test.tsUser-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.chatAutoScrollsetting from feat(ui): add WebChat auto-scroll mode selector #81629 is preserved and respected; the follow-lock only tightens the default/manual sticky-bottom state machine around that setting.Diagram (if applicable)
For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write
N/A.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
ws://127.0.0.1:18789Steps
Expected
Actual
Evidence
Attach at least one:
Real behavior proof
mainwith feat(ui): add WebChat auto-scroll mode selector #81629's persistedchatAutoScrollsetting present. The proof command imports the actualui/src/ui/app-scroll.tsimplementation and exercises the WebChat scroll state used by the Control UI.pnpm exec tsxproof command againstui/src/ui/app-scroll.tswithchatAutoScroll: "near-bottom", simulating a user scroll from bottom toscrollTop=1540, a streamingscheduleChatScroll()tick, then returning to bottom atscrollTop=1576.{ "proof": "Control UI WebChat manual-scroll follow-lock after patch", "afterManual": { "scrollTop": 1540, "chatUserNearBottom": false, "chatFollowLocked": true, "chatNewMessagesBelow": false, "chatAutoScroll": "near-bottom" }, "afterStreamTick": { "scrollTop": 1540, "chatUserNearBottom": false, "chatFollowLocked": true, "chatNewMessagesBelow": true }, "afterReturnBottom": { "scrollTop": 1576, "chatUserNearBottom": true, "chatFollowLocked": false, "chatNewMessagesBelow": false } }chatFollowLockedistrueand the streaming tick leavesscrollTopat1540instead of snapping to2000;chatNewMessagesBelowbecomestrue. After returning to bottom,chatFollowLockedclears andchatNewMessagesBelowclears. The persistedchatAutoScrollmode remainsnear-bottom.Human Verification (required)
What you personally verified (not just CI), and how:
mainkept feat(ui): add WebChat auto-scroll mode selector #81629'schatAutoScrollselector/settings path intact, then ranpnpm test ui/src/ui/app-scroll.test.ts ui/src/ui/app-chat.test.ts.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.