Skip to content

fix(DropdownMenu): a sheet opened before its code loads shows its rows with it - #12619

Merged
cixzhang merged 6 commits into
mainfrom
fix/menu-sheet-rows-at-open
Nov 18, 2026
Merged

cixzhang merged 6 commits into
mainfrom
fix/menu-sheet-rows-at-open

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

A bottom-sheet menu opened before its sheet code has loaded shows the sheet together with its actions, never an empty sheet first.

User impact

  • People on phones who open a menu the moment a page loads (or a page that opens its menu on load): the sheet appeared with no actions for a moment, then the actions filled in. Now the sheet appears with every action at once.
  • Everyone else: unchanged. A menu opened after the at-rest preload has finished already rendered its rows in the same commit as the open. A bottom-sheet ContextMenu with caller content (menuContent) shows no action list, so it neither loads nor waits for the row module, as before, on any page, including one that also has a data-driven sheet menu.

Cause

A bottom-sheet DropdownMenu (and MoreMenu, ContextMenu) loads its sheet module and its row module lazily, preloading both at rest. A press right after mount could open the menu before they arrived. The sheet's module then revealed first, and its rows rendered through lazy() behind Suspense fallback={null} a moment later.

Change

  • lazyMenuBottomSheet.ts: each sheet decides the wait on its own, through two lazy sheets. MenuBottomSheet (DropdownMenu, and ContextMenu with items) resolves only once the row module has loaded too. The new MenuBottomSheetWithoutActionList (ContextMenu with menuContent) loads only the sheet. A failed row load does not hold a sheet back: the rows then fail through lazy(), as before.
  • ContextMenu.tsx: picks the sheet by its content (one line).
  • New MenuBottomSheetOpenBeforeLoad.test.tsx: opens the menu right after mount with the row module held. It checks the sheet never shows without its rows, then that the rows show once the module loads.
  • ContextMenu.sheetLoading.test.tsx: a new case opens a caller-content bottom-sheet ContextMenu and checks that the action list loads zero times.
  • New MenuBottomSheetPerSheetWait.test.tsx: renders a DropdownMenu and a caller-content ContextMenu on one page with the row module held. The ContextMenu sheet opens at once, and only that sheet is open while the rows load; the DropdownMenu sheet opens, with its rows, once they load.
  • New __tests__/MenuSheetRowsAtOpen.interaction.browser.spec.ts: in a real browser, holds the row chunk back by 250 ms and opens the MoreMenu bottom-sheet story twice on one page (light, then dark), reading the sheet two frames after it becomes visible, as the MoreMenu audit does.
  • Changeset: [fix] patch.

Authority

component:DropdownMenu FR1: the touch presentation renders a sheet frame containing the touch action list and its rows. No record change.

Evidence

  • Unit: the new case fails on main (the sheet opens with no rows) and passes here. The caller-content load-count case fails on an earlier head of this branch, and the one-page case fails with main's sheet loading (two sheets open while the rows load, one heading-only); both pass here. DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass 1133/1133. tsc and lint are clean.
  • Browser (real Chromium, Playwright 1.61.1):
    • The MoreMenu audit passes 4/4 three times in a row, including its cold sheet case.
    • The DropdownMenu audit, tooltip and menu-pattern specs pass 33/33, and the DropdownMenu audit plus ContextMenu browser specs pass 28/28 at this head.
    • The touch press, handoff and opening-release interaction specs pass 16/16.
    • A cold-load probe of the MoreMenu bottom-sheet story showed every row at the dialog's first visible frame, plus two frames, at 1× and 4× CPU.
  • Size (size:pages, against main): the menu page is +194 B raw / +11 B gzip and the table page +199 B raw, for the second lazy sheet; other pages are unchanged.
  • Real-browser red/green: the new browser spec fails 3/3 against the release-check's own a190ec0 Storybook (the sheet shows only "Project actions") and passes 3/3 with this change.
  • Context: two release-check runs' MoreMenu audits found the sheet without rows, once on the first (cold) load and once on the second load in the same page. Each case is a fresh page load, so the row chunk is cached but not yet loaded, and the same race applies. Neither run reproduced unforced locally (15/15 and 30 one-page light-then-dark passes on the a190ec0 build at 1×, 4× and 8× CPU), so the race is timing-only; holding the row chunk back reproduces it every time.

Writing rubric results

  • R1–R7: no record change.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: code review, CI, merge.

…s with it

A bottom-sheet menu preloads its sheet and row modules at rest, but a press
right after mount can open it before they arrive. The sheet's module then
revealed first, and its rows rendered through lazy() a moment later, so the
sheet showed empty. The lazy sheet now resolves only once the row module
has loaded too (a failed row load does not hold it; the rows then fail
through lazy() as before). A unit case opens the menu right after mount
with the row module held and checks the sheet never shows without its
rows; it fails before and passes after.
@vercel

vercel Bot commented Nov 18, 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 18, 2026 3:57pm UTC

Request Review

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

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 70f7ad9

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · f1de6be

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
DropdownMenuCheckboxItem 28.8 kB (0) · 7.3 kB CSS (0) — ✗ · ✓ · ✓
DropdownMenuDivider 5.3 kB (0) · 548 B CSS (0) — ✗ · ✓ · —
DropdownMenuGroup 6.4 kB (0) · 3.4 kB CSS (0) — ✗ · ✓ · —
14 more components
Component Size LoC Visual · A11y · RTL
DropdownMenuItem 28.0 kB (0) · 6.9 kB CSS (0) — ✗ · ✓ · —
DropdownMenuRadioGroup 6.6 kB (0) · 3.3 kB CSS (0) — ✗ · ✓ · —
DropdownMenuRadioItem 28.8 kB (0) · 7.3 kB CSS (0) — ✗ · ✓ · —
DropdownMenuSubMenu 78.9 kB (0) · 10.5 kB CSS (0) — ✗ · ✓ · ✓
ContextMenu · Storybook 103.3 kB (−8 B) · 18.8 kB CSS (0) 729 (+4) ✗ · ✓ · ✓
DropdownMenu 108.8 kB (−25 B) · 18.9 kB CSS (0) — ✗ · ✓ · ✓
lab/Comments 379.3 kB (+285 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 372.3 kB (+35 B) · 2.4 kB CSS (0) — — · — · —
ContextMenuItem 35.9 kB (+1 B) · 7.1 kB CSS (0) — — · — · —
MoreMenu 109.1 kB (−30 B) · 18.9 kB CSS (0) — — · — · —
TableCell 104.5 kB (−140 B) · 19.3 kB CSS (0) — — · — · —
Markdown 205.3 kB (−165 B) · 22.1 kB CSS (0) — — · — · —
TableHeaderCell 104.3 kB (−166 B) · 19.1 kB CSS (0) — — · — · —
Table 121.6 kB (−216 B) · 19.8 kB CSS (0) — — · — · —
Visual changes: 14 snapshots in 2 components

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
ContextMenu · Presentation / pointer menu (probe, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · Presentation / pointer menu (probe, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · Presentation / pointer menu (neutral, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · Presentation / pointer menu (neutral, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · States (probe, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · States (probe, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · States (neutral, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · States (neutral, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · Default (neutral, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
ContextMenu · Default (neutral, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
DropdownMenu · Lab Checkbox Items (probe, dark) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame
DropdownMenu · Lab Checkbox Items (probe, light) · inheritance unknown: not found in the 3 newest reports of other pull requests before frame after frame diff frame

2 more are in the run's visual report.

Inheritance checked against the 3 newest reports of other pull requests.

Package size: @astryxdesign/core 7.68 MB packed (+556 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


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.

Changes requested: the fix works for data-driven sheets, but its new wait also reaches ContextMenu's compound sheet.

  • lazyMenuBottomSheet.ts:77-81 now loads and waits for the row module for every sheet, so a ContextMenu with menuContent in the bottom-sheet presentation downloads a row chunk it never renders (about 21 KB gzip in a ContextMenu-only build) and waits for it on a cold open; please wait only where the sheet renders rows and add a ContextMenu.sheetLoading.test.tsx case asserting that a compound bottom-sheet menu loads the action list zero times.
  • The description's "Everyone else: unchanged" is not true for compound bottom-sheet ContextMenu users until that wait is scoped, so either fix the code or say what changes for them.

The new unit case is a good red-first check: it fails on main and passes here. CI has not run on this head yet. One optional comment-wording suggestion is inline.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claims:
    • A bottom-sheet DropdownMenu, MoreMenu or ContextMenu opened before its sheet code loads shows the sheet together with its actions: verified (lazyMenuBottomSheet.ts:77-83; ContextMenu renders its rows inside the same lazy sheet at ContextMenu.tsx:897 and :944; MoreMenu composes DropdownMenu at MoreMenu.tsx:23).
    • The release note is a patch-level fix for the core package: verified (no public API change).
    • On main the sheet appeared empty, then the actions filled in: verified (the new case fails on main at MenuBottomSheetOpenBeforeLoad.test.tsx:78).
    • A menu opened after the at-rest preload is unchanged: verified for data-driven sheets (lazyMenuBottomSheet.ts:109-118; DropdownMenuSheetFirstOpen.test.tsx passes).
    • Everyone else is unchanged: false; a compound bottom-sheet ContextMenu now loads the row module at rest and waits for it (lazyMenuBottomSheet.ts:80; ContextMenu.tsx:393-401; a load-count check gives 0 loads on main and 1 here).
    • The sheet and row modules load lazily and preload at rest: verified for data-driven sheets (DropdownMenu.tsx:637-639, ContextMenu.tsx:393-401, lazyMenuBottomSheet.ts:91-102).
    • A failed row load does not hold the sheet back, and the rows fail through lazy() as before: verified (lazyMenuBottomSheet.ts:80, :85-89).
    • The new test holds the row module, checks the sheet never shows without rows, then checks the rows after release: verified (MenuBottomSheetOpenBeforeLoad.test.tsx:34-37, :72-88).
    • The new case fails on main and passes on this branch: verified.
    • DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass 1131/1131: verified (35 files, 1131 tests).
    • Typecheck and lint are clean: verified (core typecheck; lint on the two changed source files).
    • The menu and table reference pages grow 44 B raw, gzip within noise, other pages unchanged: verified (menu +44 B / -30 B gzip, table +44 B / -389 B gzip, docs and form unchanged).
    • The browser audit, interaction and cold-load runs pass: not rerun; a separate Chromium run of the DropdownMenu action-sheet story with the row module held agrees (empty sheet on main, none on this branch until the rows arrive).
    • DropdownMenu's touch-sheet anatomy requirement (FR1) governs, with no record change: verified.
    • A release-check run once found the sheet without rows: the author's report, not verifiable here; no finding depends on it.
  • Files:
    • .changeset/menu-sheet-rows-at-open.md: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetOpenBeforeLoad.test.tsx: clear.
    • packages/core/src/DropdownMenu/lazyMenuBottomSheet.ts: blocking finding (the row wait also runs for compound ContextMenu sheets); one optional comment-wording suggestion (inline).
    • Consistency with packages/core/src/ContextMenu/ContextMenu.tsx (unchanged): its data-mode-only row preload is bypassed by the new wait.

Automated review (maintainer link)

…ble frame in a real browser

A browser case holds the sheet's row chunk back by a quarter second, so it
arrives after the sheet's own chunk, and opens the MoreMenu bottom-sheet
story twice in one page (light, then dark), reading the sheet two frames
after it becomes visible, as the MoreMenu audit does. It fails on main
(the sheet shows only its title) and passes with the sheet waiting for its
row module.
@cixzhang cixzhang added the release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it. label Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 612c63f

The lazy sheet waited for the row module for every sheet, so a compound
bottom-sheet ContextMenu (menuContent) downloaded and waited for a row
chunk it never renders. A menu that renders the action list preloads it,
so the preload now marks the rows as wanted, and the sheet waits for them
only then. The check runs once the sheet's own module has loaded, after
the menu's mount effect has run. A ContextMenu sheet-loading case asserts
that a compound sheet menu loads the action list zero times; it fails at
the previous head and passes here.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f8fa31c

@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: compound-only pages are fixed, but the new page-wide flag still lets one menu decide the wait for every sheet on the page.

  • lazyMenuBottomSheet.ts:77 keeps one flag for the whole page and the page shares one lazy sheet, so on a page that also renders a data-driven sheet menu, a menuContent bottom-sheet ContextMenu opened before the row chunk arrives shows nothing until those rows load, though it never renders them; please decide the wait per sheet (for example a second lazy sheet used only by DropdownMenu and data-mode ContextMenu) and add a case that renders both kinds of menu on one page.
  • The description's "neither loads nor waits for the row module, as before" and the comment at lazyMenuBottomSheet.ts:75-76 ("never loads or waits for the rows") are not true on such a page, so fix the code or reword both.

The red-first unit case and the compound load-count case work as described, and a real-browser cold run of the MoreMenu sheet story now shows all four actions at the sheet's first frame. A data-driven menu that mounts after a compound sheet has loaded the sheet module still opens empty, which is not a regression and which the per-sheet fix also closes; one optional comment-length suggestion is inline. CI has not run on this head yet.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none
  • Claims:
    • A bottom-sheet menu opened before its sheet code loads shows the sheet with its actions, never an empty sheet first: verified when no compound sheet loaded the sheet module first (lazyMenuBottomSheet.ts:85-91, the new unit case, a Chromium cold run); a data-driven menu mounted after a compound sheet still opens empty (non-blocking).
    • On main a menu opened at page load showed an empty sheet that filled in: verified (the new case fails on main at MenuBottomSheetOpenBeforeLoad.test.tsx:78; the cold run on main shows a heading-only sheet).
    • A menu opened after the at-rest preload already rendered its rows in the same commit: verified (lazyMenuBottomSheet.ts:117-119).
    • A compound bottom-sheet ContextMenu neither loads nor waits for the row module: false on a page that also renders a data-driven sheet menu (blocking); verified for compound-only pages (ContextMenu.sheetLoading.test.tsx:77-98).
    • The sheet and row modules load lazily and preload at rest, and on main the sheet revealed before its rows: verified (DropdownMenu.tsx:637-639, ContextMenu.tsx:396-400, lazyMenuBottomSheet.ts:112-127).
    • A row-rendering menu's preload marks the rows as wanted and the sheet waits only then: verified (lazyMenuBottomSheet.ts:65, :87).
    • The check runs after the sheet's own module loads, so the menu's mount effect has run: verified for a menu mounted with its sheet (browser request order); not for a menu that mounts later.
    • A failed row load does not hold the sheet back and the rows fail through lazy() as before: verified (lazyMenuBottomSheet.ts:88, :93-97; the module loader drops a failed load).
    • The new unit test holds the row module, checks the sheet never shows without rows, then checks the rows: verified (MenuBottomSheetOpenBeforeLoad.test.tsx:86-103, :123-155).
    • The new ContextMenu case asserts zero action-list loads for a compound sheet: verified (ContextMenu.sheetLoading.test.tsx:77-98).
    • The browser spec holds the row chunk 250 ms and opens the MoreMenu sheet story twice in one page, light then dark, reading two frames after it shows: verified by reading (MenuSheetRowsAtOpen.interaction.browser.spec.ts:216-251); not run here.
    • The release note is a patch fix for the core package: verified (no public API change).
    • DropdownMenu's touch-sheet anatomy requirement governs, with no record change: verified.
    • The new case fails on main and passes here; the compound case fails at the previous head with one load and passes here: verified.
    • DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass 1132/1132: verified.
    • Type check and lint are clean: verified (core type check; lint on the changed files).
    • The audit, interaction and cold-load browser runs pass: not rerun; a separate Chromium cold run of the same story agrees.
    • The menu and table pages grow about 51 B raw with gzip within noise, and other pages are unchanged: verified (menu +51 B / -34 B gzip, table +51 B / -391 B gzip, docs and form unchanged).
    • The new browser spec fails on an earlier release build and passes here, and release checks saw the empty sheet without an unforced repro: the author's report, not verifiable here.
  • Files:
    • .changeset/menu-sheet-rows-at-open.md: clear.
    • packages/core/src/ContextMenu/ContextMenu.sheetLoading.test.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetOpenBeforeLoad.test.tsx: clear.
    • packages/core/src/DropdownMenu/__tests__/MenuSheetRowsAtOpen.interaction.browser.spec.ts: clear.
    • packages/core/src/DropdownMenu/lazyMenuBottomSheet.ts: blocking (page-wide wait; the compound comment at lines 75-76); non-blocking (late data-driven menu; comment length, inline).
    • Consistency with DropdownMenu.tsx and ContextMenu.tsx (unchanged): both call the preload as the flag expects; no test renders both kinds of sheet menu on one page.

Automated review (maintainer link)

One page-wide flag decided the wait for every sheet, since the page shares
one lazy sheet: with a data-driven sheet menu on the page, a caller-content
ContextMenu sheet waited for rows it never shows. There are now two lazy
sheets. MenuBottomSheet, used by DropdownMenu and a data-driven ContextMenu,
loads and waits for the row module. MenuBottomSheetWithoutActionList, used
by a ContextMenu with menuContent, loads only the sheet. A case renders both
kinds of menu on one page with the rows held: the caller-content sheet opens
at once, and the DropdownMenu sheet shows only with its rows. It fails at the
previous head and passes here.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e85da01

@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 per-sheet wait works and the earlier blocking points are fixed, but one new test does not check what it says.

  • MenuBottomSheetPerSheetWait.test.tsx:86 only checks that the "Edit project" row is absent before the rows load, which also holds while the DropdownMenu sheet is open with just its heading, so the case passes unchanged on main, where that sheet does open heading-only on this page; please assert that only the ContextMenu sheet is open after the press (for example expect(document.querySelectorAll('dialog[open]')).toHaveLength(1), then two after the rows load), or narrow the test header, the comment at line 81 and the description to what the case checks.

The rest checks out: the new open-before-load case fails on main and passes here, and with the row module held a caller-content ContextMenu opens at once while the data-driven sheet waits for its rows. The header wording note on lazyMenuBottomSheet.ts line 24 stays optional. CI has not run on this head yet.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules since the last review (0): none
  • Claims:
    • A bottom-sheet menu opened before its sheet code loads shows the sheet with its actions, never an empty sheet first: verified (lazyMenuBottomSheet.ts:79-85, the new unit case, and a Chromium cold run with the row chunk held).
    • Before, a menu opened right at page load showed a sheet without actions that filled in: verified (the new case fails on main at MenuBottomSheetOpenBeforeLoad.test.tsx:78).
    • A menu opened after the at-rest preload already rendered its rows in the same commit: verified (lazyMenuBottomSheet.ts:131-133, DropdownMenuSheetFirstOpen.test.tsx passes).
    • A caller-content bottom-sheet ContextMenu neither loads nor waits for the rows, on any page, including one with a data-driven sheet menu: verified (lazyMenuBottomSheet.ts:89-91, ContextMenu.tsx:911-913, the load-count case, the one-page case's first check).
    • Both modules load lazily and preload at rest, and the sheet used to reveal before its rows: verified (DropdownMenu.tsx:638, ContextMenu.tsx:394-402, lazyMenuBottomSheet.ts:126-141).
    • Each sheet decides the wait through its own lazy sheet: verified (lazyMenuBottomSheet.ts:79-124).
    • A failed row load does not hold a sheet back, and the rows then fail through lazy(): verified (lazyMenuBottomSheet.ts:82, :93-97).
    • ContextMenu picks the sheet by its content: verified (ContextMenu.tsx:911-913, :948-953).
    • The open-before-load test holds the row module, checks the sheet never shows without rows, then checks the rows: verified (MenuBottomSheetOpenBeforeLoad.test.tsx:57-89).
    • The new ContextMenu case checks that a caller-content sheet loads the action list zero times: verified (ContextMenu.sheetLoading.test.tsx:77-98).
    • The one-page test shows the caller-content sheet opens at once and the DropdownMenu sheet shows only with its rows: first half verified (MenuBottomSheetPerSheetWait.test.tsx:79); second half false (blocking).
    • The browser spec holds the row chunk 250 ms and opens the MoreMenu sheet story twice in one page, light then dark, two frames after it shows: verified (read, and Chromium runs: it fails on main and passes here).
    • The release note is a patch fix for the core package, and the changeset's description of the fix matches it: verified (no public API change; a caller-content sheet was never empty).
    • DropdownMenu's touch-sheet anatomy requirement governs, with no record change: verified.
    • The new case fails on main and passes here; the load-count and one-page cases fail on an earlier revision of this branch and pass here: verified.
    • DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass 1133/1133: verified (36 files).
    • Type check and lint are clean: verified (Core type check; lint on the changed files).
    • The audit, tooltip, menu-pattern and touch-interaction browser runs pass: not rerun; the new browser spec and a cold run of the same story agree.
    • Menu page +194 B raw / +11 B gzip, table page +199 B raw, other pages unchanged: verified (menu +194 B / +12 B gzip, table +199 B, docs and form unchanged).
    • The new browser spec fails on a release build's Storybook and passes here: verified against main's own Storybook (it sees only the heading there); the release build and the release-check history are the author's report.
  • Files:
    • .changeset/menu-sheet-rows-at-open.md: clear.
    • packages/core/src/ContextMenu/ContextMenu.sheetLoading.test.tsx: clear.
    • packages/core/src/ContextMenu/ContextMenu.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetOpenBeforeLoad.test.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetPerSheetWait.test.tsx: blocking (the DropdownMenu half checks only a row's absence).
    • packages/core/src/DropdownMenu/__tests__/MenuSheetRowsAtOpen.interaction.browser.spec.ts: clear.
    • packages/core/src/DropdownMenu/lazyMenuBottomSheet.ts: non-blocking (the header still says "Neither wrapper").
    • Consistency with DropdownMenu.tsx (unchanged): every DropdownMenu sheet renders rows, so it keeps the waiting sheet.

Automated review (maintainer link)

…tays closed until its rows load

The case only checked that a DropdownMenu row was absent, which also holds
while that sheet is open with its heading alone. It now checks that one
sheet (the ContextMenu's) is open while the rows load, and two after. With
main's sheet loading it fails at that check. The file header names three
wrappers.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f6ab523

@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: some required checks (the test-node shards) are still running on this head.

A data-driven bottom-sheet menu opened before its row code has loaded now appears once with every action, and a caller-content ContextMenu sheet still opens without loading the rows. Nothing else is needed from the review; the required checks still have to pass before merge.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules since the last review (0): none
  • Claims:
    • A bottom-sheet menu opened before its sheet code loads shows the sheet together with its actions, never an empty sheet first: verified (lazyMenuBottomSheet.ts:79-85; the open-before-load case; a real-browser cold open of the MoreMenu sheet story with the row module held shows a heading-only sheet on main and the whole sheet in its first visible frame here).
    • Before, a menu opened at page load showed a sheet with no actions that filled in a moment later: verified (the new case fails on main at MenuBottomSheetOpenBeforeLoad.test.tsx:78; the cold open on main shows only the heading for about 3.7 s with a 4 s hold).
    • A menu opened after the at-rest preload already rendered its rows in the same commit: verified (lazyMenuBottomSheet.ts:126-141 renders the loaded module directly; the DropdownMenu, MoreMenu and ContextMenu suites pass).
    • A caller-content bottom-sheet ContextMenu neither loads nor waits for the row module, on any page, including one with a data-driven sheet menu: verified (lazyMenuBottomSheet.ts:89-91, ContextMenu.tsx:911-913; the load-count case; MenuBottomSheetPerSheetWait.test.tsx:79).
    • The sheet and row modules load lazily and preload at rest, and the sheet used to reveal before its rows through a second lazy boundary: verified (DropdownMenu.tsx:638, ContextMenu.tsx:398-402, the loader on main).
    • Each sheet decides the wait through its own lazy sheet; the data sheet resolves once the row module has loaded too; the caller-content sheet loads only the sheet: verified (lazyMenuBottomSheet.ts:74-124).
    • A failed row load does not hold a sheet back, and the rows then fail through lazy() as before: verified (lazyMenuBottomSheet.ts:82, :93-97).
    • ContextMenu picks the sheet by its content: verified (one conditional at ContextMenu.tsx:911-913, used at :947-953).
    • The open-before-load test holds the row module, checks the sheet never shows without its rows, then that the rows show once it loads: verified (MenuBottomSheetOpenBeforeLoad.test.tsx:57-89).
    • The new ContextMenu case checks that a caller-content sheet loads the action list zero times: verified (ContextMenu.sheetLoading.test.tsx:77-98).
    • The one-page test opens the caller-content sheet at once, keeps only that sheet open while the rows load, and opens the DropdownMenu sheet with its rows once they load: verified (MenuBottomSheetPerSheetWait.test.tsx:79, :88, :95-97).
    • The browser spec holds the row chunk 250 ms and opens the MoreMenu sheet story twice in one page, light then dark, reading the sheet two frames after it shows, as the MoreMenu audit does: verified (MenuSheetRowsAtOpen.interaction.browser.spec.ts:56-90; it runs and passes in CI on this head, and its chunk pattern matches the built Storybook's row chunk).
    • The release note is a patch fix for the core package covering DropdownMenu, MoreMenu and ContextMenu: verified (no public API change; with the rows held, a data-driven ContextMenu shows a heading-only sheet on main and no sheet until its rows arrive here).
    • DropdownMenu's touch-sheet anatomy requirement governs, with no record change: verified.
    • The new case fails on main and passes here; the one-page case fails with main's sheet loading: verified (two open dialogs at MenuBottomSheetPerSheetWait.test.tsx:88 on main). The load-count case failing on an earlier revision of this branch: the author's report (it passes on main and here, as expected).
    • DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass; type check and lint are clean: verified (the menu suites pass here, CI's unit, type-check and lint jobs pass on this head, and Core's type check and lint of the changed files are clean).
    • The audit, tooltip, menu-pattern and touch-interaction browser runs and the cold-load probe at several CPU rates pass: the author's report; CI's interaction and dependent-audit jobs pass on this head.
    • Menu page +194 B raw / +11 B gzip, table page +199 B raw, other pages unchanged: verified within measurement (menu +194 B and table +208 B minified on this head, docs and form unchanged, every gzip change under 0.1 KB).
    • The new browser spec fails against a release check's Storybook and passes with the change; two release-check audits caught the heading-only sheet: the author's report; holding the row module reproduces the heading-only sheet on main every time here.
  • Files:
    • .changeset/menu-sheet-rows-at-open.md: clear.
    • packages/core/src/ContextMenu/ContextMenu.sheetLoading.test.tsx: clear.
    • packages/core/src/ContextMenu/ContextMenu.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetOpenBeforeLoad.test.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetPerSheetWait.test.tsx: clear.
    • packages/core/src/DropdownMenu/__tests__/MenuSheetRowsAtOpen.interaction.browser.spec.ts: clear.
    • packages/core/src/DropdownMenu/lazyMenuBottomSheet.ts: clear.
    • Consistency with DropdownMenu.tsx (unchanged): every DropdownMenu sheet renders rows, so it keeps the waiting sheet.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 18, 2026 14:21
@cixzhang
cixzhang marked this pull request as draft November 18, 2026 15:36
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f1de6be

@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: some required checks (the remaining test-node and test-ui shards) are still running on this head.

A data-driven bottom-sheet menu opened before its row code has loaded now appears once with every action, and a caller-content ContextMenu sheet still opens without loading the rows. Nothing else is needed from the review; the required checks still have to pass before merge.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules since the last review (0): none
  • Claims:
    • A bottom-sheet menu opened before its sheet code loads shows the sheet together with its actions, never an empty sheet first: verified (lazyMenuBottomSheet.ts:79-85; the open-before-load case; a real-browser cold open of the MoreMenu sheet story with the row module held shows a heading-only sheet on main and the whole sheet in its first visible frame with this patch).
    • Before, a menu opened at page load showed a sheet with no actions that filled in a moment later: verified (the new case fails on main at MenuBottomSheetOpenBeforeLoad.test.tsx:78; the cold open on main shows only the heading for about 3.7 s with a 4 s hold).
    • A menu opened after the at-rest preload already rendered its rows in the same commit: verified (lazyMenuBottomSheet.ts:126-141 renders the loaded module directly; the DropdownMenu, MoreMenu and ContextMenu suites pass with this patch).
    • A caller-content bottom-sheet ContextMenu neither loads nor waits for the row module, on any page, including one with a data-driven sheet menu: verified (lazyMenuBottomSheet.ts:89-91, ContextMenu.tsx:911-913; the load-count case; MenuBottomSheetPerSheetWait.test.tsx:79).
    • The sheet and row modules load lazily and preload at rest, and the sheet used to reveal before its rows through a second lazy boundary: verified (DropdownMenu.tsx:637-639, ContextMenu.tsx:398-402, the loader on main).
    • Each sheet decides the wait through its own lazy sheet; the data sheet resolves once the row module has loaded too; the caller-content sheet loads only the sheet: verified (lazyMenuBottomSheet.ts:74-124).
    • A failed row load does not hold a sheet back, and the rows then fail through lazy() as before: verified (lazyMenuBottomSheet.ts:82, :93-97).
    • ContextMenu picks the sheet by its content: verified (one conditional at ContextMenu.tsx:911-913, used at :947-953).
    • The open-before-load test holds the row module, checks the sheet never shows without its rows, then that the rows show once it loads: verified (MenuBottomSheetOpenBeforeLoad.test.tsx:57-89).
    • The new ContextMenu case checks that a caller-content sheet loads the action list zero times: verified (ContextMenu.sheetLoading.test.tsx:77-98).
    • The one-page test opens the caller-content sheet at once, keeps only that sheet open while the rows load, and opens the DropdownMenu sheet with its rows once they load: verified (MenuBottomSheetPerSheetWait.test.tsx:79, :88, :95-97).
    • The browser spec holds the row chunk 250 ms and opens the MoreMenu sheet story twice in one page, light then dark, reading the sheet two frames after it shows, as the MoreMenu audit does: verified (MenuSheetRowsAtOpen.interaction.browser.spec.ts:56-90; it passed in CI on this head, and its chunk pattern matches the built Storybook's row chunk).
    • The release note is a patch fix for the core package covering DropdownMenu, MoreMenu and ContextMenu: verified (no public API change; with the rows held, a data-driven ContextMenu shows a heading-only sheet on main and no sheet until its rows arrive with this patch).
    • DropdownMenu's touch-sheet anatomy requirement governs, with no record change: verified.
    • The new case fails on main and passes here; the one-page case fails with main's sheet loading: verified (two open dialogs at MenuBottomSheetPerSheetWait.test.tsx:88 on main). The load-count case failing on an earlier revision of this branch: the author's report (it passes on main and here, as expected).
    • DropdownMenu, MoreMenu, ContextMenu and BottomSheet units pass; type check and lint are clean: verified (the menu suites and Core's type check and lint of the changed files on an earlier revision with the same patch; on this head CI's type check, lint and two of four UI unit shards pass, and the rest are still running).
    • The audit, tooltip, menu-pattern and touch-interaction browser runs and the cold-load probe at several CPU rates pass: the author's report; CI's interaction, accessibility-contract and dependent-audit jobs pass on this head.
    • Menu page +194 B raw / +11 B gzip, table page +199 B raw, other pages unchanged: verified within measurement (menu +194 B and table +208 B minified with this patch, docs and form unchanged, every gzip change under 0.1 KB).
    • The new browser spec fails against a release check's Storybook and passes with the change; two release-check audits caught the heading-only sheet: the author's report; holding the row module reproduces the heading-only sheet on main every time.
  • Files:
    • .changeset/menu-sheet-rows-at-open.md: clear.
    • packages/core/src/ContextMenu/ContextMenu.sheetLoading.test.tsx: clear.
    • packages/core/src/ContextMenu/ContextMenu.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetOpenBeforeLoad.test.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetPerSheetWait.test.tsx: clear.
    • packages/core/src/DropdownMenu/__tests__/MenuSheetRowsAtOpen.interaction.browser.spec.ts: clear.
    • packages/core/src/DropdownMenu/lazyMenuBottomSheet.ts: clear.
    • Consistency with DropdownMenu.tsx (unchanged): every DropdownMenu sheet is data-driven and renders rows, so it keeps the waiting sheet.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 18, 2026 16:08
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
@cixzhang
cixzhang merged commit 25bedb9 into main Nov 18, 2026
148 checks passed
@cixzhang cixzhang removed the release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it. label Nov 18, 2026
@github-actions
github-actions Bot deleted the fix/menu-sheet-rows-at-open branch November 19, 2026 06:04

This branch was successfully deployed

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