Skip to content

perf(Table): load the cell context menu only when a cell has actions - #11569

Draft
cixzhang wants to merge 13 commits into
mainfrom
perf/table-lazy-context-menu
Draft

cixzhang wants to merge 13 commits into
mainfrom
perf/table-lazy-context-menu

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

A page that renders a Table whose cells have no context-menu actions no longer downloads the context menu. Today every Table, TableCell and TableHeaderCell import pulls in ContextMenu, DropdownMenu's menu code and the touch sheet, even when no column defines actions. This is a performance change with no product behavior change, which none of the narrower templates covers.

This PR supersedes #8403 by @rhagigi, ported onto current main, and keeps @rhagigi as co-author. On top of that port it changes how a touch made before the menu code arrives is handled (see below), and it updates the import-boundary check and its record now that the Table crossing is gone.

User or maintainer impact

  • No actions: the cell renders as before and its page never loads menu code. A page that renders Table, Text and Button loads 22.8–25.2 KB less first-load JavaScript (gzip) in Vite 8, Rolldown and webpack 5 (about 21 %; table below).
  • With actions: the cell renders its content and trigger at once and starts loading its menu on its first client render (after hydration). The content keeps its DOM node, focus and state when the menu attaches, and the trigger's box does not move.
  • Early invocation: a right-click, Shift+F10 or long press made before the menu code arrives is held and opens the menu once when it loads, unless another press or key comes first. The browser's own menu stays shut.
  • Load failure: the table stays mounted, the held invocation is dropped and the browser's own menu returns. A later mount or invocation asks the loader again.
  • No public API change. No new props, exports or data-* attributes. Action getters still resolve when the menu opens. A loaded menu behaves exactly as on main.

Problem and solution fit

  • resolveContextActions and a new hasContextActions move to a dependency-free tableContextActions.ts, so cells and plugins read actions without importing the menu. The public export is unchanged.
  • ContextMenuTrigger (the trigger wrapper and its 1px cursor anchor, no menu code) is shared by ContextMenu and the cell. The cell renders it around its content and lazy-loads only the menu beside it through the internal ContextMenuForTrigger mode and the shared createModuleLoader. Neither module is exported publicly.
  • Before the menu attaches, the cell's listeners recognize no gesture: a right-click or Shift+F10 is held as a point in the trigger, and a touch is held as its raw touch events, which the loaded menu's own long-press detector reads in order when it attaches. The press is timed from the touch's own start. (perf(Table): load the cell context menu only when a cell has actions #8403 ran a second long-press recognizer in the cell before load; that is the change from the port.)
  • Inside the lazily loaded graph, modules import Core modules directly, not through folder barrels, so a single-file esbuild app still renders. ContextMenu's seven item aliases get one-line modules so an alias imported alone does not reach the whole menu.
  • The import-boundary check lists ContextMenu/ContextMenuTrigger and Layer/gestureCounter as base code in surface folders, and the stale Table/tableContextMenu → ContextMenu allowlist row is removed.

Authority

  • architecture:component-import-boundaries INV1–INV6: the menu is a surface revealed by interaction and loads through the shared module loader; the trigger contract is complete before load; an early intent is replayed once; the load moves no box; a failed load leaves the page working. INV2's "named moment after the first render" is named in component:TableCell PR1.
  • component:TableCell PR1 ("a context menu loads only when actions are given"), FR4; component:TableHeaderCell FR3.
  • component:ContextMenu FR1, FR10 (implementation gap note now names the cell's internal path).
  • architecture:react-component-runtime INV2/INV3 (interaction work in callbacks; the two Effects added name the system they sync: the shared hold's lifetime and a failed load).
  • spec:AST-013 FR9: the lazy menu is kept out of server markup and the hydrating render.

Change and evidence

First-load bytes

Real bundlers, from the repository's first-load matrix (base 55674f90c2a, the merge base with main → head b1903553fb1; Core built as build:esm; React, React DOM and StyleX external; gzip in KB of 1,024 B; chunks are first-load requests):

Page Bundler Base gzip / chunks Head gzip / chunks Change
table (Table, Text, Button) Vite 8 (Rolldown) 109.6 / 5 86.8 / 7 −22.8 KB
table Rolldown, inline common chunks off 109.1 / 5 86.3 / 7 −22.8 KB
table Rolldown, inline common chunks 64 KiB 115.9 / 8 91.6 / 8 −24.3 KB
table webpack 5 111.4 / 1 86.2 / 1 −25.2 KB
menu (DropdownMenu, ContextMenu, Button, Text) Vite 8 / Rolldown / webpack 5 99.2 / 98.6 / 101.4 99.5 / 99.0 / 101.7 +0.33 to +0.38 KB
docs, form all four +0 (webpack +10 to +13 B)

The menu page uses ContextMenu, so it pays for the trigger contract that now lives in its own module (ContextMenuTrigger), about 0.35 KB. Under Rolldown, the table page's first load splits into 7 requests instead of 5.

Static graph (pnpm size:pages with its module-count and depth report, esbuild; structural evidence, not the headline): table page −25,449 B gzip, static modules 635 → 616, module depth 12 → 12, chunks 13 → 13 (chunk depth 2); menu page +351 B gzip, static modules 266 → 272, module depth 8 → 8, chunks 11 → 11; docs and form +0. The import-boundary check passes, and its printout puts Table's eager gzip at 50.5 KB; the record carries that figure.

Behavior checks

  • Red first: a new test proves the cell creates no long-press detector before the menu loads (it fails on the perf(Table): load the cell context menu only when a cell has actions #8403 port, which ran its own recognizer, and passes here). New tests also cover a press still held when the menu attaches (opens at the deadline counted from the touch start), a press that moved past the tolerance before load (no menu), and a held touch dropped by a later press elsewhere.
  • From perf(Table): load the cell context menu only when a cell has actions #8403: body- and header-cell tests check the same content nodes, an edited input, button state, one mount and retained focus across the load; keyboard open, ArrowDown and Escape focus return; early right-click, Shift+F10 and long press, competing cells, cancellation by a later press or key, a scroll during the load, an unmounting cell; server render plus hydration with no recoverable error; a rejected load that keeps the table, returns the browser's menu and retries.
  • Chromium (TableCellMenuLoad.a11y.chromium.spec.ts, a server-rendered, hydrated fixture whose server holds the menu chunk): a new case shows the cell's, trigger's and button's boxes are identical before and after the menu loads, axe reports no violation before or after, and the loaded menu opens on the first right-click. Existing cases cover a right-click, Shift+F10 and a long press made before the chunk arrives.

Not covered: WebKit, recovery after a failed native chunk load in a real browser, and focus-ring pixels.

#8125 on top of this change (table page)

pnpm size:pages, this head (main 5b44d9a0 merged) against this head plus #8125's source (9cfc2fa), first-load gzip:

Page This head With #8125 Change
docs 75,983 76,049 +66 B
form 105,599 105,695 +96 B
menu 108,578 108,710 +132 B
table 94,111 94,168 +57 B

So on top of this change, #8125 adds 57 B to the table page, under INV10's 307 B. Without this change, main's table page reached the whole ContextMenu. The measurement leaves out #8125's edits to ContextMenu.tsx itself: those don't merge cleanly onto this head, and the table page reaches that module only on demand here, so they don't change its first load. #8125's shared gesture and Layer changes are included.

Writing rubric results

Records changed: architecture:component-import-boundaries (base-code list gains ContextMenu/ContextMenuTrigger and Layer/gestureCounter; the Table allowlist row and its current-state bullet are removed; one new allowlist row, Table/TableCellContextMenu → Layer/gestureCounter, at 0.0 KB; costs refreshed from the check's printout), component:TableCell (PR1 names when the load starts and how an early invocation is replayed; verified_by and the PR1 verification row list the tests), component:ContextMenu (Owns lines for ContextMenuTrigger and ContextMenuForTrigger; FR10's gap note names the cell's internal path), component:TableHeaderCell (PR1 "Resources": the cell's only state stays FR2's cut-heading tooltip, and a header cell with actions starts the menu load at the same moment as component:TableCell PR1, with an early invocation held and replayed once; its verification row names the early Shift+F10 case and two gaps).

  • R1 narration: none; each edit states what the system does, in the present tense.
  • R2 research: none added.
  • R3 evidence: test files only; no pull request, commit or date. The TableHeaderCell row states its gaps instead of claiming coverage.
  • R4 rejected alternatives: none added.
  • R5 change references: none.
  • R6 open questions: none added.

Scope

Components: Table, TableCell, TableHeaderCell, ContextMenu, DropdownMenu (direct imports only)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run packages/core/src/Table packages/core/src/ContextMenu packages/core/src/DropdownMenu after merging main: 72 files, 1,388 tests pass.
  • vitest run packages/core/src/Table/TableCellContextMenu*: touch tests (now 14: a press that strays past the move tolerance and comes back before the menu loads opens nothing, red on the previous head), load failure (now asserts one development warning, red on the previous head), modality, SSR and header-cell tests pass.
  • vitest run --project node scripts/check-component-import-boundaries.test.mjs scripts/core-single-bundle.test.mjs: pass.
  • pnpm check:component-import-boundaries: boundaries hold; Table eager 50.5 KB gzip. One new allowlist row, Table/TableCellContextMenu → Layer/gestureCounter (INV8, 0.0 KB: Text's own row already brings the module).
  • playwright test TableCellMenuLoad.a11y.chromium.spec.ts (Chromium, run locally one case at a time with --single-process, which the local sandbox requires): the new box-and-axe case, the early right-click case and the early long-press case pass. The Shift+F10 case could not run locally: Chromium on macOS sends no contextmenu event for Shift+F10, so it needs the Linux CI run.
  • pnpm -F @astryxdesign/core typecheck, ESLint and Prettier on changed files, pnpm check:knowledge, pnpm check:changesets: pass.

Overlap checked: #11859 (menu press fix; shares DropdownMenuItem and DropdownMenuSubMenu, merges first), #8125 (iOS long-press ContextMenu, which this unblocks; merges first), #8080 (DropdownMenu device work; merges first)

Owner: @cixzhang; the Astryx fix loop shepherds it to merge. Land path: CodeBunny approval of the exact head, Specs stamp, CI, then the merge queue after #11859, #8080 and #8125.

Co-authored-by: Royi Hagigi (@rhagigi), from #8403.

cixzhang and others added 4 commits November 13, 2026 07:13
Port of #8403 onto current main. Cells without `contextMenuActions` no
longer import ContextMenu. A cell with actions renders a shared trigger
around its content and loads only the menu beside it, so the content
keeps its node, focus and state across the load.

Co-authored-by: Royi Hagigi <royi@fb.com>
A cell before its menu loads now holds the touch events of a press and
hands them to the menu's own long press when it attaches, instead of
running a long-press recognizer itself. The pre-load listeners recognize
no gesture. The menu times the press from the touch's own start.

Also lists the cell trigger and the gesture counter as base modules in
the import-boundary check, removes the Table menu crossing from its
allowlist, and names when a cell with actions starts the menu load.
…the external-trigger mode exist; keep CI-measured sizes
@vercel

vercel Bot commented Nov 13, 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 10:31pm UTC

Request Review

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

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 13, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 1d8278c

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec c54e3f0

@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.

Request changes. Loading the cell menu lazily works, and the size win checks out: import {Table} drops from 357,792 to 137,952 minified bytes, and its eager chunks hold no menu module. Two parts of the early-invocation and failure paths do not yet follow architecture:component-import-boundaries:

  • A held touch loses its earlier moves (INV4): holdTouchEvent (TableCellContextMenu.tsx:164-167) keeps only the last move, so a press that strays past the 10 px tolerance and comes back before the menu loads opens the menu on replay, while the same press on a loaded cell opens nothing; hold every move and add that sequence to the touch tests.
  • A failed load is silent in development (INV6): the catch at TableCellContextMenu.tsx:89-91 (and the preload and retry catches) swallows the error, but INV6 says development builds warn once; call warnOnce from utils/devWarning there and assert it once in the load-failure test.

Also, when heavy CI runs, refresh the boundaries record's "Table carries 123.5 KB eager" line from the check's printout.

Claims and files checked

Claims (changeset and description):

  • Cells load the menu only when they have actions: verified (TableCellContextMenu returns the content untouched without actions; no-load test).
  • A table without menus no longer ships ContextMenu, DropdownMenu's menu code and the touch sheet, about 358 KB to 138 KB minified: verified (357,792 to 137,952 bytes; no menu module in the eager chunks). The gzip figures depend on how chunks are compressed and were not reproduced exactly.
  • A cell with actions renders its content at once, starts loading on its first client render, and keeps the content's node, focus and state: verified (hydration gate; content-survives tests for body and header cells).
  • An early right-click, Shift+F10 or long press is held and opens the menu once it loads unless another press or key comes first, with the browser menu kept shut: verified for right-click and Shift+F10; a held touch can also open the menu after a press that strayed past the tolerance (finding above).
  • A failed load keeps the table, returns the browser menu, and a later mount, right-click or touch retries: verified (load-failure tests); no development warning (finding above).
  • Tests that expect the menu synchronously after render must wait for it: verified (warm-up helper added to Core's suites).
  • resolveContextActions keeps its export and no longer pulls the menu in: verified (Table/index.ts re-exports it from tableContextActions.ts).
  • No public API change, no new props, exports or data attributes: verified (generated API surface has no row).
  • Action getters still resolve when the menu opens: verified (getter path, row-expansion and sortable tests).
  • A loaded menu behaves as before: verified (ContextMenu, DropdownMenu and Table menu suites pass).
  • The measured Table and ContextMenu minified sizes: verified exactly; the Markdown and root-entry rows were not re-measured.
  • The cell's listeners recognize no gesture before the menu loads: verified (no long-press detector before load).
  • A held touch is handed to the loaded detector as its raw events, in order, timed from the touch's start: partly false; consecutive moves collapse to the last one, though timing from the start holds.
  • Modules in the lazy graph import Core modules directly: verified (single-bundle test passes).
  • Each ContextMenu item alias has its own module: verified.
  • The boundary check lists the trigger and gesture-counter modules as base code and drops the Table row: verified (script, its test and the record).
  • The menu stays out of server markup and the hydrating render: verified (SSR test over three server renders).
  • The two new cell Effects name what they sync: verified.

Files (48):

  • Table/TableCellContextMenu.tsx: the two findings above.
  • ContextMenu/ContextMenu.tsx, ContextMenuTrigger.tsx, index.ts and the seven alias modules: clear.
  • Table/TableCell.tsx, TableHeaderCell.tsx, tableContextActions.ts, tableContextMenu.tsx, index.ts, and the row-expansion and sortable plugin sources: clear.
  • The four DropdownMenu import edits: clear.
  • The changeset: clear apart from the touch case above.
  • The three records: clear apart from the eager-size line.
  • The three boundary and bundle scripts and the shared-identity baseline: clear.
  • The 18 test, fixture and helper files: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/revoke-spec

Keeps the lazy cell menu. From main: the header's unpositioned menu
trigger, with points measured from the anchor's containing block, a
held right-click included; the predicate's one name, hasContextActions;
the touch sheet's lazy action list; the sub-menu's visibleText. The
boundaries record takes main's tables without the cell-menu row, adds
the cell wrapper's gesture-counter crossing, and the check's current
costs.
…ns once in development

A press that strayed past the move tolerance and came back before the
menu loaded opened the menu on replay, because only the last move was
held. Every move is held now, so the replay cancels it as a loaded cell
does. A failed load of the menu code warns once in development builds,
from whichever path saw it first.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b190355

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@cixzhang cixzhang added the lane:0 Astryx fix-loop lane 0 owns this label Nov 16, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec fd87ad2

@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.

Request changes. The lazy cell menu holds up at this head: the table page's first-load JavaScript drops by about 25 KB gzip, a loaded menu renders the same as on main, a held touch now keeps every move, and a failed load warns once in development. Two things still need fixing:

  • The boundary check's allowlist test fails: scripts/check-component-import-boundaries.test.mjs:390-410 still expects four rows, but the record's allowlist now has Table/TableCellContextMenu → Layer/gestureCounter (docs/architecture/component-import-boundaries.md:223), so add that row after the Link/Link entry.
  • The description lists a record edit that is not in the diff: it says the truncation-tooltip sentence no longer says it costs Table nothing, but component-import-boundaries.md:229-231 still says so (unchanged, and still accurate), so drop that clause from the description.

Also, the INV7 gap bullet at component-import-boundaries.md:270-271 still says 3.6 KB where the allowlist row now says 3.5 KB.

Claims and files checked

Review mode: full; reason: spec-record

Claims (changeset and description):

  • Cells load the menu only when they have actions: verified (TableCellContextMenu returns the content untouched without actions; the no-load test).
  • A table without menus no longer ships the menu code, about 23 to 25 KB less first-load gzip for a Table, Text and Button page: verified with the repository's esbuild page measure (25,618 B less gzip); the Vite, Rolldown and webpack figures were not reproduced.
  • About 21 % less first-load JavaScript on that page, and about 0.35 KB more on the menu page: verified with the same measure (21.7 % less; menu page 367 B more gzip).
  • A cell with actions renders its content at once, starts loading on its first client render after hydration, and keeps the content's node, focus and state: verified (hydration gate; body- and header-cell tests; pixel-identical frames at rest).
  • An early right-click, Shift+F10 or long press is held and opens the menu once unless another press or key comes first, with the browser menu kept shut: verified (14 touch tests, the held right-click and Shift+F10 tests).
  • A failed load keeps the table, drops the hold, returns the browser menu, warns once in development, and a later mount or invocation retries: verified (load-failure tests).
  • A test that expects the menu synchronously right after render has to wait for it: verified (the warm-up helper in four suites).
  • resolveContextActions keeps its export and no longer pulls the menu in: verified (Table/index.ts re-exports it from tableContextActions.ts).
  • No public API change, no new props, exports or data attributes: verified (the generated surface of build, core and the seven themes has no row).
  • Action getters still resolve when the menu opens, and a loaded menu behaves as before: verified (getter path, row-expansion and sortable tests; pixel-identical menu frames).
  • The trigger module and the internal trigger mode are shared and not exported publicly: verified (ContextMenu/index.ts and the package exports map).
  • The cell recognizes no gesture before load, and a held touch reaches the loaded detector in order, timed from its start: verified (no-detector test; deadline test).
  • Modules in the lazy graph import Core modules directly, and the seven item aliases have their own modules: verified (single-bundle test passes; seven alias files).
  • The boundary check lists the two base modules and drops the old Table row: verified (script and record).
  • The esbuild page figures for the table and menu pages: verified (minified deltas match exactly; gzip within a few hundred bytes).
  • The boundary check passes and prints about 50.5 KB eager for Table: verified (passes; 50.7 KB locally, within the record's stated tolerance).
  • The listed record edits (base-code list, removed row and gap bullet, PR1, verified_by, Owns lines, FR10 note): verified.
  • The truncation-tooltip sentence no longer says it costs Table nothing: false (finding above).
  • 72 files and 1,388 tests pass in the Table, ContextMenu and DropdownMenu suites: verified (same counts).
  • The touch and load-failure tests added in the last round: verified.
  • The boundary-check and single-bundle node tests pass: false; the allowlist test fails (finding above).
  • One new allowlist row at 0.0 KB: verified (check printout).
  • Typecheck, ESLint and Prettier pass: verified; the knowledge and changeset checks were not run.
  • The Chromium cases pass locally: not run here; CI has not run on this draft head.
  • Overlap and land-path notes: process information, not a code claim.

Files (49):

  • Table/TableCellContextMenu.tsx: the earlier findings are fixed; one comment-style suggestion.
  • scripts/check-component-import-boundaries.test.mjs: stale allowlist expectation (finding above).
  • docs/architecture/component-import-boundaries.md: clear apart from the INV7 gap figure.
  • ContextMenu/ContextMenu.tsx, ContextMenuTrigger.tsx, index.ts, the seven alias modules and ContextMenu.test.tsx: clear.
  • Table/TableCell.tsx, TableHeaderCell.tsx, tableContextMenu.tsx, tableContextActions.ts, index.ts and the row-expansion and sortable plugin sources: clear.
  • The four DropdownMenu import edits: clear.
  • The ContextMenu and TableCell records and the changeset: clear.
  • scripts/check-component-import-boundaries.mjs, scripts/core-single-bundle.test.mjs and the shared-identity baseline: clear.
  • The 18 other test, fixture and helper files: clear.

Automated review (maintainer link)

…er's gesture-counter row

The record's INV7 gap note takes the check's 3.5 KB, and a comment
splits into short sentences.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec defaf5b

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026

@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.

Request changes. The lazy cell menu holds up at this head. The table page's first-load JavaScript drops by about 25 KB gzip, the earlier findings are fixed, and the Chromium early-invocation, box and axe cases pass. One thing still needs fixing:

  • Miss: Header cells start loading the menu code right after hydration, and every sortable column gives its header cell actions, but architecture:component-import-boundaries INV2 allows a load before intent only at a moment the component's own record names, and component:TableHeaderCell names none (component:TableCell PR1 covers body cells only), so add that moment to the TableHeaderCell record and have an engineering owner approve that head with /approve-spec <full head SHA>, or start the header cell's load on intent.
Claims and files checked

Review mode: same-head; reason: none

Claims (changeset and description):

  • Cells load the menu only when they have actions: verified (the cell wrapper returns its content untouched without actions; the no-load test).
  • A table without menus no longer ships the menu code and the touch sheet, about 23 to 25 KB less first-load gzip for a Table, Text and Button page in Vite, Rolldown and webpack: verified with the repository's esbuild page measure (25,623 B less gzip, about 21.7 %); the three bundler figures were not reproduced.
  • The menu page grows about 0.35 KB, and the docs and form pages do not change: verified (menu page 367 B more gzip; docs and form unchanged).
  • The static-graph figures for the table and menu pages: verified within 0.2 KB, the platform tolerance the record states.
  • A cell with actions renders its content at once, starts loading on its first client render after hydration, and keeps the content's node, focus and state: verified (the hydration gate; the body- and header-cell tests).
  • An early right-click, Shift+F10 or long press is held and opens the menu once unless another press or key comes first, with the browser menu kept shut: verified (14 touch tests; the three early-invocation Chromium cases).
  • A failed load keeps the table, drops the hold, returns the browser menu, warns once in development, and a later mount or invocation retries: verified (load-failure tests).
  • A test that expects the menu synchronously right after render has to wait for it: verified (the warm-up helper in four suites).
  • resolveContextActions keeps its export and no longer pulls the menu in: verified (the Table index re-exports it from the new helper module).
  • No public API change, no new props, exports or data attributes: verified (the generated surface of build, core and the seven themes has no row).
  • Action getters still resolve when the menu opens, and a loaded menu behaves as before: verified (getter path; row-expansion and sortable tests; the loaded-menu Chromium case).
  • The trigger module and the internal trigger mode are shared and not exported publicly: verified (the ContextMenu index and the package exports map).
  • The cell recognizes no gesture before load, and a held touch reaches the loaded detector in order, timed from its start: verified (the no-detector test; the deadline test).
  • Modules in the lazy graph import Core modules directly, and the seven item aliases have their own modules: verified (the single-bundle test passes; seven alias files).
  • The boundary check lists the two base modules and drops the stale Table row, with one new allowlist row at 0.0 KB: verified (script, record and printout).
  • The boundary check passes and prints about 50.5 KB eager for Table: verified (passes; 50.7 KB locally, within the stated tolerance).
  • The records cover each load path: verified for body cells; false for header cells (finding above).
  • The red-first detector test fails on the earlier port: the test exists and passes here; the earlier port was not run.
  • The listed record edits (base-code list, removed row and gap bullet, new row, refreshed costs, PR1 and its verification row, verified_by, Owns lines, FR10 note): verified.
  • 72 files and 1,388 tests pass in the Table, ContextMenu and DropdownMenu suites: verified (same counts).
  • 14 touch tests, and the load-failure test asserts one development warning: verified.
  • The boundary-check and single-bundle node tests pass: verified.
  • The Chromium cases pass, with Shift+F10 left to a Linux run: verified (all four pass in headless Chromium on Linux, Shift+F10 included).
  • Typecheck, ESLint, Prettier, the knowledge check and the changeset check pass: verified.
  • Overlap and land-path notes: process information, not a code claim.

Files (49):

  • Table/TableHeaderCell.tsx: the header-cell load moment (finding above).
  • Table/TableCellContextMenu.tsx, TableCell.tsx, tableContextMenu.tsx, tableContextActions.ts, index.ts and the row-expansion and sortable plugin sources: clear.
  • ContextMenu/ContextMenu.tsx, ContextMenuTrigger.tsx, index.ts, the seven alias modules and ContextMenu.test.tsx: clear.
  • The four DropdownMenu import edits: clear.
  • The import-boundaries, TableCell and ContextMenu records and the changeset: clear.
  • The boundary-check script and its test, the single-bundle test and the shared-identity baseline: clear.
  • The 18 other test, fixture and helper files: clear.

Automated review (maintainer link)

…s starts its menu load, as TableCell PR1 does
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9951ddf

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026

@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.

Request changes. The lazy cell menu holds up at this head, and the description now lists every changed record. One fix is needed because main has moved:

  • Regression: docs/specs/components/Table/TableHeaderCell.spec.md conflicts with main, where #12175 rewrote PR1 to give the header cell its cut-heading tooltip state ("Its only state is FR2's cut-heading tooltip") and added an FR2 tooltip verification row, while this head's PR1 still says the cell "holds no state"; merge main, keep that state sentence and row, and add the menu-load sentence and the early Shift+F10 row.

The merge is a new commit, so an engineering owner then records the spec decision for the new head by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Cells load their context menu only when they have actions: verified (the cell wrapper returns plain content without actions; no-load test).
  • A table page without actions loads about 23 to 25 KB less first-load gzip: consistent (the table reference page drops by about 25 KB in an esbuild build of both trees; the Vite, Rolldown and webpack matrix was not rerun).
  • A cell with actions renders its content at once and starts the load on its first client render after hydration: verified (wrapper render path; hydration test).
  • Content keeps its node, focus and state, and the trigger box does not move, when the menu attaches: verified (body and header scenario tests; Chromium box test).
  • An early right-click, Shift+F10 or long press is held, opens once on load, is dropped by a later press or key, and the browser menu stays shut: verified (touch tests, Chromium cases).
  • A touch before load is held as raw events and timed from its own start by the loaded menu's detector; the cell runs no recognizer: verified (touch tests with a detector spy).
  • A failed load keeps the table, returns the browser menu, warns once in development, and retries on a later mount, right-click or touch: verified (load-failure tests).
  • Tests that expect the menu synchronously right after render must wait: true.
  • resolveContextActions keeps its export and no longer reaches the menu; action getters still resolve on open: verified.
  • No public API change, no new props, exports or data attributes: verified (generated API surface: no row).
  • The trigger module carries no menu code and neither new module is public: verified.
  • The lazily loaded graph imports Core modules directly and each ContextMenu alias has its own module: verified (single-bundle test passes; seven alias modules).
  • The boundary check lists the two base modules, drops the stale Table row and adds one row at 0.0 KB: verified (check and its tests pass).
  • The interaction work sits in callbacks and the added Effects name the system they sync: true (the description counts the cell's two; ContextMenu's two new layout Effects name theirs too).
  • The lazy menu stays out of server markup and the hydrating render: verified.
  • The static page-graph and boundary-check figures: consistent (table about −25.6 KB and menu about +0.37 KB gzip; Table eager matches the record within its platform note).
  • Fourteen touch tests and the Chromium box, axe and first right-click case: verified.
  • Records changed are the import-boundaries, TableCell, ContextMenu and TableHeaderCell records, with their rubric results: verified.
  • Overlap and land-order statements: process claims, not checked against code.

Files:

  • .changeset/table-cell-lazy-context-menu.md: clear
  • docs/architecture/component-import-boundaries.md: clear
  • docs/specs/components/ContextMenu/ContextMenu.spec.md: clear
  • docs/specs/components/Table/TableCell.spec.md: clear
  • docs/specs/components/Table/TableHeaderCell.spec.md: conflicts with main; its PR1 contradicts main's PR1 (the finding above)
  • packages/core/src/ContextMenu/ContextMenu.test.tsx: clear
  • packages/core/src/ContextMenu/ContextMenu.tsx: clear
  • packages/core/src/ContextMenu/ContextMenuCheckboxItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuDivider.ts: clear
  • packages/core/src/ContextMenu/ContextMenuGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuSubMenu.ts: clear
  • packages/core/src/ContextMenu/ContextMenuTrigger.tsx: clear
  • packages/core/src/ContextMenu/index.ts: clear
  • packages/core/src/DropdownMenu/DropdownMenuDivider.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx: clear
  • packages/core/src/DropdownMenu/renderDropdownItems.tsx: clear
  • packages/core/src/Table/TableCell.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.loadFailure.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.modality.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.ssr.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.touch.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/TableHeaderCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableMenuWindowFocus.test.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.a11y.chromium.spec.ts: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.client.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.fixture.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.html: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.server.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.vite.mjs: clear
  • packages/core/src/Table/__tests__/menuLoadScenario.tsx: clear
  • packages/core/src/Table/__tests__/warmTableContextMenu.tsx: clear
  • packages/core/src/Table/index.ts: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.test.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.tsx: clear
  • packages/core/src/Table/tableContextActions.ts: clear
  • packages/core/src/Table/tableContextMenu.test.tsx: clear
  • packages/core/src/Table/tableContextMenu.tsx: clear
  • scripts/check-component-import-boundaries.mjs: clear
  • scripts/check-component-import-boundaries.test.mjs: clear
  • scripts/core-single-bundle.test.mjs: clear
  • scripts/shared-identity.baseline.json: clear

Automated review (maintainer link)

…xt-menu

TableHeaderCell PR1 keeps main's cut-heading tooltip state (FR2) and adds
the menu-load sentence; the verification map keeps main's FR2 tooltip row
and this branch's early Shift+F10 PR1 row.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f57e833

@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.

Request changes. The lazy cell menu holds up at this head, and the merge of main kept the header cell's tooltip state in its record. One fix is left, in the description:

  • The Writing rubric results say component:TableHeaderCell PR1 leaves the header cell with no state ("the cell still holds no state"), but at this head PR1 keeps FR2's cut-heading tooltip as the cell's only state (docs/specs/components/Table/TableHeaderCell.spec.md:129-130); correct that line.

A description edit needs no new commit, so the spec approval recorded for this head stays valid.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • A page whose Table cells have no actions no longer downloads the context menu: verified (the cell wrapper returns plain content without actions; no-load test; table reference page down 25,596 bytes gzip).
  • Table, TableCell and TableHeaderCell imports used to pull in ContextMenu, DropdownMenu's menu code and the touch sheet: verified (the base allowlist row and boundary printout).
  • About 23 to 25 KB less first-load gzip in Vite, Rolldown and webpack, about 21 %: consistent (an esbuild build of both trees measures 25.0 KB less; the bundler matrix was not rerun).
  • A cell with actions renders its content and trigger at once and starts the load on its first client render after hydration: verified (wrapper render path; server-render and hydration test).
  • Content keeps its node, focus and state, and the trigger box does not move, when the menu attaches: verified (body and header scenario tests; Chromium box case).
  • An early right-click, Shift+F10 or long press is held and opens once on load unless a press or key comes first, and the browser menu stays shut: verified (touch tests; Chromium cases).
  • A failed load keeps the table, drops the hold, returns the browser menu, and a later mount or invocation asks the loader again: verified (load-failure tests).
  • No public API change, no new props, exports or data attributes; getters resolve when the menu opens; a loaded menu behaves as before: verified (generated API surface has no row; getter path; suites pass).
  • The action helpers move to a dependency-free module and the public export is unchanged: verified.
  • The trigger module is shared by ContextMenu and the cell, the cell lazy-loads only the menu through the internal mode and the shared loader, and neither module is public: verified.
  • Before the menu attaches the cell recognizes no gesture, holds a right-click as a point and a touch as raw events, and the loaded detector times the press from the touch start: verified (detector-spy and deadline tests).
  • The lazily loaded graph imports Core modules directly and each ContextMenu alias has its own module: verified (single-bundle test; seven alias modules).
  • The boundary check lists the two base modules and the stale Table row is removed: verified.
  • The cited authority, including the two Effects the cell adds naming the system they sync: verified (ContextMenu's two new layout Effects name theirs too).
  • First-load and static-graph byte figures: consistent (esbuild here: table down 25,596 bytes, menu up 372 bytes, docs and form unchanged).
  • The boundary check passes and the record carries its Table eager figure: the check passes; the local printout differs from CI's on unchanged rows too, and CI has not run at this head.
  • The behavior tests listed (no recognizer before load, held press deadline, moved press, dropped hold, ported cases, Chromium box and axe): verified (present and passing).
  • Not covered: WebKit, a failed chunk in a real browser, focus-ring pixels: true.
  • Records changed and their rubric results: verified, except the header-cell line below.
  • The header-cell record's PR1 leaves the cell with no state: false (its PR1 keeps the cut-heading tooltip as the cell's only state).
  • The Table, ContextMenu and DropdownMenu suites pass: verified (73 files, 1,404 tests at this head, after the latest merge of main).
  • The new cell-menu tests (14 touch tests, one development warning), the node boundary and single-bundle tests, and the boundary check pass: verified.
  • The Chromium cases pass, and Shift+F10 needs a Linux run: verified (all four pass in headless Chromium on Linux, Shift+F10 included).
  • Typecheck, ESLint, Prettier, the knowledge-record check and the changeset check pass: verified (each exits 0 at this head).
  • Overlap and land order: process statements, not checked against code.
  • The release note (lazy only with actions; the saving; content at once; node, focus and state kept; early invocation held; failure fallback and retry; tests must wait; the helper export stays): verified, sizes consistent.

Files:

  • .changeset/table-cell-lazy-context-menu.md: clear
  • docs/architecture/component-import-boundaries.md: clear
  • docs/specs/components/ContextMenu/ContextMenu.spec.md: clear
  • docs/specs/components/Table/TableCell.spec.md: clear
  • docs/specs/components/Table/TableHeaderCell.spec.md: clear; the description misstates its PR1 (the finding above)
  • packages/core/src/ContextMenu/ContextMenu.test.tsx: clear
  • packages/core/src/ContextMenu/ContextMenu.tsx: clear
  • packages/core/src/ContextMenu/ContextMenuCheckboxItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuDivider.ts: clear
  • packages/core/src/ContextMenu/ContextMenuGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuSubMenu.ts: clear
  • packages/core/src/ContextMenu/ContextMenuTrigger.tsx: clear
  • packages/core/src/ContextMenu/index.ts: clear
  • packages/core/src/DropdownMenu/DropdownMenuDivider.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx: clear
  • packages/core/src/DropdownMenu/renderDropdownItems.tsx: clear
  • packages/core/src/Table/TableCell.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.loadFailure.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.modality.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.ssr.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.touch.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/TableHeaderCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableMenuWindowFocus.test.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.a11y.chromium.spec.ts: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.client.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.fixture.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.html: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.server.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.vite.mjs: clear
  • packages/core/src/Table/__tests__/menuLoadScenario.tsx: clear
  • packages/core/src/Table/__tests__/warmTableContextMenu.tsx: clear
  • packages/core/src/Table/index.ts: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.test.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.tsx: clear
  • packages/core/src/Table/tableContextActions.ts: clear
  • packages/core/src/Table/tableContextMenu.test.tsx: clear
  • packages/core/src/Table/tableContextMenu.tsx: clear
  • scripts/check-component-import-boundaries.mjs: clear
  • scripts/check-component-import-boundaries.test.mjs: clear
  • scripts/core-single-bundle.test.mjs: clear
  • scripts/shared-identity.baseline.json: clear

Automated review (maintainer link)

@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, so the required checks still have to pass before it merges. The description's Writing rubric line for the header-cell record now matches the record, which was the last open finding, and nothing else blocks.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • A page whose Table cells have no actions no longer downloads the context menu: verified (the cell wrapper returns plain content without actions; no-load test; table reference page down 25,596 bytes gzip).
  • Table, TableCell and TableHeaderCell imports used to pull in ContextMenu, DropdownMenu's menu code and the touch sheet: verified (the base allowlist row and the base cell imports).
  • About 23 to 25 KB less first-load gzip in Vite, Rolldown and webpack, about 21 %: consistent (an esbuild build of both trees measures 25.0 KB less, 21.4 %; the bundler matrix was not rerun).
  • A cell with actions renders its content and trigger at once and starts the load on its first client render after hydration: verified (the lazy menu renders only once hydration is over; server-render and hydration test).
  • Content keeps its node, focus and state, and the trigger box does not move, when the menu attaches: verified (body and header scenario tests; Chromium box case).
  • An early right-click, Shift+F10 or long press is held and opens once on load unless a press or key comes first, and the browser menu stays shut: verified (touch tests; Chromium cases).
  • A failed load keeps the table, drops the hold, returns the browser menu, and a later mount or invocation asks the loader again: verified (load-failure tests).
  • No public API change, no new props, exports or data attributes; getters resolve when the menu opens; a loaded menu behaves as before: verified (generated API surface has no row; getter path; suites pass).
  • The action helpers move to a dependency-free module and the public export is unchanged: verified.
  • The trigger module is shared by ContextMenu and the cell, the cell lazy-loads only the menu through the internal mode and the shared loader, and neither module is public: verified (no exports entry reaches them).
  • Before the menu attaches the cell recognizes no gesture, holds a right-click as a point and a touch as raw events, and the loaded detector times the press from the touch start: verified (detector-spy and deadline tests).
  • The lazily loaded graph imports Core modules directly and each ContextMenu alias has its own module: verified (single-bundle test; seven alias modules).
  • The boundary check lists the two base modules and the stale Table row is removed: verified.
  • The cited authority, including the two Effects the cell adds naming the system they sync: verified (ContextMenu's two new layout Effects name theirs too).
  • First-load and static-graph byte figures, and the 7 requests under Rolldown: consistent (esbuild here: table down 25,596 bytes, menu up 372 bytes, docs and form unchanged); the bundler figures were not rerun.
  • The boundary check passes and the record carries its Table eager figure: the check passes here; its local printout (51.9 KB) differs from the record's CI figure (50.5 KB), and CI has not run at this head.
  • The behavior tests listed (no recognizer before load, held press deadline, moved and strayed presses, dropped hold, ported cases, Chromium box and axe): verified (present and passing).
  • Not covered: WebKit, a failed chunk in a real browser, focus-ring pixels: true.
  • Records changed and their rubric results, including the header-cell record keeping the cut-heading tooltip as its only state: verified.
  • The Table, ContextMenu and DropdownMenu suites pass after merging main: verified (73 files, 1,404 tests at this head; the stated 72 files and 1,388 tests predate the latest merge of main).
  • The new cell-menu tests (14 touch tests, one development warning), the node boundary and single-bundle tests, and the boundary check pass: verified.
  • The Chromium cases pass, and Shift+F10 needs a Linux run: verified (all four pass in headless Chromium on Linux, Shift+F10 included).
  • Typecheck, ESLint, Prettier, the knowledge-record check and the changeset check pass: verified (each exits 0 at this head).
  • Overlap and land order: process statements, not checked against code.
  • The release note (lazy only with actions; the saving; content at once; node, focus and state kept; early invocation held; failure fallback and retry; tests must wait; the helper export stays): verified, sizes consistent.

Files:

  • .changeset/table-cell-lazy-context-menu.md: clear
  • docs/architecture/component-import-boundaries.md: clear
  • docs/specs/components/ContextMenu/ContextMenu.spec.md: clear
  • docs/specs/components/Table/TableCell.spec.md: clear
  • docs/specs/components/Table/TableHeaderCell.spec.md: clear; the description now matches its PR1
  • packages/core/src/ContextMenu/ContextMenu.test.tsx: clear
  • packages/core/src/ContextMenu/ContextMenu.tsx: clear
  • packages/core/src/ContextMenu/ContextMenuCheckboxItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuDivider.ts: clear
  • packages/core/src/ContextMenu/ContextMenuGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioGroup.ts: clear
  • packages/core/src/ContextMenu/ContextMenuRadioItem.ts: clear
  • packages/core/src/ContextMenu/ContextMenuSubMenu.ts: clear
  • packages/core/src/ContextMenu/ContextMenuTrigger.tsx: clear
  • packages/core/src/ContextMenu/index.ts: clear
  • packages/core/src/DropdownMenu/DropdownMenuDivider.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuItem.tsx: clear
  • packages/core/src/DropdownMenu/DropdownMenuSubMenu.tsx: clear
  • packages/core/src/DropdownMenu/renderDropdownItems.tsx: clear
  • packages/core/src/Table/TableCell.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.loadFailure.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.modality.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.ssr.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.touch.test.tsx: clear
  • packages/core/src/Table/TableCellContextMenu.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/TableHeaderCellContextMenu.test.tsx: clear
  • packages/core/src/Table/TableMenuWindowFocus.test.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.a11y.chromium.spec.ts: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.client.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.fixture.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.html: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.server.tsx: clear
  • packages/core/src/Table/__tests__/TableCellMenuLoad.vite.mjs: clear
  • packages/core/src/Table/__tests__/menuLoadScenario.tsx: clear
  • packages/core/src/Table/__tests__/warmTableContextMenu.tsx: clear
  • packages/core/src/Table/index.ts: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.test.tsx: clear
  • packages/core/src/Table/plugins/sortable/useTableSortable.tsx: clear
  • packages/core/src/Table/tableContextActions.ts: clear
  • packages/core/src/Table/tableContextMenu.test.tsx: clear
  • packages/core/src/Table/tableContextMenu.tsx: clear
  • scripts/check-component-import-boundaries.mjs: clear
  • scripts/check-component-import-boundaries.test.mjs: clear
  • scripts/core-single-bundle.test.mjs: clear
  • scripts/shared-identity.baseline.json: clear

Automated review (maintainer link)

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 18, 2026
…xt-menu

ContextMenu keeps this branch's external-trigger surface and takes main's
sheet choice (MenuBottomSheet only when the menu has items).
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d5a198d

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026

@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, so the required checks still have to pass before it merges.

The lazy cell menu holds up after the merge of main: a table whose cells have no actions loads no menu code (the table reference page drops about 25 KB gzip), an early right-click, Shift+F10 or long press opens the menu once, a loaded menu looks and behaves as before, and the record edits for the load moment, the allowlist row and ContextMenuTrigger are approved for this head. One small note: the description's Testing tally (72 files, 1,388 tests) now reads 75 files and 1,407 tests after the merges of main.

Claims and files checked

Review mode: incremental; reason: none

  • Release note, cells load their menu only when they have actions: verified (TableCellContextMenu.tsx:214, no-load test in TableCellContextMenu.test.tsx).
  • Release note, a Table, Text and Button page loads about 23 to 25 KB less gzip: consistent (esbuild reference page −25,321 B gzip here; the Vite, Rolldown and webpack matrix was not rerun).
  • Release note, content renders at once, the load starts on the first client render, and content keeps its node, focus and state: verified (TableCellContextMenu.tsx:380-388, the body and header scenario tests, Chromium box test).
  • Release note, an early right-click, Shift+F10 or long press is held, opens once unless another press or key comes first, and the browser menu stays shut: verified (touch tests, Chromium early-invocation cases).
  • Release note, a failed load keeps the table, returns the browser menu and asks the loader again later: verified (TableCellContextMenu.loadFailure.test.tsx).
  • Release note, a test that expects the menu synchronously must wait, and resolveContextActions keeps its export without the menu: verified (warmTableContextMenu.tsx, Table/index.ts:63).
  • Description, no public API change and no new props, exports or data attributes: verified (API surface generator, zero rows; source diff).
  • Description, action getters still resolve when the menu opens, and a loaded menu behaves as before: verified (tableContextMenu.tsx:89, Table, ContextMenu and DropdownMenu suites, identical frames).
  • Description, the lazy graph imports modules directly and the alias modules keep an alias import from reaching the whole menu: verified (core-single-bundle.test.mjs, ContextMenu/index.ts:18-28).
  • Description, the boundary check gains two base modules and loses the stale Table row: verified (check-component-import-boundaries.mjs, the boundary check holds).
  • Description, static-graph table −25,449 B and menu +351 B gzip: consistent (−25,321 B and +359 B here).
  • Description, the check prints Table eager at 50.5 KB: not reproduced locally (51.9 KB here; the record notes that local runs differ).
  • Description, the vitest tally: stale (75 files and 1,407 tests pass now; non-blocking).
  • Description, the Chromium box-and-axe and early-invocation cases pass: verified (4 of 4, Shift+F10 included).
  • Description, typecheck, ESLint, Prettier, knowledge and changeset checks pass: verified.
  • Description, the records changed and the authority list: verified against the four record diffs and the exact-head spec approval.
  • Files, ContextMenu.tsx, ContextMenuTrigger.tsx, ContextMenu/index.ts, the seven alias modules and ContextMenu.test.tsx: clear (ContextMenuTrigger is named by the approved component:ContextMenu edit).
  • Files, TableCellContextMenu.tsx, TableCell.tsx, TableHeaderCell.tsx, tableContextMenu.tsx, tableContextActions.ts, Table/index.ts and the sortable and row-expansion plugins: clear.
  • Files, the four DropdownMenu modules: clear (import paths only).
  • Files, the five TableCellContextMenu test files, TableHeaderCellContextMenu.test.tsx, TableMenuWindowFocus.test.tsx, tableContextMenu.test.tsx, the two plugin tests and the eight __tests__ fixtures, helpers and Chromium spec: clear.
  • Files, the four records and the release note: clear (owner-approved at this head).
  • Files, the boundary check, its test, the single-bundle test and the shared-identity baseline: clear.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — d5a198d6 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

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:0 Astryx fix-loop lane 0 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant