Uh oh!
There was an error while loading. Please reload this page.
docs(components): correct four props that no shipped type declares (#6143 round 2, option B) - #6161
Merged
Conversation
Four `content/docs/components` reference pages taught props the shipped types do not have. Each was resolved against a freshly built `packages/types/dist/*.d.ts` and against the zod schemas: - `feedback/toast.mdx` variant union -> 'default' | 'success' | 'warning' | 'error' | 'info'; 'destructive' is not a member (feedback.d.ts:123) - `form/radio-group.mdx` direction -> orientation (form.d.ts:377) - `form/combobox.mdx` drop searchPlaceholder and emptyText, declared nowhere and read by nothing (form.d.ts:1283) - `form/command.mdx` drop CommandItem.shortcut; CommandItem declares only value, label, icon (form.d.ts:1329) Every removal was checked against its renderer first, so a key a renderer genuinely reads would have been routed out as an undeclared capability rather than deleted. No type, export or union member minted. Nothing re-fenced, nothing annotated, no block changed shape: these blocks stay plaintext and stay outside the compile population. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
marked this pull request as ready for review
August 24, 2026 21:47
Uh oh!
There was an error while loading. Please reload this page.
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 #6143.
Round 2. The PM re-ruled to option B after round 1's measurement falsified the original option-2 ruling:
BaseSchemaends with a deliberate[key: string]: any, so 73 of 87 importable names are OPEN and an annotated literal accepts any key. Option 2 would have turned an uncompiled vacuous block into a compiled vacuous block while raising blocks-to-compile — negative, not neutral. The import mechanism is therefore sequenced behind #5155's strict-variant program and is not attempted here.What is left is four ordinary docs corrections.
The four corrections
Each resolved against a freshly built
packages/types/dist/*.d.tsand against the zod schemas, which #5155 ruled to be the enforcement boundary. Both layers agree on all four.feedback/toast.mdxvariant?: 'default' | 'destructive'variant?: 'default' | 'success' | 'warning' | 'error' | 'info'feedback.d.ts:123·zod/feedback.zod.js:59form/radio-group.mdxdirection?: 'vertical' | 'horizontal'orientation?: 'horizontal' | 'vertical'form.d.ts:377·zod/form.zod.js:263form/combobox.mdxsearchPlaceholder,emptyTextform.d.ts:1283·zod/form.zod.js:378form/command.mdxCommandItem.shortcutform.d.ts:1329·zod/form.zod.js:76toast.mdxis the one that mattered:'destructive'is not a member, it is the Shadcn vocabulary a reader arrives with, and it is the value most likely to be copied verbatim.One precision.
emptyTextis removed fromComboboxSchemaonly.CommandSchemareally does declare it (form.d.ts:1368,zod/form.zod.js:406), socommand.mdxkeeps it.Renderer check before every removal, because a key a renderer genuinely reads is an undeclared capability rather than a doc error. None of these four is read —
renderers/form/combobox.tsxcontains neithersearchPlaceholdernoremptyText;renderers/form/command.tsxcontains noshortcut;renderers/feedback/toast.tsxcontains no'destructive'.Omissions left alone, deliberately.
toast.mdxstill omitspositionandonDismiss. A reference page may show a subset, and round 2 was dispatched as exactly four corrections.Blocks-to-compile did not move — the ordered proof
Nothing was re-fenced, annotated or imported; these blocks stay
plaintextand stay outside the compile population.pnpm check:doc-snippets, before and after, on the same freshly built types:Identical resolution control line on both runs:
Gates — all at
cc607b380, each quoting its own verdict line, exit captured before any pipecheck:doc-snippetsEvery covered documentation snippet compiles against the built types.check:doc-types✅ Every documented component type is registered.(183 docs, 1054 blocks, 887 type literals)check:control-bytes✅ check-control-bytes: OK (scanned 5092 tracked text file(s); skipped 85 binary).check-changeset-presence✅ No source of a released package changed in this range, so no changeset is owed.check-changeset-fixed✅ All workspace packages are in the changeset fixed group.check-changeset-no-major✅ No changeset declares a major bump.check-doc-linksLinks are valid across 15 scan roots.Builds ran under the shared verify lock:
pnpm --filter @object-ui/types build—VERDICT command-exit 0.Lint, narrowed and the narrowing proved. ESLint's own flat config admits only
**/*.{ts,tsx}(and one named.ts); no block admits.mdor.mdx. Read from ESLint itself rather than asserted:eslint --no-inline-config --format jsonover all five changed files returns 5 results, every one of themFile ignored because no matching configuration was supplied, 0 errors and 0 files actually linted. Invariance for untouched files is trivial here — no type-aware linting is configured (noprojectService, noproject), and the diff contains no.tsor.tsxat all, so no untouched file's verdict can move.Vitest: this diff implicates no suite, verified rather than assumed. No test references any of the four pages; the three files matching
content/docs/componentsnamespan.mdxanddiv.mdxin prose comments. The only other references to these filenames are inapps/site/.source/*, which is gitignored codegen.Render-check, from the prerendered HTML
next buildofapps/sitesucceeded (VERDICT command-exit 0) and.next/server/app/docs/components/feedback/toast.htmlshows the reader-visible line as:The only surviving
destructivestrings on that page are Tailwind classes on a rendered button — where'destructive'genuinely is a member ofButtonSchema.variant— and a demo fixture id. No toast variant teaches it any more.@object-ui/plugin-ganttand@object-ui/plugin-mapwere linked but had never been built here, so the firstnext builddied onModule not found. Building them cleared it. Unrelated to this diff, which touches no TypeScript.Two findings filed, not fixed
SchemaExamplefixtures on these same pages still carry the invented keys the prose just stopped teaching: the toast action payload in two fixtures,shortcuton threeCommandItementries, anddirectionin both radio-group layout fixtures. Arguably the worse half, since a reader copies a working demo more readily than an interface block. Note one precision recorded there: the top-level"variant": "destructive"on those toast fixtures is a legitimate button variant, so a blanket replace would break two working buttons.RadioGroupSchema.orientation, the key this PR corrects the page to, is declared by the type and the zod schema and read by nothing. Measured from the prerendered HTML: all eight radiogroup roots on the page render byte-identical markup, so the two demos under## Layout Optionsare indistinguishable and the horizontal one renders vertically. The mirror image of finding(types): 13 top-level schema keys that component renderers genuinely READ are declared by no shipped type — measured across all 76content/docs/componentspages #6150.Refusals honoured
No type, export, union member or subpath minted. Nothing re-fenced or annotated, no block changed shape.
ToggleGroupItemreachability,sidebar.mdx,SpanSchema,PageSchema,SemanticSchema,BreadcrumbandFilterConditionuntouched. #6132's five files — sonner, context-menu, menubar, dropdown-menu, button-group — are byte-identical. #6150 and #6151 are not touched here.Generated by Claude Code