Repository navigation
fix(ui): Control UI smooth scrolling ignores the reduced-motion preference - #130428
Conversation
Six Control UI actions passed behavior: "smooth" directly to scrollIntoView, bypassing the reduced-motion preference because explicit ScrollOptions are not overridden by the global CSS rule. Route all six call sites through a shared resolveScrollBehavior() helper that returns "auto" under prefers-reduced-motion: reduce and keeps the requested behavior otherwise, mirroring the guards already used by chat/scroll.ts and panels-tools-skills.ts. Closes openclaw#127335
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 12:04 AM ET / 04:04 UTC. ClawSweeper reviewWhat this changesCentralizes Control UI scroll-motion selection so imperative smooth scrolling changes to non-animated scrolling when the browser prefers reduced motion. Merge readinessKeep open: the exact-head patch correctly covers the current-main reduced-motion regression, and the supplied browser recordings address the prior proof request; no blocking defect was found. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherControl UI interactions in chat, settings, Cron, model setup, and channel pairing issue browser scroll requests. The resolver sits between those actions and the DOM scroll API, preserving targets and focus while choosing the motion behavior. flowchart LR
A[Control UI action] --> B[Scroll behavior resolver]
C[Browser motion preference] --> B
B --> D[DOM scroll request]
D --> E[Chat and settings target]
E --> F[Focus or navigation result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +10, Tests +77. Total +87 across 12 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the small shared resolver as the canonical policy and merge through the normal exact-head checks; no compatibility, migration, or API work is needed. Do we have a high-confidence way to reproduce the issue? Yes—current main visibly passes explicit smooth options in each reported owner path, and the exact-head browser proof exercises reduced-motion and normal-preference contexts. Is this the best way to solve the issue? Yes—the shared resolver removes duplicate preference checks while preserving the existing target, focus, hash, and chat-guard behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8dac217ce94e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
939f393 to
1c9c963
Compare
|
@clawsweeper re-review The exact-head PR body now includes redacted real-browser recordings for both reduced-motion and no-preference contexts, plus the 12-action trace summary and focused remote proof. This addresses the remaining real-behavior proof and rank-up move. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper before-merge items:
Exact-head hosted CI and the independent reviews remain clean. |
|
Merged via squash.
|
…-retirement-v13 * origin/main: (243 commits) fix: preserve Gateway error reasons in text logs (#130645) refactor(video): deduplicate generation contracts (#130635) fix(agents): preserve direct-message sender identity (#124548) fix(agents): preserve silent reply after settled tools (#130675) fix(talk): preserve replacement speech when an old utterance is canceled (#130687) fix(browser): preserve literal names and formatter-owned snapshot refs (#130599) fix(auth): reset only the profile replaced by a successful login (#124014) fix: bind session creation to admitted Gateway (#130686) refactor(qa-lab): reuse model reference splitter (#130317) docs(gateway): clarify independent HTTP endpoint switches (#130690) fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428) refactor(lmstudio): remove unreachable catalog merge (#130689) fix(crabbox): restore cloud machine CPU and RAM (#130684) fix(secrets): compare proxy bearer tokens directly (#127054) fix(matrix): show recovery key availability in text status (#128051) fix(ios): restore approval settings navigation and remove duplicate shell state (#130651) refactor(agents): use fixed tool-loop defaults directly (#130681) refactor(qa-lab): share process tree metric reader (#130419) refactor(models): simplify prepared owner access (#130683) fix(parallels): main install and update smoke cannot complete (#130658) ...
…rence (openclaw#130428) * fix(ui): respect prefers-reduced-motion in imperative scrolling Six Control UI actions passed behavior: "smooth" directly to scrollIntoView, bypassing the reduced-motion preference because explicit ScrollOptions are not overridden by the global CSS rule. Route all six call sites through a shared resolveScrollBehavior() helper that returns "auto" under prefers-reduced-motion: reduce and keeps the requested behavior otherwise, mirroring the guards already used by chat/scroll.ts and panels-tools-skills.ts. Closes openclaw#127335 * fix(ui): centralize imperative scroll motion policy --------- Co-authored-by: Agi-Asi <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Closes #127335
What Problem This Solves
Users with
prefers-reduced-motion: reducestill received animated smooth scrolling from six Control UI actions. Those callers passedbehavior: "smooth"directly toscrollIntoView, so the reduced-motion CSS rule could not override the explicit imperative option.Why This Change Was Made
One browser-safe
resolveScrollBehavior()policy now owns imperative scroll behavior for all eight callers: the six reported actions plus the existing chat and agent-tool sibling policies.autoandinstantpass through unchanged.smoothbecomesautoonly when reduced motion is requested.matchMediais unavailable.User Impact
Reduced-motion users no longer receive forced smooth-scroll animation from chat reply navigation, Cron validation focus, Config hash navigation, custom-theme import, manual model setup, or channel pairing review. Other users keep the existing smooth scrolling.
Evidence
Exact reviewed head:
0b08f08679878d9a0ba29945af1429d48c759fd1Focused tests
Run serially in a fresh sanitized direct AWS Crabbox checkout bound to the exact PR head:
The resolver cases cover reduced motion, normal preference, missing
matchMedia,auto, andinstant. The sibling tests cover chat guard timing and agent focus/hash preservation.Browser proof
A trusted Playwright proof driver wrapped the native
scrollIntoView, called the original method, and captured the target and options. Each preference mode ran in a fresh browser context:autosmoothautosmooth#cron-namefocusautosmoothautosmoothautosmoothautosmoothReduced-motion recording:
scroll-proof-reduce.webm
No-preference recording:
scroll-proof-no-preference.webm
Before/after screenshots for both contexts and the 12-entry JSON trace were visually inspected. All artifacts contain only public fixture data. Trace SHA-256:
77316c541b660b383624c2f3e4c6a4fd3918265f880514a33879b43b58aaff5a.Additional validation
git diff --check: passcoreTestsandui.pnpm ui:build: pass, 3,024 modulesopenclaw/ci-gateDiff surface
The production growth is the shared resolver boundary; it replaces duplicate motion-policy checks while routing eight imperative callers through one policy.