Uh oh!
There was an error while loading. Please reload this page.
docs(components,plugins): resolve the undeclared ActionConfig annotation per site against the built types - #6130
Conversation
…ation where the built types determine the answer `ActionConfig` is named by 16 references across 15 `content/docs/components` pages and is exported by nothing: `@object-ui/types` has no such member (TS2724, "Did you mean 'AIConfig'?") and no `packages/*/src` file declares it. Each site was resolved individually against the BUILT `packages/*/dist/*.d.ts` — never against source — rather than by picking one replacement name. Six sites name a prop the shipped schema type really declares, so those six are corrected to the type it declares. The other ten do not resolve to anything and are left for a ruling; none of the sixteen resolves to `ActionSchema` or `UIActionSchema`. Two one-file defects surfaced by the same probe are fixed here: * `feedback/sonner.mdx` declared `action` twice in one interface (TS2300 / TS2687 / TS2717). The first was the discriminant, misspelt: the shipped `SonnerSchema` declares `type: 'sonner'`, and the variant union the page called `type?` is the shipped `variant?`, which is also the key the renderer reads (`renderers/feedback/sonner.tsx:22-25`). * `plugins/plugin-dashboard.mdx` shipped a block that has never parsed (TS1109 — `widgets: [...]` is a spread with no operand). It also imported `DashboardSchema` and `MetricCardSchema` from `@object-ui/plugin-dashboard`, neither of which that package exports. Rewritten against the real surface: `DashboardComponentSchema` / `DashboardWidgetSchema` from `@object-ui/types`. No `FRAGMENT_MARKER` was added — these are genuinely TypeScript. Declared fragments stay at 111, unmoved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
commented
Aug 24, 2026
PM: ACCEPT the 8 sites in this PR — and a partial ruling on the other 10
|
Uh oh!
There was an error while loading. Please reload this page.
Part of #6122
ActionConfigis named by 16 references across 15content/docs/componentspages and is exported by nothing. Measured, not assumed: a probe importing it from@object-ui/typesthrough the gate's ownpathsderivation reportsand no file under
packages/*/srcdeclares it.Per the ruling on #6122 (
#6122#issuecomment-5399663646): no blanket substitution. Each of the 16 sites was resolved individually against the builtpackages/*/dist/*.d.ts. This PR corrects the sites the built types determine, fixes the two one-file defects the same probe surfaced, and leaves the rest for a ruling.ActionConfigis not minted — the refusal on #5329 / #6107 stands.The measured 16-site table
Resolved with the TypeScript compiler API against
packages/*/dist/*.d.ts, usingderivePackageTypePaths()fromscripts/check-doc-snippet-types.mjs— the gate's ownexports.typesderivation, so nothing resolves to source. Resolution control for the probe:.d.tsbasic/pagination.mdx:27PaginationSchemaonPageChange(page: number) => void@navigation.d.ts:256disclosure/toggle-group.mdx:41ToggleGroupSchemaonValueChange(value: string | string[]) => void@disclosure.d.ts:170form/button.mdx:64ButtonSchemaonClick() => void | Promise⟨void⟩@form.d.ts:56form/form.mdx:50FormSchemaonSubmit(data: Record⟨string, any⟩) => void | Promise⟨void⟩@form.d.ts:1158form/input-otp.mdx:35InputOTPSchemaonChange(value: string) => void@form.d.ts:720form/input-otp.mdx:36InputOTPSchemaonComplete(value: string) => void@form.d.ts:724form/command.mdx:34CommandSchemaonSelectonChange(renamed)(value: string) => void@form.d.ts:1376form/radio-group.mdx:50RadioGroupSchemaonValueChangeonChange(renamed)(value: string | number) => void@form.d.ts:394form/date-picker.mdx:34DatePickerSchemaonDateChangeonChange(renamed)(date: Date | undefined) => void@form.d.ts:642form/combobox.mdx:44ComboboxSchemaonValueChangeonChange(renamed)(value: string) => void@form.d.ts:1324feedback/toast.mdx:36ToastSchemaonActionaction.onClickaction?: { label: string; onClick: () => void }@feedback.d.ts:135feedback/sonner.mdx:40SonnerSchemaaction.onClickactionprop at alloverlay/context-menu.mdx:27ContextMenuSchemaonSelectoverlay/menubar.mdx:34MenubarSchemaonSelectoverlay/dropdown-menu.mdx:42DropdownMenuSchemaonSelectonOpenChangebasic/button-group.mdx:47ButtonGroupSchemaonValueChangeThe distribution — the ruling's
ActionSchematrap does not fireActionSchema—crud.d.ts:62, the deprecated declarationActionSchema—ui-action.d.ts:331, re-exported asUIActionSchemaBoth
ActionSchemadeclarations were resolved and are reported for the record —packages/types/dist/crud.d.ts:62(deprecated) andpackages/types/dist/ui-action.d.ts:331, whichindex.d.ts:982re-exports asUIActionSchema. Neither is what any of the 16 sites resolves to, so the "which declaration" question the ruling flagged never arises, and no documentation is pointed at a deprecated type.The candidate set the card named —
UIActionSchema,ActionSchema, or a new narrow action type — is wrong for all sixteen sites. Every slot the shipped types actually declare is a plain function callback, not an action reference. See "What still needs a ruling" below.The six corrections
Each replaces
string | ActionConfigwith the signature the shipped.d.tsdeclares for that exact prop on that exact type — no prop renamed, no new claim introduced. (⟨ ⟩ per the notation note; the files carry ASCII angle brackets.)The two one-file defects
feedback/sonner.mdx—actiondeclared twice in one interface (TS2300 x2, TS2687 x2, TS2717). The first occurrence was the discriminant, misspelt. The builtSonnerSchema(feedback.d.ts:194) declarestype: 'sonner', and the variant union the page calledtype?is the shippedvariant?— which is also the key the renderer reads (packages/components/src/renderers/feedback/sonner.tsx:22-25,schema.variant === 'success' ? toast.success : ...). Correcting the discriminant alone would have moved the duplicate ontotype; both halves are needed and both are read off the built type.plugins/plugin-dashboard.mdx— a block that has never parsed.widgets: [...]is a spread with no operand, soTS1109: Expression expectedat line 337 — the only syntax-phase failure among the blocks this card touches. Fixing the parse alone would have revealed a second defect of the same class the card is about, so it was fixed in the same stroke and is reported here rather than left to surface later: the block importedDashboardSchemaandMetricCardSchemafrom@object-ui/plugin-dashboard, and that package exports neither. Measured against its builtdist/index.d.ts:The real surface is
DashboardComponentSchema/DashboardWidgetSchemafrom@object-ui/types— the pairDashboardRendererPropsitself is declared against (packages/plugin-dashboard/dist/DashboardRenderer.d.ts:1). The block was rewritten against it and compiles clean (CANDIDATE DIAGNOSTICS: 0);'metric-card'is a member of the closedDASHBOARD_COMPONENT_WIDGET_TYPES(complex.d.ts:677).The fence stays
plaintexton both pages — re-fencing is #5867 batch 3's job, and this PR does not take it.Verification
Both the before and after readings come from a throwaway re-fence probe under a
trap ... EXIT INT TERM: it flips the fences of exactly the blocks under test tots, runs the gate, and restores the tree. It is never committed. Each leg proved the mutation landed on disk before any reading was taken — the anchor text was counted before and after, not inferred from an editor's exit code:Harness controls, quoted from the gate's own output — resolution lands on a built artifact, so nothing was judged against source:
origin/main133e2ea1ecbf03d111TS2304: Cannot find name 'ActionConfig'sonner.mdxduplicateaction(TS2300 / TS2687 / TS2717)plugin-dashboard.mdxsyntax phaseTS1109at :337every block parsedThe declared-fragment count is unchanged in both directions, which is the proof that no
FRAGMENT_MARKERwas used: these blocks are genuinely TypeScript and were made to compile, not declared exempt.Gates run on the committed tree, each quoting its own verdict line — the exit code was captured before any pipe:
The packages were built before any of this was judged (
pnpm build --concurrency=2, exit 0), so every reading above is against the shipped.d.tsand not against a stale one. No changeset: the diff iscontent/docs/**only, and the presence gate says so in its own words rather than on my say-so.What still needs a ruling — the card's premise did not survive the measurement
The card asked which action type these props meant, offering
UIActionSchema,ActionSchema, or a new narrow type. The measurement answers: none of them, at any of the 16 sites. Every slot the shipped types declare is a plain function callback, and 5 of the 16 props do not exist on the shipped type at all.Two further measurements bear on the ruling:
The
string |half of every one of the 16 annotations documents a shape this repo has already ruled is dropped. objectui#4453 is exactly this: an authoredonAction: 'NOT-A-FUNCTION'reaching a handler slot. The accepted fix narrows totypeof onAction === 'function'and drops anything else — see the comment atpackages/plugin-calendar/src/calendar-view-renderer.tsx:322-331. So the pages are teaching authors to write a value the runtime discards.No renderer reads any of these schema-level slots. Grepping
packages/*/srcfor aschema.property access on each of the nine documented prop names returns no hit for any of the 15 components — the only hits anywhere arealert-dialog'sschema.onAction,plugin-editor/plugin-view'sschema.onChange, and the builder writingthis.schema.onClick/onSubmit(packages/core/src/builder/schema-builder.ts:157,206). The documented surface is declared-but-unconsumed where it is declared at all.Correcting the remaining ten therefore is not a name substitution. Four need the documented prop renamed (
onValueChange/onSelect/onDateChangetoonChange), one needs restructuring into the shipped nestedactionobject, and five have no target at all — for those the choice is to delete a reader-facing prop, to move the handler onto the item (which is where the shippedMenuItem.onClicklives,overlay.d.ts:334), or to treat it as a gap in the types. That last fork decides whether ObjectUI's component schemas are meant to carry JSON-authorable action references at all, which is a public-contract question about the SDUI event model and is not mine to settle. It is put back to #6122 rather than guessed, precisely because the card warns that getting it wrong fossilizes a shape across 15 reader-facing pages.This PR is deliberately titled
Part of #6122, not a closing reference — merging it must not close the card while those ten sites are unresolved.Generated by Claude Code