Skip to content

test(BottomSheet): the keyboard proofs hold the scene at the report - #10279

Merged
cixzhang merged 2 commits into
meta:mainfrom
vjeux:test/bottomsheet-keyboard-freeze
Nov 6, 2026
Merged

cixzhang merged 2 commits into
meta:mainfrom
vjeux:test/bottomsheet-keyboard-freeze

Conversation

@vjeux

@vjeux vjeux commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

Five Chrome-on-Android proofs in the BottomSheet keyboard-inset spec fail on a loaded runner. The show and hide rides find "no ride among []", and the pan put-back sees ride 0. The Reduce Motion cross-fade has no frame below opacity 1.

Intended invariant

The proofs judge the sheet's ride, fade and pan put-back on the scene's own time, however slowly the runner runs. What they assert is unchanged.

Change

Each proof read the content's ride or fade after the keyboard report, on a later frame or through a hold the test sent. The ride ends less than 200 ms after the report. On a loaded runner, the next frame or command can come after that. A slow enough runner even ends the slide while the page still handles the report, so no ride starts.

The proofs now freeze the scene before the page hears the report, with the harness's page freeze. The settle proofs freeze the same way before the sheet hears the lift. The ride or fade then starts held, on the scene's own clock.

  • The ride proofs hold and sample it, then thaw.
  • The pan proofs move the stand-in viewport on real frames, then thaw.
  • The fade proof reads the content's opacity at the report, then thaws and samples each frame as before.

Evidence

Chromium, the worker and its load on two cores, the arms interleaved on one machine:

Load before after
CPU ×8 20/28 27/28
Two busy loops 24/28 27/28
CPU ×20 6/14 13/14
CPU ×8, ten runs 70/70
Two busy loops, ten runs 70/70
Unpinned, five runs 35/35 35/35
  • Failure before the change: under CPU ×8, both ride proofs fail every run. Under CPU ×20, the pan put-back and the cross-fade fail too.
  • Success after the change: the only misses are story loads past the test's 60 s, on both heads (Testing).
  • Product/runtime behavior verified unchanged: the diff is one test file.
  • CI impact: none.

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

pnpm --filter storybook build
node_modules/.bin/playwright test --config playwright.interaction.config.ts \
  --project=chromium -g "Chrome on Android" \
  packages/core/src/BottomSheet/__tests__/BottomSheetKeyboardInset.interaction.browser.spec.ts

Each arm pins the worker and any busy loops to the same two cores. As commits not for landing, with CPU throttling set by an environment variable:

Story-load timeouts at 60 s, tracked separately: page.goto once in the two-loop arm before the change; once each under CPU ×8, two loops and CPU ×20 after it. Under CPU ×40 after the change: page.goto twice, the Storybook root once, a locator wait once.

Prettier, ESLint, pnpm lint, the core type check and review:pre are clean.

Under load, five Chrome-on-Android proofs of the keyboard inset
failed. Each read the content's ride or fade after the report, on a
later frame or through a hold the test sent. The ride ends less than
200 ms after the report. A loaded runner's next frame or command can
come after that: "no ride among []", a pan put back with ride 0, or no
frame below opacity 1. A slow enough runner even ends the slide while
the page still handles the report.

The proofs now freeze the scene before the page hears the report, as
the settle proofs freeze it before the sheet hears the lift. The ride
or fade then starts held, on the scene's own clock. The test reads it,
or pans the viewport on real frames, and thaws. What the proofs
assert is unchanged.
@vercel

vercel Bot commented Nov 6, 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 6, 2026 5:29pm UTC

Request Review

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

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 5:31 PM UTC

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · e84ffb4

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
BottomSheet 59.4 kB (0) · 7.5 kB CSS (0) — ✓ · ✓ · —
BottomSheetSwitcher 17.5 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —

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

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 24 rows; 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

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 40b033f

@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 once it is ready for review a maintainer adds the ci:run label so CI runs.

The change is test-only, and the five Chrome-on-Android proofs still verify what they did (AST-099 FR8 and the reduced-motion cross-fade). The rewritten proofs pass under heavy CPU throttling, and they still fail when the ride, the cross-fade or the pan put-back is removed.

Non-blocking:

  • The comment at line 319, and the description, say the show ride ends under 200 ms after the report, but it ends about 242 ms after it (Gboard's 267 ms slide minus the 25 ms report lag); "the rest of Gboard's 267 ms slide, about 240 ms after the report" would be accurate.

[Automated review]

await field.focus();
const before = await readBody(field);
const reported = await reportAt(page, COVER);
// The ride lasts the rest of Gboard's slide, under 200 ms. A hold sent

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.

Non-blocking: the show ride ends about 242 ms after the report, not under 200 ms. It starts at Gboard's start, 25 ms before the report, and runs the 267 ms slide, so the held ride is at 25 ms with its curve ending at 267 ms. Only the hide ride (167 − 33 = 134 ms) is under 200 ms. Suggested: "The ride lasts the rest of Gboard's 267 ms slide, about 240 ms after the report."

@vjeux
vjeux marked this pull request as ready for review November 6, 2026 13:26
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 6, 2026
@cixzhang
cixzhang marked this pull request as draft November 6, 2026 13:39
@cixzhang
cixzhang marked this pull request as ready for review November 6, 2026 13:39
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec e84ffb4

@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 finished on this head yet.

The change is test-only, and the five Chrome-on-Android proofs still verify what they did (AST-099 FR8 and the reduced-motion cross-fade). The rewritten proofs pass under heavy CPU throttling, and they still fail when the ride, the cross-fade or the pan put-back is removed.

Non-blocking:

  • The comment at line 319, and the description, say the show ride ends under 200 ms after the report, but it ends about 242 ms after it (Gboard's 267 ms slide minus the 25 ms report lag); "the rest of Gboard's 267 ms slide, about 240 ms after the report" would be accurate.

[Automated review]

@cixzhang
cixzhang merged commit 2159916 into meta:main Nov 6, 2026
70 checks passed
@vjeux
vjeux deleted the test/bottomsheet-keyboard-freeze branch November 6, 2026 18:02

This branch was successfully deployed

1 active deployment
Preview — e84ffb48 Deployed Nov 6, 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