Repository navigation
fix(plugin-dashboard): a dimensioned pie / donut / funnel / treemap / sankey says which measures it drops (objectui#11417) - #11433
Conversation
… sankey says which measures it drops (objectui#11417) The shared chart renderer draws one series on the pie / donut, funnel, treemap and sankey arms, so a dataset widget of one of those families with a dimension and several measures drew the first and dropped the rest in silence. DatasetWidget now settles that in renderedMeasures from one set, SINGLE_SERIES_CHART_FAMILIES, read off the family a widget renders as, and the existing dropped-measure diagnostic (objectui#8894) names the dropped measures. For this shape the message states the cause and points to no ADR-0087 entry: the metric-family entry answers for a one-number tile. What is drawn does not change. The README, the docs page and the pending 8894 changeset said this shape draws the first measure with no warning; they now say the warning covers it. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
…pec refusal arrives; the tie accepts only the scatter's arity refusal Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
… bullet, not "the list above", for the dimensionless tile shape (objectui#11417) The new fourth bullet names pie / donut / funnel / treemap / sankey, so "a dimensionless widget of a type outside the list above" read as if a dimensionless pie were inside the list and outside the warning. It takes the tile and warns; the sentence now points at the third bullet. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
|
Every other check on this head is green or an expected skip. The review record is on the card (objectui#11417, ACCEPT Generated by Claude Code |
Part of #11417. What stays open is triage's item 2: at the pin bump that carries objectstack-ai/objectstack#21293, objectui's
DashboardWidgetSchemamirror follows the refusal. Measured below (item 2): that needs objectui code at the bump, so the card stays open after this PR merges.Clause-②: no
What changes
A dataset widget of the
pie/donut,funnel,treemaporsankeyfamily with a dimension and two or more measures hands every measure to the shared chart renderer as a series, and the renderer draws the first series only. The query ran both measures, every door accepted the document, and nothing said the second measure was dropped.packages/plugin-dashboard/src/DatasetWidget.tsx: one new set,SINGLE_SERIES_CHART_FAMILIES, read off the family a widget renders AS (CHART_TYPE_MAP, so a storedpyramidis in it throughfunnel).renderedMeasuresnow says "the first measure only" for a chart of that family, and the existing dropped-measure diagnostic (objectui#8894, PR objectui#11416) names the dropped measures. ⛔ No change to what is drawn: the chart schema handed to the renderer is byte-unchanged (every measure is still a series).Its chart family "pie" draws a single series: the first declared measure., and points to no ADR-0087 entry. The tile's pointer (dashboard-widget-metric-family-multi-measure-refused) answers for "a one-number tile with several measures", which a chart with a dimension is not; no entry at spec 17.5.0 answers for this shape, and none is invented.packages/plugin-dashboard/README.md,content/docs/plugins/plugin-dashboard.mdxand the pending.changeset/8894-dashboard-measures-not-rendered.mdsaid this shape "draws only the first, with no warning (objectui#11417)"; they now say the warning covers it. New.changeset/11417-dashboard-single-series-dropped-measure.md(@object-ui/plugin-dashboardpatch).The PM's mechanism assumptions, measured
chartType === …branches, and the one set it declares,SERIES_ONLY_CHART_TYPES(families that drawseries.map(…)and nothing else), is not this set's complement (radardraws every series,scatterrefuses). plugin-dashboard also reaches plugin-charts only as a devDependency. So the list lives once, inDatasetWidget, and a pin ties it to the renderer by behaviour, not by name:DatasetWidget.singleSeriesMeasures-11417.test.tsx, block "the TIE", renders every chart type@objectstack/spec'sChartTypeSchemadeclares (13 after the metric family andtable/pivot) through the REAL chain (DatasetWidget→SchemaRenderer→ registrychart→AdvancedChartImpl), changes the second measure's values, and requires the diagnostic to fire exactly when the drawn markup does not change. Controls per type: same rows twice give identical markup; changed FIRST-measure values give different markup (the plot painted).pie/donutarm (const pieDataKey = series[0]?.dataKey || 'value'), thefunnelarm, thetreemaparm and thesankeyarm (const rootName = series[0]?.label || dataKey). Two of the brief's sixseries[0]reads are not drawing arms of the five: one is the pie CLICK handler (handlePieClick), the other the metric-family single-value arm (SINGLE_VALUE_CHART_TYPES).scatterwas measured and is NOT added: with two series it renders a visible refusal naming them (SeriesArityRefusal,data-chart-error="scatter-multi-series"), so nothing is dropped in silence; the tie pin accepts exactly that refusal forscatterand stays silent there.DashboardWidgetSchemainpackages/types/src/zod/complex.zod.tsre-attaches the spec's object-level checks by NAMED import, one.superRefine(checkX)line per exported check (checkDashboardWidgetStageOrder,checkDashboardWidgetMetricMeasureArity), andpackages/types/src/__tests__/spec-object-refinements-7715.test.tsreddens on any check the spec adds until a line and a census row are added. It does not follow new checks wholesale. objectstackmain(4e6dc233) already exports a third,checkDashboardWidgetDimensionlessMeasureArity(objectstack#21053), which objectui does not chain yet; whether objectstack#21293 widens that export or adds a fourth, the bump carrying it needs at least one re-attachment line in objectui. HencePart of.Tests (final head
6d55dd12c)packages/plugin-dashboard/src/__tests__/DatasetWidget.singleSeriesMeasures-11417.test.tsx, 22 tests: five SUBJECT pins (triage's: each of the five types with a dimension and two measures names"cost"as dropped and"revenue"as rendered; both doors accept the document), a SUBJECT on the message (cause stated, no ADR-0087 entry, no advice, no other type named), a SUBJECT for a storedpyramid(the family decides), CONTROL one measure on a dimensionedpie(silent, triage's), CONTROL a dimensionedbarwith two measures (silent), and the 13-row tie.pnpm exec vitest run packages/plugin-dashboard/src/__tests__/DatasetWidget.singleSeriesMeasures-11417.test.tsx packages/plugin-dashboard/src/__tests__/DatasetWidget.unrenderedMeasures-8894.test.tsxat6d55dd12c:Test Files 2 passed (2),Tests 34 passed (34).pnpm exec vitest run --maxWorkers=2 packages/plugin-dashboard/ata83d34002:Test Files 160 passed (160),Tests 1527 passed | 6 skipped (1533). The only later commit (6d55dd12c) edits the new test file alone, re-run above.pnpm --filter @object-ui/plugin-dashboard type-check(script name echoed:tsc --noEmit && tsc -p tsconfig.test.json), exit 0, afterpnpm --workspace-concurrency=2 --filter '@object-ui/plugin-dashboard^...' run build(13 packages), exit 0.tsc -p tsconfig.test.json --listFilesOnlylists the new test file.Ablations (implementation committed first; each through
ablation-replace.mjswith an on-disk anchor count and a blob-hash restore to HEAD,git diff HEADempty after each)pyramidSUBJECTs, and the five tie rows for the single-series types; controls and the other 8 tie rows green; the objectui#8894 file 12/12 green.radarandbar: 4 red — bothbarsilence controls (this file and the objectui#8894 file) and thebarandradartie rows. The tie catches a family wrongly added, not only one left out.pyramidSUBJECT.Gates
node scripts/check-changeset-presence.mjs✅ 1 changeset declared for 2 source files of 1 released package;pnpm check:changeset-claimsexit 0 (report-only: three pending changesets name a touched file,7125-…,8114-…,8760-…; each paragraph read, none falsified by this diff);check-changeset-overwrite.mjsreports the 8894 correction as its case 2 (deliberate correction);pnpm check:pending-changeset-literals✅;pnpm changeset:check✅.pnpm check:control-bytes✅;pnpm check:new-line-citationsVERDICT … 0 new citation(s);pnpm docs:check-links✅;pnpm check:i18n-keys,check:doc-types,check:registry-bare-names,check:vi-mock-inherit,check:test-path-roots,check:phantom-deps,check:unreferenced-sources,check:installed-pin-claims,check:doc-fences,check:doc-example-ids,check:doc-example-readersall exit 0.node scripts/markdown-test-inputs.mjs --list(20 files,readme-dashboard-examples-spec-validamong them):Tests 854 passed (854). Tests outside the package that nameDatasetWidget(34 files):Tests 478 passed (478). Import judgesexamples/console-starter/test/vite-alias-closure.test.ts+scripts/__tests__/vite-objectstack-spec-dist.test.ts:Tests 96 passed (96)(the new test file imports only specifiers sibling tests in this package already import).File ignored because no matching configuration was supplied, so the linted population of this diff is the two.tsxfiles (--format json: 2 files, 0 errors; 10 warnings onDatasetWidget.tsx, the same 10 by rule as the base blob via--stdin; 0 on the test file). Invariance: the config enables no type-aware linting (noprojectService/project) and no rule undereslint-rules/reads the filesystem, so this diff cannot move any untouched file's verdict.check:readme-exports,check:doc-snippets,check:doc-examples— prerequisite not met (each needs every package'sdist, exit 1/2 naming unbuilt packages); this diff adds no fenced code block to any README or doc. CI builds first.Acceptance notes
buildChartSeriespivots the second dimension into series, and these five arms draw the first group's column only. That drops groups, not declared measures, so the diagnostic (which compares measures) does not speak; not measured on a rendered chart.MEASURE_AXIS_CHART_FAMILIESinDatasetWidget.tsxrestates the set objectstackmainexports asDASHBOARD_WIDGET_MULTI_MEASURE_TYPES, whose docblock says objectui's mirror is to import it rather than restate it; it is not in spec 17.5.0.Generated by Claude Code