Skip to content

[P3] Report: prune dangling ReportColumnSchema/ReportGroupingSchema exports + retire the legacy ReportViewer fallback #3463

Closed

Description

@os-zhuang

Deep-cleanup follow-up from the report-chart disposition (#3441, umbrella #1878). #3441 was the non-breaking accuracy fix; these two items are breaking / cross-repo and were deferred.

1. Prune the dangling ReportColumnSchema / ReportGroupingSchema

After the ADR-0021 single-form cutover, a dataset-bound report expresses columns/grouping as dataset measure/dimension name arrays (rows/columns/values = z.array(z.string())). ReportColumnSchema / ReportGroupingSchema (packages/spec/src/ui/report.zod.ts:26-41) are referenced by no schema body — they survive only as public type exports (ReportColumn/ReportGrouping/…Input) and were marked @deprecated in #3441.

  • Remove the schemas + their type exports from @objectstack/spec.
  • Remove the objectui re-exports (@object-ui/types spec-report.ts SpecReportColumn* / SpecReportGrouping*, index.ts:694-712).
  • Breaking (public exports) → schedule with a major + a one-line migration note. Coordinated framework + objectui PRs.

2. Retire the legacy ReportViewer chart path

DatasetReportRenderer (objectui) is the live, primary report renderer — it plots the spec chart.xAxis/yAxis as dataset dimension/measure via useDatasetRows. The older ReportViewer (reads the invented xAxisField/yAxisFields, ReportViewer.tsx:326-330) is only a fallback now (app-shell/.../ReportView.tsx:502-508).

Refs #1878, #1890, #3441.

Activity

  1. self-assigned this
    on Jul 25, 2026
  2. os-zhuang commented on Jul 25, 2026

    @os-zhuang
    ContributorAuthor

    Both deferred items shipped across two coordinated PRs.

    1. Pruned the dangling ReportColumnSchema / ReportGroupingSchema ✅

    2. Retired the legacy ReportViewer chart fallback ✅

    The ReportViewer fallback branch in app-shell ReportView.tsx was confirmed unreachable by any shipped metadata: it fired only when a report had neither dataset nor objectName, the Studio inspector only ever writes the dataset-bound shape, and no seed/example authored type: 'report-viewer'. objectstack-ai/objectui#2816:

    • ReportView now routes every report through the spec ReportRenderer dispatcher (dataset → DatasetReportRenderer, stored pre-9.0 JSON → presentation bridge, pre-spec { data, columns } → LegacyReportRenderer). Deleted the ReportViewer last-resort branch, the mapReportForViewer spec→legacy chart-section adapter (the sole producer of xAxisField / yAxisFields), and the now-dead data-fetch loading flag.
    • plugin-report ReportViewer.tsx: removed the chart-section branch (it read the invented xAxisField / yAxisFields, never the spec's xAxis / yAxis, and was only fed by the deleted adapter).

    Why ReportViewer the component was kept (not deleted outright): its table / summary / text sections still back the registered report-viewer component and the pre-9.0 specReportToPresentation bridge in ReportRenderer. Only the dead chart branch and the fallback routing were retired.

    Shipped as minor

    Per the launch-window breaking-as-minor policy (precedent: remove-enable-trash-mru) — the major guard would otherwise block the PR. Both changesets carry the FROM→TO migration.

    Verification

    Browser-dogfooded against the showcase backend: the summary (Hours by Status), matrix (Status × Priority, with server totals) and joined (Task Overview) reports all render correctly through DatasetReportRenderer after the fallback removal. Framework: 6857 spec tests + all generated-artifact / API-surface / changeset / liveness gates green. objectui: 60/60 dependent type-checks + all test shards green.

    Refs #1878, #1890, #3441.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions