Skip to content

fix: promote spinning refresh icon to its own layer on Usage page - #7072

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtxqyovv/agent-2ce50b68
Sep 12, 2026
Merged

fix: promote spinning refresh icon to its own layer on Usage page#7072
atomantic merged 1 commit into
mainfrom
cos/task-mtxqyovv/agent-2ce50b68

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • The subscription usage page's Refresh All icon (and each provider card's per-family refresh icon) toggles Tailwind's animate-spin on and off frequently — the section-level refresh, plus the per-card poll that auto-refreshes while a reading is pending.
  • Without a compositor-layer hint, restarting a CSS transform animation this often can leave a stale rasterized frame behind the freshly-spinning icon, which reads as the animation rendering over a static duplicate of itself.
  • Added will-change-transform to both RefreshCw icons so the browser promotes them to their own GPU layer before the spin starts, avoiding the artifact.

Test plan

  • cd client && npx vitest run src/pages/UsagePage.test.jsx — 16/16 pass, unchanged.
  • Verified live: ran the client dev server in an isolated worktree with the /api/** calls mocked (playwright), navigated to /devtools/usage, clicked Refresh All, and confirmed the button renders exactly one RefreshCw SVG with a single continuous animate-spin animation (element.getAnimations()), no pseudo-element or duplicate icon in the DOM.

The subscription usage page's refresh icons toggle animate-spin on and
off frequently (the section-level Refresh All, and each provider
card's per-family refresh, which also restarts on every pending poll).
Without a compositor-layer hint, the browser can leave a stale
rasterized frame behind the live rotation on repeated restarts, making
the spin look like it's rendering over a static duplicate of itself.
will-change-transform forces the icon onto its own GPU layer so the
restart repaints cleanly.
@atomantic
atomantic merged commit 46bcb72 into main Sep 12, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtxqyovv/agent-2ce50b68 branch September 12, 2026 02:25
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