Skip to content

fix(RefreshControl): a Reduce Motion release cross-fades the list - #11087

Draft
vjeux wants to merge 16 commits into
meta:mainfrom
vjeux:fix/refresh-control-reduce-motion-cross-fade
Draft

vjeux wants to merge 16 commits into
meta:mainfrom
vjeux:fix/refresh-control-reduce-motion-cross-fade

Conversation

@vjeux

@vjeux vjeux commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

User impact

With Reduce Motion on a phone, a pull's release and a refresh's end blank RefreshControl's list and spinner for a moment. Both should stay in view.

Problem and solution fit

Under Reduce Motion, the shared animator turns the list's move into a dip: out, land, back in, through opacity 0.

Now a copy of the list, spinner band included, fades out as the list lands and fades in. A row never shows below 0.75.

Expected behavior and authority

design:reduced-motion DR2: a transition that a touch release starts changes opacity only, within 200 ms. "An entering element appears in its final place and fades in; a leaving element fades out where it is." Its cross-fade "connects the two states".

It adds one item to the transient copies architecture:component-style-authoring INV7 allows:

the old place of content that a Reduce Motion cross-fade moves, fading out as the content fades in at its new place, such as RefreshControl's list at a release or a refresh's end (design:reduced-motion DR2)

Smallest restoration

  • playReducedMotionCrossFade lays an inert copy beside the scroll container, clipped to its visible box past the copy's edges. It reads that box before any write. Content too large to copy keeps the dip.
  • RefreshControl's settle and end use it under Reduce Motion. An end into the inset cross-fades onto its slide's end, then takes the scroll back. A new refresh or an unmount stops it mid-fade, and a release that moves nothing lands at once.

Evidence

  • At 4b4aaee, the test alone on main, the first case fails 3 of 3 in each engine: a row shows at 0.000–0.011.
  • After it, a row shows at 0.750 or more on every frame, 3 of 3 in each engine.
  • At e0362d7 the spinner showed 0.001 at the release and 0.000 through the end. Now it fades with the copy.
  • At 5bbd943, an end into the inset read the scroll after laying its copy. At 8391a16, a refresh begun mid-fade lost its inset. At 57ba8f6, a release that moved nothing laid a copy. At 25f17e1, an unmount mid-fade left the copy and a late scroll.
  • Unchanged: normal motion, a trackpad's release on a fine primary pointer, and the other Reduce Motion cases.
  • Regression tests: six RefreshControl interaction cases and eight unit cases.

Scope

Components: RefreshControl, motion

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

The head, ae54d25, merges main 787369d into 15b3624. Main added prepareFocusReturnOnRemoval to INV13, and the merge keeps both sentences. 15b3624 adds one commit to 25f17e1: an unmount ends a cross-fade in flight. 25f17e1 merges main 91cd63f into 402e9bd with no conflict. 402e9bd adds one commit to 57ba8f6: a release that moves nothing lays no copy. 57ba8f6 merges main 426ba23 into a16514c. Main added timing to INV13 and to the bundle test's Lab-only names, and the merge keeps both sides. a16514c merged main 061b2fa into 1ff7ccb with no conflict. Neither merge changes this pull request's own text; INV13's lines rewrap around main's new sentence. 1ff7ccb is the branch rebased on main 8b9fbfa, plus four commits. The first two show the indicator band in the copy and cross-fade an end into the inset onto its slide. The third widens the INV7 item, and the fourth keeps a refresh begun mid-fade on its inset. The sandbox route lists keep both sides. At this head, every browser run used 1 worker:

  • RefreshControl's interaction spec: 32 passed (1 skipped) in Chromium, and 25 passed (8 skipped) in WebKit in CI's container.
  • At 25f17e1, the animatedLayout specs and their adopters, busy and reveal-paint specs: 118 passed in Chromium, and 115 passed (3 skipped) in WebKit. This head changes no Core file.
  • At 25f17e1, the unmount case fails in Chromium: the copy outlives the list. At 57ba8f6, both no-travel cases fail in Chromium: a copy is laid over the list that did not move. At 8391a16, the mid-fade refresh case fails in Chromium: the list ends at 0, not on the 60 px inset. At 5bbd943, the end case fails: one scroll read lies between laying the copy and starting its fade. At e0362d7, the spinner check fails in Chromium, with the numbers in Evidence.
  • Unit tests for motion, the internal entry and RefreshControl: 1,137 passed, the cross-fade's own 8 among them. The touch-support bundle test and the sandbox's route test: 17 passed.
  • The pull request's accessibility specs (pnpm test:a11y-contract:pr): 141 passed in Chromium.
  • The Storybook build, the core and Lab typechecks, pnpm check:knowledge and pnpm check:changesets pass.
  • Prettier and strict ESLint on the changed files: 0 errors and 0 warnings.
  • The phone check page, /pages/refresh-control/, is test surface only: a raw sandbox page whose document scrolls.

Device runs at the head ae54d25, stated in text: the clips exist and are not attached. Both heads ran interleaved on one iPhone 14 and one Pixel 8. Each phone read the sandbox's version.json for each head: ae54d25 and 8391a16. Each case matches 8391a16, except the pushed-back pull, which no longer fades. The measure is the list text's contrast per frame, against 1.00 at rest. The 402e9bd take ran the same steps and reached the same verdict.

  • Real iPhone 14, iOS 26.2 Safari, ae54d25, normal motion: pass. A pull refreshes once and a second pull refreshes again, with no fade (0.96 or more).
  • Real iPhone 14, iOS 26.2 Safari, ae54d25, Reduce Motion: pass. A pull refreshes once, a second pull again, and a short pull nothing. Each release and return cross-fades, dipping to 0.56–0.63, never blank.
    • A pull pushed back past its start refreshes nothing and does not dip (0.98–0.99, 2 of 2), where 8391a16 dips to 0.80.
    • At 402e9bd, under Reduce Motion, the iPhone showed the spinner on every frame through a release. At a refresh's end it faded out over 4 to 5 frames. This take did not measure the spinner's frames.
  • Real Pixel 8, Chrome 157, ae54d25, Remove animations: pass. A pull refreshes once, a second pull 1.55 s later again, and a short pull nothing. Each release and return cross-fades, dipping to 0.53–0.54, never blank.
    • A pull pushed back past its start shows no fade (0.97, 2 of 2), where 8391a16 dips to 0.53. Both end scrolled 162–163 px.
    • The spinner turns at 120° per second.
  • Real Pixel 8, Chrome 157, ae54d25, normal scale: pass. The same four pulls refresh once, twice, and not at all, with no cross-fade (0.93–0.98). The spinner turns at 686° per second.
  • Real Pixel 8, Chrome 157, ae54d25, at 4× CPU as the slow-device profile: pass. A pull refreshes once and a second pull again, with no cross-fade.

At 4195083, before the rebase and the band fix, on main fcf9286:

  • RefreshControl's interaction spec, three times over: 78 passed (3 skipped) in Chromium, and 63 passed (18 skipped) in WebKit.
  • Motion's interaction specs passed in both engines, Chromium then WebKit. animatedLayout: 101 and 101. animatedLayoutAdopters: 6 and 6. animatedLayoutRevealPaint: 8 and 8. animator: 22 and 15. themeTempo: 6 and 6. themeTiming: 8 and 8. animatedLayoutBusy: 3, skipped in WebKit.
  • pnpm build, the sandbox build and pnpm check:repo passed.
  • In Chromium at a phone's size, the phone check page refreshes once on a slow pull. Under Reduce Motion a row shows at 0.750 or more.

