fix(web): programmatic scrolls jump instead of glide when Reduce Motion is on #16014
main fromrefs/pull/16014/head·merged by juliusmarminge View on GitHubDiscrete scrolling could glide even when Reduce Motion was enabled. Read the current preference when scrolling to the end, paging from the composer, choosing a minimap turn, revealing a Theme Editor role, or anchoring a just-sent message. Reduced motion uses the existing immediate positioning path; normal easing, destinations, focus, and continuous key holds remain intact.
Rebuilt from @saphid’s #16014, preserving contributor commits and merging main. Kept the fitting action-time checks and controller boundary, changed minimap navigation to read the preference at click time, and removed redundant tests and comments.
Validation: 12 → 11 tests in apps/web/src/components/chat/pageScrollController.test.ts, preserving all nine main behaviors. All pass; reverting the controller to pinned main fails the immediate-position regression. Targeted lint/format and web typecheck pass. One independent review round (Claude Opus 5.5 and GPT-6 Sol): both found no code defects and independently reran all 11 tests.
Linux browser verification used isolated synthetic thread data at 1280×800. The fixture overrides only the reduced-motion query’s MediaQueryList.matches; this is not physical OS/CSS preference emulation. At the same starting offsets, reduced-motion Scroll to end, PageUp/PageDown, minimap navigation, and Theme Editor Inspect each had zero observed intermediate positions after the fix; pinned main animated each. Normal motion still animated, page-key taps reached the same destinations, and held keys continued until release in both modes. Preference flips were exercised without reloading.
Before — Scroll to end still glides with the simulated reduced preference:
After — the same native button click jumps from offset 600 to 3747 and retains composer focus:
The stills show the fixture before the action and its destination; use the recordings to judge motion.

Limits: the send check blocked dispatch/launch requests, submitted through the UI, then invoked the current anchor-ready callback for the optimistic row. That callback jumped immediately, but automatic anchor-ready delivery and a complete server-acknowledged far-from-end send were not verified. The existing 750 ms normal-motion anchor settlement issue was reproduced on pinned main and remains outside this change. The send check does not establish the intended row offset, settlement event, or response to later height changes. The normal Theme Editor sample showed animation; its endpoint was confirmed by a later read. A human should check the full send flow and a physical Reduce Motion setting. macOS, Windows, Electron desktop, Safari/Firefox, iOS, Android, and a second remote environment were not run. Native mobile is untouched. This takeover does not merge the PR.
Related: #15953, #12871, and the separate native mobile work in #16015.
Implementation and verification: GPT-6.1 Sol in the Codex harness through T3 Code; tests GPT-6 Astra; independent reviews GPT-6 Sol and Claude Opus 5.5.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
cb9c9edMacroscope's review found this PR approvable — This is a focused reduced-motion bug fix that preserves normal scrolling while making existing programmatic scroll paths honor the user's accessibility preference. The production changes are localized and supported by targeted tests, with no schema, deployment, security, or static-analysis impact.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
45829042-d03d-4005-8d3b-fc007c918f64
📥 Commits
-
Reviewing files that changed from the base of the PR and between 7812230572f2d7e042d8d14ada2381fc71377560 and 4c417d01369d46a9797e1b968d25a2e80535a7e6.
📒 Files selected for processing (5)
-
apps/web/src/components/ChatView.tsxapps/web/src/components/chat/MessagesTimeline.tsxapps/web/src/components/chat/pageScrollController.test.tsapps/web/src/components/chat/pageScrollController.tsapps/web/src/components/settings/ThemeEditorPanel.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
📝 Walkthrough
-
📝 Walkthrough
-
Walkthrough#
Scrolling in chat navigation and theme editing now respects the browser’s reduced-motion preference. When reduced motion is enabled, these interactions use immediate scrolling; otherwise, they retain animated scrolling where applicable.
Changes#
Reduced-motion scrolling
Layer / File(s) Summary Preference-aware page scrolling
apps/web/src/components/chat/pageScrollController.ts,apps/web/src/components/chat/pageScrollController.test.tsThe page scroll environment exposes the reduced-motion preference. Page scrolling applies the delta immediately when reduced motion is enabled. Tests cover this behavior and preference changes between presses. Other scrolling interactions
apps/web/src/components/ChatView.tsx,apps/web/src/components/chat/MessagesTimeline.tsx,apps/web/src/components/settings/ThemeEditorPanel.tsxChat scroll-to-end, minimap navigation, and theme color-role reveal disable smooth scrolling when reduced motion is preferred. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#12871: It also disables animated scrolling when reduced motion is enabled and covers several of the same web behaviors.
Suggested reviewers:
yash-singh1,maria-rcks
-
Merge Risk: ⚪ Minimal · up to
4c417-
The changed scrolling interactions are ready to merge after normal checks; no actionable issue was established.
Pre-merge checks:
4 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Docstring Coverage Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold. Passed checks: 4 passed-
Check name Status Explanation Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Title check The title clearly and concisely describes the main web change: programmatic scrolling becomes immediate when Reduce Motion is enabled. Description check The description clearly states the problem, implementation, affected interactions, verification results, UI evidence, limitations, related issues, and agent details. It does not use the template headi… Full details: Description check
-
Explanation
The description clearly states the problem, implementation, affected interactions, verification results, UI evidence, limitations, related issues, and agent details. It does not use the template headings and does not explicitly document maintainer approval or explain why approval was unnecessary, but the focused bug scope and linked issue provide sufficient context.
-
-
- Fix all pre-merge checks with AI
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
Review requested
Logged so this PR shows when a maintainer was asked to review it.Date (UTC) Reviewer Where 2026-10-06 Maria Discord DM Following up on the triage on #15953, both extra paths are now covered at 66df205d6b:
- Sending on web:
onTimelineAnchorReadynow reads the preference when it runs and scrolls the new message into place without animation when motion is reduced. Settling is unchanged (it still waits forscrollend, which an instant scroll also fires, or the 750 ms fallback). - Holding PageUp/PageDown: left continuous on purpose, because holding the key is the user moving the page. The hold test now runs with and without reduced motion and checks that scrolling continues while held and stops on release.
Not re-measured in a running client: the send path while scrolled far from the end, and the macOS desktop app with the real system setting. Mobile stays in #16015.
- Sending on web:
juliusmarminge assignedjuliusmarminge
Taking over this one as maintainer for batch settings-theme-02. I will preserve your commits, merge current main, minimize the regression coverage, and verify reduced-motion scrolling against the current client paths. I will leave it unmerged.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged thiscf53005
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed