Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 160c6c6

Browse files
fix(plugin-dashboard): a dataset-less provider: 'object' metric widget draws the retired-format placeholder on both surfaces (objectui#11525) (#11538)
Fixes #11525 Clause-②: no (narrowing) The maintainer's ruling C on objectui#11525 (record `5964914121`) retires one stored widget form. The form is a dataset-less single-value widget whose `options.data` (or widget-level `data`) is `{ provider: 'object', … }`. The single-value family is `metric`, `gauge`, `solid-gauge`, `kpi` and `bullet`, plus a typeless widget, which resolves to `metric` since objectui#11514. - **Both surfaces.** The metric arms of `DashboardRenderer` and `DashboardGridLayout` now return the shared `LEGACY_RETIRED_WIDGET_SCHEMA`. It is the same imported object the pivot arms already return for that input (objectui#10528). - **The producer is gone.** The flat `object-metric` node both arms used to build is removed. That node carried an ObjectQL-dialect `filter` that no node type declares. - **What does not move.** The inline chart and table arms are untouched. No zod or TS authoring face moves. Implemented by the `domain:spec @ objectui` seat's dev, session `session_01XvhGmGAP79ZB8swnkapxPC`, under the PM claim `5965174453`. ## Before and after, per surface The before/after run went through the real `SchemaRenderer` and real registrations. The adapter's `aggregate` answers 4242 and `queryDataset` answers 510000. "Before" is base `9d7419b9`; "after" is this branch. | surface | widget | before | after | | --- | --- | --- | --- | | `DashboardRenderer` | `metric`, provider `options.data` | "Pipeline 4,242", 1 `aggregate` call | the placeholder, 0 calls | | `DashboardRenderer` | `kpi`, same data | heading "Pipeline", then "Pipeline 4,242" | heading "Pipeline", then the placeholder, 0 calls | | `DashboardRenderer` | no `type`, same data | "Pipeline 4,242", 1 call | the placeholder, 0 calls | | `DashboardRenderer` | `pivot`, same data (control) | heading "Deals", then the placeholder | unchanged | | `DashboardRenderer` | `metric` bound to a dataset (control) | "Revenue 510000", 1 `queryDataset` call | unchanged | | `DashboardGridLayout` | the same five rows | the same readings as above | the same readings as above | The placeholder text is "This widget uses a retired data format. Edit it to bind a dataset." **Chrome, measured (the dispatch's H2).** The tile's chrome follows the widget's family, not the placeholder. - A dataset-less `metric` (and a typeless widget) is self-contained on both surfaces, so its tile draws the placeholder without the widget's heading. That is the same tile the retired top-level `object` metric shape already drew, and a pin holds the two DOMs equal. - `gauge`, `solid-gauge`, `kpi` and `bullet` take the Card chrome, so their heading is drawn above the placeholder, as the pivot's is. - I did not change the chrome. Doing so would also move the legacy-shape metric's tile, which no ruling covers. This is listed under Acceptance notes and in the report's open question. ## What stays, and why: the filter broadcast's `object-metric` member `DashboardRenderer`'s `FilterableComponentType` / `FILTERABLE_COMPONENT_TYPES` keeps `object-metric`. The member is not dead after the producer goes, measured: - An author's legacy `component` envelope holding an `object-metric` node still reaches the merge. - The filter bar scopes it today. A probe got `filter: { region: 'EMEA' }` on that node, for both an untyped and a `custom` envelope. - Dropping the member would silently stop that, which the ruling did not ask for. Its docblock now says so, and a pin holds it. `DashboardGridLayout` has no filter bar, so it has no such plumbing. ## The pins The pins are in `packages/plugin-dashboard/src/__tests__/inlineObjectMetricRetired-11525.test.tsx`: 29 tests, both surfaces. - **Subjects.** Each single-value type with provider `options.data` is read off `METRIC_LIKE_TYPES`, not restated. Widget-level `data` and a typeless widget are cases too. Each draws `LEGACY_RETIRED_WIDGET_SCHEMA`, checked by identity on the recorded node. The test also reads the placeholder text on screen, finds no `object-metric` node, and sees no `aggregate`, `find` or `queryDataset` call. One more case holds that the retired `metric` tile's DOM equals the retired legacy-shape metric tile's. - **Controls.** The provider pivot draws the same placeholder object, and a dataset-bound metric draws "510000". A static metric draws its `options.value` through `plugin-dashboard:metric`. A provider bar still builds an `object-chart` node naming `deal`, and a provider table still builds `object-data-table` and fetches. An envelope `object-metric` receives `{ region: 'EMEA' }` from the filter bar and queries. **Reverse verification.** The fix was committed first (`856f56f0`). The two producer files were then checked out at `9d7419b9`, with a trap restoring them from `HEAD`. - **Before running.** On disk, the base `object-metric` producer lines were 2 in `DashboardRenderer.tsx` and 1 in `DashboardGridLayout.tsx`. The renderer's 2 are the producer and the kept union member. The retired-arm marker read 0 and 0. - **Result.** The run gave **16 failed, 13 passed (29)**. The failures are every subject (8 per surface); the passes are every control. This is the direction stated in the file header. - **Restore.** The restored blob hashes equal `HEAD`'s, `git diff HEAD` on both files is 0 bytes, and the rerun is 29 passed. ## Corpus re-judged (H3) **The census.** I ran `git grep` over the whole tracked tree for a file that pairs a `provider: 'object'` literal with a metric-family `type`. It found no test, fixture, story or example that authors a dataset-less inline provider metric through a dashboard surface or asserts its number. The hits are prose, CHANGELOGs, this card's own files, and two plugin-dashboard tests whose provider widget is a `bar`. The full plugin-dashboard suite was green before this branch's pins were added. Verdicts: - `DashboardGridLayout.legacyRetired.test.tsx`: its header said the nested provider config is live for every family. It gets a dated note. Its provider control is a `bar`, so the control stands as written. - `DashboardGridLayout.datasetPath.test.tsx`, `widgetDataProviderRetired-7353.test.tsx`, `dashboard-producer-node-types-11514.test.tsx` and the three `DashboardChart.*` files: these are provider `bar`, `table` or `pivot` widgets, all live or already retired. Left alone. - `DashboardRenderer.legacyRetired.test.tsx`: it covers the top-level `object` shape only. Left alone. - Docs. `content/docs/guide/dashboard-filters.md` and `content/docs/plugins/plugin-dashboard.mdx` each get one paragraph naming the form that now draws the prompt. In `packages/plugin-dashboard/README.md`, the filters example's comment does the same, and the accent table's "inline `object-metric`" now reads "an `object-metric` block". - Comments falsified by this change: `legacyRetiredWidget.ts` (the dated, append-only correction the ruling names), `ObjectMetricWidget.tsx`'s `aggregate` docblock (it said both relays compose this node), and the render-site and broadcast comments in the two surfaces. ## Pending changesets - **New entry.** `.changeset/11525-inline-metric-retired.md` (`@object-ui/plugin-dashboard`: `minor`) states the render change: what the tile showed before, what it shows now, and the fix, which is to bind a dataset. - **Dated note.** `.changeset/11514-dashboard-slot-entry-types.md` gets one: its "Every widget that names a known family draws as before" no longer holds for this form. Its frontmatter is unchanged. - **Left alone, and why.** I read every pending entry that names the inline provider, `object-metric`, `ObjectMetricWidget`, `legacyRetiredWidget`, objectui#4612, objectui#10528, objectui#11479 or the filter broadcast. - `11348-dashboard-widget-reads` still holds: the type guard still covers the same three `object-*` types. - `10528-grid-object-table-fetch` and `7353-retire-widget-dataprovider` cover the table and pivot only. - The `object-metric` block entries (`8613`, `8970`, `9002`, `10221`, `10356`, `10572`, `10993`, `11254`, `11444`, `11475`, `7352`, `7752`, `11506`) describe the widget, which stays live as an authored block. None says a dataset-less provider widget reaches it. - `check:changeset-claims` named three entries for files this branch edits: `11483-metric-card-needs-value`, `8114-detail-tab-activity-timeline` and `8760-unfulfilled-chart-stubs`. Their paragraphs concern `metric-card`, a detail tab and `line-chart`, which this branch does not move. ## V1 census (H4) This was a throwaway worktree detached at PR #11512's head `ff7f748e`. I applied `git merge-tree` of that head and this branch, which had one conflict, `zod-mirror-parity.test.ts`; I took V1's side because no plugin-dashboard program reads that file. After a fresh install and a closure build, I ran plugin-dashboard's two programs. Nothing was committed or pushed from the probe, and the probe was removed. - **As is, with this change:** 4 lines per program (8 in all), only the four `SchemaRenderer` cast sites, two in each surface. - **With the probe-only annotation that types both `getComponentSchema` returns as the renderer prop:** - **Base producers:** 12 lines per program. That is 5 `object-metric` lines (3 in `DashboardRenderer`, 2 in `DashboardGridLayout`), 2 `plugin-dashboard:metric`, 1 static `pivot` and the 4 casts. - **This branch:** 7 lines per program, with `object-metric` at **0**. Left are 2 `plugin-dashboard:metric`, 1 static `pivot` and the 4 casts, which belong to objectui#11466. ## Gates Read at `29b4ab28` unless stated. objectui has no `dispatch-gates.mjs`; the list is hand-derived from `package.json`. - **Closure build.** `pnpm --filter '@object-ui/plugin-dashboard^...' build` exited 0 under the verify lock. - **`pnpm --filter @object-ui/plugin-dashboard run type-check`** exited 0. The script echoed `tsc --noEmit && tsc -p tsconfig.test.json`. The test program covers the new pin file: its first run failed on that file's case-table typing, which was then fixed. - **`pnpm exec vitest run packages/plugin-dashboard/`** (from the worktree root): 165 files and 1620 tests passed, 6 skipped. This ran at `a1c7e645`; the only later change is the pin file's stub registration, whose own rerun gave 29 passed. - **Readers of the touched files, 29 test files:** 720 passed. They are the doc readers, `sdui-parser`'s options census, the app-shell `DashboardView` and preview suites, the console drill-down suites, the schema-catalog gallery render and the widget DOM-leak sweep. - **Light gates, all exit 0:** - `check:new-line-citations`: 0 new. - `check:control-bytes`, `check:doc-types` and `check-changeset-no-major`. - `check-changeset-presence`: 1 changeset for 6 published source files. - `check:changeset-claims` and `check-changeset-overwrite`: reports only, judged above. - **Targeted eslint** over the six touched TS files: 0 errors. Each edited source file has the same warning count as at base. The new test carries 2 `any` warnings, the same two the objectui#7353 listener carries. This is a targeted run, not the repo lint, which CI owns. - **NOT MEASURED:** `check:doc-snippets` and `check:doc-examples`. They exited 2, PREREQUISITE NOT MET, because they need a 34-package build. They compile `ts`/`tsx` fences only; this branch edits no such fence and moves no published type. - **Not reached:** `check:component-surface-parity` and `check:sdui-registration-pins`. No registration input moves. ## Acceptance notes - **Chrome.** A retired dataset-less `metric` tile (and a typeless one) draws no heading, as the retired legacy-shape metric tile already does. Giving retired tiles Card chrome would move the legacy shape too. Not done; the report carries it as an open question. - **`DashboardGridLayout.tsx` line addresses.** The one cross-file line address in the paragraph this branch edits was replaced by a symbol citation. Eleven others stay, in the props docblock and the render-site comment. Two of them also carry content that is stale at base: the sibling's `as any` read of `dataset`, and a second fork in the sibling's self-contained branch. Their repair is a content correction outside this card. Carrier: none. - **`packages/sdui-parser/src/dashboard-widget-options.ts`.** Its scope note lists `object-metric` among the legacy inline spread targets, which no longer holds for the metric family. It is a comment in a package outside this card's surface. Carrier: none. - **`packages/plugin-dashboard/src/index.tsx`.** `ObjectMetricBlock`'s docblock names "the dashboard grid path" as a props-only host; no dashboard path builds the node now. Comment only. Carrier: none. - **`packages/data-objectstack/src/index.ts`.** A comment there cites `isObjectProvider` as how a metric's `groupBy` arrives. It is a dated measurement (2026-09-08) and is left as written. --- _Generated by [Claude Code](https://claude.ai/code/session_01XvhGmGAP79ZB8swnkapxPC)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6837bfa commit 160c6c6

11 files changed

Lines changed: 364 additions & 48 deletions

‎.changeset/11514-dashboard-slot-entry-types.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
- **The `object-chart` producers.** A series dispatch carries the family as a literal union whose members are all families `ObjectChartSchema.chartType` declares, so the node both surfaces build for a `provider: 'object'` series widget satisfies `ObjectChartSchema` with no cast.
1212
- **README.** "Reading a widget key off `widgets[]`" narrows an entry on `type` before reading a widget key, and a new section states what a widget with no `type`, or an unknown one, draws.
1313
- **What does not move.** Every widget that names a known family draws as before: the dispatch routes the same families, and each `object-chart` node carries the same `chartType` it carried. A legacy `component` envelope with no `type` is not the spec's widget and is not given its default; it draws under its card heading as before, and a number or `true` in its `component` draws the same text, now forwarded through `toRenderableSchema`.
14+
15+
⚠️ **Dated note, 2026-10-03 — a dataset-less `provider: 'object'` metric is retired — objectui#11525.** At this change, "Every widget that names a known family draws as before" held for the single-value family's inline `provider: 'object'` widget, which drew its number through a flat `object-metric` node. Now a `metric`, `gauge`, `solid-gauge`, `kpi` or `bullet` widget, or a typeless one, with no `dataset` and an `options.data` (or widget-level `data`) of `{ provider: 'object', … }` draws the retired-format placeholder on both surfaces, by the maintainer's ruling C on objectui#11525. A typeless widget still draws exactly as the same widget with `type: 'metric'`, so it draws that placeholder too. `.changeset/11525-inline-metric-retired.md` states what ships. The rest of this entry is kept as the reading of this change.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
'@object-ui/plugin-dashboard': minor
3+
---
4+
5+
**A dashboard metric widget bound inline to an object now shows the
6+
retired-format prompt instead of its number (objectui#11525).** This follows
7+
the maintainer's ruling C on objectui#11525.
8+
9+
**What changes on screen.** The change covers a stored single-value widget:
10+
`metric`, `gauge`, `solid-gauge`, `kpi`, `bullet`, or a widget with no `type`,
11+
which draws as `metric`. If it has no `dataset` and its `options.data` (or
12+
widget-level `data`) is `{ provider: 'object', object, aggregate }`, it is
13+
affected:
14+
15+
- **Before:** both `DashboardRenderer` and `DashboardGridLayout` aggregated the
16+
object and drew the number in the tile.
17+
- **Now:** the tile shows "This widget uses a retired data format. Edit it to
18+
bind a dataset." and sends no query. This is the same placeholder a `pivot`
19+
widget with that config already showed (objectui#10528).
20+
21+
Breaking for stored dashboards that still carry this form; `minor` because
22+
objectui never declares `major`. Under ADR-0021 a widget binds a
23+
semantic-layer `dataset`, and both validator faces already refuse a widget
24+
without one, so nothing authored against the current contract is affected. No
25+
example, objectui authoring surface, cloud dashboard or AI Studio path was
26+
measured emitting the form (the measurements are on objectui#11525).
27+
28+
**The fix.** Rebind the widget to a dataset: set `dataset` and select its
29+
`values` by name. A dataset-bound metric draws its number as before.
30+
31+
**What does not move:**
32+
33+
- The inline `provider: 'object'` chart and table widgets still draw.
34+
- A static metric (`options.value` or an inline row array) still draws its value.
35+
- The zod and TypeScript authoring faces are unchanged.
36+
- An `object-metric` node an author places in a widget's legacy `component`
37+
envelope still receives the dashboard filter bar's values.
38+
39+
The flat `object-metric` node the two surfaces used to build carried an
40+
ObjectQL-dialect `filter` that no node type declares; it is gone.

‎content/docs/guide/dashboard-filters.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ into it as `runtimeFilter`.
7474
> `@objectstack/spec` requires `dataset` on every widget. The renderer still
7575
> draws a stored widget that carries them, but that path is renderer-internal
7676
> (ADR-0021), not something to author against: bind the widget to a dataset.
77+
> One stored form no longer draws at all: a single-value widget (`metric`,
78+
> `gauge`, `solid-gauge`, `kpi`, `bullet`, or a widget with no `type`) whose
79+
> `options.data` is a `{ "provider": "object", … }` query shows the
80+
> retired-format prompt below instead of its number (objectui#11525), as a
81+
> `pivot` widget with that query already did.
7782
7883
> **Retired: the top-level inline analytics shape.** `object` +
7984
> `categoryField` / `valueField` / `aggregate` on the widget itself (and the

‎content/docs/plugins/plugin-dashboard.mdx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ data format. Edit it to bind a dataset."* prompt instead of a chart. Inline
324324
widget data is not an authoring surface either: `options.data` (an array of
325325
rows or a `{ "provider": "object", … }` query) and `options.xField` /
326326
`options.yField` are refused by name by `@object-ui/types`' strict authoring
327-
face (objectui#11228), and every widget binds a dataset.
327+
face (objectui#11228), and every widget binds a dataset. A stored single-value
328+
widget (`metric`, `gauge`, `solid-gauge`, `kpi`, `bullet`, or one with no
329+
`type`) whose `options.data` is a `{ "provider": "object", … }` query shows the
330+
same retired-format prompt instead of its number (objectui#11525), as a `pivot`
331+
widget with that query already did.
328332

329333
Binding rules, in precedence order:
330334

‎packages/plugin-dashboard/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,10 @@ into each bound widget's inline query (`AND`-combined with the widget's own
443443
// Edit it to bind a dataset." instead of a chart. Inline widget data
444444
// (`options.data`, `options.xField` / `options.yField`) is not an
445445
// authoring surface either: the strict authoring face refuses those keys
446-
// by name (objectui#11228).
446+
// by name (objectui#11228). A stored single-value widget (`metric`,
447+
// `gauge`, `solid-gauge`, `kpi`, `bullet`, or one with no `type`) whose
448+
// `options.data` is a `{ "provider": "object", … }` query draws that same
449+
// retired-format prompt instead of its number (objectui#11525).
447450
//
448451
// Default binding: the filter's own `field` (dateRange → created_at).
449452
{ "id": "w1", "type": "bar", "dataset": "invoices", "dimensions": ["status"], "values": ["count"] },
@@ -511,7 +514,7 @@ Where the accent lands depends on the layout, not on the token:
511514

512515
| Layout | Accent |
513516
| --- | --- |
514-
| Card chrome (`MetricWidget`, inline `object-metric`) | the icon chip's background + foreground |
517+
| Card chrome (`MetricWidget`, an `object-metric` block) | the icon chip's background + foreground |
515518
| Chrome-less (`MetricWidget variant: 'bare'`, and every dataset-bound `metric`) | the big number's text colour |
516519

517520
Both read one shared table (`src/colorVariants.ts`), so the same declaration

‎packages/plugin-dashboard/src/DashboardGridLayout.tsx‎

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -372,22 +372,15 @@ export const DashboardGridLayout: React.FC<DashboardGridLayoutProps> = ({
372372
// Single-value families render as a metric card, not a chart (#2943).
373373
if (dispatch.family === 'metric') {
374374
const widgetData = (widget as any).data || options.data;
375+
// provider: 'object' — RETIRED (objectui#11525, maintainer ruling C), with
376+
// the same placeholder object this surface's pivot arm and
377+
// `DashboardRenderer`'s metric arm return, imported rather than restated.
378+
// A metric binds a `dataset` (ADR-0021); this branch used to build a flat
379+
// `object-metric` node in a filter dialect no node type declares. A
380+
// typeless widget resolves to `metric` (objectui#11514) and answers here
381+
// too. The chart and table arms keep their `provider: 'object'` branches.
382+
if (isObjectProvider(widgetData)) return LEGACY_RETIRED_WIDGET_SCHEMA;
375383
const label = widget.title || widgetType;
376-
if (isObjectProvider(widgetData)) {
377-
const providerAgg = widgetData.aggregate;
378-
return {
379-
type: 'object-metric',
380-
...options,
381-
objectName: widgetData.object,
382-
label,
383-
aggregate: providerAgg ? {
384-
field: providerAgg.field,
385-
function: providerAgg.function,
386-
groupBy: providerAgg.groupBy,
387-
} : undefined,
388-
filter: widgetData.filter || widget.filter,
389-
};
390-
}
391384
const rows = Array.isArray(widgetData) ? widgetData : widgetData?.items || [];
392385
const valueField = options.yField || 'value';
393386
return {
@@ -585,7 +578,6 @@ export const DashboardGridLayout: React.FC<DashboardGridLayoutProps> = ({
585578
const widgetId = widget.id || `widget-${index}`;
586579
// `getComponentSchema` builds a node for `SchemaRenderer` in every
587580
// branch, but not every branch's node is a declared type yet: the
588-
// flat `object-metric` node has none (objectui#11525), the
589581
// `plugin-dashboard:metric` key is typed `string`
590582
// (`DASHBOARD_NODE_TYPES`, objectui#11466), and the static `pivot`
591583
// does not state `PivotTableSchema`'s required axes. So the
@@ -623,10 +615,12 @@ export const DashboardGridLayout: React.FC<DashboardGridLayoutProps> = ({
623615
// from a caller's fork (`legacyRetiredWidget.ts:97-102`).
624616
const datasetBound = !!(widget as { dataset?: unknown }).dataset;
625617
// A `metric` widget renders its own card chrome ONLY in the inline
626-
// path. A dataset-bound metric uses DatasetWidget, which renders just
618+
// path (the `plugin-dashboard:metric` card, or a retired
619+
// `provider: 'object'` metric's placeholder, objectui#11525). A
620+
// dataset-bound metric uses DatasetWidget, which renders just
627621
// the value — so it must take the shared Card wrapper to get a title
628622
// and border like its neighbours, instead of showing as bare text
629-
// (`DashboardRenderer.tsx:777-782`, same rule, same reason).
623+
// (`DashboardRenderer`'s `isSelfContained`, same rule, same reason).
630624
const isSelfContained = resolveWidgetType(widget) === 'metric' && !datasetBound;
631625
// `DashboardWidget.title` is the spec's `I18nLabel`: since
632626
// 17.0.0-rc.6 an author may inline a per-locale map

‎packages/plugin-dashboard/src/DashboardRenderer.tsx‎

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,22 @@ const FILTERABLE_COMPONENT_TYPES: ReadonlySet<string> = new Set<FilterableCompon
165165
* `object-chart` and `object-data-table` are the `@object-ui/types` node
166166
* schemas, by reference. `object-metric` has no TypeScript declaration there
167167
* (the spec's `ComponentPropsMap` row is its only published one, and it types
168-
* the `properties` bag); the node this renderer builds carries `filter` flat,
169-
* and `ObjectMetricBlock` hands that key to the widget's `filter` prop, so it is
168+
* the `properties` bag); the node carries `filter` flat, and
169+
* `ObjectMetricBlock` hands that key to the widget's `filter` prop, so it is
170170
* typed by that prop.
171171
*
172+
* Since objectui#11525 this renderer builds no `object-metric` node: the
173+
* dataset-less `provider: 'object'` metric draws the retired-format
174+
* placeholder. The member stays because an `object-metric` node still reaches
175+
* the merge from the author: a widget's legacy `component` envelope holding
176+
* one is handed through as written, and the filter bar scopes it today.
177+
* Dropping the member would stop that silently, which the ruling did not ask
178+
* for.
179+
*
172180
* The value is not host state: the renderer wrote it from the widget's own
173-
* spec-declared `filter` (or the provider's), and the dashboard's filter-bar
174-
* values arrive separately, as the `scopedFilter` merged into it.
181+
* spec-declared `filter` (or the provider's), or the author wrote it on the
182+
* envelope's node, and the dashboard's filter-bar values arrive separately, as
183+
* the `scopedFilter` merged into it.
175184
*/
176185
type FilterableComponentSchema =
177186
| ObjectChartSchema
@@ -841,6 +850,23 @@ const DashboardRendererInner = forwardRef<HTMLDivElement, DashboardRendererProps
841850
// and never routed the widget, so four spec chart types fell through
842851
// to a red error box (#2943).
843852
if (dispatch.family === 'metric') {
853+
// provider: 'object' — RETIRED for the single-value family
854+
// (objectui#11525, maintainer ruling C), with the same
855+
// placeholder object the pivot arm below returns
856+
// (objectui#10528), imported rather than restated. A metric
857+
// binds a semantic-layer `dataset` (ADR-0021), which both
858+
// validator faces require on every widget; a stored
859+
// dataset-less widget whose `options.data` (or widget-level
860+
// `data`) is `{ provider: 'object', … }` is stale metadata. This
861+
// branch used to build a flat `object-metric` node carrying an
862+
// ObjectQL-dialect `filter` that no node type declares, so the
863+
// tile drew a number through a second filter dialect beside the
864+
// dataset path. It now draws the visible rebind prompt instead.
865+
// A typeless widget resolves to `metric` (objectui#11514), so it
866+
// answers here too. The chart and table arms keep their
867+
// `provider: 'object'` branches. `DashboardGridLayout`'s metric
868+
// arm answers the same way.
869+
if (isObjectProvider(widgetData)) return LEGACY_RETIRED_WIDGET_SCHEMA;
844870
// objectui#4032 — the KPI card's heading comes from the SAME
845871
// convention channel every other widget's header uses
846872
// (`{ns}.dashboards.{dash}.widgets.{id}.title`), not from the
@@ -861,29 +887,12 @@ const DashboardRendererInner = forwardRef<HTMLDivElement, DashboardRendererProps
861887
// its own key, `…widgets.{id}.subCaption`, because it is a
862888
// different authored field (`options.description`) from the
863889
// shared header's `widget.description`. Assigned AFTER the
864-
// `...options` spread in both branches below: the spread is
890+
// `...options` spread in the branch below: the spread is
865891
// what carries the raw authored `options.description` through,
866892
// and this is the resolved value that replaces it. When nothing
867893
// translates it, `tWidgetSubCaption` hands back exactly what the
868894
// spread would have — so an untranslated dashboard is byte-identical.
869895
const subCaption = tWidgetSubCaption(widget);
870-
// provider: 'object' — ObjectMetricWidget aggregates server-side.
871-
if (isObjectProvider(widgetData)) {
872-
const providerAgg = widgetData.aggregate;
873-
return {
874-
type: 'object-metric',
875-
...options,
876-
objectName: widgetData.object,
877-
label,
878-
description: subCaption,
879-
aggregate: providerAgg ? {
880-
field: providerAgg.field,
881-
function: providerAgg.function,
882-
groupBy: providerAgg.groupBy,
883-
} : undefined,
884-
filter: widgetData.filter || widget.filter,
885-
};
886-
}
887896
// Static value: an inline `options.value`, else the first row's
888897
// measure from an inline data array.
889898
const rows = Array.isArray(widgetData) ? widgetData : widgetData?.items || [];
@@ -1028,7 +1037,10 @@ const DashboardRendererInner = forwardRef<HTMLDivElement, DashboardRendererProps
10281037
? { ...widget, filter: mergeFilters(widget.filter, scopedFilter) }
10291038
: widget;
10301039
// A `metric` widget renders its own card chrome ONLY in the inline
1031-
// (object-metric) path. A dataset-bound metric uses DatasetWidget, which
1040+
// path: the `plugin-dashboard:metric` card, or, for a retired
1041+
// `provider: 'object'` metric (objectui#11525), the placeholder, which
1042+
// draws its own border, as the legacy metric shape's placeholder always
1043+
// has here. A dataset-bound metric uses DatasetWidget, which
10321044
// renders just the value — so it must take the shared Card wrapper to get
10331045
// a title + border like the kpi/gauge widgets (otherwise it shows as bare
10341046
// text with no title, inconsistent with its neighbours).

‎packages/plugin-dashboard/src/ObjectMetricWidget.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ export interface ObjectMetricWidgetProps {
177177
* `groupBy` is the contract's own union — BY REFERENCE through
178178
* `ObjectChartSchema['aggregate']`, which holds `ChartAggregate` from
179179
* `@objectstack/spec/ui` by reference in turn, never a local near-copy of it
180-
* (`check:spec-symbols`). It is the same authored key both dashboard relays
181-
* compose for the `object-metric` and the `object-chart` node out of one
182-
* provider block, so a second spelling here could only be a way for the two
183-
* to disagree.
180+
* (`check:spec-symbols`). It is the same authored key the `object-chart` node
181+
* carries, so a second spelling here could only be a way for the two to
182+
* disagree. (Both dashboard relays used to compose this node and the chart's
183+
* out of one `provider: 'object'` block; since objectui#11525 a dataset-less
184+
* metric draws the retired-format placeholder, and this node is authored.)
184185
*
185186
* It used to say `string`, which was a claim about the AUTHOR that nothing
186187
* upstream backed: the value crosses two `any` seams on its way in

‎packages/plugin-dashboard/src/__tests__/DashboardGridLayout.legacyRetired.test.tsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
* still-live authoring surface (the #4600 measurement's do-not-conflate note);
3030
* dataset widgets and static-data widgets are live too. None of them may acquire
3131
* the placeholder — on either surface.
32+
*
33+
* ⚠️ Dated note, 2026-10-03 — objectui#11525. When this header was written the
34+
* nested `provider: 'object'` config was live for every family. The
35+
* single-value family's is now retired: a dataset-less provider metric draws
36+
* this placeholder through each surface's metric arm, not through the shared
37+
* detector (`inlineObjectMetricRetired-11525.test.tsx`). The provider control
38+
* below is a `bar`, whose family stays live, so it holds as written. The rest
39+
* of this header is kept as the reading of objectui#4612.
3240
*/
3341

3442
import { describe, it, expect, afterEach } from 'vitest';

0 commit comments

Comments
 (0)