Skip to content

finding(docs): overlay/menubar.mdx publishes an invented MenubarItem interface — it is what taught the fixture its wrong spellings #6521

Description

@os-support-ai

Found while implementing #6249 (repairing the menubar demo's array shortcut and its two blank-row separators). Filed unassigned and out of that card's fence: #6249's triage ruling scopes it to "one small fixture PR", and its dispatch says to file anything found outside the fixture rather than widen the PR.

⚠️ content/docs/components/overlay/menubar.mdx is currently held by open PR #6345, which rewrites the handler line in this same block. Whoever picks this up should sequence after that PR lands.

What was measured, at 50f987f9a

The page's ## Schema section publishes this:

interface MenubarItem {
  label?: string;
  value?: string;
  icon?: string;
  shortcut?: string[];
  type?: 'separator';
  disabled?: boolean;
}

No such interface exists. MenubarMenu.items is typed MenuItem[] (packages/types/src/overlay.ts:417-425), and the shipped MenuItem (overlay.ts:330-359, mirrored at zod/overlay.zod.ts:131-141) disagrees with the published block on five of its six lines:

taught on the page actually shipped
label?: string label: stringrequired (overlay.ts:334, z.string() at overlay.zod.ts:133)
value?: string not declared at all
shortcut?: string[] shortcut?: string (overlay.ts:350, overlay.zod.ts:137)
type?: 'separator' separator?: boolean (overlay.ts:358, overlay.zod.ts:139)
(absent) children?: MenuItem[] — real, and the renderer draws submenus from it
icon?: string, disabled?: boolean ✅ these two match

Also on the same block: MenubarSchema.menus is taught as required, but is declared menus?: MenubarMenu[] (overlay.ts:436, overlay.zod.ts:179).

Excluded from this card: the onSelect?: string | ActionConfig line. That is the handler question PR #6345 and #6346 already own — this card should not touch it.

Why this is worth a card rather than a note

This block is the producer of the defect #6249 exists to end. The fixture wrote "shortcut": ["Ctrl","T"] and {"type":"separator"} because the page next to it declares exactly those two spellings. Repairing the fixture alone leaves the page teaching the wrong shapes one screen below the corrected demo — which is precisely the failure #6157's own test header records in reverse ("#6143 round 2 had just corrected the PROSE on those same pages; the demo rendered beside the prose still contradicted it").

Under AGENTS.md #0.1 (fix the metadata at the producer, not the consumer), the published interface is the producer here.

value is not a menubar-only stray, which is why it belongs on this card rather than being waved through — measured across the whole catalog:

  • components-overlay-menubar/application-menubar11 items carry value
  • components-overlay-context-menu/basic-context-menu4
  • components-overlay-dropdown-menu/basic-dropdown-menu3
  • components-overlay-dropdown-menu/with-icons3

21 items author a key MenuItem does not declare and no renderer reads. MenuItemSchema is a bare z.object, so zod strips it and reports success — the #6157 class-2 blindness, which is why no gate has ever reported it.

Related, and deliberately not merged into this

The open question

Whether the page should keep teaching shortcut at all. It is genuinely declared, but the menubar renderer never reads it (see the companion finding filed alongside this one), so documenting it on this page advertises an affordance this component cannot draw. That is the same honesty call #6249's triage already made for the demo, and it should be made once for the prose rather than guessed at.

Refs: #6249 · #6326 · #6346 · #5250 · #6157.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:blocked

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions