Skip to content

docs(accordion): rewrite Schema block to match the real AccordionSchema/AccordionItem interface - #4727

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-4722-accordion-mdx-schema-truth
Aug 15, 2026
Merged

docs(accordion): rewrite Schema block to match the real AccordionSchema/AccordionItem interface#4727
yinlianghui merged 1 commit into
mainfrom
claude/issue-4722-accordion-mdx-schema-truth

Conversation

@yinlianghui

@yinlianghuiyinlianghui commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Fixes#4722

What changed

content/docs/components/disclosure/accordion.mdx's "Schema" code block taught a
fictional shape that never existed on the real interface. Rewrote it to match
packages/types/src/disclosure.ts's AccordionSchema/AccordionItem field-for-field,
post-#4723 (which retired icon):

Docs said (before)Reality (packages/types/src/disclosure.ts)
items: Array< { title, content } >items: AccordionItem[]AccordionItem requires value: string (missing from docs entirely)
content: string | SchemaNodecontent: SchemaNode | SchemaNode[]
defaultOpen?: number[]doesn't exist — real key is defaultValue?: string | string[]
multiple?: booleandoesn't exist — real key is accordionType?: 'single' | 'multiple'
(missing)collapsible?: boolean, value?: string | string[], onValueChange?: (value) => void, variant?: 'default' | 'bordered' | 'separated', item-level disabled?: boolean

defaultOpen/multiple never existed on the real interface — this was an early draft of
the component that was never updated as the interface evolved, not a two-name rename.

Same-page drift sweep

Per the card's sweep instruction, checked every other code block on the page. The page has
exactly one other block: the SchemaExample demo component (id
components-disclosure-accordion/basic-accordion), which is a live-rendered demo, not an
inline fenced code block, and the prose above it ("The second item sets disabled: true
...") is already accurate against the real, now-honored AccordionItem.disabled. No
further drift found on this page.

Out of scope (filed, not fixed here)

While reading the renderer to confirm the real interface, found that the schema-catalog's
own basic-accordion.json — the JSON backing that SchemaExample demo — omits the
required value key on every item, silently tolerated by a renderer-side fallback
(item.value || item-${index}). Different file, different defect class (a required-key
omission in an authored example vs. this card's stale-prose-in-docs), so filed separately
rather than folded in here: #4726.

Verification

Docs-only change (content/), no interface/renderer edits, no content/docs/releases/
touched.

  • node scripts/check-doc-links.mjsLinks are valid across 13 scan roots.
  • node scripts/check-control-bytes.mjsOK (scanned 4250 tracked text file(s); skipped 85 binary).
  • node scripts/check-changeset-presence.mjsNo source of a released package changed in this range, so no changeset is owed. (content/ is not under a released package's src/; no changeset added, per the gate's own verdict.)

All three re-run at the final commit, HEAD 9e4735e5f.

Generated by Claude Code

…ma/AccordionItem interface
The "Schema" section on the accordion docs page taught a fictional shape
(`defaultOpen?: number[]`, `multiple?: boolean`) that never existed on
`AccordionSchema`, was missing the required `AccordionItem.value` key entirely,
and omitted `collapsible`/`onValueChange`/`variant` plus the now-honored
`disabled`. Rewritten to match `packages/types/src/disclosure.ts` field-for-
field, post-#4723 (`icon` retired). Swept the rest of the page: it has exactly
one other block (the `<SchemaExample>` demo, not an inline code block), which
already renders `disabled: true` correctly against the real interface — no
further drift found on this page.
Fixes#4722
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ
@vercel

vercelBot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredAug 15, 2026 6:24pm

Request Review

@yinlianghuiClaude

Copy link
Copy Markdown
CollaboratorAuthor

Review verdict: ACCEPT (reviewer of record, PM session session_01RnQd8iMMUwXQEV1crFmQiQ).

Verified against this PR, not the report: one changed file, Fixes #4722 the only closing keyword, no changeset per the presence gate's own verdict. The before/after table documents each fabrication (defaultOpen/multiple never existed on the real interface — an unrevised early draft, correctly identified as such rather than guessed to be a rename), the required AccordionItem.value is now taught, and the same-page sweep accounts for the only other block. The adjacent catalog defect found while confirming the real interface is filed as its own card instead of scope-creeping in — the right split. Gates pinned to 9e4735e5f, matching this PR's current head.

Will flip ready + enable auto-merge once Lint, Type Check, and Test shards 1–4 conclude success on this head.


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 15, 2026 18:34
@yinlianghui
yinlianghui added this pull request to the merge queueAug 15, 2026
Merged via the queue into main with commit 466ce43Aug 15, 2026
18 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-4722-accordion-mdx-schema-truth branch August 15, 2026 18:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding(docs): accordion.mdx's schema block is stale against the real AccordionSchema/AccordionItem interface

2 participants

@yinlianghui@claude