fix(report): render dataset-form reports (ADR-0021 single-form)#1616
Open
os-zhuang wants to merge 1 commit into
Open
fix(report): render dataset-form reports (ADR-0021 single-form)#1616os-zhuang wants to merge 1 commit into
os-zhuang wants to merge 1 commit into
Conversation
After the single-form cutover, reports bind a semantic `dataset` + `rows`/
`values` and no longer carry `objectName`/`columns`. The report stack still
assumed the inline shape, so every dataset-bound report rendered BLANK:
- `ReportView` gated the spec renderer on `previewReport.objectName`, so a
dataset report fell through to the legacy `ReportViewer` (no data source to
fetch from → empty).
- `ReportRenderer`'s `isSpecReport` guard requires `objectName` + `columns`, so
even when reached it dropped to `LegacyReportRenderer`.
Adds `DatasetReportRenderer` — the report-side counterpart to plugin-dashboard's
`DatasetWidget`. It runs `dataSource.queryDataset(dataset, { dimensions: rows,
measures: values, runtimeFilter })` and renders a grouped table; a `joined`
report renders one dataset-bound table per block with the report-level filter
merged in. `ReportRenderer` dispatches dataset-bound reports here (before the
legacy guards) and `ReportView` routes them through the spec renderer.
Because it uses the governed `queryDataset` path, server-resolved dimension
display labels (select option labels, lookup names) flow through automatically.
Verified in the browser on the showcase reports (joined / summary / matrix) —
all three now render with resolved labels. 9 new tests (118 plugin-report total).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After the framework's ADR-0021 single-form cutover, reports bind a semantic
dataset+rows/valuesand no longer carryobjectName/columns. The console's report stack still assumed the inline shape, so every dataset-bound report rendered blank (the dashboardDatasetWidgetwas migrated, but the report side was not).Two gates dropped dataset reports into the legacy (no-data) path:
ReportViewcomputeduseSpecRendererfrompreviewReport.objectName→ dataset reports fell to the legacyReportViewer, which has no source to fetch from → empty.ReportRenderer'sisSpecReportguard requiresobjectName+columns→ even if reached, dropped toLegacyReportRenderer.Fix
New
DatasetReportRenderer— the report-side counterpart to plugin-dashboard'sDatasetWidget:dataSource.queryDataset(dataset, { dimensions: rows, measures: values, runtimeFilter })and renders a grouped table;joinedreport renders one dataset-bound table per block, with the report-level filter merged into each block.Wiring:
ReportRendererdispatches dataset-bound reports here (isDatasetReport) before the legacy guards.ReportViewroutes dataset reports through the spec renderer.Because it uses the governed
queryDatasetpath, server-resolved dimension display labels (select option labels, lookup names — framework PR #1680) flow through automatically.Verification
Browser-tested on the showcase reports against a live backend:
status | est_hourstable ✅status | priority | est_hours, both dims labelled ✅All with resolved labels (
Backlog/In Progress/To Do,Low/Urgent). 9 new tests; plugin-report 118/118 green.🤖 Generated with Claude Code