Repository navigation
test(DropdownMenu): capture geometry after its frame samples settle - #12343
Conversation
Re-cut of #12342 by astracat-bot, byte for byte on current main. Co-authored-by: astracat-bot[bot] <323722387+astracat-bot[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 3be09df |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DropdownMenu | 108.3 kB (0) · 18.9 kB CSS (0) | — | ✗ · ✓ · ✓ |
| DropdownMenuCheckboxItem | 28.6 kB (0) · 7.3 kB CSS (0) | — | ✗ · ✓ · ✓ |
| DropdownMenuDivider | 5.3 kB (0) · 548 B CSS (0) | — | ✗ · ✓ · — |
6 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DropdownMenuGroup | 6.4 kB (0) · 3.4 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuItem | 27.8 kB (0) · 6.9 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuRadioGroup | 6.6 kB (0) · 3.3 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuRadioItem | 28.7 kB (0) · 7.3 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuSubMenu | 78.7 kB (0) · 10.5 kB CSS (0) | — | ✗ · ✓ · ✓ |
| ContextMenuItem | 35.5 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
Visual changes: 4 snapshots in 1 component
A change is a question for the reviewer, not a failure.
Inheritance checked against the 4 newest reports of other pull requests.
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The audit now waits for the menu's box to hold still before it captures a frame, keeps the 0.5 px bound and every state assertion, and still fails a frame whose box disappears or never settles. A menu moved by script for six frames after opening fails the current capture and passes this one, and a menu that keeps moving still fails with the new poll message.
- Optional:
settledRender.initialnow holds the earlier sample of the settled pair, so a receipt no longer shows that the menu moved before capture; recording the first measured box and the poll count would keep the next occurrence diagnosable.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the diff is byte-identical to the original pull request it re-cuts, on current
main: verified. - Claim: the original author keeps credit through a co-author trailer: verified in the commit message.
- Claim: repeated local and lab runs passed: not re-run here; one full Chromium run of the audit at this head passed all 32 frames.
- Claim: Prettier, ESLint and the pre-review report are clean: verified at this head.
- Claim: the failing CI run measured a 286 px movement in the fourth chunk: the failing commit's copy of this spec matches the base; that run's log was not available to this review.
- Claim: one pair of frame samples can straddle an opening layout update: verified; a six-frame scripted shift fails the current capture and passes this one.
- Claim: the poll uses the same maximum movement and 0.5 px bound and keeps the settled pair in the receipt: verified in
capture(). - Claim: a missing box still fails at once: verified.
- Claim: every claimed-state, focus, overflow, theme and forced-colors assertion is kept: verified, unchanged.
- Claim: no product code, visibility wait, timeout value, tolerance or baseline changes: verified; the poll is bounded by Playwright's default expect timeout.
- Claim: the bound rejects continuously moving geometry: verified with a scripted continuous movement.
- Claim: the change targets the audit's fourth-chunk test: verified title and chunk count.
- Claim: another open pull request edits this spec: verified.
- Claim: the older MoreMenu contract-shard failure is separate: not checked; outside this change.
- File:
packages/core/src/DropdownMenu/__tests__/DropdownMenuAudit.a11y.chromium.spec.ts: clear, one optional suggestion.
There was a problem hiding this comment.
Changes requested: the settle poll itself is a sound fix for this flake, but the pull request no longer matches the change it says it re-cuts.
- Regression: The description says this is a byte-for-byte re-cut of #12342 that closes #12342 on merge, but #12342 now has a second commit that keeps the opening box and the largest sampled movement in
settledRender(DropdownMenuAudit.a11y.chromium.spec.ts:1042here still writes only the settled pair), so merging this as described would drop that change; please bring that commit into this branch, or update the description so #12342 is not closed on merge.
Everything else checks out: only this spec changes, the 0.5 px bound and every claimed-state and forced-colors assertion are untouched, and a missing or never-settling box still fails the frame.
Claims and files checked
Review mode: same-head; reason: none
- Claim: the diff is byte-identical to the original pull request it re-cuts: false; the original has since gained a second commit that changes the receipt.
- Claim: the original author keeps credit through a co-author trailer: verified in the commit message.
- Claim: repeated local and lab runs of the audit passed, at the failing commit and with the change: not re-run; one full Chromium run of the audit at this head passed all 32 frames.
- Claim: Prettier, ESLint and the pre-review report are clean: verified; the Lint workflow also passes at this head.
- Claim: the failing CI run measured a 286 px movement in the fourth chunk: that run's log was not available; the failing commit's copy of this spec matches the base.
- Claim: the audit went red twice in a week and passed between: not checked.
- Claim: one pair of frame samples can straddle an opening layout update: verified; a six-frame scripted shift fails the current capture and passes this one.
- Claim: the poll uses the same maximum movement and 0.5 px bound and keeps the settled pair in the receipt: verified in
capture(). - Claim: a missing box still fails at once: verified.
- Claim: every claimed-state, focus, overflow, theme and forced-colors assertion is kept: verified, unchanged.
- Claim: no product code, visibility wait, timeout value, tolerance or baseline changes: verified; the poll is bounded by Playwright's default expect timeout.
- Claim: the bound rejects continuously moving geometry: verified with a scripted continuous movement.
- Claim: the change targets the audit's fourth-chunk test: verified title and chunk count.
- Claim: another open pull request edits this spec: verified.
- Claim: the older MoreMenu contract-shard failure is separate: not checked; outside this change.
- Claim: no public API, product behavior, visual or policy change, and no unrelated product change: verified.
- Claim: no private operational context in the submitted files: verified for the changed file.
- File:
packages/core/src/DropdownMenu/__tests__/DropdownMenuAudit.a11y.chromium.spec.ts: one blocking finding (its receipt no longer matches the re-cut original), otherwise clear.
|
/approve-spec 45169ba |
There was a problem hiding this comment.
Approved. CI has run on this head and passes.
The audit now waits for the menu's box to hold still before it takes a frame, keeps the 0.5 px bound and every state assertion, and still fails a frame whose box disappears or never settles. Each receipt keeps the opening box and the largest movement the wait saw, and the diff still matches #12342 byte for byte, so closing #12342 on merge loses nothing.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim: the two commits' combined diff is byte-identical to the original pull request's two commits: verified; the two diffs are identical, and the original has not changed since.
- Claim: the re-cut sits on current
main: verified; it was cut on the tip ofmainat the time,mainhas not changed this spec since, and the head merges onto today'smaincleanly. - Claim: the original author keeps credit through a co-author trailer: verified; both commits carry one.
- Claim: the original pull request closes when this one merges: not checked; a process step outside the code.
- Claim: 20 repeated audit runs with four workers passed all 100 checks, with zero settled movement in every final receipt: not re-run as repeats; one full Chromium run at this head passed all 32 frames with zero settled movement.
- Claim: Prettier, ESLint and the pre-review report are clean: Prettier and ESLint verified, and the Lint workflow passes on this head; the pre-review report was not re-run.
- Claim: a separate lab passed 20 of 20 unchanged runs at the failing commit: not checked.
- Claim: the failing CI job received 286 against the 0.5 px bound in the fourth chunk at the named commit: verified in that job's log.
- Claim: the audit went red in two streaks in a week and passed between: partly verified; the second streak's time matches the failing job's log, and the first was not checked.
- Claim: the unchanged failing commit passed 20 of 20 local repeats: not re-run.
- Claim: a single pair of frame samples can straddle an opening layout update: verified; a six-frame scripted move fails the current capture and passes this one.
- Claim: the poll uses the same maximum movement and 0.5 px bound, and the receipt keeps the settled pair, the opening box and the largest sampled movement: verified in the code and in a receipt from the scripted move.
- Claim: a missing box still fails at once: verified in the code.
- Claim: every claimed-state, focus, overflow, theme and forced-colors assertion is kept: verified, unchanged.
- Claim: no product code, visibility wait, timeout value, tolerance or baseline changes: verified; the poll uses Playwright's default expect timeout.
- Claim: the bound rejects continuously moving geometry: verified with a scripted continuous move.
- Claim: a temporary browser probe saw movement settle to zero, and an interrupted repeat run was rerun in isolation: not checked; neither is submitted.
- Claim: the change fixes the audit chunk that captures DropdownMenu states 4 of 4: verified; the test title and chunk count match the failing job.
- Claim: the older MoreMenu contract-shard failure is separate: not checked; outside this change.
- Claim: another open pull request edits this spec: verified; it is still open and still edits this file.
- Claim: no public API, product behavior, visual or policy change, and no unrelated product change: verified; Core's build skips the changed file, and CI's API report lists no change.
- Claim: no private operational context in the submitted files: verified for the changed file.
- File:
packages/core/src/DropdownMenu/__tests__/DropdownMenuAudit.a11y.chromium.spec.ts: clear.












Re-cut of #12342 by astracat-bot, byte for byte, on current
main: the two commits' combined diff is identical to #12342's two commits (the settle poll, then keeping the opening box and the largest sampled movement insettledRender). Credit stays with astracat-bot (a Co-authored-by trailer on the commit). The drain shepherd drives it and closes #12342 when this one merges.validation: ran pnpm exec playwright test packages/core/src/DropdownMenu/tests/DropdownMenuAudit.a11y.chromium.spec.ts --config playwright.config.ts --project chromium --repeat-each=20 --workers=4 --reporter=list: 100/100 passed, covering 20 complete audit repetitions; Prettier and ESLint passed; pnpm review:pre reported zero findings. CodeBunny's CI lab also passed 20/20 unchanged runs at the failing commit (repro 6674083777953085362).
Maintainer impact
Run 44088856748 (#43793), job 134066319568, failed the fourth DropdownMenu audit chunk at commit deb3b38:
expect(geometryDelta).toBeLessThanOrEqual(0.5)received 286. A single pair of frame samples can straddle an opening layout update, preventing the audit from producing its settled-frame evidence.Intended invariant and change
The screenshot and its receipt must describe a settled layout. Poll the same maximum x/y/width/height movement until it satisfies the existing 0.5-pixel bound, then retain that measured pair in
settledRender, together with the opening box and the largest movement sampled before it settled, so the receipt shows what the poll waited out. A missing box still fails immediately rather than waiting for UI to reappear. Keep every claimed-state, focus, overflow, theme and forced-colors assertion.No behavior change. Only this spec changes; no product code, visibility wait, timeout, tolerance or baseline changes.
Evidence
The exact layout update behind the CI sample was not reproduced locally or in the lab. This deliberately corrects the sampling assumption, rather than guessing at a product positioning change.
Scope
Fixes:
decb2da1cd586cd61a826365f5521732ae2b52797d21ba8eeb3a1e077c3442cd— captures DropdownMenu states 4/4 with sensor receipts.The older contract-shard failure in run 44073648282 is a separate MoreMenu sheet-row assertion, not covered by this change.
See also #11297.
#11297 by bezabyte also changes this test file.
Overlap checked: #12342, #11297 (#12342: astracat-bot's original of this same change, byte for byte; it closes when this re-cut merges. #11297: a community change to another behavior in the same spec file, so whichever lands second merges main)
Owning session: noopbot (a61f66c2), under CI & Release (ca77f950); driven by the drain shepherd (66fc5b74). Land path: the shipper, through merge-guard.