Repository navigation
fix(plugin-report): a matrix report with columns draws its declared chart beside the cross-tab (objectui#10964) - #11043
Conversation
…hart beside the cross-tab (objectui#10964) The cross-tab branch of DatasetReportRenderer returned DatasetMatrixTable before the only report.chart read, so a matrix report with columns and a chart (which ReportSchema accepts) parsed the chart and drew nothing. The non-joined presentations now share one wrapper and one chart slot: DatasetReportChart runs its own chart.xAxis x chart.yAxis dataset query, so it binds the same way beside a cross-tab as beside a grouped table. The chart follows the cross-tab (ruling on objectstack-ai/objectstack#20293: beside or below) and still precedes the grouped / flat table. The out-of-spec chart-type notice no longer says the table is below it. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…d of any (objectui#10964) Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Inputs: card #10964 (body; comments ① Derived judgments
Nothing in the diff is judged wrong. ② Semver level
③ Boundary flags
Deviations, each answered:
Stop valve (#20293 note 3): did not fire, and the head's code confirms it needed not to (①.3). Not graded here: the PR is a draft, which is the seat's to lift. The PR body measured its premises on Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #10964
Clause-②: no
What
A
matrixreport that declarescolumnsnow draws its declaredchartbelow the cross-tab.ReportSchemaaccepts that shape, but the cross-tab branch ofDatasetReportRendererreturnedDatasetMatrixTablebefore the onlyreport.chartread, so the chart parsed and drew nothing.The non-joined presentations now share one wrapper and one chart slot.
DatasetReportChartruns its ownchart.xAxis×chart.yAxisdataset query, so it binds the same way next to a cross-tab as next to a grouped table:xAxisnames a dataset dimension (a matrixrowsorcolumnsdimension) andyAxisa dataset measure. The chart still comes before a tabular or summary table (and before a matrix withoutcolumns, which degrades to the grouped table), and it comes after the cross-tab. The ruling on objectstack-ai/objectstack#20293 places it "beside or below the cross-tab", and below needs no new layout option.Landing site:
packages/plugin-report/src/DatasetReportRenderer.tsx, as the card and the claim name it.Premises measured on objectui
origin/main3ad61001bpresentation === 'matrix' && across.length > 0branch returned before thechartCfg/report.chartread.DatasetReportChartqueries[chart.xAxis]×[chart.yAxis]overreport.datasetthroughuseDatasetRows, independent of the table next to it, andscopeOrderalready narrowsreport.orderto that pair. No new binding rule is involved. On the spec side, objectstack'svalidate-chart-bindings(packages/lint) already treats a chart on every non-joinedreport as drawn (drawsChartisreport.type !== 'joined') and bindschart.xAxisto a dataset dimension andchart.yAxisto a dataset measure: the binding this renderer now honours on the matrix arm too.columnsand achart, so the pin builds its own document.Also changed, because this round made it false
flex flex-col gap-3classes anddata-report-presentationattribute the other non-joined presentations carry.git grepfinds no reader ofdata-report-presentationoutside the renderer.packages/plugin-report/README.mdandcontent/docs/plugins/plugin-report.mdxsay where the chart draws for each type. Prose only, no fenced block.Tests
New pin
packages/plugin-report/src/__tests__/DatasetReportRenderer.matrixChart-10964.test.tsx:columnsand achartdraws both, with the chart after the cross-tab in document order, from its own['status']×['est_hours']query;chart, draws the cross-tab only and issues exactly one query (the cross-tab's);xAxisnaming the ACROSS dimension binds the same way;Reverse verification. The implementation was committed first (
cad6b4745). The renderer file was then checked out from BASE3ad61001bwith the pin kept, under a trap-guarded restore. After the mutation the on-disk blob equals the BASE blobc362912eband the fix-marker count went from 3 to 0. The run gaveTests 3 failed | 1 passed (4): the three chart cases red and the control green, as predicted in the pin's header. After the restore the on-disk blob equals the HEAD blob9560f4d4bandgit diff HEADis 0 bytes.Gates, at HEAD
ec7caad07:pnpm exec vitest run packages/plugin-report/:Test Files 23 passed (23),Tests 232 passed | 7 skipped (239). The 7 skips are thedescribe.runIf(DRIVEN)blocks offormatValue.dateOnlyZone-10844.test.ts.pnpm --filter @object-ui/plugin-report type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0.tsc -p tsconfig.test.json --listFilesOnlyincludes the pin. The dependency closure was built first withturbo run build --filter='@object-ui/plugin-report^...'.pnpm exec eslinton the two changed.tsxfiles: 2 files linted, 0 errors, 5 warnings. The BASE renderer carries the same 5 warnings under the same rules, shifted 3 lines by the new doc lines, so none is new.check-changeset-presence,check-control-bytes,check-new-cross-file-line-citations,check-changeset-no-major,check-changeset-fixed,check-changeset-claims,check-changeset-overwrite,check-pending-changeset-literals,check-doc-links,check-doc-fence-languages,check-test-path-roots,check-unreferenced-sources,check-vi-mock-specifiers.check-readme-exports: exit 1 on this checkout because 24 unrelated packages are unbuilt and it cannot judge them. With plugin-report built, its README has 0 findings.check-sdui-registration-pins, reason: it needs a console build (apps/console/dist/assets), and the diff touches no registration and nosideEffects. Declared to CI.ESLint narrowing, declared. (1) The population is read from eslint itself: the
.md/.mdxfiles in this diff answer "File ignored because no matching configuration was supplied". (2) The file count is read from--format json: 2. (3) Invariance:eslint.config.jsenables no type-aware linting (noprojectService, noparserOptions.project), so this diff cannot move a verdict on an untouched file. The repo-widepnpm lintis CI's.Acceptance notes
packages/spec/src/ui/report.zod.ts: the doc comment onReportSchema.chartsays the chart is plotted "above the report's table". That still holds for tabular and summary reports. On a matrix withcolumnsthe chart now draws below the cross-tab, per the ruling. It is a doc-comment word with no accept-set change, so it is not filed. Carrier: the spec seat on [finding] Atype: 'matrix'report withcolumnsand achartparses, and the pinned renderer never draws the chart objectstack#20293, when that coordination card wraps up.DatasetReportChartare English literals outside the i18n catalogue. That predates this PR and is unchanged in kind. Not filed; carrier: none.Generated by Claude Code