Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

docs(components): follow the shipped MenuItem union on the menubar Schema block - #7074

Merged
os-sam merged 1 commit into
mainfrom
claude/issue-6521-menubar-schema-block
Aug 31, 2026
Merged

os-sam merged 1 commit into
mainfrom
claude/issue-6521-menubar-schema-block

Conversation

@claude

@claude claude Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closes #6521

Docs only, publishes nothing. Three rows of content/docs/components/overlay/menubar.mdx's ## Schema block did not describe the surface packages/types/src/overlay.ts declares, plus one prose alignment. Verified against origin/main 592acafbeed97c5aed81a18f4d848b6179d3c044; local gate union re-run on the final commit 00d0cdab5.

⚠️ Read the type, not the card — most of #6521 already landed via #6523

The card's six-row "actually shipped" evidence table was measured at 50f987f9a, before MenuItem became a discriminated union. Four of its rows are already satisfied on main and are not in this diff:

the card asks for status on 592acafbe
label published as required already done (MenuCommandItem.label: string, overlay.ts:367)
shortcut?: string, not string[] already done (overlay.ts:383)
divider as separator: true, not type?: 'separator' already done — its own arm, MenuDividerItem (overlay.ts:409-421)
the excluded menu-level handler line removed already done (landed with #6132 / PR #6345)

A reviewer holding the stale card should reconcile against this table rather than the card's.

What this diff actually changes

page before the declaration that authorises the change page after
value?: string Declared on neither arm: not MenuCommandItem (overlay.ts:363-400), not MenuDividerItem (overlay.ts:409-421); mirrored absent in zod (overlay.zod.ts:147-168). No menu renderer reads a .value — zero occurrences across menubar.tsx, dropdown-menu.tsx, context-menu.tsx. row deleted
(absent) children?: MenuItem[] — overlay.ts:387, zod overlay.zod.ts:155. Read, and it draws a real submenu: menubar.tsx:35-39 branches item.children into MenubarSub / MenubarSubTrigger / MenubarSubContent. children?: MenubarItem[]; added
menus: MenubarMenu[] (required) menus?: MenubarMenu[] — overlay.ts:511, .optional() at overlay.zod.ts:208. The renderer optional-chains it (menubar.tsx:28, schema.menus?.map), so a menubar with no menus is legal today. menus?: MenubarMenu[];
## Dividers prose ended at "Author a divider as { "separator": true }." type is tombstoned ?: never on both arms (overlay.ts:400, :420) and carries retirementTombstone() guidance in zod (overlay.zod.ts:158-162) — authoring it is a parse-time refusal, not a strip. picks up the sentence dropdown-menu.mdx and context-menu.mdx already carry, verbatim

children is the row that matters: a declared capability with working runtime that the page hid outright, so an author reading this page had no way to learn menubar draws submenus at all.

Deliverable 3 — the card's open question is false, and I did not act on it

The card asks whether the page should keep teaching shortcut, on the stated ground that "the menubar renderer never reads it".

⛔ That premise does not hold on main. packages/components/src/renderers/overlay/menubar.tsx reads it in both arms of its recursion:

// :74 — top-level item
{item.shortcut && <MenubarShortcut>{item.shortcut}</MenubarShortcut>}

// :56 — submenu child
{child.shortcut && <MenubarShortcut>{child.shortcut}</MenubarShortcut>}

The code comment at :70-73 records why, and dates it: "Parity, not new capability (objectui#6523 rider): the declared shortcut string already has working runtime in dropdown-menu and context-menu; menubar read it nowhere." So the renderer gap the card describes was real when the card was written and was closed by #6523.

⇒ shortcut stays documented with no renderer caveat. Writing the caveat the card asks for would have installed inverse drift — publishing a limitation that does not exist.

Deliverable 4 — ruling on the interface names: leave them localized, and this is a measurement

The page names its interfaces MenubarCommandItem / MenubarDividerItem / MenubarItem while the shipped names are MenuCommandItem / MenuDividerItem / MenuItem. Before deciding, I read the two sibling pages that document the same union:

page what it publishes the union as
overlay/dropdown-menu.mdx DropdownMenuCommandItem / DropdownMenuDividerItem / DropdownMenuItem
overlay/context-menu.mdx ContextMenuCommandItem / ContextMenuDividerItem / ContextMenuItem
overlay/menubar.mdx MenubarCommandItem / MenubarDividerItem / MenubarItem

Three of three localize the name. Not one of them publishes the shared MenuItem name. ⇒ this is a house convention, menubar.mdx is not the outlier, and renaming it here would have made it the only page out of step. Names untouched.

(The card's title — "publishes an invented MenubarItem interface" — is therefore only half live: the invented shape was the defect, and #6523 plus this PR close it. The name is deliberate house style.)

Deliverable — ruling on separator?: false and type?: never: not in the fence; the why goes in the prose

Same measurement decides it. Neither sibling page publishes separator?: false or type?: never in its plaintext block. Both instead carry the refusal as prose, in ## Dividers, with its reason and its issue number. That is the house's answer to "where does a tombstone get taught", and it is the better one: a bare type?: never row in a teaching block tells a reader nothing, whereas the sentence says what happens and why.

So: the block stays free of union mechanics, and menubar.mdx's ## Dividers picks up the sibling sentence so all three pages now say the same thing. This is the one edit here that is not one of the card's three rows; it is the same defect class (page under-teaching the shipped contract), mechanical, and its correct form is fixed verbatim by two sibling pages.

Deliverable 5 — the split, filed

Verification

content/docs/** is not published source — apps/site is private: true — so check-changeset-presence reports "no changeset is owed". The changeset therefore uses the empty frontmatter form, which that gate documents as counting and which is what PR #6345 used for its docs-only edit to this same file. ⚠️ This deviates from the dispatch's "ship patch": a patch bump would have been a false claim that a released package changed. major was never in play.

Gate union re-run on the final commit 00d0cdab5, each verdict quoted from the gate's own output:

gate verdict line
check:doc-fences ✅ every TypeScript block in 224 document(s) is fenced ts/tsx/typescript, except 80 declared file(s) carrying 90 block(s) — the SHRINK-ONLY population is unmoved
check:doc-types ✅ Every documented component type is registered.
docs:check-links Links are valid across 17 scan roots.
check:control-bytes ✅ check-control-bytes: OK (scanned 5861 tracked text file(s); skipped 85 binary).
check:docs-route-closure ✅ MEASURED_PAYLOAD is honest + ✅ gauge: 1360 modules crawled from 149 route roots
check:skills-paths ✅ OK (95/96 stated path(s) resolve across 18 guide file(s); 1 baselined).
check:shell-escape-residue ✅ OK (content/docs: 185 file(s), 1067 fence(s)... 0 occurrence(s) outside a fence)
changeset:check (fixed) ✅ All workspace packages are in the changeset fixed group.
changeset:check (no-major) ✅ No changeset declares a `major` bump.
check-changeset-presence ✅ No source or published contract of a released package changed in this range, so no changeset is owed.
check-changeset-overwrite ✅ No pre-existing changeset was modified or deleted.

Fence census on the edited file, before and after: 2 fence markers, 1 plaintext opener. Unchanged.

Declared narrowings — two gates were NOT run, and neither can see this diff

Stated as narrowings rather than passes, because "not run" and "green" must stay distinguishable.

  1. check:doc-snippets exits 2 here (PRECONDITION NOT MET — the packages it resolves against are not built); building the 21 package closures it names would not change its answer. Its covered population is read from its own source, not guessed: TS_FENCE_LANGUAGES = new Set(['ts', 'tsx', 'typescript']) (scripts/check-doc-snippet-types.mjs:317), acted on at :600. This diff lives entirely inside a plaintext fence and adds, removes and relabels zero fences (census above). It changes no source and no .d.ts, so no untouched document's verdict can move either.
  2. eslint — eslint.config.js:28 scopes the TypeScript config to files: ['**/*.{ts,tsx}']. This diff contains no .ts or .tsx file. Read from the config, not assumed.

check:readme-exports also hit the unbuilt precondition; its own census reports its population as "43 tracked README(s) under packages/", and this diff touches no README.

CI runs the full farm regardless.


Generated by Claude Code

…hema block

The `## Schema` block published `value?: string`, which neither arm of the
shipped union declares and no menu renderer reads, and omitted
`children?: MenuItem[]`, which is declared and which the menubar renderer draws
as a real submenu. `menus` was taught as required; it is declared optional and
the renderer optional-chains it.

The `## Dividers` prose picks up the `type` tombstone sentence the two sibling
menu pages already carry, so all three say the same thing about the retired
`{ "type": "separator" }` spelling being a parse-time refusal rather than a
silent strip.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hfmP9hoMd3dJwTh85J4yB
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant