Uh oh!
There was an error while loading. Please reload this page.
docs(guides,tooling): clear three .md pages off the doc-snippet ledger (#5174 batch 3) - #5983
Merged
Merged
Conversation
Walk `guide/plugin-development`, `guide/schema-rendering` and `guide/theming`
off `UNGATED_DOCS`, clearing 81 diagnostics (25 / 27 / 29). The ledger goes
49 -> 46 entries and the covered set 173 -> 176; `guide/layout` and
`guide/component-registry` are the two that remain.
38 blocks come under the gate: 26 declared fragments and 12 that compile, of
which 7 already compiled untouched and 5 were edited to. Only the two honest
routes were used.
Four genuine documented-API defects were fixed rather than declared away:
- `guide/theming`'s three `Theme` objects were annotated `Theme` while the
annotation itself errored, so TypeScript never excess-checked the literals.
With it resolving, the `brand` palette had ten of fourteen `colors` keys off
`ColorPalette` -- `"primary-foreground"`, `foreground`, `muted`, `ring`,
`destructive` and the other `*-foreground` pairs are Shadcn CSS VARIABLE
names, not palette keys -- plus `radius` and `fonts`, neither a `Theme` key,
and no `label`, which is required. `generateColorVars` iterates
`COLOR_TO_CSS_MAP`, so every one of those was dropped in silence at runtime.
Routed through the two doors that do work: real palette keys, each annotated
with the variable it emits, and `customVars` for the rest.
- `guide/plugin-development`'s Vitest example asserted `toBeInTheDocument()`
with no `@testing-library/jest-dom` import.
- `guide/schema-rendering`'s first example set `body: { /* ... */ }`, which is
not a `SchemaNode`.
- the same page's restated `BaseSchema` named `CSSProperties` from nowhere.
Gate strictness is unmoved: everything from the `Fence scanning` banner to EOF
is byte-identical to `main` (475 lines, same sha), as are `DOC_EXTENSIONS`,
`TS_FENCE_LANGUAGES`, `FRAGMENT_MARKER`, `MIN_REASON_LENGTH` and
`COMPILER_OPTIONS`. `--build-filter` is unchanged at 20 filters / 33 turbo
build tasks, both sets identical package-by-package.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
This was referenced Aug 24, 2026
yinlianghui-tw
marked this pull request as ready for review
August 24, 2026 10:39
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 #5174
Batch 3 of the
.mdledger triage. Walksguide/plugin-development,guide/schema-renderingandguide/themingoffUNGATED_DOCS, clearing 81 diagnostics.guide/layoutandguide/component-registryare the two entries that remain on this card.Verified at final commit
2f6207692, working tree clean and byte-identical to what is pushed; the gate union below was re-run after that commit.Ledger
UNGATED_DOCSentriesPer page, diagnostics actually cleared:
content/docs/guide/plugin-development.mdcontent/docs/guide/schema-rendering.mdcontent/docs/guide/theming.mdOnly the two honest routes were used; no third.
Four real documented-API defects, fixed rather than declared away
1.
guide/theming— the theme documents were mostly keys the engine drops. The largest single defect this card has surfaced, and it was hidden the way #5138 describes: all threeThemeobjects were annotatedThemewhile the annotation itself errored (Themewas never imported in two of them), so TypeScript never excess-checked the literals underneath. The ledger entry recorded the annotation error and nothing beneath it.With the annotation resolving, the
brandpalette alone had ten of its fourteencolorskeys offColorPalette—primary-foreground,foreground,muted,muted-foreground,ring,destructive,destructive-foreground,secondary-foreground,accent-foregroundare Shadcn CSS variable names, not palette keys — plusradiusandfonts, neither of which is aThemekey at all, and nolabel, which is required.This is not a typing nicety.
generateColorVarsiteratesCOLOR_TO_CSS_MAP, which is typed as aRecordkeyed bykeyof ColorPalette:so a key that is not on
ColorPalettecan never be emitted — it is dropped in silence at runtime. The page was teaching theme JSON most of which the engine ignores. The fix routes it through the two doors that do work: the real palette keys, each annotated with the variable it emits (text→--foreground,surface→--card,error→--destructive,textSecondary→--muted-foreground), andcustomVarsfor the rest, which the engine emits verbatim as a--KEY: VALUEdeclaration and which is the declared escape hatch for exactly this.2.
guide/plugin-development— the documented Vitest example could not run. Under "Testing Plugins", the test assertstoBeInTheDocument()five times with no@testing-library/jest-domimport. That matcher is not a Vitest one; the repo's own tests all import it. A reader copying that block got neither the types nor the matcher.3.
guide/schema-rendering— the page's very first example did not type-check.body: { /* ... */ }is not assignable toSchemaNode | SchemaNode[](TS2322). Given a real node.4.
guide/schema-rendering— the restatedBaseSchemanamedCSSPropertiesfrom nowhere. Now says where it comes from.Invariants
Checked programmatically by importing
origin/main's copy of the script and this branch's copy and comparing key sets:ADDED ledger entries: []UNGATED_DOCShunk contains only removals, exactly the three batch pagesREMOVED entries= exactly the three batch pages and nothing else[]across all 46Gate strictness proven byte-for-byte, not argued. Everything from the
Fence scanningbanner to EOF —scanFences,listDocuments,derivePackageTypePaths,analyze,compileSnippets, reporting,main— is byte-identical toorigin/main: 475 lines, shadd9e52a11f116f3bon both sides.DOC_EXTENSIONS,TS_FENCE_LANGUAGES,FRAGMENT_MARKER,MIN_REASON_LENGTHandCOMPILER_OPTIONSeach hash identical. The script diff is the three removed entries plus the ledger docblock's own prose.--build-filtercost (#4846) — re-measured, not assumedFilters 20 → 20, and the two filter sets are textually identical. Turbo build tasks 33 → 33, task sets identical package-by-package from
--dry=json(tasks ADDED: [],tasks REMOVED: []). Three more covered pages cost this gate zero extra CI build work — the packages they import were already in the closure. Nothing for the maintainer to weigh under #4846.(Batch 2 moved filters 19 → 20; this batch moves nothing. The real
turbo runreports 32 successful where--dryenumerates 33 — the difference is@object-ui/test-support#build, which the dry run lists but which carries no build command. Both sides measured the same way, so the zero delta stands.)Gates
Exit codes captured before any pipe; every line quotes the gate's own printed verdict.
check-doc-snippet-types.mjsScanned 222 document(s): 176 covered (40 of them hold a ts/tsx block), 46 ungated·Covered blocks: 241 — 147 to compile, 94 declared fragment(s).·Syntax phase: every block parsed·Semantic phase: 147 of 147 block(s) judged, 0 failed.Controls green: resolution landed onpackages/types/dist/index.d.ts, sentinel produced TS2305, positive control 0 diagnosticsscripts/__tests__/check-doc-snippet-types.test.tsTest Files 1 passed (1)·Tests 20 passed (20)— running the script is not running its test; both were runcheck-doc-component-types.mjsScanned 183 doc file(s) (.mdx + .md), 1056 code block(s), 886 type literal(s)·Every documented component type is registered.check-doc-links.mjsLinks are valid across 13 scan roots.check-control-bytes.mjsOK (scanned 4950 tracked text file(s); skipped 85 binary), plus a manual control-byte grep over all four changed files: no hitscheck-changeset-presence.mjs4 file(s) changed, 0 of them under the src/ of a package the release covers·No source of a released package changed in this range, so no changeset is owed.Verdict followed; none addedcheck-changeset-no-major.mjsNo changeset declares a major bump.check-lint-coverage.mjs46/46 packages linted, 0 with outstanding errors (0 total).lint:root(the complete root eslint task)0 errors, 26 warnings, all pre-existing; the changed.mjsreportserrorCount 0 warningCount 0. Run whole, not narrowedpnpm checkAll checks passedLint population read from eslint's own
--format json: 166 files, 0 of them.md, so the three changed.mdfiles are outside eslint's population by its own config; the other 46 per-package lint tasks are scoped topackages/*,apps/*,examples/*, which this diff does not touch.Changeset: none owed — the presence gate says so and its verdict was followed. ⛔ No
skip-changesetlabel: #4912 / #3724 establish that label was never a real mechanism in this repo, and none was created or applied.Reverse verification
Predictions written to disk before each run with the direction stated; mutation proven by grepping the specific text meant to change;
trap … EXIT INT TERMrestore; restore leg actually run and verified. No build artifact sits between mutation and thing-under-test on either leg — the gate reads the markdown straight from disk and thedist/*.d.tsit compiles against is untouched — so no rebuild was needed.Leg 1 (revert
theming.mdonly, keep its ledger removal). Predicted exit 1; exactly 29 diagnostics all on that page; fragments 94 → 84; blocks-to-compile 147 → 157; NOTE printed; direction MORE;TS2353on thecorporateThemeliteral andTS2304 'Theme'on the brand block. Observed exit 1, 29 diagnostics all on that page,Covered blocks: 241 — 157 to compile, 84 declared fragment(s).,Syntax phase: 2 block(s) failed to parse, NOTE printed,TS2353: … 'primary-foreground' does not exist in type 'ColorPalette'andTS2304: Cannot find name 'Theme'. Match including direction.Leg 2 (revert all three pages). Predicted exit 1; exactly 81 split 25 / 27 / 29 per page; fragments 94 → 68; blocks-to-compile 147 → 173; covered blocks 241 unchanged; NOTE printed; direction MORE. Observed exit 1, 81 diagnostics split exactly
25 plugin-development / 27 schema-rendering / 29 theming— matching the baseline to the unit and per page —Covered blocks: 241 — 173 to compile, 68 declared fragment(s).,Syntax phase: 4 block(s) failed to parse, NOTE printed. Match including direction.A restore leg failed the first time round, and is reported rather than quietly re-run.
git checkout origin/main -- PATHwrites the index as well as the worktree, so the trap'sgit checkout -- PATHrestored from the polluted index and left the mutation on disk — reporting success while changing nothing. It was caught by the post-leggit status, not by the trap. Both legs were then re-run withgit checkout HEAD -- PATH, and both reproduced their first run byte-identically (diff -qclean on both outputs). Restore verified after each:git statusclean,git diff HEADempty, 26 markers back on disk (9 / 7 / 10), gate exit 0 with147 of 147 block(s) judged, 0 failed. Nothing was lost — the work was committed before reverse verification began.Zone 2 assumptions — both re-measured, both held
origin/main@2aff580b5, exactly as dispatched. Line numbers had not rotted.TS2305/TS2724/TS2614across all 81 diagnostics. The mix was 43TS2304, 8TS7006, 8TS2307, 6TS2339, 5TS1005, 4TS1109, 2TS2451, and one each ofTS2882/TS2657/TS2353/TS2322/TS17008. Every one was genuine per-page fragment / self-containment judgement. No fabricated symbol was re-decided per page and The getting-started guides teach ~14 symbols the packages do not export — one decision per symbol, applied everywhere (the #5160 class, oncontent/docs/guide/**) #5343 needed no supplementing.Generated by Claude Code