Uh oh!
There was an error while loading. Please reload this page.
docs(fields): re-fence 24 plaintext TypeScript blocks as ts (#5867 batch 1) - #6106
Conversation
…batch 1) `scripts/check-doc-snippet-types.mjs` reads only `ts` / `tsx` fences, so a TypeScript example fenced ```plaintext is invisible to it — and objectui#5044 proved one such block taught a type error on a page the gate reports as covered. Batch 1 of N applies triage's classifier verbatim — a plaintext block whose first line starts with `import` / `export` / `interface` / `type X =` / `const x: T` is code — to thirteen `content/docs/fields/*.mdx` scalar-field reference pages: boolean, currency, date, datetime, email, number, password, percent, phone, text, textarea, time, url. Twenty-four fences become `ts`. Genuinely-prose blocks on the same pages are left alone: `date.mdx`'s bare object literal and `percent.mdx`'s comment-only illustration stay `plaintext`. Nothing but the fence language changed — no block body was edited, no `FRAGMENT_MARKER` was declared, and the gate itself, `UNGATED_DOCS` and the ledger are untouched. The gate's blocks-to-compile count moves 157 to 181, exactly the batch size, with 0 diagnostics. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
commented
Aug 24, 2026
PM: ACCEPT — batch 1, and the probe is why this batch is trustworthyYou chose the batch by measurement, not by eyeThis is the part that makes the exclusions credible. Rather than judging which files were "unambiguous" by reading them, you re-fenced the other 13 So "these 13 are clean and those 13 are not" is a reading, not a judgement call. A batch scoped by inspection would have been a guess that happened to be right or wrong; this one knows. The counts are exactly what the card owed
Fragments holding at 111 is the one I look at hardest: it is the proof you did not take the forbidden route of declaring a Population corrected: 195 blocks / 118 files on today's The render check is unusually preciseRe-fencing is reader-visible, and "it still renders" is weak evidence. You read the prerendered HTML and counted shiki keyword spans: 13 interface blocks + 11 import blocks = 24, exactly the batch, each previously unstyled — while Leaving two prose blocks in place as living proof (
|
Uh oh!
There was an error while loading. Please reload this page.
Part of #5867 — batch 1 of N. The card's remaining blocks are listed at the bottom so the next batch does not have to re-derive them.
What this changes
Twenty-four fences, thirteen files, nothing else.
content/docs/fields/*.mdxscalar-field reference pages had their TypeScript examples fenced asplaintext, socheck-doc-snippet-types— which reads onlyts/tsxfences — never compiled them. Those twenty-four fences are nowts.No block body was edited. The diff is exactly 24 changed lines, all of them the fence opener — 24
+```tsagainst 24-```plaintext.Triage's classifier is applied verbatim, not widened: a plaintext block whose first line starts with
import/export/interface/type X =/const x: Tis code. Genuinely-prose blocks on the same pages are left alone, and two of them survive as evidence of that —date.mdx:69(a bare object literal) andpercent.mdx:53(a comment-only illustration) are stillplaintext.Files:
boolean·currency·date·datetime·email·number·password·percent·phone·text·textarea·time·url. Whole files: every classified block on each page converted, so none is left half-done. They were chosen because the classifier is unambiguous on all of them — each block is either a completeinterface …FieldSchema { … }using only primitives and globals, or a singleimport { …CellRenderer } from '@object-ui/fields'with comments.Gate counts, before and after
Both runs against the built tree; the after-run is at
542eaa0df, this branch's head.FRAGMENT_MARKERwas declaredGate strictness is unmoved:
scripts/check-doc-snippet-types.mjs,UNGATED_DOCSand the ledger prose are untouched by this diff.Every block was compiled, not eyeballed
The 24 blocks are in the gate's population now and the gate reports
181 of 181 block(s) judged, 0 failed. That is the whole claim — none of it is inferred from "it looks like TypeScript".The blocks still render, and they render better
pnpm site:buildis green (Next.js prerendered all 180+ doc pages). Reading the prerendered HTML back, the converted blocks now carry real shiki TypeScript tokens where they were previously unstyled — 13 highlightedinterfacekeywords plus 11 highlightedimportkeywords across the thirteen pages, which is 24, matching the batch exactly. The prose block left alone still renders with no colour spans at all ({"children":"// Stored in database: 0.85"}).That is the reader-visible half: these examples stopped looking like console output.
What reddens next, measured rather than predicted
Before choosing the batch I ran the remaining thirteen
content/docs/fields/pages through the gate as a throwaway probe — 27 fences mutated, gate run, tree restored by anEXITtrap (git statusclean afterwards). Five would pass untouched (file,formula,rich-text,select,user); eight red, and the diagnostics are real documentation defects:@object-ui/fieldsdoes not export —GridCellRenderer,ObjectCellRenderer,SummaryCellRenderer,VectorCellRenderer.gridandvectorhave no exported renderer at all (the resolver returns an inline anonymous component), so the remedy is a documentation decision rather than a rename. Filed separately, and those files are excluded from this batch.image.mdxandlookup.mdxreferenceFileMetadata/DataSourcewithout declaring or importing them.auto-number.mdxuses an ambientdb;object.mdximportsajv, not a root dependency;location.mdx's block is a JSX element followed by a bare object literal and does not parse.None of those was made to pass with a
FRAGMENT_MARKER.Population, corrected
The card says 211 blocks / 122 files. Re-measured on today's
origin/main(f471b4f73) with the gate's own fence walk and triage's classifier: 195 blocks across 118 files — all undercontent/docs, none in a package README.After this batch, 171 blocks in 105 files remain:
content/docs/components/**content/docs/core/**content/docs/fields/**content/docs/layout/**content/docs/plugins/**content/docs/blocks/**UNGATED_DOCS— re-fencing adds 0 to the compile populationOut of scope, deliberately
The gate itself,
UNGATED_DOCS, the ledger entries, and the future fence-language guard. No block body was rewritten and no fragment was declared.Verification
All at
542eaa0df:node scripts/check-doc-snippet-types.mjs—Every covered documentation snippet compiles against the built types.,181 of 181 block(s) judged, 0 failedpnpm check:doc-types—Every documented component type is registered.pnpm docs:check-links—Links are valid across 15 scan roots.pnpm check:control-bytes—OK (scanned 5056 tracked text file(s))pnpm exec vitest runoverscripts/__tests__/check-doc-snippet-types.test.ts,check-doc-component-types.test.ts,check-doc-links.test.tsanddoc-version-claims.test.ts, from the repo root —Test Files 4 passed (4) · Tests 165 passed (165)pnpm site:build— greenChangeset:
.changeset/5867-plaintext-fenced-ts-batch1.md, empty frontmatter — docs-only, publishes nothing.Refs: #5044 (the victim that made this a card) · #5174 (the batching precedent).
Generated by Claude Code
Generated by Claude Code