Uh oh!
There was an error while loading. Please reload this page.
docs(components): name the shipped handler on five action props (#6122 PR 2) - #6142
Merged
Merged
Conversation
The five reference pages annotated an event prop as `string | ActionConfig`,
a type `@object-ui/types` has never exported. Read individually from the
freshly built `packages/types/dist/*.d.ts`, each slot is a plain function
callback under a different prop name:
- form/command.mdx onSelect -> onChange, (value: string) => void
- form/radio-group.mdx onValueChange -> onChange, (value: string | number) => void
- form/date-picker.mdx onDateChange -> onChange, (date: Date | undefined) => void
- form/combobox.mdx onValueChange -> onChange, (value: string) => void
- feedback/toast.mdx onAction -> the nested action?: { label; onClick }
The `string |` half goes with the name. #4453 narrowed the runtime to
`typeof === 'function'`, so an authored string handler is dropped; a
reference page promising `string | Fn` teaches an inert key.
Part of #6122yinlianghui-tw
marked this pull request as ready for review
August 24, 2026 20:56
This was referenced Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 24, 2026
Merged
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 freeto 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.
Part of #6122 — option A's mechanical half, dispatched as PR 2 in #6122 (comment).
PR #6130 landed the 6 sites the built types determined outright. This one takes the 5 where the shipped slot exists but the page had also named the prop wrongly. The 5 sites with no target at all are #6132 and are left byte-identical here.
The 5 corrections
Every signature below was re-read from a freshly built
packages/types/dist/*.d.tsin this worktree and written verbatim. The gate's own resolution control confirms which file the readings came from:form/command.mdxonSelect?: string | ActionConfigonChange?: (value: string) => voidform.d.ts:1376form/radio-group.mdxonValueChange?: string | ActionConfigonChange?: (value: string | number) => voidform.d.ts:394form/date-picker.mdxonDateChange?: string | ActionConfigonChange?: (date: Date | undefined) => voidform.d.ts:642form/combobox.mdxonValueChange?: string | ActionConfigonChange?: (value: string) => voidform.d.ts:1324feedback/toast.mdxactionLabel+onAction?: string | ActionConfigaction?: { label: string; onClick: () => void }feedback.d.ts:137feedback.d.ts:135from the measurement at133e2ea1e; onbfdb9f906the declaration sits atfeedback.d.ts:137(ToastSchemaitself opens at:109, the JSDoc Action button at:135–136). The fourform.d.tsnumbers are unchanged.The
string |half goes with the nameThis is the substance, not a tidy-up. #4453 narrowed the runtime to
typeof === 'function', so an authored string handler is dropped — seepackages/plugin-calendar/src/calendar-view-renderer.tsx. A reference page promisingstring | Fnis precisely what makes an AI author emit a handler that publishes, validates, and silently does nothing. Each page now documents the declared function type, alone.toast.mdxalso losesactionLabel, named here rather than left silentThe ordered restructure replaces
onActionwith the nestedactionobject — and that object carrieslabel.actionLabelis absent from the shipped surface: it appears nowhere inpackages/types/dist/feedback.d.ts(checked by name, not by grep ofsrc/). Keeping it besideaction.labelwould have documented two ways to set one label, one of them inert — the same defect the card exists to remove, in the same section being rewritten. Folded into the restructure and called out here so it is reviewable rather than incidental.Measurement
A throwaway re-fence probe under
trap '…' EXIT INT TERM, flipping the singleplaintextfence in each of the 10ActionConfig-bearing pages tots, running the gate, and restoring. ⛔ Nothing was re-fenced for real —content/docs/componentsis #5867's lane and still blocked on #6132. Each leg proved the mutation reached disk before any reading was taken:The restore leg is
git checkout HEAD -- content/docs/components, never a baregit checkout --, and the fix was committed before the probe ran — a bare restore wiped the entire uncommitted fix on this card's PR 1.The prediction held exactly.
TS2304: Cannot find name 'ActionConfig'The 5 that remain are exactly #6132's, by file:
basic/button-group.mdx,feedback/sonner.mdx,overlay/context-menu.mdx,overlay/dropdown-menu.mdx,overlay/menubar.mdx. Nothing else changed — no new diagnostic appeared under any of the 5 corrected blocks, which is the reading that says these annotations are now valid TypeScript and not merely different text.⛔ No
ActionConfigwas minted, noFRAGMENT_MARKERdeclared — the unmoved 111 is that proof.Render check on
toast.mdxThe restructure changes the shape a reader copies, so the page was prerendered — parsed with the site's own
@mdx-js/mdxand rendered throughreact-dom/server— and the HTML read back:codeelement above very likely shows bare here; in the actual prerender output it carriedclass="language-plaintext", which is the part that proves the fence language is unchanged.The nested object survives intact and escaped, the fence is still
plaintext, and the section reads as one coherent shape. The other four pages were prerendered too; all five render.Gates
Union re-run on the final commit
6600c7ad7, each quoting its own verdict line, exit code captured before any pipe.check-doc-snippet-typesSemantic phase: 225 of 225 block(s) judged, 0 failed./Every covered documentation snippet compiles against the built types.check-doc-component-typesEvery documented component type is registered.check-doc-linksLinks are valid across 15 scan roots.check-control-bytescheck-control-bytes: OK (scanned 5088 tracked text file(s); skipped 85 binary).check-changeset-presenceNo source of a released package changed in this range, so no changeset is owed.check-changeset-fixedAll workspace packages are in the changeset fixed group.check-changeset-no-majorNo changeset declares a major bump.Vitest: the diff implicates no suite, stated rather than silently skipped. The diff is
content/docs/**plus one.changesetfile and touches no package source. No vitest test reads any of the five pages — the tests that readcontent/docspinapi/schema-reference.md,components/basic/span.mdx,layout/*.mdx,plugins/plugin-calendar.mdx,utilities/cli.mdxand the guide pages, none of them these.e2e/docs-smoke.spec.tspins/docs/components/form/buttonand/docs/components/feedback/alert, also not these.Lint narrowing, declared — and it is a measurement, not a skip. The repo-wide
eslint .was not run locally. Three readings, from eslint's own configuration rather than from a guess about which files count: (1) all six changed paths returntruefromESLint#isPathIgnored, so the linted population contains zero of them; (2) 0 of 6 changed files are linted; (3) type-aware linting is off —calculateConfigForFilereports noparserOptions.projectand noprojectService— so this diff cannot move the verdict on any untouched file. CI runspnpm lintunfiltered regardless.A changeset is included with empty frontmatter (
Docs only, publishes nothing), matching the convention the sibling docs PRs in this lane use; the presence gate independently agrees none is owed.Out of scope, filed not fixed
Filed as #6143, not reconciled here, per the dispatch. The prerender and a per-prop sweep of these same five pages surfaced a separate class the gate structurally cannot see: these
## Schemablocks re-declare their interface rather than importing it, so a self-declared interface compiles no matter what it says.ActionConfigwas only ever visible because it was an undefined name; a key that is merely wrong produces no diagnostic at all. Four divergences on five pages, e.g.toast.mdxdocumentsvariant?: 'default' | 'destructive'where the shipped union is'default' | 'success' | 'warning' | 'error' | 'info'—'destructive'is not a member, and it is exactly the plausible-looking value a reader arrives with.Scope
⛔ #6132's five files are untouched and byte-identical to
origin/main— verified withgit diff origin/main --over exactly those paths, which returns empty.plugin-dashboard.mdxis likewise untouched. This card stays open for both.Generated by Claude Code