Public and internal API delta

  • Public: none in the documented entries. The generated API report finds no changes against main's built surface, but it leaves out Core's ./internal/* entries (INV24).
  • @astryxdesign/core/internal/touch, the published entry Lab reads, gains playReducedMotionCrossFade and the type ReducedMotionCrossFade.
  • New internal module packages/core/src/motion/reducedMotionCrossFade.ts exports both.
    • Usage: playReducedMotionCrossFade(element, fade, land, owner.current) in RefreshControl's touch controller. Its fade is reducedMotionFade(element, {touchRelease}).
    • Why: under Reduce Motion, a release and a refresh's end fade the list through a copy, so a row never dips to blank.
    • Existing modules considered: motion/reducedMotion.ts, which holds the animator's dip and reducedMotionFade. It could hold the cross-fade beside the dip.
  • placeOver in motion/transientCopy.ts returns the host's scale on each axis.
    • Usage: const scale = placeOver(copy, host, rect, anchor.nextSibling); in the cross-fade, which converts the clip's insets with it.
    • Why: reading the copy's box again after laying it forced a second layout.
    • Existing modules considered: placeOver already measures that scale to lay the copy.
  • Records: architecture:component-style-authoring INV7 gains one allowed transient copy. architecture:react-component-runtime INV13 names playReducedMotionCrossFade on internal/touch, and says why the motion modules' dip does not cover it.
  • Test surface only: the raw sandbox page /pages/refresh-control/, and the scroll-container story's refreshcontrol-story-unmount event.
  • Lines against main 787369d: product +323/−16, tests +895/−2, records +10/−3, changeset +7/−0, sandbox page, routes and story +145/−8.
  • App-level load, at 4195083: a minified app of 16 components, including RefreshControl, grows 1,155 bytes gzip against main. It goes from 360,047 to 361,202 bytes, with two more modules.

Writing rubric results

architecture:component-style-authoring INV7 gains one present-tense item in its list of transient copies. The item is the old place of content a Reduce Motion cross-fade moves, such as RefreshControl's list at a release or a refresh's end. architecture:react-component-runtime INV13 gains two present-tense sentences on playReducedMotionCrossFade: what it does, and why the dip does not cover it.

  • R1 narration: none; the item states what the system does.
  • R2 research: none.
  • R3 evidence: none touched.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none touched.
  • R7 project status: none.

Merge carry (8e7ea02): merge carry by Cindy's M&G lane; conflicts resolved in packages/core/src/internal/touch.ts (keeps both new re-exports: this branch's playReducedMotionCrossFade and main's useFocusAcrossSwap), its re-export test internal/touch.test.ts and scripts/touch-support-bundle.test.mjs (both names), and docs/architecture/react-component-runtime.md (main's shorter prepareFocusReturnOnRemoval sentence plus this branch's playReducedMotionCrossFade sentences); no product change. Checked on the merged tree: Prettier and ESLint on the files that differ from main, pnpm check:knowledge, Core internal/motion and Lab RefreshControl unit tests (52 files, 1161 tests), the touch bundle test (16 tests) and the Core and Lab source typechecks pass.

@vercel

vercel Bot commented Nov 10, 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 Dec 3, 2026 3:25pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Dec 3, 2026, 3:47 PM UTC

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

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@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.

The list now stays visible through a Reduce Motion release and refresh end. Approval waits on an engineering-owner decision about the record change, and two fixes are needed either way.

Spec decision: this pull request adds a new permitted transient copy to architecture:component-style-authoring INV7 (the old place of content that a release moves under Reduce Motion). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, you may record it yourself.

Required fixes:

  • clipTo clamps each inset at 0 (packages/core/src/motion/reducedMotionCrossFade.ts:131-137), so the copy never shows the indicator band the content draws above itself, and under Reduce Motion the spinner vanishes in one frame when a refresh ends and drops to near 0 at a release; clip the copy to the scroller's visible box instead (for example a holder like visiblePartCopy's) and cover the indicator in the new interaction case.
  • clipTo reads layout (reducedMotionCrossFade.ts:122-130) right after placeOver writes the copy's position, which forces another layout in the task that starts each cross-fade; read the scroller's box together with rect before any write, or use the holder, which needs no read.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e0362d7

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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.

Changes requested. An engineering owner approved the record changes for this head (the new INV7 copy kind and the INV13 sentence), so what remains is two fixes in the cross-fade.

  • The copy's clip stops at its own box (Math.max(0, value) in packages/core/src/motion/reducedMotionCrossFade.ts:136), so it never shows the indicator band that sits above the content, and under Reduce Motion the spinner vanishes in one frame when a refresh ends and blinks at a release; clip the copy to the scroller's visible box without the clamp (or in a holder, as visiblePartCopy does), update the unit case that expects the clamped inset, and cover the indicator in the new interaction case.
  • clipTo reads layout (reducedMotionCrossFade.ts:122-130) right after placeOver writes the copy's position, which forces another layout in the task that starts each cross-fade; read the scroller's box together with rect before any write, and take the host's scale from placeOver.

The branch also needs a rebase: apps/sandbox/src/app/sandboxPages.ts and apps/sandbox/scripts/next-export-routes.json conflict with main.

Claims and files checked
  • Claims
    • The changeset's fix, the list kept in view at a Reduce Motion release and refresh end: verified (a row stays at 0.750 or more in Chromium; the new interaction case).
    • The changeset's cross-fade instead of blanking: verified (reducedMotionCrossFade.ts:78-85).
    • The cross-fade comes from a new internal touch export and apps import nothing new: verified (internal/touch.ts:126-127; no public export changes).
    • The shared animator fades a move as a dip through opacity 0: verified (reducedMotion.ts, playReducedMotionDip; a row reaches 0.001 on main).
    • A row never shows below 0.75: verified for the list; the indicator is not covered by that measure.
    • Content too large to copy keeps the dip: verified (isCopyable caps at 1,500 elements; crossFadeContent then returns null).
    • A finger landing mid-fade ends it with the list where it was heading: verified (refreshTouchController.ts:837-842 cancels after the landing already ran).
    • The animator is unchanged: verified (no animator change).
    • The copy is inert, next to the scroll container and clipped to it: verified, but the clip stops at the copy's own box (finding above).
    • No public API in the documented entries; the internal touch entry gains the function and its type: verified.
    • The record changes, one INV7 item and the INV13 sentence: verified.
    • Line counts by area (product, tests, records, changeset, sandbox): verified.
    • Seven unit cases for the cross-fade: verified.
    • App bundle growth of 1,155 bytes gzip: not verified (no build ran).
    • Test, build, typecheck and lint runs passing: not verified here (the test workflow did not run on the draft).
    • The sandbox page is a raw page whose document scrolls: verified (page.tsx).
  • Files
    • .changeset/refresh-control-reduced-motion-cross-fade.md: clear.
    • apps/sandbox/scripts/next-export-routes.json: conflicts with main.
    • apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clear.
    • apps/sandbox/src/app/sandboxPages.ts: conflicts with main.
    • docs/architecture/component-style-authoring.md: clear (approved).
    • docs/architecture/react-component-runtime.md: clear (approved).
    • packages/core/src/internal/touch.test.ts: clear.
    • packages/core/src/internal/touch.ts: clear.
    • packages/core/src/motion/animatedLayout.boundary.test.ts: clear.
    • packages/core/src/motion/reducedMotionCrossFade.test.ts: the clip case pins the clamped inset.
    • packages/core/src/motion/reducedMotionCrossFade.ts: both findings above, and three comment suggestions.
    • packages/core/src/motion/transientCopy.ts: clear.
    • packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear; it does not cover the indicator.
    • packages/lab/src/RefreshControl/refreshTouchController.ts: clear apart from the indicator reset the first finding exposes.
    • scripts/touch-support-bundle.test.mjs: clear.

Automated review (maintainer link)

Under Reduce Motion, a release and the end of a refresh fade the list
instead of moving it. A new case records, on each frame, how much of a
row shows, counting the list and any copy of it, and requires half or
more. Today both fades dip to blank, so the case fails in Chromium and
in WebKit.
The animator fades a move under Reduce Motion as a dip: out, land, back
in. Its opacity passes through 0, so the list went blank as a release
or the end settled it.

Core's internal entry gains a cross-fade through a copy. A copy of the
element fades out where it shows, laid next to the box that clips it,
while the element lands and fades in on the same easing. RefreshControl
plays it for its settle and its end when Reduce Motion makes them fades.
Content too large to copy keeps the animator's dip.

The transient copies that component style authoring allows gain this
one.
A raw page with a RefreshControl list in a card, above rows that make
the document scroll. A pull past the spinner refreshes for 1.5 s.
The invariant on the internal touch modules now names
playReducedMotionCrossFade on the internal/touch subpath: what it does
under Reduce Motion, and why the animator's dip and the Reduced Motion
policy's dip do not cover it.
With Reduce Motion on a phone, Lab's RefreshControl list now
cross-fades when a pull is released or a refresh ends, instead of
blanking. The cross-fade is a new export of Core's internal/touch
entry, so a patch changeset names @astryxdesign/core.
Under Reduce Motion, the copy of the list was clipped at its own box,
so it hid the indicator band above the list. The spinner vanished in
one frame when a refresh ended, and blinked at a release. The copy is
now clipped to the scroller's visible box, past its own edges. The
cross-fade reads the scroller's box with the list's, before it lays
the copy, and takes the host's scale from placeOver. So laying the
copy forces no second layout. The interaction case covers the
indicator, and a unit case checks that nothing reads layout once the
copy is laid.
@vjeux
vjeux force-pushed the fix/refresh-control-reduce-motion-cross-fade branch from e0362d7 to 5bbd943 Compare November 12, 2026 04:44
@vjeux

vjeux commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Both fixed in 5bbd943, and the branch is rebased on main 8b9fbfa, with the sandbox route lists keeping both sides.

  • The copy is clipped to the scroller's visible box with no clamp, so the indicator band above the list shows in it. The unit case now expects inset(-167px 0px 467px 0px). The interaction case records the spinner too. At e0362d7 it showed 0.001 on the release's first frame and 0.000 through the end. Now it fades with the copy.
  • The scroller's box is read with the list's, before the copy is laid, and the clip takes the host's scale from placeOver. A unit case checks that nothing reads layout once the copy is laid.

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 12, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 5bbd943

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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.

Changes requested. The list and spinner now stay in view through a Reduce Motion release and refresh end, and both earlier findings are fixed: the copy keeps the indicator band, and the scroller is read before any write. The record changes have an engineering owner's approval at this head, but two fixes remain.

  • Miss: the new INV7 item allows the copy only where "a release moves" the content, but refreshTouchController.ts:639 also cross-fades through it at a refresh's end, so widen the item to cover the end (and get the widened item approved at that head) or keep the animator's dip there.
  • Miss: when the list is scrolled 1-59 px into the inset as a refresh ends, finish reads and writes scrollTop (refreshTouchController.ts:154) after the copy is laid, so the page is laid out twice before the fade starts (INV18); cross-fade onto animateTo and call finish once the cross-fade resolves, as the motion path does.

Two non-blocking comment-wording notes stay open inline.

Claims and files checked
  • Changeset, the list stays in view at a release and an end under Reduce Motion on touch: verified in code (refreshTouchController.ts:514, :639) and asserted by the new interaction case.
  • Changeset, the cross-fade comes from a new internal/touch export and apps import nothing new: verified (internal/touch.ts:126-127; no public export changes).
  • Before the change a row dips to about 0, after it stays at 0.75 or more: consistent with the code and with earlier Chromium traces of the same list path; not re-run here.
  • The spinner now fades with the copy: verified in code (reducedMotionCrossFade.ts:157-163) and asserted by the interaction case; not re-run here.
  • The copy is laid next to the scroller and clipped to its visible box past its own edges, with that box read before any write: verified (reducedMotionCrossFade.ts:57-78, unit cases).
  • Content too large to copy gets null and keeps the dip: verified (transientCopy.ts:47-52, refreshTouchController.ts:298-300).
  • A finger landing mid-fade ends it with the list where it was heading: verified (refreshTouchController.ts:267-272, :837-842).
  • The animator is unchanged, and placeOver returns the host's scale: verified (transientCopy.ts:272).
  • Normal motion, a trackpad's release and the other Reduce Motion cases are unchanged: verified by the 'crossfade' gate (refreshTouchController.ts:283-290).
  • INV7 gains one copy kind and INV13 names the export: verified; the INV7 item covers only a release (finding above).
  • Line counts per area and the eight unit cases: verified.
  • Browser and unit pass counts and the app-level size figure: not rechecked.
  • Files: refreshTouchController.ts and component-style-authoring.md have the findings above; reducedMotionCrossFade.ts has two non-blocking comment notes; .changeset/refresh-control-reduced-motion-cross-fade.md, next-export-routes.json, the sandbox page, sandboxPages.ts, react-component-runtime.md, internal/touch.ts, internal/touch.test.ts, animatedLayout.boundary.test.ts, reducedMotionCrossFade.test.ts, transientCopy.ts, the interaction spec and touch-support-bundle.test.mjs: clear.

Automated review (maintainer link)

Under Reduce Motion, a release that left the list where it was, such
as a pull pushed back past its start or a pull during a refresh that
returns to the inset, still cross-faded. The list dimmed to about 0.75
under a copy. A move of 0.05 px or less, the controller's own
at-target tolerance, now lands at once with no copy. Two interaction
cases cover the pushed-back pull and the return to the inset.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 402e9bd

@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.

Approved pending CI: CI has not run on this head yet.

Under Reduce Motion on a touch screen, RefreshControl keeps its list and spinner in view through a pull's release and a refresh's end, and a release that moves nothing now lands at once with no copy, which was the last open problem. An engineering owner approved both record changes for this head, and no blocking findings remain.

Claims and files checked

Claims:

  • Changeset: under Reduce Motion on a phone the list stays in view when a pull is released or a refresh ends — verified (refreshTouchController.ts:529, :661).
  • Changeset: it cross-fades to its new place instead of blanking — verified (reducedMotionCrossFade.ts:83-93).
  • Changeset: the cross-fade comes from a new internal export, and apps import nothing new — verified (internal/touch.ts:129-130; no public export).
  • The shared animator turns a Reduce Motion move into a dip through opacity 0 — verified (reducedMotionPlan.ts:238-274).
  • A row never shows below 0.75 — verified from the keyframes (list 0.001 to 1, copy 1 to 0, one easing).
  • The quoted reduced-motion rule and the new transient-copy item — verified against the records.
  • The helper lays an inert copy next to the scroll container, clipped to its visible box, reads that box before any write, then lands the list and plays both fades; content too large to copy gets null and the dip plays — verified (reducedMotionCrossFade.ts:60-93, transientCopy.ts:47-52).
  • The settle and the end use it; an end into the inset cross-fades onto its slide's end and then takes the scroll back; a refresh begun mid-fade stops it first; a release that moves nothing lands at once — verified (refreshTouchController.ts:303-306, :529, :661-671, :929).
  • Normal motion, a trackpad's release and the other Reduce Motion cases are unchanged — verified (refreshTouchController.ts:294-301); a move of 0.05 px or less, which the animator dipped, now lands at once, a difference no one can see.
  • Five interaction cases and eight unit cases — verified.
  • The head adds one commit on top of a merge of main, and the merges keep both sides of the internal-entry sentence and the bundle test's names — verified.
  • The sandbox page is test surface only — verified (a raw route in the sandbox app).
  • No public API change; the internal entry, the new module and the placement helper's return value are as described — verified.
  • The line counts per group — verified (1,236 added, 21 deleted).
  • The record text is present tense with no narration — verified.
  • Browser, unit, typecheck, lint, build and bundle-size results, and the failing runs on earlier revisions — the author's results, not rerun here; CI has not run on this head.

Files:

  • .changeset/refresh-control-reduced-motion-cross-fade.md — clear
  • apps/sandbox/scripts/next-export-routes.json — clear
  • apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx — clear
  • apps/sandbox/src/app/sandboxPages.ts — clear
  • docs/architecture/component-style-authoring.md — clear (owner-approved)
  • docs/architecture/react-component-runtime.md — clear (owner-approved)
  • packages/core/src/internal/touch.test.ts — clear
  • packages/core/src/internal/touch.ts — clear
  • packages/core/src/motion/animatedLayout.boundary.test.ts — clear
  • packages/core/src/motion/reducedMotionCrossFade.test.ts — clear
  • packages/core/src/motion/reducedMotionCrossFade.ts — clear
  • packages/core/src/motion/transientCopy.ts — clear
  • packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts — clear
  • packages/lab/src/RefreshControl/refreshTouchController.ts — clear
  • scripts/touch-support-bundle.test.mjs — clear

Automated review (maintainer link)

@vjeux
vjeux marked this pull request as ready for review November 12, 2026 13:19
@vjeux
vjeux marked this pull request as draft November 12, 2026 16:58
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 25f17e1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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.

Changes requested: both record changes have an engineering owner's approval for this head, and the cross-fade works as described while the list stays mounted. Three things remain.

  • Regression: the iPhone and Pixel runs in the description are at the previous head, and this head's merge of main changed two files this pull request changes plus the shared animator module, so spec:AST-094 DEC-31 does not carry them; run the side-by-side on the same phones at this head (iOS Safari on a real iPhone; Android Chrome with animations at normal scale and removed, plus a slow-device profile, as DEC-27 asks) and state each run in the description.
  • Miss: nothing cancels the Reduce Motion cross-fade when the list unmounts (refreshTouchController.ts:272, :720-727), so its copy lingers over what replaced the list and the end's finish can still scroll a surviving container, against architecture:react-component-runtime INV5; cancel it in the unmount cleanup and when contentRef detaches the list with no replacement, and add a case that unmounts mid-fade.
  • Miss: the description's "Unchanged: … a trackpad's release" is false on a coarse primary pointer, where a trackpad's release now cross-fades through the copy instead of dipping (refreshTouchController.ts:528); say that it holds on a fine primary pointer.

A code change makes a new head, which needs a fresh /approve-spec for the two records and phone runs at that head. CI has not run on this draft head yet.

Claims and files checked

Claims:

  • Changeset: with Reduce Motion on a phone, the list stays in view when a pull is released or a refresh ends: verified (refreshTouchController.ts:529, :661).
  • Changeset: it cross-fades to its new place instead of blanking: verified (reducedMotionCrossFade.ts:83-93).
  • Changeset: the cross-fade comes from a new internal export, and apps import nothing new: verified (internal/touch.ts:129-130; no public export).
  • On the base, a Reduce Motion release and a refresh's end blank the list and spinner, because the shared animator plays a move as a dip through opacity 0: verified (reducedMotionPlan.ts:239).
  • A copy fades out where the list showed, spinner band included, while the list lands and fades in on one easing: verified (reducedMotionCrossFade.ts:79-93, negative top inset in clipTo).
  • A row never shows below 0.75: holds only as the test measures it, both drawings of a row together; each drawing bottoms near 0.5 mid-fade (non-blocking note).
  • The quoted reduced-motion rule and the new transient-copy item: verified against the records.
  • The helper lays an inert copy beside the scroll container, clipped to its visible box, reads that box before any write, then lands the list and plays both fades; content too large to copy falls back to the dip: verified (reducedMotionCrossFade.ts:60-93, transientCopy.ts:47-51).
  • The settle and the end use it; an end into the inset cross-fades onto its slide's end, then takes the scroll back; a refresh begun mid-fade stops it first; a release that moves nothing lands at once: verified (refreshTouchController.ts:303-306, :529, :661-671, :929).
  • Unchanged: normal motion, a trackpad's release and the other Reduce Motion cases: false for a trackpad's release on a coarse primary pointer, which now cross-fades (finding above); true on a fine primary pointer.
  • Five new interaction cases and eight unit cases: verified.
  • The head merges main into the previous head with no conflict, and the pull request's own text is unchanged by the merges: verified (the patch is identical to the previous head's).
  • Browser, unit, accessibility, typecheck, lint, build and bundle-size results, and the failures on earlier revisions: the author's results, not rerun; CI has not run on this head.
  • Phone runs on a real iPhone and a Pixel: stated for the previous head; runs at this head are pending (finding above).
  • The sandbox page is test surface only: verified (a raw route in the sandbox app).
  • No public API change; the internal entry gains the function and its type; the new module; the placement helper returns the host's scale: verified.
  • The line counts per group: verified (1,236 added, 21 deleted).
  • The record text is present tense, with no narration or project status: verified.

Files:

  • .changeset/refresh-control-reduced-motion-cross-fade.md: clear
  • apps/sandbox/scripts/next-export-routes.json: clear
  • apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clear
  • apps/sandbox/src/app/sandboxPages.ts: clear
  • docs/architecture/component-style-authoring.md: clear (owner-approved for this head)
  • docs/architecture/react-component-runtime.md: clear (owner-approved for this head)
  • packages/core/src/internal/touch.test.ts: clear
  • packages/core/src/internal/touch.ts: clear
  • packages/core/src/motion/animatedLayout.boundary.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.ts: clear (one wording note on the 0.75 comment)
  • packages/core/src/motion/transientCopy.ts: clear
  • packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear (no case unmounts mid-fade)
  • packages/lab/src/RefreshControl/refreshTouchController.ts: finding (the cross-fade is not released on unmount)
  • scripts/touch-support-bundle.test.mjs: clear

Automated review (maintainer link)

Under Reduce Motion, nothing cancelled the cross-fade when the list
unmounted. Its copy stayed over what replaced the list, and the end's
deferred finish could still scroll. The controller now cancels it at
unmount, and when its content element detaches with none in its place.
A list element swapped mid-fade keeps the cross-fade, so the end still
finishes. The scroll-container story can unmount its list on a window
event, and an interaction case unmounts it in the middle of the end's
cross-fade.
@vjeux

vjeux commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. In ae54d25, an unmount cancels the cross-fade: in the controller's unmount cleanup, and when its content element detaches with none in its place. A list element swapped mid-fade keeps the cross-fade, so the end still finishes. A new interaction case unmounts the list 60 ms into the end's cross-fade. At 25f17e1 the copy outlived the list; now it is gone before the next frame, and no scroll is written after. The description now limits the trackpad claim to a fine primary pointer, and the phone runs at this head follow.

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

Copy link
Copy Markdown
Contributor

/approve-spec ae54d25

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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.

Changes requested: the code and both record changes are ready, and an engineering owner approved the records for this head; one evidence gap remains.

  • The phone runs in the description are for an earlier head and the runs at this head are marked pending; spec:AST-094 DEC-27 needs them at the exact head, and DEC-31 does not carry them because this head adds the unmount fix and its merges change the shared animator, so run the side-by-side on the same phones at this head (iOS Safari on a real iPhone; Android Chrome with animations at normal scale and removed, plus a slow-device profile) and state each run in the description.

Stating the runs needs no new commit, so the current /approve-spec stays valid. CI has not run on this draft head yet. A wording suggestion: "a row never shows below 0.75" counts both drawings of a row together, and each is near 0.5 mid-fade, so "the list area shows the old rows, the new rows or both on every frame" says it more exactly.

Claims and files checked

Claims:

  • Changeset: with Reduce Motion on a phone, the list stays in view when a pull is released or a refresh ends: verified (refreshTouchController.ts:536, :668; midpoint frames in Chromium phone emulation).
  • Changeset: it cross-fades to its new place instead of blanking: verified (reducedMotionCrossFade.ts:83-93).
  • Changeset: the cross-fade comes from a new internal export, and apps import nothing new: verified (internal/touch.ts:133-134; the API generator finds no public change).
  • On the base, a Reduce Motion release and a refresh's end blank the list and spinner: verified (base midpoint frames are blank).
  • The shared animator plays the move as a dip through opacity 0: verified (the base's content fade holds at 0 until the list lands).
  • A copy of the list, spinner band included, fades out as the list lands and fades in: verified (reducedMotionCrossFade.ts:79-93; the end's midpoint frame shows the band in the copy).
  • A row never shows below 0.75: holds only counting both drawings of a row together; each drawing is near 0.5 mid-fade (wording suggestion above).
  • The quoted reduced-motion rule and the new transient-copy item: verified against the records.
  • The helper lays an inert copy beside the scroll container, clipped to its visible box past the copy's edges, reads that box before any write, and leaves content too large to copy to the dip: verified (reducedMotionCrossFade.ts:60-81, transientCopy.ts:47-51).
  • The settle and the end use it; an end into the inset cross-fades onto its slide's end, then takes the scroll back: verified (refreshTouchController.ts:536-550, :665-680).
  • A new refresh or an unmount stops it mid-fade, and a release that moves nothing lands at once: verified (:948, :729-737, :913-921, :310-313).
  • Unchanged: normal motion, a trackpad's release on a fine primary pointer, and the other Reduce Motion cases: verified (:301-306; a fine pointer gets an immediate change).
  • Six new interaction cases and eight unit cases: verified.
  • The merge history in Testing: verified.
  • Unit tests for the cross-fade, the internal entry, the copy mechanism, RefreshControl and the bundle test: verified (rerun, all pass); browser, accessibility, build, typecheck and lint results and the failures on earlier revisions: the author's, not rerun.
  • Phone runs on a real iPhone and a real Android phone: stated for an earlier head; runs at this head are pending (finding above).
  • The sandbox page is test surface only: verified.
  • No public API change; the internal entry gains the function and its type; the new module; the placement helper returns the host's scale: verified.
  • The line counts per group: verified.
  • The bundle-size figures: the author's, at an earlier revision, not rerun.
  • The record text is present tense, with no narration or project status: verified.

Files:

  • .changeset/refresh-control-reduced-motion-cross-fade.md: clear
  • apps/sandbox/scripts/next-export-routes.json: clear
  • apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clear
  • apps/sandbox/src/app/sandboxPages.ts: clear
  • apps/storybook/stories/PullToRefresh.stories.tsx: clear
  • docs/architecture/component-style-authoring.md: clear (owner-approved for this head)
  • docs/architecture/react-component-runtime.md: clear (owner-approved for this head)
  • packages/core/src/internal/touch.test.ts: clear
  • packages/core/src/internal/touch.ts: clear
  • packages/core/src/motion/animatedLayout.boundary.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.ts: clear
  • packages/core/src/motion/transientCopy.ts: clear
  • packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear
  • packages/lab/src/RefreshControl/refreshTouchController.ts: clear
  • scripts/touch-support-bundle.test.mjs: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

Decision: D-20261112-609

Merge carry by Cindy's M&G lane; conflicts resolved in
packages/core/src/internal/touch.ts (keeps both new re-exports: this
branch's playReducedMotionCrossFade and main's useFocusAcrossSwap), its
re-export test and the touch bundle's export list (both names), and
docs/architecture/react-component-runtime.md (main's shorter
prepareFocusReturnOnRemoval sentence plus this branch's
playReducedMotionCrossFade sentences); no product change.

Branch work by @vjeux.
@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed needs:design-review Affects visuals — Design should review labels Dec 3, 2026
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 8e7ea02

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Dec 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.

Changes requested. Run here, the cross-fade works: RefreshControl's interaction spec passes in Chromium, and the list no longer blanks at a Reduce Motion release or refresh end. An engineering owner has approved both record changes for this head, and none of the items below needs a code change.

  • Phone runs missing at this head: the iPhone and Pixel runs are stated for the previous head, and this head's merge of main changes internal/touch.ts, motion/reducedMotion.ts and the shared animator, layer and gesture-host modules, so those runs no longer carry; please run the same side-by-side on this head and state each run in the description.
  • Claims overstate where the list stays in view: a list over 1,500 elements still dips, and rows that scroll into view fade in from near 0, so the changeset ("keeps its list in view…"), the title and the description's "A row never shows below 0.75" and "never dips to blank" need that bound.
  • Newly live check: Reference-page sizes missing: this change grows transientCopy.ts, so please state the first-load gzip delta on the four reference pages (docs, form, menu, table); a measurement here shows +0 B on each.
Claims and files checked

Review mode: full; reason: requested

  • Title: a Reduce Motion release cross-fades the list. False: lists over 1,500 elements, a trackpad release under a fine pointer, and a release that moves nothing all skip the cross-fade.
  • Changeset: the list stays in view at a release or a refresh end. False for lists over 1,500 elements.
  • Changeset: the cross-fade comes from a new internal export, and apps import nothing new. Verified (internal/touch.ts:131-134; the API report, run here, lists 0 rows).
  • Base behavior: the shared animator dips the list through opacity 0. Reported; this run's base frame shows opacity 0 at 100 ms.
  • A copy of the list, spinner band included, fades out as the list lands and fades in. Verified (the unit clip case and the first new interaction case, run here).
  • A row never shows below 0.75. False: rows that scroll into view show at 0.5 at the midpoint here, and lists over 1,500 elements dip.
  • The quoted INV7 item and the INV13 sentences. Verified against the records at this head.
  • The helper lays an inert copy beside the scroll container, clipped to its visible box, and reads that box before any write. Verified (unit cases run here).
  • Content too large to copy keeps the dip. Verified (transientCopy.ts:47-52).
  • The settle and the end use the helper; an end into the inset cross-fades onto its slide end and then takes the scroll back. Verified (interaction case run here).
  • A new refresh or an unmount stops the cross-fade mid-fade, and a release that moves nothing lands at once. Verified (four interaction cases run here).
  • Normal motion, a trackpad release under a fine pointer, and other Reduce Motion cases are unchanged. Verified by reading the diff and by the spec's other cases, run here.
  • Regression tests: six interaction cases and eight unit cases. Verified by counting them.
  • Red-first runs, earlier-head browser runs, device runs, bundle size and accessibility counts. Reported; the device runs are for the previous head (see the blocking finding).
  • No public API change; the internal entry gains two names; a new internal module; placeOver returns the scale. Verified.
  • Per-category line counts. Verified (+323/-16, +895/-2, +10/-3, +7/-0, +145/-8).
  • Merge carry: conflicts resolved by keeping both sides, no product change, and the checks pass. Verified: the pull request's own patch is unchanged apart from INV13's rewrap; the unit tests, the Core typecheck and the Lab source typecheck pass here.
  • Writing rubric results. Present.
  • .changeset/refresh-control-reduced-motion-cross-fade.md: finding (claims)
  • apps/sandbox/scripts/next-export-routes.json: clear
  • apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clear
  • apps/sandbox/src/app/sandboxPages.ts: clear
  • apps/storybook/stories/PullToRefresh.stories.tsx: clear
  • docs/architecture/component-style-authoring.md: clear (owner-approved)
  • docs/architecture/react-component-runtime.md: clear (owner-approved)
  • packages/core/src/internal/touch.test.ts: clear
  • packages/core/src/internal/touch.ts: clear (it ends the device-evidence carry)
  • packages/core/src/motion/animatedLayout.boundary.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.test.ts: clear
  • packages/core/src/motion/reducedMotionCrossFade.ts: clear (the claims finding cites its clip)
  • packages/core/src/motion/transientCopy.ts: finding (reference-page sizes)
  • packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear
  • packages/lab/src/RefreshControl/refreshTouchController.ts: clear
  • scripts/touch-support-bundle.test.mjs: clear

Automated review (maintainer link)

'@astryxdesign/core': patch
---

[fix] With Reduce Motion on a phone, Lab's RefreshControl keeps its list in view when a pull is released or a refresh ends. It cross-fades to its new place instead of blanking between the two. The cross-fade comes from a new export of `internal/touch`; apps import nothing new.

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 holds only for lists the copy can take: over 1,500 elements, playReducedMotionCrossFade returns null and the animator still dips the list through opacity 0 (transientCopy.ts:47-52). Suggested: "…keeps a list of up to 1,500 elements in view when a pull is released or a refresh ends; a larger list keeps the dip."

This branch was successfully deployed

1 active deployment
Preview — 8e7ea024 Deployed Dec 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants