Uh oh!
There was an error while loading. Please reload this page.
docs(fields): correct the four Cell Renderer imports and bring the blocks under the type gate - #6119
Conversation
…ocks under the type gate The Cell Renderer example on grid, object, summary and vector each imported a symbol @object-ui/fields does not export. Re-fenced as ts and measured on origin/main, all four produced TS2724. Two different defects, per the ruling on the card: - summary / object have a real renderer under a different name — getCellRenderer's standardMap routes `summary` to the exported FormulaCellRenderer and `object` to the exported JsonCellRenderer. The imports are renamed. - grid / vector have no exported renderer at all — standardMap answers both with an inline anonymous component, so there is no symbol to import. Their snippets now show the real, supported path: getCellRenderer(type). No new exports were minted, and no FRAGMENT_MARKER was added: declared fragments stay at 111 while blocks-to-compile goes 181 -> 185. The rendered-output comments beside each import were corrected in the same pass — they described output the code does not produce (`grid` renders "[Grid]", not "5 rows"; `vector` renders "[Vector]", not a component preview; FormulaCellRenderer stringifies rather than formatting with tabular numbers; JsonCellRenderer never emits a literal "[Object]"). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
commented
Aug 24, 2026
PM: ACCEPTBoth halves of the ruling executed, and the acceptance numbers are exactly what the card owed:
Fragments unmoved is the one that matters: it is the proof no You verified the rename rather than assuming itI warned that a rename might not be the whole fix — the shape could have moved too. You checked: For Correcting the output comments was right, and I would have missed itYou went one step past the imports: each block's rendered-output comment asserted output the code does not produce —
Exactly right, and it is the same defect class as the imports themselves — prose asserting behaviour the code does not have. A reader trusting the corrected import would then have trusted the uncorrected comment beside it. My order did not ask for this; catching it is the difference between fixing the diagnostic and fixing the page.
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#6107
Four
content/docs/fields/*.mdxpages documented a Cell Renderer example importing asymbol
@object-ui/fieldsdoes not export. This PR corrects all four and brings theblocks into the
check-doc-snippet-typescompile population, per the PM ruling atobjectui#6107 (comment 5398904856).
Re-derived the defect on
origin/mainbefore editingA throwaway probe re-fenced only those four
plaintextblocks asts, ran the gateagainst the built
dist/*.d.ts, and restored the tree from anEXITtrap (git statusclean afterwards, verified inside the trap). The gate's own lines on
b9c367717:Two different defects, two different fixes
summaryandobject— rename the import.getCellRenderer'sstandardMap(
packages/fields/src/index.tsx) routessummaryto the exportedFormulaCellRendererand
objectto the exportedJsonCellRenderer. The names were the whole difference:both are declared in the shipped
packages/fields/dist/index.d.tsasexport declare function ...({ value }: CellRendererProps): React.ReactElement(lines 261 and 287), and the corrected imports compile clean.
gridandvector— rewrite to the real API. No new exports were minted. The samemap answers both with an inline anonymous component —
gridandvectoreach map toan arrow function returning a muted span whose only text is the literal
[Grid]/[Vector]— so there is no symbol to import. Their snippets now show the supported path,getCellRenderer(type), whichpackages/fields/dist/index.d.ts:331declares as afunction taking
fieldType: stringand returningReact.FCparameterised byCellRendererProps. The honest snippet was writable, so the "stop and report" branch ofthe ruling did not apply.
No
FRAGMENT_MARKERwas added to any of the four blocks. Declared fragments areunmoved at 111.
Rendered-output comments corrected in the same pass
Each block's neighbouring comment asserted output the code does not produce. These were
rewritten from the
standardMapentries and renderer bodies rather than from the prose:grid// Renders: "5 rows"[Grid]; the row-count renderer isrepeater, a different typevector// Renders: [0.1234, ...] (768D)[Vector]summary15,750.50FormulaCellRendererisfont-monoand doesString(safe)— no thousands separator, no precisionobject[Object]"JsonCellRendereremits truncated single-line JSON with the full text intitle; it never emits a literal[Object]Leaving a knowingly-false comment beside a corrected import would have shipped half the fix.
Verification — all at
53ce33ca1(the final commit)Packages built first (
turbo run buildover the 20 filters the gate itself derives via--build-filter), so every result below is measured against the shippedpackages/*/dist/*.d.ts, never against source. The gate'sresolutioncontrol confirmsit each run:
resolved to '.../packages/types/dist/index.d.ts'.node scripts/check-doc-snippet-types.mjs— before/after:origin/main(b9c367717)53ce33ca1)Verdict line on this branch:
Ablation — each corrected import is load-bearing. With the fix committed, all four
import names were replaced with bogus ones (
getCellRendererNotAnExport, …), confirmedon disk per file (removed-text count 1 to 0, injected-text count 1,
git diff --statnon-empty), the gate re-run, and the tree restored from an
EXITtrap. The gate went redon exactly the four blocks, each naming its own file:
So the four blocks genuinely reach the semantic phase — the green above is a measurement,
not a silent skip. (No rebuild leg was needed: the mutation is in the documents, not in a
package whose
dist/the program reads.)Other gates implicated by this diff, each quoting its own verdict line:
check:doc-types—Every documented component type is registered.(886typeliterals)docs:check-links—Links are valid across 15 scan roots.check:control-bytes—check-control-bytes: OK (scanned 5062 tracked text file(s))check-changeset-presence—No source of a released package changed in this range, so no changeset is owed.(docs-only; nothing under a released package'ssrc/)pnpm exec vitest run scripts/__tests__/check-doc-snippet-types.test.ts scripts/__tests__/check-doc-component-types.test.ts—Test Files 2 passed (2) · Tests 54 passed (54)Docs render — a declared narrowing, with the measurement. Instead of a full
apps/siteNext build, the four changed pages were compiled directly with the repo's own@mdx-js/mdx@3.1.1: 4 of 4 compiled,MDX_COMPILE_FAILURES=0, and the corrected snippettext is present in each compiled output (so the blocks survive into the rendered page).
The narrowing is safe because fumadocs compiles each page file independently and this diff
touches four
.mdxpages only — no MDX config, plugin, or shared component — so nountouched page's compilation can move.
ESLint — narrowing read from ESLint's own config, not guessed.
eslint.config.jsdeclares its linted population as
files: ['**/*.{ts,tsx}'];.mdxappears in no configblock. Measured rather than asserted, via
eslint --no-inline-config --format jsonoverthe four changed files: 4 files reported, 0 errors, and each message is
File ignored because no matching configuration was supplied.A diff confined to.mdxcannot move any ESLint verdict.
Generated by Claude Code