This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
docs(disclosure): collapsible.mdx documents the content slot the renderer reads - #8237
Merged
Merged
Conversation
…nderer reads The schema block named `children: SchemaNode[];` as a required member. No such member exists: `CollapsibleSchema` declares `content: SchemaNode | SchemaNode[]` (required), and `children` reaches it only through `BaseSchema` as an optional key of a different union that the `collapsible` renderer never reads. Replace the row with the declared one and add a prose note naming the trap, matching the shape tooltip.mdx already uses for its own unread `children`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #8197
The
## Schemablock oncontent/docs/components/disclosure/collapsible.mdxpublished
children: SchemaNode[];as a required member. No such memberexists.
packages/types/src/disclosure.ts:113declares the content slot ascontent: SchemaNode | SchemaNode[];— required — andchildrenreachesCollapsibleSchemaonly throughBaseSchema(packages/types/src/base.ts:260)as
children?: SchemaNode | SchemaNode[]: optional, and a different union. Thecollapsiblerenderer readsrenderChildren(schema.content)insideCollapsibleContentwith nochildrenfallback of any kind, and theregistration's
defaultPropsshipscontent, notchildren. So the page nameda key nothing consumes and omitted the only key that works.
The row is now the declared one, and a short prose note below the fence names
the trap for anyone who already followed the old row.
The judgement the card left open: NO row for the inherited
childrenThe card deliberately did not rule on whether the inherited optional
childrendeserves a row of its own. It does not, for three reasons.1. The fence's membership rule is "what this component reads", not "what it
inherits". The block lists four members and stops. It carries no
id,visible,className,testId,bindorbody— all equally inherited fromBaseSchema. Admittingchildrenand nothing else would make the selectionarbitrary. This page has no "Base properties" section to hold it either (the
scroll-areapage has one; this one does not).2. The two same-class precedents document
childrenbecause their renderersREAD it — that is the discriminator, not inheritance. Measured on this base:
packages/components/src/renderers/complex/scroll-area.tsx:34isrenderChildren(schema.children)— the only content channel, andscroll-area.mdxcarries achildrenrow. (objectui#6805)packages/components/src/renderers/layout/aspect-ratio.tsx:33isrenderChildren(schema.children || schema.body), andaspect-ratio.mdxcarries a
childrenrow. (objectui#6773)collapsible.tsx:28isrenderChildren(schema.content). Applying the same ruleto this page yields: no
childrenrow. Giving it one would re-document a keythe renderer provably ignores — the exact defect this PR removes, merely
downgraded from "required" to "optional". A member list is read as "this is how
you author it here"; a row for an inert key is a trap, not a completeness win.
3. The repo already has a shape for an inherited-but-unread key that authors
are actively getting wrong: prose below the fence, not a member row.
content/docs/components/overlay/tooltip.mdx:24-27does exactly this for itsown
children(objectui#6939). The evidence that authors get it wrong here isthis card itself — a doc row that had been telling them to write
children. Sothe note is added in tooltip's shape and the fence stays a list of read keys.
Landing control — before/after, with a lit control
All three legs measured with
grep -cF(fixed-string: a regex grep would readthe
|as alternation).children: SchemaNode[];content: SchemaNode | SchemaNode[];SchemaNodeon any lineBidirectional on purpose: deleting the row alone would satisfy leg 1 and is not
the fix. The two legs are each other's firing control — leg 1 returned 1 before,
leg 2 returns 1 after, so neither grep is silently matching nothing.
The defect demonstrated end-to-end, not just measured as text
Two nodes identical except for the content key, both
defaultOpen: true.Zod twin (
packages/types/src/zod/disclosure.zod.ts,safeParse):children) —success = false:{ "code": "invalid_type", "expected": "nonoptional", "path": ["content"], "message": "Invalid input: expected nonoptional, received undefined" }content) —success = trueRender (
renderComponentfrompackages/components/src/__tests__/test-utils,jsdom, real renderer registration). Both roots came back
data-state="open",aria-expanded="true", so both were genuinely expanded:id="radix-_r_0_") ends immediately after its ownattributes — empty body, no
BODY-MARKERtext node anywhere in the tree.id="radix-_r_2_") holds the text nodeBODY-MARKER— content painted.The NEW leg is the firing control for the OLD leg's negative reading: the same
harness does paint the marker when the key is right.
These were throwaway probes, run and then deleted; the tree carries only the
docs change (
git statusclean at4b9be5954).Gates: they all pass, and NONE of them judges this deliverable
Stated plainly because a green CI is not evidence for this row.
check:doc-types— exit 0. Reads onlytypestring literals out of doc codeblocks (889 literals scanned); it never judges a member row.
check:doc-snippets— exit 2, PRECONDITION NOT MET. It did not run (fivepackages unbuilt). It is also structurally incapable of judging this block:
TS_FENCE_LANGUAGESatscripts/check-doc-snippet-types.mjs:548is{ts, tsx, typescript}, and this file has 0 such fences and 1plaintextfence (measured here, not taken from the card). Read as NOTMEASURED, neither green nor red.
check:doc-fences— exit 0 (227 documents).docs:check-links— exit 0, "Links are valid across 17 scan roots."check:control-bytes— exit 0 (6556 tracked text files). Plus a direct scan ofthe changed file for the C0/C1 set: no hits.
check:doc-example-readers— exit 0.check:docs-route-closure— exit 0.check-doc-expression-carriage— exit 0 (report-only by design).node scripts/check-changeset-presence.mjs— exit 0: "No source or publishedcontract of a released package changed in this range, so no changeset is
owed." So no
.changeset/*.md, and no label is applied.turbo ls --affectedagainst the merge base returns 0packages —
content/is outside every workspace package, so no package testor typecheck is owed here.
eslinthas nothing to say about this diff, measured from eslint'sown config resolution rather than assumed:
eslint --format jsonon thechanged file returns
"File ignored because no matching configuration was supplied."Every config block ineslint.config.jstargets**/*.{ts,tsx}.fumadocs-mdxregenerates cleanly (exit 0), so the page still parses as MDX.⇒ the verification for the row itself is the before/after measurement and the
render demonstration above, not any gate.
Other rows in the same fence, checked against the declaration
type: 'collapsible';— matchesdisclosure.ts:93. Correct.trigger: SchemaNode | SchemaNode[];— objectui#7767's row, already correct onmain via objectui#8199. Untouched, per the scope fence.
defaultOpen?: boolean;— matchesdisclosure.ts:118, and the renderer readsit. Correct.
open?: booleanandonOpenChange. OmittingonOpenChangeis right — it is a runtime slot whose zod twin refuses thekey by name (
handlerKeyRefusal(..., 'runtime-slot')is az.customarmwhose predicate always returns false), so it is not authorable. Omitting
openis defensible for a different reason and is not folded in: therenderer never reads
schema.open, so it is a declaration-side question,filed separately.
Out-of-scope findings — filed, not repaired here
Three, none touched by this PR:
scroll-area.mdxdocuments acontent?member thatScrollAreaSchemadoes not declare andui:scroll-areadoes not read, andlabels
children?(the only channel) "Alternative content prop". Exact mirrorof this card on another page; objectui#6805 addressed that component's demos,
not its reference page.
on*handlerrows their zod twins refuse by name. 3 confirmed on top-level schemas
(
accordion,toggle-group,pagination), 14 further rows left unclassifiedrather than overclaimed.
CollapsibleSchema.openis declared on both faces,validates, and is read by no renderer. Deliberately not documented on this
page: a row for an inert key is the trap this PR removes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Generated by Claude Code