Repository navigation
Conversation
…on is on Scroll to end, PageUp/PageDown from the composer, timeline minimap jumps and the theme editor's color reveal now move instantly when the system asks for reduced motion. The preference is read at the moment of each action, so changing it applies without a reload. Normal motion is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped accessibility fix that makes four existing programmatic scroll actions honor the user's reduced-motion preference while preserving normal scrolling behavior. The added controller tests cover the new instant-scroll and live-preference paths, and no sensitive, schema, deployment, or static-analysis configuration is involved. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughScrolling 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. ChangesReduced-motion scrolling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Possibly related PRs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The changed scrolling interactions are ready to merge after normal checks; no actionable issue was established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review requested
Logged so this PR shows when a maintainer was asked to review it. |
Problem
With Reduce Motion on (
prefers-reduced-motion: reduce), the web and desktop client still animates four programmatic scrolls: the Scroll to end pill, PageUp/PageDown from the composer, timeline minimap jumps, and the theme editor's Inspect reveal. Part of #15953, which has repro steps and measurements on maina1d9d72aef.Change
Each of those actions now reads the preference when it runs and moves instantly when motion is reduced:
ChatViewscrollToEndanimates only when the caller asks and motion is not reduced.pageScrollControllergets aprefersReducedMotionenvironment hook. A discrete PageUp/PageDown press jumps the full page instead of the 150 ms ease. Holding the key still scrolls continuously, because that motion is driven by the user.prefersReducedMotionmedia query thatMessagesTimelinealready reads for streaming end-follow.behavior: "auto"when motion is reduced.Destinations, focus, and normal motion are unchanged. Paths that already honor the preference on main (right-panel tab scrolling, settings search reveal, citation reveal, streaming end-follow) are untouched.
Scope and approval
A small, focused fix for an accessibility bug reported in #15953. It replaces the web half of #12871, which was closed for missing live motion verification. The mobile half is a separate PR, #16015.
Verification
vp test run apps/web/src/components/chat/pageScrollController.test.ts: 11 passed. The two new tests (reduced-motion press jumps a full page with no frames; the preference is re-read on each press) fail without the fix.vp run typecheckinapps/web, plus scopedvp lintandvp fmt --checkon the changed files: all pass.reducedMotionemulation sampled the timeline'sscrollTopevery animation frame after each action. Counts are frames strictly between the start and end positions:Destinations are identical. After each action the composer keeps focus (Scroll to end, PageDown), and the minimap's Next button keeps focus.
Scroll to end, Reduce Motion on, frames 100 ms apart:
Recordings, captioned with the build and live preference value:
Not verified:
matchMediaquery; it was tested here through Chrome's media emulation.onTimelineAnchorReady). It never produced intermediate frames in testing (a single 170 px jump from the live edge), so it is unchanged.Reproduction, implementation and evidence: Claude Opus 5.5 in Claude Code, inside T3 Code. Independent review: GPT-6.1 Sol through Codex in T3 Code.
🤖 Generated with Claude Code