Skip to content

check-doc-component-types collects only .mdx too — 26 .md guides teach 345 type literals inside fences with nothing checking them #5342

Description

@os-support-ai

Found while implementing #5174 (PR #5341), which widened the sibling gate's collector. Filed unassigned and deliberately NOT fixed in that PR — #5174 is scoped to check-doc-snippet-types.mjs, and this is a second gate with its own ledger, its own exemption vocabulary and its own CI-cost profile.

Sub-issue of #5106 because it is the same gate's scan surface, on a second axis: #5106 measured that the surface stops at code fences (tables and prose are outside it); this one is that the surface also stops at the .mdx extension.

Measured, on today's main

scripts/check-doc-component-types.mjs:697:

constfiles=walkFiles(docsDir,(f)=>f.endsWith('.mdx')).sort();

Its own summary line confirms the surface at runtime:

Scanned 143 mdx file(s), 632 code block(s), 564 `type` literal(s) ...

content/docs holds 143 .mdxand 40 .md. Of those 40, 26 hold a type: 'value' literal inside a fenced code block — 345 literals in total, none of them read by this gate. Largest contributors:

102 content/docs/api/schema-reference.md
10 content/docs/guide/dashboard-filters.md
7 content/docs/components/index.md
6 content/docs/guide/notifications.md
2 content/docs/guide/data-source.md
1 content/docs/guide/react-pages.md

(Count is a fence-restricted scan of type keys, the same shape the gate matches; treat it as the order of magnitude rather than the gate's exact tally, which only the gate can produce.)

Why this is worth a card and not just a note

This is the same class the gate exists to close. objectui#4823 landed it after real recurrences of documented component keys that nothing registers, and objectui#5076 found a whole #5002 family mirror sitting on the docs site. Those guides are the getting-started pages, and api/schema-reference.md alone carries 102 type literals presented as reference material.

One honest difference from #5174

This gate is not contradicting itself. Its docblock says, in its first sentence, "Every type string literal in a content/docs/**.mdx code block" — the surface is stated, and the DOC_TYPE_EXEMPTIONS ledger is keyed by .mdx paths throughout. So this is a coverage gap, not a broken promise, and it should be triaged on whether the coverage is worth the triage pass rather than as a correctness defect.

What turning it on would cost, for triage

Unknown until measured, and that measurement is the first task on this card, not a prerequisite for filing. The comparable number from #5174: widening the snippet gate to .md collected 40 more documents, of which 28 held a compilable block and all 28 failed on first collection. Expect a similar triage pass here, absorbed by DOC_TYPE_EXEMPTIONS entries plus real key fixes. Note that #5106 proposes changes to the same scanDocs / walkFiles region, so the two are best sequenced rather than run in parallel.

Reproduce

sed -n '690,700p' scripts/check-doc-component-types.mjs # the .mdx-only walk
node scripts/check-doc-component-types.mjs | tail -2 # "Scanned 143 mdx file(s)"
find content/docs -name '*.md' -type f | wc -l # 40

Related: #5174 / PR #5341 (the same extension gap in check-doc-snippet-types.mjs, fixed there), #5106 (the fence axis of this same gate), objectui#4823 (this gate's own card).

Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions