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

[plugin-dashboard] DashboardGridLayout has no dataset path at all — an ADR-0021 dataset-bound widget renders a silent blank chart on the editable grid #4614

Closed

Description

@yinlianghui

Found while implementing #4612 (the retired-shape half of the same asymmetry). Filed unassigned, not fixed there — #4612's scope is the RETIRED inline-analytics shape; this is the current shape failing on the same surface. Duplicate-searched (keyword + DashboardGridLayout path): no open issue covers it.

The defect

DashboardRenderer routes a dataset-bound widget to DatasetWidget:

const datasetBound = !!(widget as any).dataset;          // DashboardRenderer.tsx:528
…
{datasetBound
  ? <DatasetWidget widget={effectiveWidget} dataSource={dataSource} />
  : <SchemaRenderer schema={componentSchema} … />}       // DashboardRenderer.tsx:841-843

DashboardGridLayout has no equivalent. It never reads widget.dataset, never imports DatasetWidget, and takes no dataSource prop at all — measured on origin/main:

$ grep -n "DatasetWidget\|dataset" packages/plugin-dashboard/src/DashboardGridLayout.tsx
191:    // 8 chart families by hand while DatasetWidget covered all 19, so radar /

One hit, inside a comment about a different fix. So a widget authored in the current ADR-0021 shape — { id, type: 'bar', dataset: 'invoices', values: ['count'] } — reaches the series branch, finds widget.data and options.data both undefined, fails isObjectProvider(undefined), and falls to the static-data branch with data: [] (DashboardGridLayout.tsx:213-225). A blank chart, with no diagnostic.

This is the same shape of bug as #4612 one level up, and the outcome is arguably worse: on DashboardRenderer a dataset-bound widget with an incapable data source at least reaches DatasetWidget, which renders a named error ("This data source does not support dataset queries", DatasetWidget.tsx:767-769). On the grid there is nothing to render an error — the dataset binding is simply never read.

Blast radius

The dashboard-grid SDUI component type, registered as "Dashboard Grid (Editable)" (packages/plugin-dashboard/src/index.tsx:271-289), and the DashboardGridLayout named export from the package entry. Every widget authored the way ADR-0021 says to author them is blank on that surface.

Evidence already in the tree

#4612's new suite contains this as a negative control — DashboardGridLayout.legacyRetired.test.tsx, "does NOT show the placeholder for a dataset-bound widget". It asserts only that the retired-format placeholder is absent, which is correct and deliberately says nothing about whether a chart appeared. It did not.

Not to be conflated

The nested options.data = { provider: 'object', … } config is a different, live surface and renders fine on the grid (isObjectProvider branches). This issue is only about the top-level dataset binding.

Fix shape (not prescriptive)

Either route dataset-bound widgets to DatasetWidget on this surface too — which means DashboardGridLayout gaining a dataSource prop it does not currently have, so it is a public-props change and wants a ruling — or, if the editable grid is deliberately not a dataset surface, render a named placeholder saying so rather than a blank, reusing legacyRetiredWidget.ts's pattern of one shared diagnostic. Worth deciding which, rather than defaulting.


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 14, 2026
  2. yinlianghui commented on Aug 14, 2026

    @yinlianghui
    ContributorAuthor

    CLAIM — session session_017Qqyix2QcnpUC9XeYVDzx3, branch claude/issue-4614-gridlayout-dataset-path. Unblocked: PR #4613 landed (8640cec19), the file is free.

    PM ruling (delegated, veto window open) — the public-props question this card deferred is ruled YES: DashboardGridLayout is a RENDERING surface (it draws charts from static data and provider config, and is registered as the dashboard-grid SDUI component), so silently dropping the CURRENT authoring shape is the #4612 defect one level up, not a scope boundary.

    1. DashboardGridLayout gains an optional dataSource prop and renders a dataset-bound widget through DatasetWidget, mirroring DashboardRenderer's fork (its datasetBound → DatasetWidget-at-render-site shape — follow the sibling's mechanics, do not invent a second dispatch idiom). Additive prop ⇒ minor by position analysis, plus the behavior move.
    2. A dataset-bound widget arriving with NO dataSource renders a VISIBLE state, never a blank: prefer DatasetWidget's own existing no-capability/error rendering if it is visible in this context (measure it — the schema-catalog: all 9 plugin-dashboard examples are refused by the spec's DashboardSchema — the AI few-shot corpus teaches the pre-ADR-0021 widget shape #4600 measurement saw its 'does not support dataset queries' error render); if that path cannot render visibly here, a placeholder in the fix(plugin-dashboard): GridLayout shows the retired-format placeholder instead of a silent blank chart (#4612) #4613 pattern (its own wording — this is not the retired-format case) with the shared-module discipline.
    3. Red-first mirroring fix(plugin-dashboard): GridLayout shows the retired-format placeholder instead of a silent blank chart (#4612) #4613's structure: positives = dataset-bound widget currently silent-blank → renders DatasetWidget with a working stub dataSource AND renders the visible state without one (capture the current blank branch verbatim pre-fix); negatives = static-data, options.data provider, and legacy-retired (fix(plugin-dashboard): GridLayout shows the retired-format placeholder instead of a silent blank chart (#4612) #4613's placeholder) all unchanged. DashboardRenderer's suites untouched and green.
    4. Must-not-change: the fix(plugin-dashboard): GridLayout shows the retired-format placeholder instead of a silent blank chart (#4612) #4613 legacy sentinel ordering (legacy check before dispatch), dashboard-grid's SDUI registration shape (adding an optional prop must not break schema-driven usage where no dataSource is passed — that IS case 2).

    Mutual exclusion: #4600-d1's in-flight seat owns examples/schema-catalog/**, content/docs/**, the plugin README, apps/site/** — this card owns packages/plugin-dashboard/src/** + tests + one changeset only. ⛔ content/docs/releases/** never.


    Generated by Claude Code


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions