Skip to content

perf(site): reduce spinner rendering frequency - #28182

Draft
ibetitsmike wants to merge 1 commit into
mainfrom
fix/agents-idle-spinner-cpu
Draft

perf(site): reduce spinner rendering frequency#28182
ibetitsmike wants to merge 1 commit into
mainfrom
fix/agents-idle-spinner-cpu

Conversation

@ibetitsmike

Copy link
Copy Markdown
Collaborator

A continuously animated spinner keeps Chrome rendering at display refresh rate even when the Agents page has no JavaScript activity. Override indefinite animate-spin animations to use 12 discrete updates per second, and respect reduced-motion preferences for the persistent sidebar status.

An isolated spinner dropped from 59.4 to 12.1 rendered frames per second and from 4.6% to 1.9% of one Chrome core. In an active-chat fixture with five concurrent tool spinners, stepping reduced Chrome CPU from about 26.0% to 20.7%; pausing those spinners measured 19.2%, confirming they accounted for about 6.8 percentage points while the remaining active-chat work continued at 60 Hz.

Implementation and validation notes
  • Override Tailwind's indefinite spin animation with steps(12, end) while preserving the smooth one-shot spin-once animation.
  • Disable the persistent sidebar spinner when reduced motion is requested.
  • Validated with TypeScript, Biome, production Vite build, focused Storybook interaction tests, and repository pre-commit hooks.
  • The complete Tool story file has one unrelated existing failure in MCP Tool Completed; the three affected running-spinner stories pass when selected directly.

This pull request was generated by Coder Agents.

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