Skip to content

fix(Spinner): the ring keeps turning while JavaScript runs - #8177

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c07-spinner-compositor
Nov 3, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c07-spinner-compositor

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Part of making Astryx match iOS, whose spinners keep moving while an app is busy. A Spinner stops turning whenever the page runs JavaScript, when spinners show, in Button and inputs too. Now it keeps turning.

Problem and solution fit

What led to it: the arc animates stroke-dashoffset, repainted on the main thread every frame, so a busy page stops it. #6311 chose it over a rotating <svg>, which wobbled on an iPhone (#6253).

Options:

  • Keep the dash animation: the freeze stays.
  • Rotate the <svg> again: that is what wobbled.
  • Rotate an HTML box holding the arc, its layer declared up front (this PR). Cost: one element and one svg.

Expected behavior and authority

For the owner: component:Spinner needs /approve-spec at this head. The pre-clear said "no record change", but main's FR3 still describes the dash:

  • FR3: "an aria-hidden SVG of two concentric circles … The arc's dash moves around the stationary circle" becomes "an aria-hidden track circle and an aria-hidden arc … The arc turns around the stationary track". Fraction, start, caps, period, timing and the reduced-motion cycle stay.
  • Ownership boundary: "the dash motion" becomes "the arc's turn".
  • AR2: "The SVG is aria-hidden" becomes "The ring is aria-hidden".
  • Verification map: FR3, FR4, PR2 and AR4 name the new browser spec; system_specs adds spec:AST-108/FR4.

Smallest restoration

Spinner.tsx: the arc moves into a second svg inside the turning box; the track stays still. Sizes, shades, theme variables, period and Reduce Motion are unchanged. No API change.

Evidence

  • Mobile Safari (iOS 26.2 simulator), 0.7 s busy script; main above, this change below:
    Spinners frozen on main and turning with this change
  • One revolution, frame by frame (Chromium):
    One revolution, frame by frame
  • Real-device evidence (AST-094 Platform support): owner hand pass on a real iPhone, 2026-11-03, at 5fefc4b: no cap wobble or shimmer over ~10 s; same look and speed as main; no jitter while scrolling; Reduce Motion turns every 3 s.

Testing

  1. Mobile Safari, same script: on main every ring stands still for over half a second; here none stops for more than 30 ms.
  2. At this head, SpinnerMotion.a11y.chromium.spec.ts passes 18 of 18 (three runs): the rings keep turning through a 0.7 s block with no paint per frame, clockwise at a constant rate, in phase, and at 3 s per turn under Reduce Motion.
  3. The other browser contracts, test:ui, test:node and lint pass at this head.

Writing rubric results

R1 narration: none. R2 research: none. R3 evidence: cells name test files. R4 rejected alternatives, R5 change references, R6 open questions: none.

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 3, 2026 8:56am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 24, 2026
@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 3, 2026, 2:01 PM UTC

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 5fefc4b

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
CheckboxInput 48.8 kB (+38 B) · 9.7 kB CSS (+29 B) — — · — · —
ChatMessageList 22.9 kB (+35 B) · 8.0 kB CSS (+26 B) — — · — · —
FileInput 53.7 kB (+45 B) · 10.7 kB CSS (+15 B) — — · — · —
90 more components
Component Size LoC Visual · A11y · RTL
Switch 86.8 kB (+33 B) · 10.6 kB CSS (+27 B) — — · — · —
CommandPaletteInput 26.8 kB (+31 B) · 8.5 kB CSS (+25 B) — ✓ · ✓ · ✓
TextArea 47.2 kB (+36 B) · 9.9 kB CSS (+20 B) — — · — · —
TextInput 52.9 kB (+43 B) · 11.0 kB CSS (+12 B) — — · — · —
ToggleButton 43.3 kB (+32 B) · 9.6 kB CSS (+23 B) — — · — · —
ListItem 52.8 kB (+36 B) · 11.0 kB CSS (+18 B) — — · — · —
Spinner · Storybook 18.5 kB (+32 B) · 6.8 kB CSS (+22 B) 321 (+20) ✓ · ✓ · —
CheckboxListItem 53.4 kB (+34 B) · 11.0 kB CSS (+18 B) — — · — · —
NumberInput 55.0 kB (+40 B) · 11.2 kB CSS (+12 B) — — · — · —
ChatDictationButton 46.0 kB (+28 B) · 9.8 kB CSS (+23 B) — — · — · —
MobileNavToggle 45.8 kB (+28 B) · 9.7 kB CSS (+23 B) — — · — · —
CodeBlock 59.1 kB (+38 B) · 11.1 kB CSS (+11 B) — — · — · —
LayerProvider 62.8 kB (+36 B) · 10.5 kB CSS (+13 B) — — · — · —
SideNavCollapseButton 46.1 kB (+27 B) · 9.8 kB CSS (+22 B) — — · — · —
BreadcrumbItem 67.2 kB (+36 B) · 11.4 kB CSS (+12 B) — — · — · —
Button 42.4 kB (+26 B) · 9.5 kB CSS (+22 B) — — · — · —
IconButton 42.4 kB (+26 B) · 9.5 kB CSS (+22 B) — — · — · —
AppShell 68.6 kB (+36 B) · 12.2 kB CSS (+11 B) — — · — · —
CommandPalette 48.9 kB (+30 B) · 12.2 kB CSS (+17 B) — ✓ · ✓ · ✓
Typeahead 62.9 kB (+33 B) · 11.8 kB CSS (+14 B) — — · — · —
ChatComposerInput 56.2 kB (+37 B) · 10.4 kB CSS (+9 B) — — · — · —
ChatComposerTokenElement 56.2 kB (+37 B) · 10.4 kB CSS (+9 B) — — · — · —
ChatToolCalls 25.9 kB (+31 B) · 9.3 kB CSS (+15 B) — — · — · —
DialogHeader 48.4 kB (+30 B) · 10.2 kB CSS (+16 B) — — · — · —
ComplexSelector 55.6 kB (+35 B) · 11.1 kB CSS (+10 B) — — · — · —
AlertDialog 56.4 kB (+34 B) · 12.7 kB CSS (+10 B) — — · — · —
ChatSendButton 45.2 kB (+21 B) · 9.5 kB CSS (+23 B) — — · — · —
MultiSelector 72.8 kB (+38 B) · 15.2 kB CSS (+6 B) — — · — · —
DropdownMenuSubMenu 56.0 kB (+28 B) · 9.9 kB CSS (+15 B) — — · — · —
Pagination 86.0 kB (+33 B) · 16.0 kB CSS (+10 B) — — · — · —
Thumbnail 49.5 kB (+29 B) · 11.3 kB CSS (+14 B) — — · — · —
SideNav 65.7 kB (+29 B) · 10.9 kB CSS (+13 B) — — · — · —
Tokenizer · Storybook 70.2 kB (+28 B) · 17.1 kB CSS (+14 B) 2,002 (0) ✓ · ✓ · ✓
Calendar 54.3 kB (+30 B) · 10.3 kB CSS (+11 B) — — · — · —
Carousel 50.7 kB (+30 B) · 10.5 kB CSS (+11 B) — — · — · —
DateRangeInput 69.9 kB (+28 B) · 11.8 kB CSS (+13 B) — — · — · —
Stepper 47.0 kB (+31 B) · 9.9 kB CSS (+10 B) — — · — · —
TableSelectionToolbar 52.3 kB (+29 B) · 11.5 kB CSS (+12 B) — — · — · —
lab/Schedule 61.4 kB (+41 B) · 3.9 kB CSS (0) — — · — · —
SideNavItem 54.7 kB (+29 B) · 10.5 kB CSS (+11 B) — — · — · —
lab/Comments 232.5 kB (+40 B) · 2.5 kB CSS (0) — — · — · —
Selector 77.0 kB (+30 B) · 15.7 kB CSS (+9 B) — — · — · —
TabMenu 55.5 kB (+29 B) · 10.4 kB CSS (+10 B) — — · — · —
ChatLayoutScrollButton 45.8 kB (+28 B) · 9.9 kB CSS (+10 B) — — · — · —
lab/TourStep 55.5 kB (+38 B) · 590 B CSS (0) — — · — · —
Banner 47.3 kB (+26 B) · 10.3 kB CSS (+11 B) — — · — · —
ChatComposer 61.0 kB (+25 B) · 11.2 kB CSS (+12 B) — — · — · —
ChatLayout 48.5 kB (+26 B) · 10.3 kB CSS (+11 B) — — · — · —
Lightbox 50.4 kB (+27 B) · 10.2 kB CSS (+10 B) — — · — · —
SideNavHeading 58.9 kB (+26 B) · 10.6 kB CSS (+11 B) — — · — · —
lab/TransferList 74.4 kB (+37 B) · 1.7 kB CSS (0) — — · — · —
DrawerHeader 48.5 kB (+23 B) · 11.6 kB CSS (+13 B) — — · — · —
MobileNav 50.2 kB (+23 B) · 10.4 kB CSS (+12 B) — — · — · —
TableHeaderCell 75.9 kB (+30 B) · 15.5 kB CSS (+5 B) — — · — · —
Toast 59.5 kB (+25 B) · 10.1 kB CSS (+10 B) — — · — · —
richtext/RichTextEditor 277.7 kB (+35 B) · 2.6 kB CSS (0) — — · — · —
TopNavMegaMenu 54.4 kB (+25 B) · 11.2 kB CSS (+9 B) — — · — · —
Popover 50.1 kB (+30 B) · 12.4 kB CSS (+3 B) — — · — · —
TopNav 51.8 kB (+19 B) · 10.7 kB CSS (+13 B) — — · — · —
TopNavMenu 58.4 kB (+22 B) · 10.5 kB CSS (+10 B) — — · — · —
lab/ListInput 81.5 kB (+32 B) · 1.6 kB CSS (0) — — · — · —
DropdownMenu 73.1 kB (+29 B) · 15.4 kB CSS (+2 B) — — · — · —
Table 84.4 kB (+19 B) · 16.0 kB CSS (+12 B) — — · — · —
TableCell 76.3 kB (+26 B) · 15.8 kB CSS (+5 B) — — · — · —
TimeInput 90.1 kB (+32 B) · 14.3 kB CSS (−1 B) — — · — · —
lab/CommentComposer 102.4 kB (+31 B) · 1.9 kB CSS (0) — — · — · —
lab/DiffViewer 70.8 kB (+31 B) · 2.1 kB CSS (0) — — · — · —
BaseTypeahead 55.2 kB (+21 B) · 10.3 kB CSS (+9 B) — — · — · —
Markdown 145.1 kB (+27 B) · 18.3 kB CSS (+3 B) — — · — · —
lab/ChatReactionBar 65.7 kB (+29 B) · 1.1 kB CSS (0) — — · — · —
lab/EmojiPicker 70.2 kB (+29 B) · 722 B CSS (0) — — · — · —
lab/MobileTokenizer 101.1 kB (+29 B) · 880 B CSS (0) — — · — · —
lab/MobilePowerSearch 213.7 kB (+28 B) · 1.2 kB CSS (0) — — · — · —
lab/CommentThread 227.1 kB (+27 B) · 2.4 kB CSS (0) — — · — · —
MoreMenu 73.4 kB (+24 B) · 15.4 kB CSS (+2 B) — — · — · —
lab/TransferListSelector 80.8 kB (+26 B) · 1.9 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 222.0 kB (+26 B) · 454 B CSS (0) — — · — · —
ContextMenu 75.1 kB (+25 B) · 15.3 kB CSS (0) — — · — · —
TopNavHeading 58.3 kB (+16 B) · 10.4 kB CSS (+9 B) — — · — · —
lab/ChatEmojiPicker 65.1 kB (+23 B) · 773 B CSS (0) — — · — · —
richtext/RichTextView 258.2 kB (+23 B) · 2.3 kB CSS (0) — — · — · —
DateInput 103.3 kB (+36 B) · 15.3 kB CSS (−17 B) — — · — · —
PowerSearch 184.2 kB (+28 B) · 20.6 kB CSS (−18 B) — — · — · —
Timestamp 21.3 kB (−1 B) · 9.9 kB CSS (+10 B) — — · — · —
DateTimeInput 158.5 kB (+23 B) · 17.0 kB CSS (−16 B) — — · — · —
CommandPaletteEmpty 6.2 kB (0) · 3.5 kB CSS (0) — ✓ · ✓ · —
CommandPaletteFooter 17.0 kB (0) · 3.7 kB CSS (0) — ✓ · ✓ · ✓
CommandPaletteGroup 3.5 kB (0) · 3.5 kB CSS (0) — ✓ · ✓ · —
CommandPaletteItem 10.0 kB (0) · 3.6 kB CSS (0) — ✓ · ✓ · —
CommandPaletteList 16.0 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —

Package size: @astryxdesign/core 6.09 MB packed (−327 B); no new dependencies.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: moving the arc onto a compositor-turned rotor does keep the ring turning through a busy main thread in Chromium, and the new SpinnerMotion contract fails on main and passes here. Before this lands, please:

  • Update CommandPalette.a11y.chromium.spec.ts, whose .astryx-spinner circle:last-of-type selector now also matches the track, so its 3:1 contrast check fails (1.51:1 light, 2.33:1 dark).
  • Update TokenizerEndLane.a11y.chromium.spec.ts, which treats at least 10 style recalculations per 500 ms as proof the busy ring is ticking; the compositor rotor yields 6–9, so it fails in both ltr and rtl.
  • Attach a recording from a physical iPhone showing the rotor without the #6253 wobble, since the simulator does not reproduce that wobble even for the old rotating svg.

[Automated review]

Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
height: `var(${BOX_SIZE})`,
// Its own compositing layer from the first frame, before the start time
// is pinned from script (see `pinRotorsToTimelineOrigin`).
willChange: 'transform',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This brings a rotating arc back to iOS Safari, where #6311 removed rotation after a physical-device test showed the #6253 wobble despite layer promotion. The simulator does not reproduce #6253 even for the old rotating svg, so please attach a physical-iPhone recording of this head beside main.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the compositor rotor keeps the Spinner turning through a busy main thread in Chromium, and the two browser contracts flagged earlier now pass on this head. Before this lands, please attach a recording from a physical iPhone on current iOS showing this head beside main, since the #6253 wobble was reproduced only on a device and the iOS 26.2 simulator does not show it even for the old rotating svg. Rebasing on main will also let pr-a11y find the WheelPinchZoom spec its workflow now runs. Minor: without a stylesheet each Spinner now renders two discs side by side, twice its normal width.

[Automated review]

Comment thread packages/core/src/Spinner/Spinner.tsx Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: moving the arc onto a compositor-turned rotor keeps the Spinner turning through a busy main thread in Chromium, with the same look at rest. Before this lands, please attach a recording from a physical iPhone on current iOS showing this head beside main, since the #6253 wobble was reproduced only on a device and the iOS 26.2 simulator does not show it even for the old rotating svg. Minor: without a stylesheet each Spinner now renders two discs side by side, twice its normal width (Spinner.tsx:602-605). Rebasing on main will also let the pr-a11y job reach the new Spinner contract.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:

  • Reduced motion. core/src/Spinner/Spinner.tsx:322 handles reduced motion locally. Per design:reduced-motion (DR1–DR4), the animator is the one place that resolves it (touch cross-fades in 200 ms or less with no travel, a fine pointer changes at once), and core has no opt-out, so reducedMotion: 'keep' should be removed.

This is about where the behavior lives, not about the PR's intent.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Reduced motion. core/src/Spinner/Spinner.tsx:322 handles reduced motion locally.

design:reduced-motion leaves continuous status indicators such as a spinner outside its scope, and the animator's reduced-motion policy covers transitions, so this keeps main's existing 3 s reduced-motion turn, moved onto the compositor rotor. If spinners should follow a shared rule too, that's a question for the record.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: moving the arc onto a compositor-turned rotor keeps the Spinner turning through a busy main thread in Chromium with the same look at rest, and a render without the stylesheet keeps the box's size again. Before this lands, please attach a recording from a physical iPhone on current iOS showing this head beside main, since the #6253 wobble was reproduced only on a device and the iOS 26.2 simulator does not show it even for the old rotating svg. Recording the pre-#6311 rotating ring on the same device as well would show that the recording can catch the wobble.

[Automated review]

Comment thread packages/core/src/Spinner/Spinner.tsx Outdated
Comment on lines +226 to +228
* on an iPhone (#6253). The box that turns here is an HTML element holding
* a compositing layer from its first frame, so the arc is rasterized once and
* turned as a whole.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the claim the #6253 history puts in doubt: on the reporter's iPhone, a forced compositing layer on the rotating svg did not stop the wobble, and the iOS 26.2 simulator shows none even for the old rotating svg. Please attach a recording from a physical iPhone on current iOS of this head beside main before this lands; the pre-#6311 rotating ring on the same device would show the recording can catch the wobble.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No physical iPhone is available to this work. The evidence attached is from the iOS 26.2 simulator (this head beside main through a 700 ms block) and from Chromium, where the arc's centroid radius varies 0.03–0.04 px (SD) against 0.09–0.2 px for the dash animation. The physical-device comparison, including the pre-#6311 rotating ring on the same device, is left to the owners.

@vjeux

vjeux commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

This ring can't land while component:Spinner FR3 describes it as one aria-hidden SVG of two concentric circles whose arc's dash moves. Here the track SVG stays still, and the arc turns by transform in a second aria-hidden SVG inside a rotor, so the ring keeps turning while the page runs JavaScript.

Could the record's engineering owners amend FR3 to describe the ring by what it shows rather than how it moves? For example: "The ring is an aria-hidden track circle and an aria-hidden arc covering --spinner-arc-fraction of the circumference (0.375 by default), starting at twelve o'clock with round caps. The arc turns around the stationary track at --duration-slow-min per cycle, linear, indefinitely; under prefers-reduced-motion: reduce the cycle slows to 3 seconds and does not stop."

Our reading is that everything FR3 can observe stays the same: arc fraction, start angle, caps, a stationary track, the period, linear timing and the reduced-motion cycle. Only the mechanism changes, measured in this PR's evidence:

  • Chromium, 700 ms main-thread block: no frame changes on main (the dash animation repaints 305 times a second); here 39 of 40 frames per ring change, with no paint or layout.
  • Mobile Safari on the iOS 26.2 simulator, same block: the longest still stretch per ring drops from 517–632 ms to 30 ms.
  • The arc's centroid radius varies 0.03–0.04 px (SD), against 0.09–0.2 px for the dash animation.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the arc onto a compositor-turned rotor keeps the Spinner turning through a busy main thread in Chromium, with the same look at rest. Approval waits on an engineering owner updating component:Spinner FR3 for this intentional change: FR3 still describes one aria-hidden SVG whose arc's dash moves, and the Ownership boundary's "the dash motion" and AR2's "The SVG" need the same decision. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Separately, please attach a recording from a physical iPhone on current iOS showing this head beside main, since the #6253 wobble was reproduced only on a device and the iOS 26.2 simulator does not show it even for the old rotating svg.

[Automated review]

@vjeux

vjeux commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

The FR3 decision asked above also covers two lines of component:Spinner that name the old mechanism. Proposed, in the same terms as the FR3 wording above:

  • Ownership boundary: "Ring geometry per size, ring and track color per shade, the arc's turn, and the reduced-motion rate.", in place of "the dash motion".
  • AR2: "AR2 — Decorative ring. The ring is aria-hidden." Here the track's SVG and the rotor that holds the arc both carry aria-hidden.

On a physical iPhone: no physical-device recording is available for this PR. Every Mobile Safari claim here is recorded on the iOS 26.2 simulator, and a real-device check is the release gate. The simulator shows no #6253 wobble even for the old rotating <svg>, so it cannot clear this change either way, as the description says. What differs from that <svg>: the box that turns is an HTML element holding its own compositing layer from the first frame, so the arc is rasterized once and turned as a whole.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: turning the arc on a compositor rotor keeps the Spinner moving through a busy main thread in Chromium with the same look at rest, and the component:Spinner record change is owner-approved at this head. Before this lands, please:

  • Attach a recording from a physical iPhone on current iOS of this head beside main, because Spinner.tsx now says the rotor avoids the #6253 wobble and the iOS 26.2 simulator cannot show that wobble even for the old rotating svg.
  • Add spec:AST-108/FR4 to system_specs in the Spinner record, because removing the comment's citation drops that claim from pnpm specs:for packages/core/src/Spinner/Spinner.tsx.
  • Import blockMainThread and startScreencast from @astryxdesign/interaction-harness in SpinnerMotion.a11y.chromium.spec.ts instead of keeping local copies.

A smaller suggestion: the compositing-layer reason now appears in four comments in Spinner.tsx, and one copy on the rotor style is enough.

[Automated review]

Comment thread packages/core/src/Spinner/Spinner.tsx Outdated
Comment on lines +229 to +232
* every frame, so it would stop while a script runs. WebKit can re-rasterize
* a rotating stroked shape at each angle, which reads as a wobble on an
* iPhone. Here the box that turns is an HTML element with a compositing layer
* from its first frame. So the arc is rasterized once and turned as a whole.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the claim the #6253 history puts in doubt: on the reporter's iPhone a rotating svg kept wobbling even with a forced compositing layer, and the iOS 26.2 simulator shows no wobble even for the old rotating svg. Please attach a recording from a physical iPhone on current iOS of this head beside main (AST-013 FR10); the pre-#6311 rotating ring on the same device would show the recording can catch the wobble.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attached are iOS Simulator recordings (iOS 26.2, iPhone 17 Pro), not a physical phone:

Does that satisfy this thread? If a physical device is required, say so.

Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
@vjeux
vjeux force-pushed the uikit/c07-spinner-compositor branch from 2ac04cc to 9bdd4cf Compare November 3, 2026 07:13
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@vjeux

vjeux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Review threads at 9bdd4cf:

  • Fixed: spec:AST-108/FR4 is in the Spinner record's system_specs, so pnpm specs:for packages/core/src/Spinner/Spinner.tsx lists it again.
  • Fixed: SpinnerMotion.a11y.chromium.spec.ts imports blockMainThread and startScreencast from @astryxdesign/interaction-harness, and the local copies are gone. It passed 18 of 18 over three runs.
  • Fixed: the layer reason is stated once, on the rotor's willChange. The wobble claim is out of the comments.
  • Fixed earlier, still true at this head: the CommandPalette contract selects the rotor's arc, and TokenizerEndLane checks the busy ring's running animation. The test comment names SpinnerMotion.a11y.chromium.spec.ts. With no stylesheet, the track is zero-sized, so a Spinner draws one disc at its own size.
  • Open: the physical-iPhone recording of this head beside main (three threads). A person records it on current iOS before this leaves draft, and the recording goes on this pull request.

@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 9bdd4cf

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: turning the arc on a compositor rotor keeps the Spinner moving through a busy main thread in Chromium, with the same look at rest, and the component:Spinner record change is owner-approved at this head. The spec:AST-108/FR4 link and the blockMainThread/startScreencast imports are fixed. Before this lands, please:

  • Attach a recording from a physical iPhone on current iOS of this head beside main, because the arc rotates again on iOS Safari, where the #6253 wobble was reproduced only on a device, and the iOS 26.2 simulator recordings cannot show that wobble even for the old rotating svg (so yes, a physical device is required).
  • Use traceRendering, animationStoryboard and parseTransform from @astryxdesign/interaction-harness in SpinnerMotion.a11y.chromium.spec.ts instead of the local paint trace (lines 198-228), contact sheet (lines 329-425) and angleOf (lines 140-148).

A smaller suggestion: two comments in Spinner.tsx (lines 215-218 and 300-301) restate the code; the inline notes suggest shorter wording.

[Automated review]

// Mobile Safari keeps a re-timed animation off the main thread only on an
// element with its own layer. So the rotor declares one before the start
// time is set (see `pinRotorsToTimelineOrigin`).
willChange: 'transform',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new iOS 26.2 simulator recordings show the ring keeps turning, but they cannot settle #6253: by your own account the simulator shows no wobble even for the old rotating svg, and on the reporter's iPhone a forced layer on the rotating svg still wobbled. So yes, a physical device is required: please attach a recording from a physical iPhone on current iOS of this head beside main (the pre-#6311 ring on the same device shows the recording can catch the wobble).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real-device evidence is now in the pull request body: an owner's hand pass on a real iPhone at 5fefc4b, which the spec owners ruled is the evidence AST-094 Platform support asks for. No recording is attached.

Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
@vjeux
vjeux force-pushed the uikit/c07-spinner-compositor branch from 9bdd4cf to 98cee74 Compare November 3, 2026 07:58
@vjeux

vjeux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Review threads at 98cee74:

  • Fixed: the paint check uses traceRendering and expects paint and layout to be 0. The angle comes from parseTransform(...).rotate. The storyboard uses animationStoryboard with timeline(duration - 1) and storyboard.write, and checks every frame against 360 × t / P. The local trace parsing, matrix parse and sheet code are gone. It passed 18 of 18 over three runs.
  • Fixed: both comments use the suggested wording.
  • Open: the physical-iPhone recording of this head beside main (four threads). It is recorded on a device before this leaves draft.

@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 98cee74

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: turning the arc on a compositor rotor keeps the Spinner moving through a busy main thread in Chromium, and the new SpinnerMotion contract fails against main and passes here. The component:Spinner record change is owner-approved at this head. Before this lands, please:

  • Attach a recording from a physical iPhone on the latest stable iOS of this head beside main, since the #6253 wobble was only ever reproduced on a device and the iOS 26.2 simulator shows none even for the old rotating svg (AST-013 FR10).
  • In SpinnerMotion.a11y.chromium.spec.ts:168-184, summarise each ring's checksum series with the harness's frameStats instead of the local changed-frame and longest-stall loop.
  • In Spinner.test.tsx:46-81, use the shared getAllInjectedCss and declaredValue test helpers instead of injectedCss and declarationsOf, extending declaredValue to read classList so it also serves the svg and circle.

[Automated review]

The arc turns inside a rotor, an HTML box with its own compositing layer,
instead of animating its dash. The compositor turns it, so a busy main
thread no longer stops it. The track stays still. component:Spinner FR3,
its ownership boundary and AR2 now describe the ring by what it shows.
@vjeux

vjeux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Review threads at 5fefc4b:

  • Fixed: each ring's checksum series goes through frameStats, and the test asserts changed and longestStallMs with the same thresholds. It passed 18 of 18 over three runs.
  • Fixed: Spinner.test.tsx uses getAllInjectedCss and declaredValue, and its local copies are gone. declaredValue now reads classList, so it also reads svg and circle classes. Its other seven users still pass.
  • Open: the physical-iPhone recording of this head beside main. It is recorded on a device before this leaves draft.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: turning the arc on a compositor rotor keeps the Spinner moving through a busy main thread in Chromium, and the new SpinnerMotion contract fails against main and passes here. The component:Spinner record change is owner-approved at this head, and the switch to frameStats, getAllInjectedCss and declaredValue resolves the earlier test-helper findings. Before this lands, please:

  • Attach a recording from a physical iPhone on the latest stable iOS of this head beside main, since the #6253 wobble was only ever reproduced on a device and the iOS 26.2 simulator shows none even for the old rotating svg (AST-013 FR10).

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending approval. Turning the arc on a compositor rotor keeps the Spinner moving while a script runs (in Chromium every ring changes in each frame of a 1 s script, where main presents none), and the ring looks the same at rest. The component:Spinner record change is owner-approved at this head, and the owner's hand pass on a real iPhone answers the #6253 wobble question raised in earlier reviews. Nothing further is needed from the author.

[Automated review]

@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 5fefc4b

@vjeux
vjeux marked this pull request as ready for review November 3, 2026 14:25
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 3, 2026
@cixzhang
cixzhang marked this pull request as draft November 3, 2026 14:33
@cixzhang
cixzhang marked this pull request as ready for review November 3, 2026 14:33
@cixzhang
cixzhang merged commit fa3295a into meta:main Nov 3, 2026
157 of 162 checks passed
@vjeux
vjeux deleted the uikit/c07-spinner-compositor branch November 3, 2026 15:23
cixzhang added a commit to korkt-kim/astryx that referenced this pull request Nov 5, 2026
Resolves the conflicts with meta#8177, meta#9936 and meta#8256 (Spinner's rotor,
wake-once-per-100-turns and CircularProgress) and the adopters test's
PowerSearch and InfoTip changes. The Spinner record takes main's FR3,
system_specs and verification rows, with this branch's approved
"indicator" wording, AST-017/AST-020 additions and announcement notes
applied onto them.
cixzhang pushed a commit that referenced this pull request Nov 5, 2026
…t channel (#7910)

* fix(Spinner): share rendered-text announcements

Use the shared rendered-text announcement path for Spinner while keeping composed indicators silent. Let Lab loading owners announce busy starts, including the Comments history dialog through its shared modal channel.

Fixes #7855

Co-authored-by: Cindy Zhang <[email protected]>

* Merge main to resolve PR #7910 conflicts

Preserve Spinner's rendered-text fallback alongside owner-provided announcers, keep direct module imports, and retain Comments' persistent error region together with its busy-start announcement.

* refactor(lab): reuse status announcements for busy loaders

* Merge main to resolve PR #7910 conflicts

Carry the approved Spinner contract to docs/specs/components while preserving the existing announcement changes and upstream Typeahead and Tokenizer updates.

* Merge main into korkt-kim/fix-issue-7855

Resolves the conflicts with #8177, #9936 and #8256 (Spinner's rotor,
wake-once-per-100-turns and CircularProgress) and the adopters test's
PowerSearch and InfoTip changes. The Spinner record takes main's FR3,
system_specs and verification rows, with this branch's approved
"indicator" wording, AST-017/AST-020 additions and announcement notes
applied onto them.

* chore: comments give their reasons without record citations

The comments this branch added cite knowledge records (spec IDs and FR
numbers), which strict lint's no-comment-provenance rule rejects. Each now
keeps only the reason it gives; the records still hold the requirements.
Comments only: no code changes.

* chore(lab): remove the old useStatusAnnouncement left by the merge

This branch moved packages/lab/src/Comments/useStatusAnnouncement.ts to packages/lab/src/useStatusAnnouncement.ts; the merge of main brought the old copy back. Nothing imports it.

This branch was successfully deployed

1 active deployment
Preview — 5fefc4bb Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants