Repository navigation
perf(ui): stop loading shimmers from repainting - #128687
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Evidence updated in the PR body with inspected Playwright recordings for every touched loading surface: Chat, Usage, and Memory Import. Both recordings include the three-second DevTools rendering trace on-screen. Before ( anim-shimmer-before.mp4After ( anim-shimmer-after.mp4 |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 7:48 AM ET / 11:48 UTC. ClawSweeper reviewWhat this changesThe PR replaces animated loading-gradient backgrounds with a shared transform-animated pseudo-element and applies it to Chat, Usage, and Memory Import skeletons. Merge readinessNo blocking correctness finding: the shared stylesheet is the right owner for the repeated shimmer behavior, and current main still has the paint-driven variants. This member-authored draft is protected for explicit Control UI maintainer review rather than automated closure or landing. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherControl UI renders empty loading placeholders while Chat history, usage data, or a memory-import plan is pending. The page-specific loading views feed a shared stylesheet primitive, which supplies the visible shimmer and honors the global reduced-motion rule. flowchart LR
A[Chat history loading] --> D[Shared skeleton primitive]
B[Usage data loading] --> D
C[Memory import planning] --> D
D --> E[Clipped highlight layer]
E --> F[Transform animation]
F --> G[Visible loading shimmer]
H[Reduced motion preference] --> D
Decision needed
Why: The PR is member-authored, labeled maintainer, and still a draft, so automated review should not decide its landing state. Before merge
Agent review detailsSecurityNone. PR surfaceSource -5, Tests +103. Total +98 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one shared compositor-friendly skeleton primitive, with page styles limited to geometry and intentional timing differences. Do we have a high-confidence way to reproduce the issue? Yes — current main visibly animates background-position in the shared, Usage, and Memory Import skeleton rules, and the PR supplies a focused Chromium trace path for those loading states. Is this the best way to solve the issue? Yes — centralizing the animation at the shared skeleton owner removes duplicate paint-driven keyframes while preserving page-owned durations and reduced-motion behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d840c0fce11. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Landing evidence for exact head
Production: +38/-68 (net -30). Tests: +152/-0. Test routing: +1/-0. |
|
Merged via squash.
|
* perf(ui): move loading shimmer off paint * perf(ui): keep model loading shimmer off paint
Closes #128657
AI-assisted.
What Problem This Solves
Fixes an issue where users loading initial Chat history, Usage data, or a Memory Import plan would incur continuous rendering work for as long as the loading skeleton remained visible. A three-second Chromium Timeline trace recorded 360-362 Paint events and 180-181
UpdateLayoutTreeevents per affected surface.Why This Change Was Made
All three affected loading states now consume the shared skeleton primitive. The primitive keeps a static base on the host and moves a fixed highlight on a clipped
::afterlayer usingtransform, so Chromium can composite the shimmer without repainting the skeleton each frame. Usage and Memory Import retain their existing 1.35 s and 1.4 s timing, while the duplicate paint-driven keyframes are removed.Memory Overview was inspected as the invariant-sharing sibling cited by the original motion audit. It already animates only
opacityandtransformbehindprefers-reduced-motion: no-preference, measured 0 Paint / 0UpdateLayoutTree, and remains unchanged. The running-tool text wave is also unaffected because its gradient is clipped to glyphs rather than used as a loading skeleton.User Impact
Chat, Usage, and Memory Import retain the same loading affordance and geometry with no continuous paint work. The existing global reduced-motion kill switch still reduces each shimmer pseudo-element to one 0.01 ms iteration.
Production LOC: +29/-34 (net -5) | Tests: +103/-0
Evidence
Reproduction and performance
Reproduced before editing on
47aea1eed43fbb6663e1d241311956a0827c3c85with Chromium 151.0.7922.34. Each production-class fixture warmed for 500 ms, then recorded a three-second DevTools Timeline trace.Before video: current
origin/mainPlaywright
recordVideoagainst the real Control UI bundle and mocked Gateway. One player covers Chat, Usage, and Memory Import in order; each screen includes its measured three-second DevTools trace.anim-shimmer-before.mp4
After video: PR head
aef38b5266d048c33e0b0becb28f7bf017ac994cThe same Playwright flow, viewport, deferred Gateway methods, and trace window. All three loading surfaces remain visible while continuous paint falls to zero.
anim-shimmer-after.mp4
The required video rerun on current
origin/mainmeasured 580 / 360 / 360 Paint events for Chat / Usage / Memory Import; the PR head measured 0 / 0 / 0. The earlier fixture measurements remain above as an independent reproduction with the same conclusion.The production Control UI bundle was run against the mocked Gateway with
chat.startup,sessions.usage,usage.cost, andmigrations.memory.plandeliberately deferred. Chat, Usage, and Memory Import rendered their real loading states. On the PR head all three computedhostAnimation: none,::after animation: shimmer, andwill-change: transform. Every screenshot and both complete recordings were inspected locally before upload.Regression proof
The new browser test failed against the pre-fix CSS because the host had
animation: shimmer, a gradient background, visible overflow, and no animated pseudo-element. It passes after the owner-boundary repair and also verifies reduced motion.Focused test command on the rebased branch:
Result: Focused current-main validation: 370 unit/browser tests and 5 model-catalog Chromium E2Es passed. The dedicated
unit-nodeproject ran the shimmer test 2/2, and the browser project reported no matching file because the Node-driven exclusion is active.Current-main integration:
background-position. It now consumes the same transform-only shared pseudo-element through--skeleton-base,--skeleton-highlight, and--skeleton-duration; the duplicate shimmer and reduced-motion keyframes were removed.ui/src/styles/shimmer.browser.test.tsis now routed through theunit-nodeVitest project because it imports Node stylesheet fixtures. The browser project explicitly excludes it.transform, preserves each duration, and proves reduced motion has no continuing animation. Usage and Memory Import renderer tests protect their productionskeletonhooks.Other validation:
node scripts/check-changed.mjs -- <six changed files>passed the complete changed-file gate, including formatting, typechecks, lint, stylelint, dependency guards, dead exports, and Control UI i18n..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainreported no accepted/actionable findings, confidence 0.99.git diff --checkpassed.Branch audit after rebasing:
git log --name-only origin/main..HEADcontains one shimmer commit and sixui/src/**files.git diff --exit-code origin/main..HEAD -- .githubpassed; no workflow or.github/**changes are present.Provenance and blast radius