Uh oh!
There was an error while loading. Please reload this page.
docs(fields): split location.mdx's welded map fence into a tsx and a jsonc block - #6134
Conversation
…jsonc block `content/docs/fields/location.mdx`'s "Integration with Maps" fence welded two different examples into one block: an import plus a JSX element (which needs `tsx`), immediately followed by a bare metadata object literal at statement position (which `tsx` reads as a labelled statement, then fails on the commas). Measured standalone with the repo's own TypeScript on origin/main: 2 syntactic diagnostics as `ts`, 5 as `tsx` — it parsed under neither fence language, which is why the page was excluded from objectui#5867 batch 3 by measurement. The fence is split in two, each half fenced for what it actually is: a `tsx` block holding the widget example, made self-contained so it compiles, and a `jsonc` block holding the `object-map` metadata node. Connecting prose numbers the two halves so the section still reads as one example. The page's other classifier-matching fence, "Field Schema", is re-fenced plaintext -> ts in the same pass. Accounting: 1 block re-fenced, plus 1 fence split into 2 of which 1 half is TypeScript, so blocks-to-compile rises by 1 + 1 = 2 — measured 206 -> 208, with diagnostics 0 and declared fragments unmoved at 111. Part of #6127 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
commented
Aug 24, 2026
PM: ACCEPTThe arithmetic is derived, not asserted — which was the whole point of the warningMeasured: 206 → 208, declared fragments unmoved at 111, covered/ungated document sets unchanged (178/44). The identity this card family has used across four batches doesn't hold under a split, and you showed the replacement rather than presenting a delta that quietly failed to match. The |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#6127
Docs only, publishes nothing. Verified at
fe478454e.The defect, re-measured on
origin/mainrather than inheritedcontent/docs/fields/location.mdx's Integration with Maps fence welded twodifferent examples into one block: an import plus a JSX element (which needs
tsx), immediately followed by a bare metadata object literal at statementposition (which
tsxreads as a labelled statement, then falls over on thecommas). Parsed standalone with the repo's own TypeScript (6.0.3) at
133e2ea1e, before any edit:It parses under neither fence language, which is why switching the single
fence to
tsxis the obvious move and the wrong one.The fix — the fence split in two, per the ruling
Each half is now fenced for what it actually is:
tsxblock holding the widget example, made self-contained so itcompiles: it renders
LocationFieldwith a typedLocationFieldMetadataanda state-held coordinate pair, instead of spreading an undeclared
props(which would have reddened the gate with
TS2304: Cannot find name 'props');jsoncblock holding theobject-mapmetadata node — a metadatadocument, not a component call, and a schema-key question
check-doc-snippet-typesexplicitly says it does not answer (see its header,"Schema-key validity").
jsoncis an existing convention in this tree(
guide/record-edit-modes.md,guide/troubleshooting.md) and keeps theinline comments that carry the teaching.
No
FRAGMENT_MARKERwas declared and nothing was left plaintext to dodge theproblem.
After the split, parsed the same way:
The gate parses every block as TSX regardless of the fence label, so 0 there is
the number that governs; the
tsleg is quoted only to show the label is thehonest one.
Bounded in-place fix, named rather than smuggled
The page's other classifier-matching fence — Field Schema, first line
interface LocationFieldSchema {— is re-fencedplaintext->tsin the samepass. This is the same defect class (#5867 plaintext-fenced TypeScript), the
correct form is pinned by landed evidence (batch 3, PR #6128, does exactly this
to nine sibling
fieldspages), no other claim holds this file (batch 3 excludedlocation.mdxin full; #6126 coversauto-numberandobjectonly), and it addsno verification surface beyond the gate already run here. It is also what makes
the page whole: #6126 records
location.mdxas blocking 2 of the 129 blocksremaining on #5867, and those two are exactly these two.
Applying #5867 triage's classifier (first line starts with
import/export/interface/type X =/const x: T) to the page's four plaintext fences:lines 22 and 81 are code; the other two — first lines
{and// Valid coordinates— are prose and are left alone.Splitting one fence into two changes the block count, so this PR cannot assert
the plain "blocks-to-compile rises by exactly the batch size" identity. The
derivation, stated:
ts(Field Schema).tsxhalf enters the gate's population; the
jsonchalf is not a TS fence languageand does not.
Measured, gate's own summary lines:
206 -> 208 = +2, exactly the derivation. Declared fragments unmoved at 111.
The page's fence count rises 4 -> 5, and the covered/ungated document sets are
unchanged (178 covered / 44 ungated both runs; the "hold a ts/tsx block" count
moves 63 -> 64, which is
location.mdxarriving).Verification
All at
fe478454e, each quoting the gate's own verdict line.pnpm check:doc-snippetsSemantic phase: 208 of 208 block(s) judged, 0 failed./Every covered documentation snippet compiles against the built types.(exit 0)pnpm check:doc-types✅ Every documented component type is registered.(exit 0)pnpm docs:check-linksLinks are valid across 15 scan roots.(exit 0)pnpm check:control-bytes✅ check-control-bytes: OK (scanned 5081 tracked text file(s); skipped 85 binary).(exit 0)pnpm changeset:check✅ No changeset declares a major bump.(exit 0)node scripts/check-changeset-presence.mjs✅ No source of a released package changed in this range, so no changeset is owed.(exit 0)vitest runon the five doc-gate spec filesTest Files 5 passed (5)/Tests 221 passed (221)(exit 0)Exit codes were captured before any pipe (
cmd > file 2>&1; EXIT=$?), neverthrough
tail.Ablation — the block is judged, not merely counted. Predicted direction: red,
naming the new block. With the fix committed first,
LocationFieldin the newtsxblock was renamed to a name the package does not export; the mutation wasconfirmed on disk by grep (
injected-text count: 1), the gate then reported:exit 1. The restore leg ran from an
EXIT INT TERMtrap asgit checkout HEAD -- content/docs/fields/location.mdx(never the bare form),and absence was confirmed after it: injected-text count 0,
git statusclean.No rebuild leg is involved — the mutation is in a document, and the packages the
snippet program compiles against were untouched.
Render check.
pnpm --filter @object-ui/site buildexits 0 and the page'sprerendered HTML (
apps/site/.next/server/app/docs/fields/location.html) wasread back. The section reads as one example in two numbered halves — an intro
sentence naming both, then "1. The input." and "2. The map over the same
field." — and the closing
objectName/markersnote still lands under themap half. The
jsoncblock is really highlighted, not dumped as plain text(shiki emits keyed token spans for
"type"/"object-map"and greys the//comments), and both halves get their own Copy button.
Lint, narrowed and declared. The diff is two files,
location.mdxand a.changeset/*.md. ① Population read from eslint's own config: every config blockin
eslint.config.jsscopesfilesto**/*.{ts,tsx}or narrower — no blockadmits
.md/.mdx, and no markdown processor is configured. ② Count read fromeslint --format jsonon exactly those two files: 2 files, 0 rule findings, bothreported
File ignored because no matching configuration was supplied.③ Invariance:
eslint.config.jsconfigures no type-aware linting (noproject:/
projectService), and the diff contains zero files in the lint population, sono untouched file's verdict can move because of it. Repo-wide
pnpm lintis CI'srun.
Out of scope
Nothing new filed — no unrelated defect surfaced. The page's two prose fences
stay
plaintextby the classifier, and #6126'sauto-number/objectblockers are untouched here.
Generated by Claude Code