This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
docs(guide): give schema-rendering.md's nested chart rows it can actually plot - #8022
Merged
Merged
Conversation
`content/docs/guide/schema-rendering.md` taught a `chart` node binding
node-level `data` to `${chartData}`. Measured on `4922b83`, that node is
wrong twice over:
* the expression is never evaluated there. `SchemaRenderer` evaluates the
`properties` / `props` bags, the condition keys and the carriage keys the
node's own type declares; node-level `data` is none of them, so the raw
string reaches `ChartRenderer`, whose
`Array.isArray(schema.data) ? schema.data : []` drops it. Rendered through
the real renderer with a provider genuinely holding the rows: 0
`.recharts-bar`, 0 x-axis ticks — a correct-looking frame over nothing.
* since objectui#7113 it is also a parse refusal. `ChartSchema.data` is
`z.array(z.record(...))`, and `series` is required, so the authored node
fails at both paths.
The example now carries literal rows plus the `series` / `xAxisKey` pair that
selects the plotted column and the category column, and one paragraph says why
the rows are literal and where to resolve them instead. The `properties` bag
does carry the expression, but `skills/objectui/rules/protocol.md` records it
as objectui#4795's open contract question rather than a taught surface, so the
guide keeps teaching the host-resolved route.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Contributor
Author
|
Standing-down note — Generated by Claude Code |
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 free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #7680
The Nested Schemas example taught a
chartnode binding node-leveldatato${chartData}. One file, one node, 15 insertions, 1 deletion. Both directions are measuredbelow, on the bytes the page actually carries — every node in this PR body was lifted out of
the markdown by a script, not retyped.
field.
Direction (a) — the parser
Built
@object-ui/typeszod mirror,ChartSchema.safeParse, controls in the same run so theinstrument is demonstrably not blind:
The card measured one refusal; there are two.
ChartSchema.seriesis required and theauthored node carries none, so the second control isolates that half: literal rows alone still
fail, at
seriesonly. The corrected node passes.Re-run against the node parsed out of the edited page rather than retyped:
Direction (b) — the renderer
The chart sibling of objectui#6665's four-leg table, which had never been run on
chart. RealSchemaRendererinside aSchemaRendererProviderholding{ chartData: 2 rows }, identicalseries/xAxisKeyin every leg, counting.recharts-barafter the lazy implementationresolves:
.recharts-bardata=${data.chartData}propspropertiesSame shape as the
data-tabletable objectui#6665 measured — so this is the same mechanism,not a chart-specific quirk.
Then the two nodes the page itself carries, each parsed out of its own markdown file and
rendered through the same harness:
The provider genuinely holds
chartDatain the BEFORE leg, so 0 bars over a drawn frame isthe defect and not a missing fixture.
Why literal rows, and not the
propertiesspellingpropertiesdoes carry the expression — leg 3 above plots. It is not what the guide shouldteach, for three measured reasons:
skills/objectui/rules/protocol.md, objectui#6665's own remediation, already rules on thisexact question: the
propertiesrow "works today, but its channel is objectui#4795's opencontract question, not a taught surface", and the route the skill teaches is the host
resolving the array onto the node. A guide teaching the opposite would contradict the
published skill.
BaseSchemais.passthrough(), so rows written underpropertiesare not validated atall — that is why the CANDIDATE leg passes in (a). Teaching it would move the rows off
the one key
ChartSchemacan refuse, which is the wrong direction for metadata an AIwrites.
chartreads nobindeither —ChartRenderercalls nouseDataScope— so there is nothird declarative route to point at. Host-resolved rows on the node is the whole set.
What the page says now
The example gains
series/xAxisKeyand literal rows, and one paragraph states themechanism: the raw string reaching
ChartRenderer'sArray.isArray(schema.data) ? schema.data : [], the refusal since objectui#7113, what theseries[].name/xAxisKeypair selects, and where to resolve the array instead.Gates — all on final HEAD
2e3b92680, exit codes captured by redirect-then-capturepnpm check:doc-typesEvery documented component type is registered.(188 files, 889typeliterals)pnpm exec vitest runon 6 doc pin suitesTest Files 6 passed (6)/Tests 344 passed (344)pnpm check:doc-fencesevery TypeScript block in 227 document(s) is fenced ts/tsx/typescriptnode scripts/check-doc-links.mjsLinks are valid across 17 scan roots.pnpm check:doc-snippets528 of 528 block(s) judged, 0 failed— recorded, not evidence: JSON fences are outside its filter (objectui#5250)pnpm check:doc-example-readersOK 80 documented symbol(s) … no @example hand-spells onepnpm check:control-bytesOK (scanned 6446 tracked text file(s)); plus agrep -naPself-scan of the page, no hitsnode scripts/check-changeset-presence.mjsNo source or published contract of a released package changed in this rangenode scripts/check-governed-queue-guard.mjs --testNOT GOVERNED — 1 path(s) checked against 5 governed surface(s)The six pin suites are
check-doc-component-types,check-doc-expression-carriage,check-doc-links,check-doc-snippet-types,check-doc-example-shared-reader,doc-version-claims— derived bygit grep -lfor the page path plus everyscripts/__tests__file that walkscontent/docs. Docs-only PRs skip CI's test shards bydesign, so these first run in the merge group unless run here.
scripts/check-doc-component-types.mjs's per-page entry for this guide needed no change: theedit adds no unregistered
typeliteral and removes none of the three exempted ones, soneither the gate nor its
stale-exemptionleg moves.The repo's own census agrees, in both directions
scripts/check-doc-expression-carriage.mjsis a report-only gate that names exactly this classof defect. Reverse-verified after committing, by restoring the base file, re-running, and
restoring the branch file (
git diff HEADempty afterwards):The page leaves the census. The three sites that remain belong to the three open cards the
gate's own footer names, and are untouched here.
Repo-wide lint
eslint . --no-inline-configis CI's run, not this branch's. The narrowing is a measurement,not an omission:
npx eslint --format json content/docs/guide/schema-rendering.mdreports theone changed file with
"message": "File ignored because no matching configuration was supplied."— eslint's own config supplies no matching configuration for
.md, and type-aware linting isnot in play, so this diff cannot move any judgement, on this file or on any untouched one.
Out of scope, filed not fixed
objectui#8021 — the same page's Data Context section teaches a
dataprop the evaluatornever reads, plus a bare
${user.name}spelling no scope holds. Different key family, threeseparate passages, measured with a four-leg control table on that card. Not touched here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code