docs(components): follow the shipped types on the last five action props - #6345
Draft
os-warren wants to merge 1 commit into
Draft
docs(components): follow the shipped types on the last five action props#6345os-warren wants to merge 1 commit into
os-warren wants to merge 1 commit into
Conversation
The five `content/docs/components` pages that objectui#6122 measured as having
NO declared slot at all are corrected against the built `packages/types/dist`.
Maintainer ruled Option A on 2026-08-25: documentation follows the shipped types.
Two remedies, because the cases differ:
Deleted, nothing declares them at any level:
* feedback/sonner.mdx action?: { label; onClick } -- SonnerSchema has no
`action` (src/feedback.ts:204); the renderer reads only message/title/
description/variant/buttonLabel/buttonVariant/className.
* basic/button-group.mdx onValueChange -- ButtonGroupSchema declares only
type/buttons/variant/size (src/navigation.ts:335). `ButtonGroupButton`
does declare `onClick`, but a per-button click is not a group-level
selection-change, so this is a deletion and not a redirect.
Redirected, the real slot is one level down on the item:
* overlay/context-menu.mdx, overlay/dropdown-menu.mdx, overlay/menubar.mdx
documented a menu-level `onSelect`; no menu schema declares any event slot
(DropdownMenuSchema declares `onOpenChange` and nothing else). `MenuItem`
declares `onClick?: () => void` at src/overlay.ts:346, built at
dist/overlay.d.ts:334 -- the exact line the card cited -- and mirrored in
Zod at src/zod/overlay.zod.ts:136. `MenuItem` is the element type of all
three `items` arrays, so one declaration serves all three pages.
The `string |` half goes with the name: objectui#4453 narrowed the runtime to
`typeof === 'function'`, so an authored string handler is dropped.
No type was minted. No fence moved: the five pages hold 10 `plaintext` fence
markers before and after, leaving objectui#5867's SHRINK-ONLY population at
80 files / 93 blocks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CZgmFFzqA9cX8tBMhvpFe
This was referenced Aug 25, 2026
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6132
Maintainer ruling of 2026-08-25, verbatim 「6132 6166 同意」 — Option A: documentation
follows the shipped types, and where a real declared slot exists one level down, the page
points there instead of going silent.
Population — derived from the tree, not from the card
The card estimates "15 pages". My count is 5, and it governs. The 15 was the whole
objectui#6122 population (16 sites / 15 pages); 6 of those were corrected in #6130 and 5
more in #6142, leaving exactly the 5 this card rules on. Deriving command and its output:
One site per file, five files — matching the five ruled prop names exactly. Post-change the
same command returns nothing (exit 1).
The delete-versus-redirect split
Deleted — nothing declares them, at any level.
feedback/sonner.mdxaction?: { label; onClick }SonnerSchema(src/feedback.ts:204) declaresmessage/title/description/variant/buttonLabel/buttonVariantand noaction; the Zod mirror (src/zod/feedback.zod.ts:116) agrees, and the renderer reads none of itbasic/button-group.mdxonValueChangeButtonGroupSchema(src/navigation.ts:335) declares onlytype/buttons/variant/sizeOn button-group I considered and rejected a redirect.
ButtonGroupButtondoes declareonClick?: () => void(src/navigation.ts:325), so a slot does exist one level down — but aper-button click is not a group-level selection-change; redirecting
onValueChangetherewould assert an equivalence neither the types nor the ruling make. The ruling scopes the
redirect to "the menu pages" and names only
MenuItem.onClick. So: deletion.Redirected — the real slot is one level down, and it is genuinely declared.
overlay/context-menu.mdx,overlay/dropdown-menu.mdx,overlay/menubar.mdxeach documenteda menu-level
onSelect. No menu schema declares any event slot at all (DropdownMenuSchemadeclares
onOpenChangeand nothing else;ContextMenuSchemaandMenubarSchemadeclarenone). The handler is declared on the item — quoted from source, as asked:
Independently confirmed in three places, so this is not a redirect to a second undeclared prop:
packages/types/src/overlay.ts:346.packages/types/dist/overlay.d.ts:334— the exact line the card cited.packages/types/src/zod/overlay.zod.ts:136,onClick: z.function().optional().describe('Click handler').MenuItemis the element type ofDropdownMenuSchema.items,ContextMenuSchema.itemsandMenubarMenu.items, so one declaration serves all three pages. Each page gainsonClick?: () => voidon its item interface plus a two-line note that handlers live on theitem, not the menu.
Gates
Run on the final commit
cb56e5ae1; HEAD was re-read after the run and had not moved. Exitcodes captured by redirect before any pipe; each line is the gate's own verdict.
check:doc-fencescheck:doc-typescheck:doc-snippetscheck:control-bytesdocs:check-linkscheck-changeset-presenceOn the flagged
check:doc-snippetsprecondition — it did first exit 2 withPRECONDITION NOT MET ... the packages it resolves against are not built. That is not a red,and I did not report it as a green either: I ran the build the gate itself prescribes
(
turbo run build $(node scripts/check-doc-snippet-types.mjs --build-filter) --concurrency=2,32/32 tasks, 2m18s) and re-ran the gate, which then returned a real exit 0 with its
controls firing correctly (sentinel 1 diagnostic TS2305, positive 0 diagnostics, undeclared 1
diagnostic TS2307). So the green above is measured, not declared.
Fence-count evidence (the ratchet this diff could have moved): the five pages hold 10
plaintextfence markers before and after — delta 0.check:doc-fencesreports objectui#5867'sSHRINK-ONLY declared population unchanged at 80 files / 93 blocks. I did not convert any fence:
that is objectui#5867's scope, deliberately untouched.
Repo-wide
pnpm lint— a measured narrowing, not a skip.eslint --no-inline-config --format jsonover all 6 changed paths exits 0 and reports, for every one of them, "Fileignored because no matching configuration was supplied." — read from eslint's own config,
counted from its JSON output (6 files).
.mdxand.changeset/*.mdare outside the lintedpopulation entirely, so this diff cannot move any verdict on any untouched file.
Changeset: the presence gate says none is owed (docs-only, no published package source).
One is added anyway as the empty-frontmatter docs-only declaration this repo uses, matching
#6142's convention. No
skip-changesetlabel (#4912).Coordination
content/docs/blocks/block-schema.mdxandcontent/docs/plugins/plugin-dashboard.mdx; neither is in my 5-file list, so no merge ofmainwas needed and none was done.71-file components group, which is the whole contribution. Its scope was not entered.
content/docs/releases/untouched.One finding this work surfaced (filed separately, not fixed here)
The redirect target is declared, but the three menu renderers read
item.onSelect— a propMenuItemdoes not declare — while the declaredMenuItem.onClickis read by nothing(
packages/components/src/renderers/overlay/dropdown-menu.tsx:67,context-menu.tsx:65; menubar wires no item handler at all). Declared and enforced disagree atthe item level. That is a code-side contract question, not this card's docs question, and
fixing it here would widen into
packages/. Filed as its own card, along with the remainingundeclared props on these same pages.
Generated by Claude Code