Skip to content

feat(BaseTypeahead, Typeahead): a menu config with listbox and dialog roles, and an open handle - #10544

Merged
cixzhang merged 13 commits into
mainfrom
feat/typeahead-menu
Nov 10, 2026
Merged

cixzhang merged 13 commits into
mainfrom
feat/typeahead-menu

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #10544 → #10624 → #10625 → #10847
Merge group: #10544, #10624, #10625 (lands together; none merges alone)

Who this helps

Keyboard and screen-reader users of a custom typeahead. Builders who need a header, a hint, or an editor next to typeahead results build their own popup today, and PowerSearch's filter editor shows the result: after a person picks a field, focus lands in a popup with no role and no name, and Escape after editing a token sends focus to the search box instead of back to the token. With this change, BaseTypeahead keeps the menu's layer and lets the caller fill it through one menu config that carries the role, the name and the content together. Owner decision: row 49, "49 A".

What changed

  • menu on BaseTypeahead:
    • {role: 'listbox', render} (the default, render optional) shows the result list. render receives the list, the query, the busy state, whether the search was empty (isEmptySearch), and close, and places information such as a header or a key hint around the list. Anything a person acts on stays a result, so the arrow keys reach it. A control rendered outside the list draws one development warning (development builds only).
    • {role: 'dialog', label, render} shows content that takes focus. The popover itself is the dialog: it runs through usePopover's dialog role, so it is named by label, modal, takes initial focus and restores it. The input gets aria-haspopup="dialog" and no active descendant. Only the handle opens it: typing, focus or ArrowDown in the field don't. It does not close when the query empties, a load finds nothing, or the input loses focus; a press outside the field and the dialog closes it.
    • Astryx keeps the layer either way: position, top layer, outside press, Escape, and the ARIA wiring.
  • Focus return: when a dialog-role menu closes (Escape, an outside press, close), focus returns to the element focused when the menu was asked to open (open() called, or the menu shown), or to the input when that element is gone. Three package-internal options on the shared focus trap and usePopover carry this: the input fallback, the opener read at open(), and a focus-return hook that lets BaseTypeahead keep the list closed when focus comes back to the input, however late close() runs.
  • Open handle: handleRef with open() and close(), and the existing onOpenChange reports each change. There is no controlled isOpen (as in ComplexSelector), and no onTokenActivate. open() runs after the commit it is called in, so it uses the menu the caller rendered in the same event. A pick whose onChange calls open() keeps the menu open, so switching the list to a dialog keeps the same layer on the same anchor. If the menu stays a listbox, focus returns to the input and the list loads its focus entries, or closes when there are none.
  • Typeahead forwards menu and handleRef. While its token shows, a dialog menu's close returns focus to the token's button (BaseTypeahead's restore point asks the field for that stand-in through an internal context), for Escape, close() and a close() after an await. Tokenizer's forwarding (with FR28 and token focus return) is feat(Tokenizer): forward BaseTypeahead's menu, onOpenChange and open handle #10624, and the CLI block is feat(cli): a BaseTypeaheadMenu block #10625, in the same merge group.
  • Docs: the BaseTypeahead Menu story builds a filter field: a heading and a key hint around the list, and a pick or a filter button opens a dialog that edits the value. The matching CLI block is feat(cli): a BaseTypeaheadMenu block #10625.
  • Records:
    • BaseTypeahead: menu and open handle concept rows, FR13–FR16, AR6, ORD3, an allowed-variation line, DEC-1 (row 49 A), DEC-2 (no controlRef on TextInput: that route handles none of the accessibility a typeahead needs; a custom typeahead uses BaseTypeahead with anchorRef and menu), and the not-decided note: "menu styling overrides may be added later (for example part styling or theme targets); out of scope now". The contract table and compatibility now say the change is additive; FR1, FR4 and AR1 are qualified by role; the anatomy names Menu content and Menu dialog.
    • Typeahead: FR11. (Tokenizer's FR28 is in feat(Tokenizer): forward BaseTypeahead's menu, onOpenChange and open handle #10624.)
    • Each new requirement has a verification row.
  • Not in this PR: moving PowerSearch onto the dialog-role menu, which is a separate follow-up after this merges.

Changeset: [feat] patch for Core.

Verification

  • Real Chrome (a local Storybook build of this branch, the Menu story, Neutral theme, headless Chromium on this machine, 1280 and 375 px):

    • The arrow keys move the active option Status → Priority → Owner, with "Filter by" and the key hint around the list. Focus stays in the input, and there is one listbox.
    • Enter on Priority switches the same open layer (same id) to the dialog "Priority filter". In 40 animation frames sampled from the key press, the layer is open in every frame and its top never moves. Focus moves to the first radio, and the input reads aria-haspopup="dialog".
    • After Apply, Enter on the "Priority: High" filter button reopens the dialog, and Escape closes it with focus back on that button.
    • A press outside the field and the dialog closes the dialog.
  • Tests: BaseTypeahead.menu.test.tsx covers:

    • information around the list, with one listbox and every result reached;
    • the warning for a control outside the list;
    • the named dialog opened from the handle, with focus moving in;
    • Escape returning focus to the opener, and to the input when the opener is gone;
    • the dialog staying open on an emptied query and a blur, closing on an outside press, and opening only from the handle;
    • a pick that calls open() and stays a listbox (reload, or close with focus in the input);
    • a pick switching to a dialog with no close in between;
    • closing a dialog a pick opened (Escape, close(), close() after an await, an outside press) leaving the list closed;
    • Typeahead forwarding (Tokenizer's is in feat(Tokenizer): forward BaseTypeahead's menu, onOpenChange and open handle #10624).

    BaseTypeaheadMenu.a11y.chromium.spec.ts runs the keyboard, role-switch, focus-return and outside-press cases in pr-a11y. The Typeahead, Tokenizer, PowerSearch, Popover, hooks and processEnvTypes suites pass (2127).

  • Other checks: lint; the Core and CLI template typechecks show no errors in the changed files; knowledge; the Core build; and the API report (only this change's rows).

Writing rubric results

Covers component:BaseTypeahead FR13–FR16, AR6, ORD3, DEC-1 and DEC-2, and component:Typeahead FR11.

R1 narration: none; each line states what the component does.
R2 research: none in the records; the measurements are here.
R3 evidence: verification cells name tests and the story spec, not pull requests.
R4 rejected alternatives: DEC-1 records the spread-props layer and typed layer options; DEC-2 records a controlRef on TextInput.

… an open handle

BaseTypeahead takes `menu`, which chooses what its anchored menu shows while
Astryx keeps the layer (position, top layer, outside press, Escape, focus
return, ARIA). The listbox role may put information around the result list;
anything a person acts on stays a result, and a control outside the list
warns in development. The dialog role shows content that takes focus in a
dialog named by `label`; closing it returns focus to the element focused when
it opened, or to the input, and it does not close on an empty query or an
input blur. `handleRef` exposes open() and close(); onOpenChange reports
changes; there is no controlled open state. open() runs after the commit it
is called in, and a pick whose onChange calls open() keeps the menu open, so a
role switch keeps the same layer with no close in between. Typeahead and
Tokenizer forward the menu (Tokenizer in its inline presentation, with
onOpenChange and open/close on its handle). Records: BaseTypeahead FR13-FR16,
AR6, ORD3 and DEC-1 (row 49 A), Typeahead FR11, Tokenizer FR28. Adds the
BaseTypeaheadMenu CLI block (the docsite example), a Menu story and a
Chromium spec.
@vercel

vercel Bot commented Nov 7, 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 10, 2026 3:02am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 7, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 7, 2026
@astracat-bot

astracat-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 10, 2026, 6:45 AM UTC

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

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 44c9f6f

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Typeahead 80.8 kB (+1.1 kB) · 12.4 kB CSS (0) — ✓ · ✓ · ✓
PowerSearch 289.3 kB (+966 B) · 24.2 kB CSS (0) — — · — · —
Tokenizer 92.4 kB (+908 B) · 18.8 kB CSS (0) — — · — · —
48 more components
Component Size LoC Visual · A11y · RTL
BaseTypeahead 72.1 kB (+900 B) · 10.9 kB CSS (0) — ✓ · ✓ · ✓
Selector 100.4 kB (+200 B) · 17.4 kB CSS (0) — — · — · —
MultiSelector 95.2 kB (+198 B) · 16.8 kB CSS (0) — — · — · —
TopNavMenu 74.9 kB (+188 B) · 11.2 kB CSS (0) — — · — · —
TabMenu 72.1 kB (+181 B) · 11.1 kB CSS (0) — — · — · —
DateInput 187.2 kB (+175 B) · 17.0 kB CSS (0) — — · — · —
DateTimeInput 208.9 kB (+175 B) · 18.7 kB CSS (0) — — · — · —
SideNavItem 70.8 kB (+175 B) · 11.1 kB CSS (0) — — · — · —
lab/CommentComposer 152.4 kB (+174 B) · 1.9 kB CSS (0) — — · — · —
TopNavHeading 75.5 kB (+173 B) · 11.2 kB CSS (0) — — · — · —
Pagination 110.4 kB (+170 B) · 17.8 kB CSS (0) — — · — · —
ChatComposerInput 76.4 kB (+169 B) · 11.3 kB CSS (0) — — · — · —
SideNavHeading 75.9 kB (+169 B) · 11.3 kB CSS (0) — — · — · —
BreadcrumbItem 85.0 kB (+168 B) · 12.1 kB CSS (0) — — · — · —
ChatComposerTokenElement 76.4 kB (+167 B) · 11.3 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 278.7 kB (+166 B) · 454 B CSS (0) — — · — · —
lab/ChatEmojiPicker 106.3 kB (+163 B) · 773 B CSS (0) — — · — · —
ChatComposer 78.7 kB (+162 B) · 12.0 kB CSS (0) — — · — · —
DateRangeInput 93.0 kB (+161 B) · 12.5 kB CSS (0) — — · — · —
TopNavMegaMenu 70.0 kB (+157 B) · 11.8 kB CSS (0) — — · — · —
MoreMenu 97.7 kB (+156 B) · 17.6 kB CSS (0) — — · — · —
lab/TourStep 97.6 kB (+153 B) · 590 B CSS (0) — — · — · —
lab/Comments 352.2 kB (+149 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 345.3 kB (+146 B) · 2.4 kB CSS (0) — — · — · —
Popover · Storybook 91.2 kB (+145 B) · 14.2 kB CSS (0) 1,549 (+9) ✓ · ✓ · ✓
lab/TransferListSelector 109.9 kB (+144 B) · 1.4 kB CSS (0) — — · — · —
lab/ChatReactionBar 107.4 kB (+142 B) · 1.1 kB CSS (0) — — · — · —
ComplexSelector 71.3 kB (+139 B) · 11.8 kB CSS (0) — — · — · —
DropdownMenu 97.4 kB (+135 B) · 17.6 kB CSS (0) — — · — · —
Drawer 50.8 kB (+116 B) · 8.3 kB CSS (0) — — · — · —
ContextMenu 109.0 kB (+1 B) · 17.4 kB CSS (0) — — · — · —
AlertDialog 105.6 kB (0) · 14.6 kB CSS (0) — — · — · —
AppShell 91.6 kB (0) · 13.5 kB CSS (0) — — · — · —
BottomSheet 68.3 kB (0) · 7.7 kB CSS (0) — — · — · —
Dialog 24.0 kB (0) · 6.9 kB CSS (0) — — · — · —
DropdownMenuSubMenu 70.4 kB (0) · 9.7 kB CSS (0) — — · — · —
Lightbox 122.6 kB (0) · 10.6 kB CSS (0) — — · — · —
MobileNav 70.7 kB (0) · 10.6 kB CSS (0) — — · — · —
SideNav 114.7 kB (0) · 11.4 kB CSS (0) — — · — · —
Table 125.6 kB (0) · 18.3 kB CSS (0) — — · — · —
TableCell 110.2 kB (0) · 17.9 kB CSS (0) — — · — · —
TimeInput 162.5 kB (0) · 16.0 kB CSS (0) — — · — · —
TopNav 72.4 kB (0) · 10.9 kB CSS (0) — — · — · —
TypeaheadItem 6.4 kB (0) · 3.6 kB CSS (0) — ✓ · ✓ · ✓
BottomSheetSwitcher 17.9 kB (−1 B) · 3.4 kB CSS (0) — — · — · —
CommandPalette 73.4 kB (−1 B) · 12.7 kB CSS (0) — — · — · —
Markdown 188.4 kB (−1 B) · 20.6 kB CSS (0) — — · — · —
TableHeaderCell 109.8 kB (−1 B) · 17.7 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.24 MB packed (+9.3 kB); no new dependencies.

API changes: core +12 · ~0 · −0

Committed API report behind this build: cli 29 rows, core 36 rows; run pnpm api:report.

12 API changes (advisory)
Package Where Signature Usage
+ core . · Components · component BaseTypeahead prop handleRef?: React.Ref<BaseTypeaheadHandle> <BaseTypeahead handleRef={…} />
+ core . · Components · component BaseTypeahead prop menu?: BaseTypeaheadMenu <BaseTypeahead menu={…} />
+ core . · Components · component Typeahead prop handleRef?: React.Ref<BaseTypeaheadHandle> <Typeahead handleRef={…} />
+ core . · Components · component Typeahead prop menu?: BaseTypeaheadMenu <Typeahead menu={…} />
+ core . · Types · interface BaseTypeaheadDialogMenuInfo interface BaseTypeaheadDialogMenuInfo import type {BaseTypeaheadDialogMenuInfo} from '@astryxdesign/core'
+ core . · Types · interface BaseTypeaheadHandle interface BaseTypeaheadHandle import type {BaseTypeaheadHandle} from '@astryxdesign/core'
+ core . · Types · interface BaseTypeaheadListboxMenuInfo interface BaseTypeaheadListboxMenuInfo import type {BaseTypeaheadListboxMenuInfo} from '@astryxdesign/core'
+ core . · Types · type BaseTypeaheadMenu type BaseTypeaheadMenu = { role: 'listbox'; render?: (info: BaseTypeaheadListboxMenuInfo) => ReactNode } | { role: 'dialog'; label: string; render: (info: BaseTypeaheadDialogMenuInfo) => ReactNode } import type {BaseTypeaheadMenu} from '@astryxdesign/core'
+ core ./Typeahead · Also exported from an earlier entry point · BaseTypeaheadDialogMenuInfo BaseTypeaheadDialogMenuInfo (.) import {BaseTypeaheadDialogMenuInfo} from '@astryxdesign/core/Typeahead'
+ core ./Typeahead · Also exported from an earlier entry point · BaseTypeaheadHandle BaseTypeaheadHandle (.) import {BaseTypeaheadHandle} from '@astryxdesign/core/Typeahead'
+ core ./Typeahead · Also exported from an earlier entry point · BaseTypeaheadListboxMenuInfo BaseTypeaheadListboxMenuInfo (.) import {BaseTypeaheadListboxMenuInfo} from '@astryxdesign/core/Typeahead'
+ core ./Typeahead · Also exported from an earlier entry point · BaseTypeaheadMenu BaseTypeaheadMenu (.) import {BaseTypeaheadMenu} from '@astryxdesign/core/Typeahead'

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 15dd368

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
…n() opens it

Addresses review on the menu config:
- An outside press closes a dialog-role menu: the outside-press watch finds
  the layer from the element the input controls, in its own root, instead of
  the list the dialog replaces.
- Only the handle opens a dialog-role menu; a search, focus load, focus or
  ArrowDown leaves it closed, so typing stays in the field.
- The dialog role drives usePopover (role, dialogLabel, hasAutoFocus): the
  popover is the named, modal dialog, takes initial focus and restores it. The
  shared focus trap gains a restore fallback, used when the element focused at
  open is gone or was the page, and BaseTypeahead passes its input.
- A pick that calls open() and stays a listbox returns focus to the input and
  loads the focus entries, or closes when there are none.
- `hasNoResults` is now `isEmptySearch` (spec:AST-056 vocabulary); the
  outside-list warning runs in development only.
- Records: contract-at-a-glance and compatibility say the change is additive;
  FR1, FR4 and AR1 are qualified by role; FR14 and FR16 state the open and
  pick rules; anatomy names Menu content and Menu dialog; verification rows
  name the new tests and the Chromium outside-press case.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 7, 2026 19:12
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 2d4bded

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 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.

Changes requested. The dialog role now runs through the shared popover and focus trap, and the earlier outside-press, typing, focus-copy and keep-open findings are fixed; four issues remain:

  • Miss: in a field with hasEntriesOnFocus (the Menu story and the BaseTypeaheadMenu block), closing a dialog that a pick opened returns focus to the input and the field list opens again, so Escape needs two presses and a press outside leaves the list open; please keep that focus return from opening the list, deciding it in the close callback, and add tests for Escape, close() and an outside press after a pick.
  • The edit to Tokenizer.spec.md:64 splices the FR28 sentence into the middle of the 'popover' | 'bottom-sheet' | 'adaptive' union and turns its escaped pipes into cell separators, so the rendered "Public contract" row loses the rest of the released contract; please restore that row and append the sentence after DEC-2.
  • BaseTypeahead.tsx:1861 reads process.env.NODE_ENV without a declaration, which fails processEnvTypes.test.ts in CI (test-ui (4/4)); please gate the warning on the dev flag utils/devWarning.ts already owns, or declare process as that file does.
  • Miss: the new BaseTypeaheadMenu block is missing from internal/shadcn-registry/routes.lock.json and from the CLI search goldens, which fails docsite-build, docsite-test and test-node (3/4); please refresh the lock with UPDATE_SHADCN_ROUTE_LOCK=1 node apps/docsite/scripts/generate-data.mjs and update the goldens.

Smaller record and comment points are inline. The record fix needs a fresh /approve-spec on the new commit.

[Automated review]

… CI fixes

- Closing a dialog-role menu that a pick opened (Escape, close(), an outside
  press) returns focus to the input without opening the list again, decided
  in the close callback, as a pick's own focus return already does. Tests
  cover Escape, close() and an outside press in a hasEntriesOnFocus field.
- The outside-list warning gates on a declared build flag, as
  utils/devWarning.ts does, so processEnvTypes passes.
- Tokenizer.spec: the Public contract row is main's, with the FR28 sentence
  appended; FR28 gains its Status cell.
- BaseTypeahead.spec: AR6 says aria-controls names the layer that holds the
  dialog; FR14 names what the dialog render receives; FR15 says a focus
  return does not open the list.
- The BaseTypeaheadMenu block joins the ShadCN route lock and the CLI search
  goldens.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec fd768d0

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 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.

Changes requested. The earlier Escape and outside-press reopen, the Tokenizer contract row, the process.env type check, and the route lock and CLI goldens are fixed; three issues remain:

  • A close() that runs after an await (an editor that saves first) still reopens the field list in a hasEntriesOnFocus field, because the reopen guard expires on a 0 ms timer before the focus return runs; please tie the guard to the focus return itself and add a test that closes after an await.
  • Miss: a Tokenizer token whose button calls open() gets no focus back on Escape, because the field's click handler focuses the input before the deferred open records its opener, so Tokenizer FR28's "Escape returns focus to that token" does not hold; please record the opener when open() is called, or keep the wrapper click from refocusing the input on a token's own control, and add a Tokenizer test with a renderToken button.
  • The pull request now counts 2,080 authored lines (2,152 changed, less 72 generated), over the 2,000-line limit with no exemption; please move the CLI BaseTypeaheadMenu block, or the Typeahead and Tokenizer forwarding, into a follow-up pull request.

The review links the Chromium evidence for both behavior issues; one smaller comment note is inline.

[Automated review]

… open(); Tokenizer and CLI block move out

- The dialog's close moves focus through the focus trap's new internal
  restoreFocusTo hook, so BaseTypeahead knows which focus is the return
  and keeps the list closed, however late close() runs (after an await).
- open() records the element focused when it is called, and the menu
  returns focus there (usePopover's internal getOpener), so a click's own
  handlers that move focus first no longer take the opener.
- To stay within the size limit, Tokenizer's forwarding (menu,
  onOpenChange, the handle's open and close, FR28) and the BaseTypeaheadMenu
  CLI block, with its route-lock and golden entries, move to follow-up pull
  requests. The Menu story keeps the example.
- Test: close() after an await.

@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 awaited close() focus fix works, and one size issue remains.

  • The pull request is now 2,109 authored lines (1,945 before the latest commit), over the 2,000-line limit, and the stack exemption does not apply because #10624 and #10625 target feature branches rather than main and #10624 does not contain this head; bring this pull request to 2,000 authored lines or fewer, or make the stack hold so that each pull request targets main and contains the one below.

A dialog-role menu in a Typeahead with a value now returns focus to the Token's button for Escape, close() and an awaited close(), and the new cases fail on the previous revision and pass here. The record changes are approved for this head. Small leftovers can ride along: the changeset still ends with a semicolon, and the description mentions a CLI changeset that this pull request does not include.

[Automated review]

Comment on lines +574 to +575
// While the token shows, the input is hidden and out of the tab order, so a
// dialog-role menu returns focus to the token's button instead of the input.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): one 28-word sentence. Suggested: "The token hides the input and takes it out of the tab order. A dialog menu's focus return goes to the token's button."

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 8c593c0

@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: build, test, docsite-test and the new Chromium spec have not run on this head yet.

The size request from the last review no longer applies, because the stack #10544 → #10624 → #10625 now holds and this pull request lands with it; the record changes are approved for this head, and the menu's listbox and dialog roles, its focus return and the open handle all have passing tests.

Optional cleanups: the changeset ends with a semicolon (.changeset/typeahead-menu.md:5), and four new comments run past the comment style's sentence length.

[Automated review]

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

This pull request is reviewed as part of its stack; see the review on #10625.

…ctive option

The list loads its entries after the click, and Enter and the arrow keys
act on the active option, so the sibling pick tests raced the same way the
Escape test did. A shared openList() waits for the 'Status' option to be
marked active before any key. Test-only: no product source changes.
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 1f58a0e

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

This pull request is reviewed as part of its stack; see the review on #10625.

…angeset sentence

CI's strict promise-function-async rule rejected the non-async callbacks
passed to expect.poll. Test and changeset text only.

@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 menu config and the open handle behave as the approved BaseTypeahead and Typeahead records describe, and one size issue remains.

  • At 2,126 authored lines this pull request is over the 2,000-line review limit, and the stack exemption does not apply because #10624's head does not contain this head's latest commit; merge this head into #10624 (and #10624 into #10625) so the declared stack holds again, or move the Typeahead forwarding into its own pull request.

Once the stack holds, the size is only a non-blocking note. The long comments flagged earlier at BaseTypeahead.tsx:990-993, :1041-1044, :1536-1537 and Typeahead.tsx:574-575 remain optional rewrites.

[Automated review]

The stack's top conflicted with main in the CLI goldens; main is merged at
the bottom and carried up, so each PR's increment over the one below stays
its own change.
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 910d188

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec e26f00e

@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 menu config and the open handle behave as the approved BaseTypeahead and Typeahead records describe, CI is green on this head, and the size limit no longer applies now that the stack #10544 → #10624 → #10625 holds; one mechanical fix remains.

  • Newly live check: TypeaheadProps.menu and TypeaheadProps.handleRef (Typeahead) are outside this pull request's scope (BaseTypeahead), so name Typeahead in the scope, for example feat(BaseTypeahead, Typeahead): … or a ## Scope section with Components: BaseTypeahead, Typeahead, since the approved component:Typeahead FR11 already records the owner decision.

The earlier dialog-close finding is fixed on this head, and the comment-wording suggestions in the earlier inline threads are optional.

[Automated review]

cixzhang added a commit that referenced this pull request Nov 9, 2026
@cixzhang cixzhang changed the title feat(BaseTypeahead): a menu config with listbox and dialog roles, and an open handle feat(BaseTypeahead, Typeahead): a menu config with listbox and dialog roles, and an open handle Nov 9, 2026
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec e26f00e

@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: the menu config and the handleRef open handle behave as the approved BaseTypeahead and Typeahead records describe, CI is green on this head, and the earlier scope finding is resolved now that the title names Typeahead.

  • Optional: the long comments in the earlier inline threads (BaseTypeahead.tsx:990-993, :1041-1044, :1536-1537 and Typeahead.tsx:570-571) can still be split into short sentences that keep only the reason.

[Automated review]

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec e26f00e

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 44c9f6f

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

This pull request is reviewed as part of its stack; see the review on #10847.

@cixzhang
cixzhang merged commit 0b39dd9 into main Nov 10, 2026
117 of 120 checks passed
@github-actions
github-actions Bot deleted the feat/typeahead-menu branch November 11, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 44c9f6f4 Deployed Nov 10, 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant