Skip to content

decision(spec): which schema does an SDUI dashboard COMPONENT node validate against? DashboardSchema rejects every objectui catalog example on three independent axes #8593

Description

@yinlianghui

Decision card routed from objectui#4600 (PM session session_017Qqyix2QcnpUC9XeYVDzx3), on the contract-first pattern of #7496/#7917. Full measurement: objectui#4600, comment 5287946890 (measured at objectui f69127fcc, @objectstack/spec@17.0.0-rc.6).

The question

objectui ships a schema catalog of SDUI component JSON (type: 'dashboard' nodes rendered by SchemaRenderer), published in the docs gallery and declared an AI RAG/few-shot corpus. All 9 plugin-dashboard entries are REJECTED by the spec's DashboardSchema — but on three axes with different meanings, and no existing ruling says which schema such a node is supposed to satisfy:

  • Class A — metadata identity: every entry lacks name/label. DashboardSchema models a stored platform metadata DOCUMENT; an SDUI component node has no metadata identity by construction.
  • Class B — SDUI envelope: type: 'dashboard' (all 9) and title (6) are unrecognized_keys to the spec — but type is what makes it an SDUI node at all.
  • Class C2 — metric-card: 3 entries / 11 widgets use objectui's metric-card (static presentational value/icon/trend), which is not in the spec's 20-value widget enum and has no dataset behind a hard-coded string. These render perfectly today; they are only spec-invalid.

(Class C1 — the retired inline-analytics shape — is NOT part of this question; objectui is fixing those examples to live surfaces under its own card.)

The options, as measured

  1. An SDUI dashboard node is validated by objectui's own DashboardWidgetSchema/component schema, not the spec's DashboardSchema — the spec document schema governs stored metadata only. Then the catalog gate objectui wants is against the component schema, and classes A/B are non-issues by definition. Cost: the corpus never demonstrates the platform-metadata form.
  2. The spec grows an explicit component/embedded projection of DashboardSchema (identity-optional, envelope-aware) that SDUI nodes validate against. Cost: a new spec surface with its own maintenance.
  3. The catalog migrates to genuine metadata documents (add identity, drop the envelope) and the SDUI corpus is regenerated from them. Cost: measured in objectui#4600 — it inverts what the examples are for, and metric-card still has no home.
  4. metric-card: joins the spec's widget enum (with a static-value story) / stays an objectui extension explicitly allowed by whichever schema wins above.

objectui's downstream work (gallery truth, the narrow GlobalFilterSchema gate from #4356) proceeds either way; a full DashboardSchema catalog gate stays impossible until this is ruled.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions