Skip to content

test(lab): MobilePowerSearch tests read the interactive step's dialog; regenerate the official package list - #7978

Closed
imdreamrunner wants to merge 1 commit into
mainfrom
fix/lab-mobile-powersearch-tests-per-step-dialogs
Closed

imdreamrunner wants to merge 1 commit into
mainfrom
fix/lab-mobile-powersearch-tests-per-step-dialogs

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

main is red: 41 of the 79 tests in packages/lab/src/MobilePowerSearch/MobilePowerSearch.test.tsx fail. #7402 (MobilePowerSearch) was tested before #7720 merged; since #7720 each BottomSheetSwitcher step owns its native dialog, and the tests' sheet() helper still read the first dialog[open] as the active step. After any step change that first dialog is the outgoing step, which stays open, inert and aria-hidden until a fade that jsdom never fires, so queries scoped to it miss the step on screen. Every pull request that runs the lab suite inherits the failure. The same merge also left the CLI's official package list stale: scripts/check-cli-official-packages.test.mjs (the astryx discover drift guard, spec:AST-051 FR11) fails because the committed list does not name the new Lab component MobilePowerSearch.

Intended invariant

component:BottomSheetSwitcher (current) FR2: a handoff presents the entering sheet's dialog above the retained one and closes the retained dialog only after its panel has faded; the retained dialog is inert and hidden from assistive technology meanwhile. The helper must return the step the person is interacting with.

Change

  • sheet() returns the first open dialog that is not aria-hidden. Test-only.
  • packages/cli/assets/discover/official-packages.json is regenerated with pnpm bundle:cli-official-packages; the only change is the added MobilePowerSearch component entry, the output of the existing generator.

Evidence

  • Failure before the change: on main, pnpm exec vitest run packages/lab/src/MobilePowerSearch/MobilePowerSearch.test.tsx → 41 failed, 38 passed (79).
  • Success after the change: the same command → 79 passed (79).
  • Drift guard: pnpm exec vitest run --project node scripts/check-cli-official-packages.test.mjs fails on main (list missing MobilePowerSearch) and passes after regeneration (14 passed).
  • Product/runtime behavior verified unchanged: no source, story, or test logic changes; the list change is generated output.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split (the move to MobileTokenizer for list values is a separate pull request stacked on this one).
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run packages/lab/src/MobilePowerSearch/MobilePowerSearch.test.tsx: 79 passed.
  • pnpm exec vitest run --project node scripts/check-cli-official-packages.test.mjs: 14 passed.
  • Prettier clean on the changed test file.

@vercel

vercel Bot commented Oct 23, 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 Oct 23, 2026 6:35pm UTC

Request Review

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

astracat-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 23, 2026, 6:37 PM UTC

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

MobilePowerSearch (@astryxdesign/lab) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 2418 -
Complexity N/A Very High (310) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/lab N/A 4.6KB 1.9KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

…; regenerate the official package list

Each BottomSheetSwitcher step now owns its native dialog, and through a
handoff the outgoing step's dialog stays open, inert and aria-hidden. The
tests' sheet() helper read the first open dialog, which can be that leaving
step, so 41 of 79 MobilePowerSearch tests failed on main. It now returns the
first open dialog that is not hidden; no test changes otherwise.

The Lab component it covers was added without regenerating the CLI's
official package list, so the list's drift guard failed too. The list is
regenerated with `pnpm bundle:cli-official-packages` and now names
MobilePowerSearch.
@imdreamrunner
imdreamrunner force-pushed the fix/lab-mobile-powersearch-tests-per-step-dialogs branch from 058af0f to 22aa5bd Compare October 23, 2026 18:24
@imdreamrunner imdreamrunner changed the title test(lab): MobilePowerSearch tests read the interactive step's dialog test(lab): MobilePowerSearch tests read the interactive step's dialog; regenerate the official package list Oct 23, 2026
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

Superseded by #7983, which landed the same two fixes on main (the sheet() helper now skips inert dialogs, and the official package list names MobilePowerSearch, with its changeset). #7979 is rebased onto main without this one.

auto-merge was automatically disabled October 23, 2026 18:47

Pull request was closed

@imdreamrunner
imdreamrunner deleted the fix/lab-mobile-powersearch-tests-per-step-dialogs branch October 23, 2026 18:47

This branch was successfully deployed

1 active deployment
Preview — 22aa5bd9 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant