Repository navigation
docs(plugin-dashboard): the charts example authors a line widget bound to a dataset; the card widget with nested children retires (objectui#11484) - #11523
Conversation
…d to a dataset The "Dashboard with Charts" fence authored its Sales Trend widget as a `card` with a nested `chart` node in `children`. `card` is outside the closed widget-type vocabulary and a widget declares no `children` slot, so DashboardComponentSchema refuses it on the tolerant and the strict authoring face, and the TypeScript face refuses it too. The fence now takes the package README's widget shape: `type: "line"` naming the chart family, bound to a `dataset` with `dimensions` and `values`. The lead-in and the callout no longer teach `type: "chart"` + `chartType` for a widget, which the strict widget schema refuses as well. Claude-Session: https://claude.ai/code/session_01HRYqpqGcWpJuJkDmbRF75w Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
Brings objectui#11484 (the plugin page's charts example, PR #11523); it merges cleanly beside this branch's sections of the same page. Claude-Session: https://claude.ai/code/session_01XvhGmGAP79ZB8swnkapxPC Co-authored-by: Claude <noreply@anthropic.com>
Fixes #11484
content/docs/plugins/plugin-dashboard.mdx, section "Dashboard with Charts": the json fence's "Sales Trend" widget was acardwith a nestedchartnode inchildren. It now takes the widget shape the package README teaches since objectui#7035:"type": "line"names the chart family, and the widget binds"dataset": "sales"withdimensionsandvalues. The lead-in and the callout are rewritten with it. They taughttype: "chart"+chartTypefor a dashboard chart, and the widget slot refuses that spelling too (probe: a widget{ type: "chart", chartType: "line", dataset, dimensions, values }and a widget{ type: "line", chartType: "line", ... }are both refused byDashboardComponentSchema, tolerant and strict).The schema is not the wrong side here:
cardis outside the closed widget-type vocabulary (DashboardWidgetTypeSchema: the spec's chart families pluslist/custom), the widget-slot component arm admitsmetric-cardonly, and a widget declares nochildrenslot.Validator verdicts, before and after
1. The card's own instrument,
scripts/measure-strict-authoring-face.mjs --json, afterpnpm --filter @object-ui/types build. These are readings at the two commits named, not live counts:8366accd136e925b98abdashboardnodes refused by the strict twindashboardnodes red under the face as shippeddashboard:rows inredTodayReasonstype invalid_value,children invalid_type,(root) unrecognized_keys,(root) invalid_type2. A direct probe: the fence is extracted from the page and parsed with
@object-ui/types/zodfrom the builtdist/.DashboardComponentSchema(tolerant)invalid_valueatwidgets.1.type,unrecognized_keyschildrenatwidgets.1deriveStrictAuthoringSchema(DashboardComponentSchema)StrictAnyComponentSchemaDashboardComponentSchemafrom builtdist/index.d.ts,tsc --stricttype: "card"and onchildrenC3: which docs gate judges json fences on this page
None judges a json fence's schema validity, so the fixed fence has no gate pin. Per the ruling, no gate is added.
check:doc-types(scripts/check-doc-component-types.mjs) reads thetypeliterals in every code block undercontent/docs/**, json fences included. It only asks whether each type names a registered component; its header says it "answers one question only — does the type exist".cardandchartare registered, so the refused fence passed it. Measured: I put the old fence back on this branch's tree (an ablation throughablation-replace.mjs, restored to HEAD's blob). The probe refuses it andcheck:doc-typesexits 0.check:doc-snippetscompiles ts / tsx fences only.check:doc-examplesandcheck:doc-example-readersread JSDoc@exampleblocks underpackages/NAME/src, notcontent/docs/**.The one instrument that sees this class is the report-only measurement script above.
Why the README twin's
piewidget is not copiedThe README example also carries a
piewidget, andcheck:doc-typesrefusespieon this page.pienames no registered component, and the gate'sDOC_TYPE_EXEMPTIONSrow for this page coversmetric,metric-card,barandlineonly. Measured by ablation: with the pie widget added, all three schema faces accept the fence andcheck:doc-typesexits 1 with[unregistered-doc-type] type 'pie' (json). The exemption lives inscripts/check-doc-component-types.mjs, outside this claim's file surface. So the fence keeps the metric card and the line widget.Local verification, at
6e925b9node scripts/check-control-bytes.mjs,check:doc-types,node scripts/check-prompt-component-keys.mjs,check:doc-example-ids,check:doc-fences(with--self-test),node scripts/check-doc-links.mjsandcheck:new-line-citationsall exit 0.node scripts/check-changeset-presence.mjsexits 0: "No source or published contract of a released package changed in this range, so no changeset is owed." This PR has no changeset file.node scripts/markdown-test-inputs.mjs --changednames this page as a test input, so CI runs the full suite.pnpm exec vitest run scripts/__tests__/unconsumed-widget-option-claim-6186.test.ts scripts/__tests__/check-doc-component-types.test.tspassed 2 files and 131 tests. The first reads this page. The second covers the gate whose exemptions and key-table scan read it.content/docs/**as data, because the shared verification lock timed out three times behind a sibling's full-suite run. CI runs them.check:doc-snippets, because the diff touches no ts / tsx fence. Thedoc-snippet-typesworkflow runs it.Acceptance notes
packages/cli/src/__tests__/unfulfilled-chart-stubs-retired-8760.test.tshas a case named "the spelling the corrected dashboard doc teaches is accepted". Its comment says this page teaches{ type: 'chart', chartType: 'line' }. After this PR the page no longer teaches that spelling. The case still pins a true fact (the CLI accepts achartnode), and only its name and comment point at this page. Not filed; carrier: none.The dispatch session is
session_01HRYqpqGcWpJuJkDmbRF75w(domain:devx seat 2 PM, claim comment 5963526230).Generated by Claude Code