Skip to content

fix(sidebar): stop agent 'working' spinner freezing as a broken ring under reduced motion - #9515

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/not-spinning
Jul 20, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/not-spinning

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Description

On Windows, the agent "working" spinner appeared frozen/stuck in both the terminal tab and the worktree card, while other loading spinners kept spinning.

Root cause: the agent-status spinner is a CSS ring with a transparent top border (border-t-transparent + [animation:spin_1s_steps(12,end)_infinite]), and AgentStateDot carries motion-reduce:animate-none. When Windows Settings → Accessibility → Visual effects → "Animation effects" is off, Chromium reports prefers-reduced-motion: reduce, so animate-none halts the spin — freezing the ring mid-rotation as a partial (3/4) ring, which reads as a broken spinner. Other spinners use animate-spin with no reduced-motion guard, so they keep moving — hence the asymmetry ("top-level spinner spins, agent spinner stuck").

Fix: under reduced motion, also fill the top border so the ring becomes a complete static circle — an intentional "working" marker rather than a broken partial spinner. Applied to both spinner primitives:

  • AgentStateDot.tsx — added motion-reduce:border-t-yellow-500 (fixes the terminal tab + worktree-card agent rows + dashboard/AI-Vault rows).
  • StatusIndicator.tsx — added motion-reduce:animate-none motion-reduce:border-t-yellow-500 so the sidebar/worktree status dot honors reduced motion consistently (previously it kept stepping — the outlier that caused the visible split).

This reuses the pattern already established in feature-tour-preview-glyphs.tsx (reducedMotion ? 'border-t-yellow-500' : 'animate-spin border-t-transparent'). Normal-motion rendering is completely unchanged (both new declarations live only inside @media (prefers-reduced-motion: reduce)).

Evidence of fix

  • Reproduced deterministically — DevTools → Rendering → "Emulate CSS media feature prefers-reduced-motion = reduce" freezes the pre-fix ring as a partial arc; matchMedia('(prefers-reduced-motion: reduce)').matches is true on a Windows box with Animation effects off. Also reproducible by toggling the Windows OS setting directly.
  • Cascade proven by compilation (adversarial review): compiled the exact class set with the repo-pinned [email protected]. Both motion-reduce: rules sort last in @layer utilities at equal specificity (0,1,0), so inside the media query they override border-t-transparent and the arbitrary animation utility by source order. --color-yellow-500 is defined (no --color-*: initial reset in main.css).
  • [email protected] proven not to drop the class — ran twMerge on the exact cn(...) string; the motion-reduce: modifier lands in a separate conflict bucket, so border-t-transparent and motion-reduce:border-t-yellow-500 are both kept. (StatusIndicator's span is a raw literal, not routed through cn, so it can't be merged at all.)
  • Tests — AgentStateDot.test.ts / StatusIndicator.test.ts assert the new classes are present in the rendered markup (the AgentStateDot one runs post-cn, so it also guards against tailwind-merge stripping). Note: string-level tests don't validate compiled CSS — the compile/merge proofs above cover that gap.
  • Consumers audited — all 17 AgentStateDot + 12 StatusIndicator call sites: className reaches only the outer wrapper; the inner spinner classes are hardcoded and unreachable by callers, so no caller can strip or re-color the fix.

⚠️ CI note: node_modules isn't installed in this worktree, so pnpm test / oxlint / oxfmt were not run locally here — relying on PR CI. Changes are literal-string edits with matching test assertions and no type changes.

ELI5

The little "I'm working" circle is drawn as a ring with one piece of its edge left invisible — normally it spins so fast you just see a moving gap, like a chasing tail. Windows has a setting that says "stop animations." When that's on, the spin stops but the gap stays — so you're left staring at a broken-looking three-quarter circle that never moves, and it looks like the agent is stuck.

This change says: if we're not allowed to spin, then color in that missing piece too — so instead of a frozen broken ring you get a clean, whole yellow ring. It's obviously "a status light that's on," not "a spinner that died." The other tiny loading spinners around the app were never told to stop, which is why they kept twirling next to the frozen one and made it look extra broken.

User regression / tradeoff list

Aiming for zero. What actually changes:

Change Who sees it Assessment
Normal-motion rendering Everyone with animations on (default, incl. all macOS defaults) No change — new CSS is media-query-scoped to prefers-reduced-motion: reduce.
Frozen partial ring → complete static ring Reduced-motion users (e.g. Windows Animation effects off) Fix, not regression — was already frozen; now it looks intentional.
Sidebar StatusIndicator stops stepping under reduced motion Reduced-motion users only Intended — it now honors the OS setting (it was the inconsistent outlier). Liveness is still conveyed by the title="Working" tooltip + sr-only labels; only the motion cue is dropped, which is exactly what prefers-reduced-motion requests.

One honest visual tradeoff (non-blocking, flagged by adversarial review): at the small (sm, 6px) AgentStateDot size, the filled ring has only a ~2px center hole, so a static "working" ring is a bit closer to the solid amber waiting/permission dot than the old gapped ring was. Mitigated by: the hole still shows the background through, the hue differs (yellow vs amber), and every dot is paired with a tooltip/aria-label. The md size and StatusIndicator (8px, 4px hole) are unambiguous. A stronger small-size distinguisher would be a separate design decision.

Out-of-scope follow-ups (not regressions): generic Loader2 animate-spin loaders and TasksAnimatedVisual.tsx:297 still don't honor reduced motion app-wide — a possible future consistency sweep.

Relationship to #9380

#9380 (perf: shared spinner clock) does not fix this — it preserves (and broadens) the reduced-motion freeze, so a partial ring would still look broken there. If #9380 lands, its AgentWorkingSpinner should adopt this same "complete ring under reduced motion" treatment.

Made with Orca 🐋

@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9e4ba30d-ab49-4ef3-b42a-03381e599942

📥 Commits

Reviewing files that changed from the base of the PR and between 9843632424dfd084ee965f1474921d194f9a1569 and 1d918c7.

📒 Files selected for processing (4)
  • src/renderer/src/components/AgentStateDot.test.ts
  • src/renderer/src/components/AgentStateDot.tsx
  • src/renderer/src/components/sidebar/StatusIndicator.test.ts
  • src/renderer/src/components/sidebar/StatusIndicator.tsx

📝 Walkthrough

Walkthrough

Updated working-state indicators to support reduced-motion styling by disabling spinner animation and filling the top border with the status color. Added test assertions for the reduced-motion classes in both AgentStateDot and StatusIndicator.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and on-topic, but it does not follow the required template sections. Add the required Summary, Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes sections in the repository template format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the reduced-motion spinner fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

…under reduced motion

Under prefers-reduced-motion (Windows 'Animation effects' off), the agent
'working' spinner froze mid-rotation as a partial (3/4) ring, reading as a
broken spinner in the terminal tab and worktree card. Fill the top border so
it becomes a complete static ring, and apply the same treatment to
StatusIndicator so the sidebar dot honors reduced motion consistently instead
of stepping. Mirrors the existing feature-tour-preview-glyphs pattern.
@OrcaWin
OrcaWin force-pushed the OrcaWin/not-spinning branch from 9843632 to 1d918c7 Compare July 20, 2026 05:18
@OrcaWin
OrcaWin merged commit 64dae13 into main Jul 20, 2026
1 check failed
nwparker added a commit that referenced this pull request Jul 20, 2026
Per-element infinite CSS spin animations kept Chromium's frame pipeline
awake for the whole agent run — measured live (interleaved A/B/A/B,
renderer+GPU): 86.0/76.0 ms CPU/s with the CSS animation vs 61.0/61.0
with the clock, one working agent, and the CSS cost scales per element
while the clock is one flat timer for N spinners.

The clock ticks 12 steps/s at 30° — frame-for-frame identical to the
retired animation — writes style.transform on registered elements, and
stops on document hidden (native visibilitychange post-#9395), under
prefers-reduced-motion (static ring keeps the filled top border from
#9515), and when the last spinner unmounts. The stale-visibility latch
keeps it spinning when proven user input contradicts the occlusion
tracker.

Co-authored-by: Orca <[email protected]>
nwparker added a commit that referenced this pull request Jul 20, 2026
…wake (one shared clock, hidden-window stop) (#9380)

* perf(renderer): drive agent working-spinners from one shared clock

Per-element infinite CSS spin animations kept Chromium's frame pipeline
awake for the whole agent run — measured live (interleaved A/B/A/B,
renderer+GPU): 86.0/76.0 ms CPU/s with the CSS animation vs 61.0/61.0
with the clock, one working agent, and the CSS cost scales per element
while the clock is one flat timer for N spinners.

The clock ticks 12 steps/s at 30° — frame-for-frame identical to the
retired animation — writes style.transform on registered elements, and
stops on document hidden (native visibilitychange post-#9395), under
prefers-reduced-motion (static ring keeps the filled top border from
#9515), and when the last spinner unmounts. The stale-visibility latch
keeps it spinning when proven user input contradicts the occlusion
tracker.

Co-authored-by: Orca <[email protected]>

* fix(github): restore explicit space after Filter fallback in PRFilterSections

Pre-existing failure on main: i18n-jsx-spacing-guard requires {' '} after
the 'Filter' translate fallback, but the file had a bare JSX space (which
oxfmt collapses). Wrap the subject in a span so the explicit {' '} survives
formatting, matching the pattern in the other guarded files.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…under reduced motion (stablyai#9515)

Under prefers-reduced-motion (Windows 'Animation effects' off), the agent
'working' spinner froze mid-rotation as a partial (3/4) ring, reading as a
broken spinner in the terminal tab and worktree card. Fill the top border so
it becomes a complete static ring, and apply the same treatment to
StatusIndicator so the sidebar dot honors reduced motion consistently instead
of stepping. Mirrors the existing feature-tour-preview-glyphs pattern.

Co-authored-by: OrcaWin <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…wake (one shared clock, hidden-window stop) (stablyai#9380)

* perf(renderer): drive agent working-spinners from one shared clock

Per-element infinite CSS spin animations kept Chromium's frame pipeline
awake for the whole agent run — measured live (interleaved A/B/A/B,
renderer+GPU): 86.0/76.0 ms CPU/s with the CSS animation vs 61.0/61.0
with the clock, one working agent, and the CSS cost scales per element
while the clock is one flat timer for N spinners.

The clock ticks 12 steps/s at 30° — frame-for-frame identical to the
retired animation — writes style.transform on registered elements, and
stops on document hidden (native visibilitychange post-stablyai#9395), under
prefers-reduced-motion (static ring keeps the filled top border from
stablyai#9515), and when the last spinner unmounts. The stale-visibility latch
keeps it spinning when proven user input contradicts the occlusion
tracker.

Co-authored-by: Orca <[email protected]>

* fix(github): restore explicit space after Filter fallback in PRFilterSections

Pre-existing failure on main: i18n-jsx-spacing-guard requires {' '} after
the 'Filter' translate fallback, but the file had a bare JSX space (which
oxfmt collapses). Wrap the subject in a span so the explicit {' '} survives
formatting, matching the pattern in the other guarded files.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Orca <[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