Skip to content

feat(appearance): add a Reduce motion setting - #4

Open
decrypted wants to merge 6 commits into
mainfrom
feat/reduce-motion-setting
Open

decrypted wants to merge 6 commits into
mainfrom
feat/reduce-motion-setting

Conversation

@decrypted

@decrypted decrypted commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

What

Appearance → Advanced → Reduce motion: Follow system (default) / Always (reduceMotion).

  • "Always" sets data-reduce-motion on <html> in the main, space and popout windows. It applies live, with no restart and no Chromium switch.
  • Tailwind's motion-reduce: / motion-safe: variants are redefined to also follow the attribute: 98 + 16 uses, no call-site changes.
  • All 19 @media (prefers-reduced-motion) blocks follow it too, mostly through @variant with no copied rule bodies.
  • Under "Always", one catch-all rule stops every looping animate-spin/pulse/ping/bounce/waveform and the mobile pairing page loops. The compiled CSS shows it lands outside the utility layers, so it wins.
  • The JS readers (readPrefersReducedMotion, usePrefersReducedMotion) honour the setting. They now share one module-level MediaQueryList instead of one per consumer, one per chat row before this.

Why

The agent "working" spinner cost ~60% of a core on the compositor thread with several agents working; measured, and confirmed by a stop-the-thing test. The only way to stop it was launching Electron with --force-prefers-reduced-motion.

Testing

  • oxlint, oxfmt, pnpm tc, localization checks and 1159 tests on box.
  • Tailwind compile of main.css: every compiled reduced-motion rule has an attribute twin.
  • Performance review: no per-frame or per-render cost; one style recalc per toggle.

Risk

Low. "Follow system" is unchanged. With "Always" set, there is a brief animation flash at startup before settings load.

🤖 Generated with Claude Code

Files Added Deleted Net
Test 0 0 0 0
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​296 $\color{#cf222e}{\Huge{\mathbf{−}}}$​70 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​226

@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch 2 times, most recently from ef1c493 to 907157e Compare November 18, 2026 08:42
decrypted added a commit that referenced this pull request Nov 18, 2026
Upstream 8abbc91..2f5abbc (245 commits). Branches rebased onto it:
fix/linux-port-scan-inode-cache (#1; now on upstream's linux-proc-net-listeners
parser, which gained a uid field), feat/port-detection-setting (#2),
feat/remote-autoconnect-setting (#3), feat/reduce-motion-setting (#4),
feat/keep-awake-timed (#5), feat/sleep-project-and-group (#6),
feat/project-group-filter (#7; group hider composed over upstream's
folder-nested exemption), fix/worktree-create-missing-base-hint (#8), ci/fork-build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from 907157e to 9b2c879 Compare November 19, 2026 08:18
decrypted added a commit that referenced this pull request Nov 19, 2026
Upstream 2f5abbc..7bc705a (345 commits). Branches rebased onto it:
#1 fix/linux-port-scan-inode-cache, #2 feat/port-detection-setting, #3 feat/remote-autoconnect-setting,
#4 feat/reduce-motion-setting, #5 feat/keep-awake-timed, #6 feat/sleep-project-and-group,
#7 feat/project-group-filter, #8 fix/worktree-create-missing-base-hint; plus ci/fork-build.

- #2: upstream stablyai#43836 took the refreshing flag away from the background scanner; the
  detection-off reset no longer clears it.
- #4: upstream's HoverScrollText and the composer glow use the motion-safe / motion-reduce
  variants; the bot activity list scrolls with motionSafeScrollBehavior.
- #7: kept upstream's bot-listed workspace exclusion next to the project-group scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch 2 times, most recently from 766adb1 to f19031a Compare November 23, 2026 08:19
decrypted added a commit that referenced this pull request Nov 23, 2026
Upstream 3df243e..0b23e7a (1046 commits). Tree verified on the scratch
integration branch: tc and check:changed (42 checks) green.

- follow the upstream test cut (stablyai#46786): drop test-only reset exports and
  edits to deleted tests (#3)
- #4: upstream's new reduced-motion CSS/matchMedia moved onto the setting
- #5: union with upstream's WSL-host keep-awake counts; option types moved
  out for max-lines
- #7: hiddenProjectGroupIds moved into ClientUiWorkspaceFilterFields (max-lines)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from f19031a to 7650c93 Compare November 24, 2026 08:13
decrypted added a commit that referenced this pull request Nov 24, 2026
Retires fix/linux-port-scan-inode-cache (#1): upstream stablyai#47943
moved the Linux socket-owner lookup off the main process (one ls in the
port-scan worker), which covers what #1 was for.

#2 follows upstream stablyai#47994's forward owners (SSH or paired server) in the
detection-off panel; its one-off scan guard moved into the store's
replaceWorkspacePortScans (workspace-port-actions.ts hit max-lines).
#4 routes the new BotItemReplyJump reveal through the Reduce motion helper.
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from 7650c93 to 951dbbc Compare November 25, 2026 08:11
decrypted added a commit that referenced this pull request Nov 25, 2026
Rebase conflicts were sibling additions only: locale blocks (#2 en.json,
#5 tr.json), main.css next to upstream's forced-colors plugin icon rule (#4),
and #3's launch hold next to upstream's retireStateOfRemovedEnvironments.
#4 keeps routing BotItemReplyJump through readPrefersReducedMotion().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from 951dbbc to 5d5d443 Compare November 26, 2026 08:08
decrypted added a commit that referenced this pull request Nov 26, 2026
Upstream 2bd7ae3 -> 0fce80c (284 commits). Drops the stablyai#48819 carry
(fix/upstream-48819-mcp-sdk-bundle): upstream merged it as 346447d.

- #4: native-chat-markdown.css word fade split upstream (color vs
  opacity), Reduce motion guard on both rules; BotItemReplyJump.tsx
  removed by upstream's revert of stablyai#48081, our edit dropped; new raw
  prefers-reduced-motion block in terminal.css moved onto motion-reduce.
- #2 en.json sibling union; global-settings-base.ts import union (#2/#3
  vs #4).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from 5d5d443 to 0db5e58 Compare November 27, 2026 08:13
decrypted added a commit that referenced this pull request Nov 27, 2026
Upstream 0fce80c..a788fad (404 commits). Conflicts: lazyZodSchema
wrapping (#2, #7), main.css spinner rule (#4), ko/ru locales (#5);
#4's pane-title fade fix dropped (upstream removed that block), outage
nudge moved onto motion-reduce. Fork CI: Azure apt mirror for the
node-pty floor smoke.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
decrypted and others added 6 commits November 30, 2026 11:52
Adds Appearance > Advanced > "Reduce motion" with "Follow system" (default,
unchanged behaviour) and "Always". "Always" makes every Orca window behave as
if the OS asked for reduced motion, applied live without a restart, so the
--force-prefers-reduced-motion launch flag is no longer needed to stop e.g.
the agent-working spinner from costing compositor time.

- Setting `reduceMotion: 'system' | 'always'` (default 'system'), composed
  into GlobalSettingsBase from shared/accessibility.
- useReduceMotionSetting (main, space and popout roots) sets
  `data-reduce-motion` on <html> and feeds usePrefersReducedMotion,
  readPrefersReducedMotion and motionSafeScrollBehavior.
- main.css redefines the motion-reduce / motion-safe Tailwind variants as
  "OS media query OR data-reduce-motion" / "OS no-preference AND not
  data-reduce-motion"; the raw prefers-reduced-motion blocks in main.css,
  terminal.css, mobile-page.css and text-shimmer.css now use those variants
  via @variant, and the two stylesheets imported outside main.css get
  equivalent hand-written selectors.
- PhoneCarousel, useDashboardSnapshot, the automations row flash and the
  onboarding inline terminal use the shared reader instead of matchMedia.

Browser-pane guest pages are intentionally unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- An unlayered `:root[data-reduce-motion]` rule stops animate-spin,
  animate-pulse, animate-ping, animate-bounce and animate-waveform. Most of
  the ~500 uses of these have no motion-reduce: variant, and some stay up for
  long (pending worktree rows, tab-bar create entry, terminal restore
  placeholder, status-bar segments). The rule is scoped to the attribute, so
  "Follow system" behaves as before. The mobile page's network-refresh spin,
  worktree-list spinner and terminal cursor blink get the same rule.
- usePrefersReducedMotion / readPrefersReducedMotion share one lazily
  created MediaQueryList with one change listener and a cached OS value.
  Each consumer, e.g. every native chat message row, now costs one
  subscriber entry instead of its own matchMedia and listener, and the
  reader no longer calls matchMedia on every call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The shared reduced-motion MediaQueryList was created once per module, so
a window.matchMedia replaced after first use (UpdateCard's recovery test
stubs it per test) kept answering from the old list and the Escape
collapse took the animated path. The watcher now rebuilds the list, and
drops the old listener, when window.matchMedia changes identity.

Also drops the explicit `reduceMotion: 'system'` default: the field is
optional and anything but 'always' already means system, and
default-global-settings.ts is at its max-lines budget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Pseudo-element motion-reduce rules (workspace reveal highlight, omnibox
  caret, tour rings, browser agent cursor layer, pane focus rim) now put
  `&::before`/`&::after` inside `@variant`, so they stay correct without
  Tailwind's flattening (native nesting cannot match `&` to a
  pseudo-element parent). The variant comment also notes that
  not-motion-reduce: is dropped under the custom variant.
- The catch-alls for animate-spin/pulse/ping/bounce/waveform and the mobile
  page loops now apply under the OS reduced-motion preference too, so
  "Always" really means "as if the OS asked". This changes upstream
  behaviour for users whose OS already asks for reduced motion: loaders
  without a motion-reduce: variant stop spinning, which is what that
  preference asks for.
- The setting's description is limited to Orca's interface; browser pages,
  plugin views and notebook outputs keep following the OS.
- The onboarding theme carousel's paging scroll goes through
  motionSafeScrollBehavior, and Monaco's smoothScrolling follows the shared
  reduced-motion reader.
- useReduceMotionSetting applies in a layout effect, before paint, and its
  cleanup resets the attribute and the flag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… styles

Upstream added raw prefers-reduced-motion blocks to bots-tip.css and
sidebar-section-fold.css. Both files are imported outside main.css, so
they can't use the motion-reduce variant; mirror each block under
:where(:root[data-reduce-motion]) like agent-board-transitions.css.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nner

Upstream added a raw prefers-reduced-motion block in worker-dock-morph.css
(imported outside main.css) and a raw matchMedia check for the reload
banner flash. Mirror the block under :root[data-reduce-motion] and use
readPrefersReducedMotion() so the setting's "Always" stills both too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/reduce-motion-setting branch from 0db5e58 to 7d5bb8e Compare November 30, 2026 11:10
decrypted added a commit that referenced this pull request Nov 30, 2026
Upstream a788fad..9fa1d98 (1236 commits). Branches: #2 port detection,
#3 remote auto-connect, #4 reduce motion, #5 keep-awake (squashed to one commit), #6 project sleep,
#7 project-group filter, #8 base-branch hint, #9 mouse history buttons (new in local/build), ci/fork-build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant