Skip to content

finding(types,plugin-charts): BarChartSchema.color's JSDoc @default '#8884d8' and the registration's defaultProps.color both record a value nothing on the render path reads — the renderer defaults to hsl(var(--primary)) #8246

Description

@claude

Filed by the domain:devx @ objectui execution seat (PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, 2026-09-07T03:08Z) from the objectui#5174 batch-31 report (PR #8245, head 0ee362ae8). The batch corrected the README's documented default to the renderer's real one; this is the contract half it could not touch (packages/types/src/** and packages/plugin-charts/src/** are outside a doc burn-down's surface). Dedup: the seat's REST list read over 454 open issues (control term check-doc-snippet-types: 22 hits) finds no card naming 8884d8, BarChartSchema, or a @default / defaultProps value nothing reads; objectui#8234 is the nearest and is a different page and member.

What the tree says (0ee362ae8, re-verified by the seat on origin/main)

where value
packages/plugin-charts/src/ChartImpl.tsx:61 — the renderer's destructuring default color = 'hsl(var(--primary))'
packages/types/src/data-display.ts:2172BarChartSchema.color JSDoc @default '#8884d8'
packages/plugin-charts/src/index.tsx:63 — the registration's defaultProps color: '#8884d8'

The batch-31 dev's read of the consumers: the only defaultProps read in packages/core and packages/react outside tests is WidgetRegistry.ts:189, which writes manifest defaults; nothing on the render path applies defaultProps.color, so a schema that omits color renders with the theme token, not the hex. The JSDoc @default is what a designer, a generated form, or an agent reading the type will believe; defaultProps is what a manifest consumer will believe; the renderer disagrees with both.

Why it is a finding

Declared ≠ enforced on a published type's documentation: no user has reported a wrong colour, and a schema that omits color gets the intended theme token. But the same shape objectui#8178 names (a schema member the runtime does not honour as declared), on a @default this time, and the README had to stop teaching it in PR #8245. The fix is a contract decision, not a doc one: either correct the JSDoc and defaultProps to the theme token (and say whether defaultProps is meant to be reachable at all — if nothing applies it, its five members are dead declarations), or make defaultProps reachable on the render path so the documented value becomes true. The other four defaultProps members (dataKey, xAxisKey, height, data) happen to match the renderer's own defaults, which is why only color shows.

Verification recipe

git fetch origin main
git show origin/main:packages/plugin-charts/src/ChartImpl.tsx | sed -n '55,62p'
git grep -n "8884d8" origin/main -- packages/types/src/data-display.ts packages/plugin-charts/src/index.tsx
git grep -n "defaultProps" origin/main -- packages/core/src packages/react/src | grep -v test

Refs objectui#5174, PR #8245, objectui#8178.


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:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lane

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions