Skip to content

test(DateInput): the wheel activation proof waits on the sheet's own end, not on still frames before a deadline - #9942

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c17-r47-wheel-activation-wait
Nov 4, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c17-r47-wheel-activation-wait

Conversation

@vjeux

@vjeux vjeux commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

openMonthYearWheels in WheelActivation.interaction.browser.spec.ts waits for the opening sheet, and then for the year wheel, with the harness's waitForRest: three still frames before a 5 s deadline. A starved page can present no frame for longer than that while nothing moves. The wait then fails with "still moving" while the sheet is at rest. #8209 reports this spec failing that way under six workers, and gives its own month and year wheels' proof the same fix.

Intended invariant

The proof's assertions are unchanged, and the opening's writes are still counted from the tap until the wheels rest. No product code changes, and no timeout changes.

Change

  • A local settlesAt(locator, property, value) checks a computed style once a frame until it holds the value, then awaits each unfinished animation's finished promise inside the element. It sets no deadline of its own.
  • openMonthYearWheels waits for the sheet's open transform (the identity), then for the wheels panel's full opacity. The year wheel parks its strip on its year as the wheels show.

Evidence

  • Failure before / success after, in a fixed order: evidence commits not for landing (on the fork), ff0afc73ce (main) and 5133257f9b (this change), make the page present no frame for 6 s from the field's tap. Scripts and input still run. Order-balanced runs (main, this, this, main):
engine main this change
Chromium 2 of 2 fail: "waitForRest: still moving (matrix(1, 0, 0, 1, 0, 0) … 1 | 1)" 2 of 2 pass
WebKit (in the Playwright image) 2 of 2 fail, the same error 2 of 2 pass
  • The count the proof asserts is unchanged: unstalled, main and this change both report narrow 2 options, 2 rows drawn, 2 painted, 1 element written, and wide 200, 200, 200, 3, in every run.
  • Product/runtime behavior verified unchanged: test-only.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

Local, at 344b53b on main b31575d (Linux): the spec passes in Chromium (2 tests) and in WebKit (1; the mouse case is Chromium-only by design). pnpm -F @astryxdesign/core typecheck, pnpm lint and prettier on the spec, the Changeset coverage check (nothing ships) and pnpm review:pre (0 findings) pass.

…end, not on still frames before a deadline

`openMonthYearWheels` waited for the sheet, and then for the year wheel,
with the harness's `waitForRest`: three still frames within 5 s. A starved
runner can present no frame for longer than that while nothing moves, so
the wait ran out ("still moving") and the proof failed. The proof now
checks the sheet's open transform, and then the wheels' full opacity, once
a frame with no deadline of its own, and waits on each animation's
`finished` promise. A starved runner only makes it later. The opening's
writes are still counted from the tap until the wheels rest.
@vercel

vercel Bot commented Nov 4, 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 4, 2026 12: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 4, 2026
@astracat-bot

astracat-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 4, 2026, 12:40 PM UTC

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 344b53b

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
DateInput · Storybook 147.4 kB (0) · 15.5 kB CSS (0) 5,102 (0) ✓ · ✓ · ✓

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 8 rows, theme-butter 1 row, theme-chocolate 1 row, theme-gothic 1 row, theme-matcha 1 row, theme-neutral 1 row, theme-stone 1 row, theme-y2k 1 row; run pnpm api:report.

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.

Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so CI starts once it is marked ready for review and a maintainer adds the ci:run label.

The change matches its description: the two waits no longer depend on frames arriving within 5 s, and the proof's assertions are unchanged.

Optional: settlesAt would wait forever on an infinite or scroll-timeline animation inside the element; keeping only animations with a finite endTime, as DropdownMenuItemAudit.a11y.chromium.spec.ts does, would guard against that.

[Automated review]

for (;;) {
const unfinished = element
.getAnimations({subtree: true})
.filter(animation => animation.playState !== 'finished');

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.

Optional: this keeps infinite and scroll-timeline animations too, and their finished never settles, so one inside the sheet would hold the proof until the 60 s test timeout. Nothing here runs one today. Keeping only animations with a finite end, as DropdownMenuItemAudit.a11y.chromium.spec.ts does, guards it:

.filter(
  animation =>
    animation.playState !== 'finished' &&
    Number.isFinite(Number(animation.effect?.getComputedTiming().endTime)),
);

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.

Thanks. This copy stays identical to the one in #8209, and nothing in either element runs such an animation today. The follow-up that moves settlesAt into the interaction harness will keep only animations with a finite end, once for both specs.

@vjeux
vjeux marked this pull request as ready for review November 4, 2026 12:43
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 4, 2026
@cixzhang
cixzhang marked this pull request as draft November 4, 2026 13:05
@cixzhang
cixzhang marked this pull request as ready for review November 4, 2026 13:06
@cixzhang
cixzhang merged commit d23d1fe into meta:main Nov 4, 2026
158 of 163 checks passed
@vjeux
vjeux deleted the uikit/c17-r47-wheel-activation-wait branch November 4, 2026 17:09

This branch was successfully deployed

1 active deployment
Preview — 344b53b2 Deployed Nov 4, 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