Skip to content

[P2] Retire DashboardRenderer's legacy/object-bound analytics branches (follow-up to #3251) #3320

Description

@os-zhuang

Follow-on from the dashboard analytics migration #3251 (umbrella #1878 · ADR-0021 #1890). #3251 shipped the two endpoints — Studio authors only the dataset shape (objectui#2703) and DashboardWidgetSchema.strict() is enabled (#3316). This tracks the one deferred item from that work: retiring the renderer's now-unauthored legacy branches.

Why this was deferred (not done in #3251)

The .strict() endpoint only required that authoring stop emitting legacy keys — which it now does. The renderer's legacy read-branches were kept on purpose:

So this is genuinely gated on stored-dashboard migration, hence a separate P2.

Scope (all in objectui, packages/plugin-dashboard)

Once no stored dashboard carries the pre-ADR-0021 inline shape:

  • Remove the legacy object-bound branches in DashboardRenderer.tsx getComponentSchema that read object + categoryField/valueField/aggregate (metric/metric-like ~:506-568, object-bound chart emission ~:570-664) and the legacy pivot block (rowField/columnField/valueField/aggregationobject-pivot/pivot, :718-774), plus the widget.object-keyed objectFieldSets machinery (:864-871).
  • Decide the fate of the dashboard-flow ObjectPivotTable/PivotTable emission. Keep the component files — they are public SDUI blocks (core/src/registry/public-blocks.ts) usable by other surfaces; only stop the dashboard renderer from emitting them.
  • Keep the objectui-internal static paths (options.data/widget.data, widget.component) — per the [P2] Finish the dashboard analytics migration: Studio → dataset shape, then enable DashboardWidgetSchema strict validation #3251 decision tree these stay renderer-internal.
  • Drop the @deprecated inline-analytics keys (object/categoryField/categoryGranularity/valueField/aggregate/measures) from @object-ui/types DashboardWidgetSchema (they were retained in objectui#2703 only so the renderer could read legacy/static metadata during the transition) and remove the as any casts they backed.
  • Migrate the legacy-fixture tests in __tests__/DashboardRenderer.filters.test.tsx (bar/line/pie with object+aggregate) to the dataset shape.

Precondition (blocking)

A stored-dashboard audit/migration confirming no persisted dashboard (framework examples, cloud, customer metadata) still carries the inline analytics keys. Framework examples are already dataset-shaped; cloud and stored customer metadata need verification. A visible error placeholder for any surviving legacy widget (rather than a blank) is the graceful fallback if full migration can't be guaranteed.

Links

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions