Skip to content

fix(renderer): jump instead of smooth-scrolling under reduced motion - #26796

Merged
brennanb2025 merged 3 commits into
stablyai:mainfrom
AmoabaKelvin:motion-safe-scripted-scrolls
Oct 11, 2026
Merged

brennanb2025 merged 3 commits into
stablyai:mainfrom
AmoabaKelvin:motion-safe-scripted-scrolls

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​22 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9

ELI5

When you turn on "reduce motion", things that glide across the screen should jump straight there instead. Several places in Orca still glided when they scrolled for you. Now they jump.

What Changed

Before: with reduce motion on, these scrolls still animated: the tab strip arrows and scroll indicator, jumps to review comments in the markdown preview and rich editor, markdown heading links, the checks panel comment list, and two jumps in Settings.

After: with reduce motion on, each of those goes straight to its target. With it off, nothing changes.

Mechanism: a scroll started from code with an explicit smooth behavior ignores the reduce-motion setting, so each call has to check it. One function, motionSafeScrollBehavior(), returns an instant jump when the setting is on. The seven files call it, and the sidebar reveal uses it in place of its own inline copy of the same check.

Why

The sidebar already did this check by hand. Sharing it means the next scripted scroll gets the right behavior by calling one function, and the style guide now points to it.

Split out of #26276 as requested in review there.

Visual Proof

N/A: the only change is that a scroll animation is skipped when reduce motion is on.

Testing

  • Confirmed in headless Chromium that a scripted smooth scroll still animates with reduce motion emulated, which is why the call sites need the check.

  • pnpm lint passes. Tests for the touched areas pass: tab bar, checks panel, sidebar reveal (851).

  • pnpm tc reports one error in command-receipt-transaction.test.ts, which this PR does not touch and which fails the same way on main.

  • Not run: the full app, the e2e suite.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

The function is the sidebar reveal's existing check moved to a shared place. The new usePrefersReducedMotion.test.ts covers its reduced-motion branch: with reduced motion on, a smooth scroll becomes an instant jump; with it off, or with no matchMedia, the requested behavior is kept.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Monaco's built-in smooth scrolling is unchanged.
  • No platform, SSH, mobile or wire impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

A scripted scroll's explicit behavior ignores the reduce-motion setting.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b1600cb-2032-4dfe-9538-763670b836ed

📥 Commits

Reviewing files that changed from the base of the PR and between c3fda2e and cfb7e16.


📒 Files selected for processing (2)
  • docs/STYLEGUIDE.md
  • src/renderer/src/components/right-sidebar/checks-panel/use-comments-list-state.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.



📝 Walkthrough

Walkthrough

The change adds motionSafeScrollBehavior(). When smooth scrolling is requested and reduced motion is preferred, the helper returns 'auto'. Scripted scrolling in the editor, comments panel, settings, sidebar, and tab bar now uses this helper. Tests cover reduced-motion enabled, disabled, and unavailable cases. The style guide specifies the helper for scripted scrolling.


Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to cfb7e

The change makes the listed scripted scrolls respect reduced-motion settings. No concrete regression is established, so it appears ready to merge subject to ordinary checks.

Pre-merge checks | Passed 3 | Failed 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check Warning The description explains the user impact, changed areas, mechanism, rationale, testing, limitations, and checklist status. However, the required Linked Issue section is incomplete: it mentions #26276 … Add the actual linked issue in the Linked Issue section, using a full issue link or a valid Fixes # reference. Keep the existing testing details and explicitly note that the full app and e2e suite were not run if they remain u…
Docstring Coverage Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 11 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: scripted renderer scrolling jumps instead of smooth-scrolls when reduced motion is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Description check

Explanation

The description explains the user impact, changed areas, mechanism, rationale, testing, limitations, and checklist status. However, the required Linked Issue section is incomplete: it mentions #26276 as a split-out source but does not provide an actual issue link or a valid Fixes reference.

Resolution

Add the actual linked issue in the Linked Issue section, using a full issue link or a valid Fixes #<issue-number> reference. Keep the existing testing details and explicitly note that the full app and e2e suite were not run if they remain unexecuted.


Full details: Docstring Coverage

Explanation

Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 11 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 merged commit 641b977 into stablyai:main Oct 11, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants