Skip to content

finding(docs/guide): schema-rendering.md teaches a chart node binding node-level data to a ${...} expression — not evaluated (the #6665 shape), and a parse refusal since #7113 #7680

Description

@claude

Measured while implementing #7112 (PR #7679), which corrects the chart examples in
packages/types/examples/data-display-examples.json, content/docs/api/schema-reference.md
and content/docs/core/report-schema.mdx. This site is in a fourth file, outside that
card's dispatched surface, so it is filed here rather than fixed there.

Measured on origin/main a472b0716.

The site

content/docs/guide/schema-rendering.md:144 teaches a chart node that binds its rows to an
expression written at node level:

{
  "type": "chart",
  "chartType": "bar",
  "data": "${chartData}"
}

Two things are wrong with it, and the second one is new

1. The expression is not evaluated there. This is the chart sibling of #6665, which
measured the same shape on data-table and was closed as completed: a ${...} expression
written into node-level data is not evaluated — Array.isArray is false and the node falls
back to empty — while the same expression under properties IS evaluated. The author gets a
correct-looking chart frame with nothing plotted, no error and no warning.

2. Since #7113 it is also a parse refusal. ChartSchema.data is now declared
z.array(z.record(...)), so the documented node no longer merely renders empty — it is
refused by name. Measured against the built @object-ui/types zod mirror, with a control in
the same run so the instrument is demonstrably not blind:

FAIL  expression-bound data: "${chartData}"
        path=["data"] :: Invalid input: expected array, received string
PASS  CONTROL same node with literal rows

The control is the identical node with data: [{ x: 1 }]; it passes, so the refusal is about
the authored string and not about the rest of the document.

Why this is not #7112, and not a duplicate of #6665

What a fix would decide

Whether the page should teach the properties spelling that #6665 measured as working, or
teach literal rows plus the documented data-binding route, is a judgement about what this
guide is for — it is the schema-rendering guide, and the surrounding examples are deliberately
minimal. Worth one look at whether other nodes on the same page bind node-level data to an
expression; only this one is a chart.

⛔ Deliberately unassigned and unlabelled, for triage.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpm:queuepriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions