Repository navigation
Description
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj
Split out of #36645 (item 2) · Source: #36374 spec item 3 · Maintainer's pick: decision card 2026-11-23 14:16Z, 「做,作为单独的功能卡」.
What. A report chart grouped by a field shows only the groups that have records. A sales manager charting deals by stage does not see the stages with no deals, so an empty stage looks like it does not exist rather than reading as zero. The report spec has no key to ask for those groups, so neither the renderer nor the report builder can offer it.
Expected.
- A new optional report chart setting asks for groups with a count of 0 to be shown. It defaults to off, so every existing report renders exactly as today.
- The report renderer honours it. For a picklist or other field with a known set of values, every value appears, and the empty ones show 0. For a date grouping, every bucket in the report's range appears.
- The report builder (报表搭建页:右边五项(报表类型、数据来源、指标、分组、图表),选完数据来源立刻出图,缺什么就在图的位置提示 #36374) offers a switch for it in the chart settings.
Pointers. service-analytics already exports fillEmptyGroups(rows, columnAggregates). Check whether it is the right engine hook before writing a second zero-fill. Its CHANGELOG notes a past defect where shifted bucket keys were filled with a confident 0, so a date range needs a test.
Acceptance.
- A spec test shows the key is optional and defaults off.
- A renderer or analytics test covers a picklist grouping with an empty value and a date grouping with an empty bucket.
- A builder test shows the switch round-trips through save.
- The PR carries
Clause-②: yes (widening)and its spec-baseline updates, and gets a contract-tier review before the queue.
Order. After #36705 merges, because it touches the same builder files.
Grading (proposed): area:build · Feature · a new authorable key asked for by the maintainer, no data harm without it ⇒ p2. Evidence: read (#36645, #36374 item 3, the decision card).
Dedupe: #36645 names this item and stops short of it; no other card carries it.
Activity
objectstack-fleet commentedon Nov 23, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
area:build·domain:ui·priority:p2· Feature ·pm:queue; seat grade kept.Rationale: a report-chart switch to show zero-count groups, so an empty stage reads as 0 instead of looking absent. The maintainer picked it as its own feature card (14:16Z 「做,作为单独的功能卡」), split from #36645 item 2. It is a new spec key plus builder and renderer support. No current behaviour is wrong, so p2.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Premise corrected: the date half already holds on main — the executor runs
fillEmptyTimeBucketson every query (#26893,dataset-executor.ts~1383–1386) and the report'sdateRangereaches it astimeDimensions.dateRange(DatasetReportRenderer.tsx~813–817), so every bucket in range shows with 0, switch or no switch. The card's date acceptance becomes a pin: date buckets are filled the same with the switch on or off. The option half holds:fillEmptyGroups(~322) only fills cells of existing rows; an option with no records shows no group today.Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibyFBwGSJLARjP5asi3Account:
os-teslaBranch:
claude/project-thread-19thpzWorktree:
objectstack-issue-36722Domain:
uiArea:
o3-build(area:build p2, a seat card thread)Seat:
repo:objectstack#3Seat rulings on the pre-claim report (
/mnt/project-files/card-36722/pre-claim-report-bd5407ec.md, main bd5407e):ReportChartSchema,chart.showEmptyGroups: z.boolean().optional()with no default (existing reports parse unchanged). When on, the renderer adds the declared options that have no row, valued by spec'semptyGroupValueFor(count / sum → 0, avg / min / max → empty). No fill when the result is truncated, sorted by a measure, or the field declares no options. Route B (executor fills, a newDatasetSelectionrequest key) is not built: it is a second wire face for a chart-only ask; if tables or dashboards later need the same, that is its own card.reportBuilderModel.ts~70) and round-trips it through...prev.emptyGroupValueForbecomes plugin-report's first runtime import from@objectstack/spec: check the bundle-size gate andui/import rules first; if either refuses, stop and report.Clause-②: yes (widening),Metadata-protocol: added,@objectstack/specminor; contract review L2 owed before queue; the PR body carriesSkills-docs:(does a skill teach report chart keys?follow-up #Nornone — REASON).File surface:
packages/spec/src/ui/report.zod.ts(+ generated outputs it moves),ui/packages/plugin-report/src/DatasetReportRenderer.tsx,ui/packages/plugin-report/src/builder/**(the switch), their tests, i18n keys for the switch label if new, changesets (@objectstack/specminor,@object-ui/plugin-reportpatch,@object-ui/i18npatch if keys added).Stop on breach and explain in the report.
Container & model:
M,mode:thread,model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"),effort: high, reason: the thread session serves this tierWrites: the PR only through the relay
pr_create; comments, labels and bodies only through the relay write tools; report both numbers.Clause-②: yes (widening)
Metadata-protocol: added
Responsibility: a report author can turn on "show groups with no records" so a bar chart by status shows every declared status, zeros included, instead of silently dropping the empty ones.
Premise: partly holds, read on origin/main bd5407e; corrected above
Serial constraints cleared:
none yet — overlap-check after the first commit, before the first pushReadings owed in the report: the option fill per aggregate (count, sum, avg), the three no-fill controls, the date-bucket pin on and off, one ablation, a browser reading of the switch in the report builder.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 1 (file surface) to claim 7237658512.
ui/AGENTS.mdrule #2 (docs-driven) requires a feature change to update the package README and itscontent/docspage in the same PR, and the first surface left both out. Two paths are added, each as a short note on the new "show groups with no records" switch, in one separate commit:content/docs/ui/reports.mdx, one paragraph in the "An embedded chart" section.ui/packages/plugin-report/README.md, one sentence in the "Embedded chart" section.Nothing else changes. Clause-② yes (widening) and Metadata-protocol added stay as claimed.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyFBwGSJLARjP5asi3
os-dev-report
{ "issue": 36722, "status": "done", "branch": "claude/project-thread-19thpz", "pr": "https://github.com/objectstack-ai/objectstack/pull/38284", "session": "session_01L9qibyFBwGSJLARjP5asi3", "premise_still_valid": "partly — the date half already holds on main (the executor fills every bucket of a report's period, #26893); the select-option half was real and is what this PR builds (Claim 7237658512, route A)", "summary": "ReportChartSchema gains chart.showEmptyGroups: z.boolean().optional(), no default. With it on, the dataset report chart adds every declared option of the xAxis field the answer left out (presence by stored value, authored label and localized label), carrying the stored value so relabelling, declared order and option colours treat it as a real group; measure cells are emptyGroupValueFor(aggregate) from @objectstack/spec/data (0 for count/sum, none for avg/min/max); with seriesBy one row per series value. Added rows are appended so drill indices still address the answer, and a mark on an added group opens no list. No fill when the report's order reaches the chart or the field declares no options. The report builder offers a 'Show groups with no records' switch on bar/line/donut; off removes the key, metric/table drop it. New locale key in 11 packs. Docs paragraph in content/docs/ui/reports.mdx and a README sentence (amendment 1, 7237862534). plugin-report moves @objectstack/spec from devDependencies to dependencies. Changesets: spec minor; plugin-report, i18n patch. Clause-② yes (widening), Metadata-protocol added, Skills-docs none — reason in the PR body.", "tests": "Fill per aggregate through the real chart props: count, an empty declared stage reads 0 at its declared place; sum 0; avg has no value. Controls with the switch on: switch off adds nothing; a measure order adds nothing; a text field with no declared options adds nothing; the selection sent is identical on and off. Date-bucket pin: a date axis over a period sends the same selection and draws the same buckets, 0 month included, on and off. Ablation via ablation-replace.mjs (fill condition forced false; restore blob == HEAD): 4 failed / 111 passed across the four touched suites, the four fill cases; controls and date pin stay green. Suites: four touched files 115 passed; ui vitest packages/plugin-report + packages/i18n 149 files, 2292 passed, 20 skipped; spec src/ui/report.test.ts 83 passed. Typecheck NOT MEASURED locally (workspace dependency d.ts not built; no error names the changed modules). Browser (showcase dev --fresh + console vite, Playwright, Backlog emptied on the local DB): switch off draws 4 statuses; on, the builder preview draws Backlog first at no height; hidden on Number; Save PUTs chart.showEmptyGroups: true then publishes; reloaded view draws 5 statuses and the builder reopens with the switch on. Screenshots in project files card-36722/.", "gates": "dispatch-gates --ran with recorded exit codes at 86c2dbee: 126 derived, 124 run exit 0, 2 NOT MEASURED exit 3 (check-plugin-teardown-shape --self-test: fixture commit outside the shallow clone; check:dual-build-cjs-loads: needs a full pnpm build), 0 unrun. First sweep (114 at 6508986c) found one real red, check:undeclared-dep-imports, fixed in 86c2dbee; the 12 families the lockfile change added ran at 86c2dbee. Seven spec gates first exited 3/1 against a stale dist and vitest scripts/ was OOM-killed; all re-ran exit 0 after a fresh spec build. Bundle-size and ui/ import-rule check for the first runtime spec import: library build externalizes bare specifiers (no growth), plugin-dashboard already does the same import, no eslint restriction. overlap-check VERDICT clean exit 0 at 8a299e70 (main, #38246, #38230, #38168).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "6 GitHub MCP calls, all reads (issue_read get / get_comments on #36722, #36705, #36645), plus 1 session read and 1 PR activity subscription", "api_writes": "2 — fleet-write relay pr_create (POST pulls + assignees leg, read-back 9943 bytes identical, run 46138957938); this os-dev-report comment via post-stamped", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": [ "No-fill list: the chart's selection never sends limit/offset and the dataset answer carries no truncation signal, so 'truncated' does not occur on this path and has no test.", "The fill declines under ANY order that reaches the chart's selection (dimension order included), not only a measure order: appended rows have no place in an authored order. Narrows when the switch acts; refuses nothing. Spec TSDoc says so (8a299e70).", "A zero-row answer still draws no chart; the table under the chart is not filled (the key is chart-only).", "Surface: ui/packages/plugin-report/package.json and pnpm-lock.yaml (spec moved to dependencies, required by check:undeclared-dep-imports); the claim named no manifest file.", "Docs surface per claim amendment 1 (7237862534)." ] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 2 (file surface) to claim 7237658512, recording what PR #38284 (head
86c2dbee) touches beyond amendment 1 (7237862534), per report 7238447636. Both paths are forced by a gate:ui/packages/plugin-report/package.json, which moves@objectstack/specfrom devDependencies to dependencies. The renderer now imports it at runtime, andcheck:undeclared-dep-importswas red without the move. The lib build externalizes it, andplugin-dashboardalready carries the same import.pnpm-lock.yaml, the lockfile entry that move rewrites.Nothing else changes. Clause-② yes (widening) and Metadata-protocol added stand as claimed, so an L2 at
CONTRACT_REVIEW_TIERis owed before the queue.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 3 (file surface) to claim 7237658512, after amendments 1 (7237862534) and 2 (7238456293). It adds one path, which L1-a asked for as N1:
showEmptyGroupsrow in the report liveness ledger (liveness/report.json), citing its reader and its tests.Seat ruling on the S4 rework: the builder offers the switch only on the chart families that can draw an empty group, and that offer is the follow-up L1-a named N3 ("the switch shows where it does nothing"). N3 is therefore carried by this PR, with no separate card. Clause-② yes (widening) and Metadata-protocol added are unchanged.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T14:04Z
Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 2ac50c0 · 2026-11-28T14:04Z
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T14:09Z
Contract review
Served-tier:
CONTRACT_REVIEW_TIERHead-sha:
2ac50c0e6f6f86da8574c22e00fa13fd1ff82648Local-runs: none
Scope: packages/spec/src/ui/report.zod.ts + ui/packages/plugin-report/src/emptyOptionGroups.ts, ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/plugin-report/src/builder/reportBuilderModel.ts, ui/packages/plugin-report/src/builder/ReportBuilder.tsx, packages/spec/liveness/report.json, packages/spec/liveness/state-counts/report.md, packages/spec/authorable-surface/ui.json, content/docs/references/ui/report.mdx; read only, never reviewed: ui/packages/plugin-charts/src/AdvancedChartImpl.tsx, ui/packages/plugin-charts/package.json, ui/packages/core/src/utils/chart-series.ts, ui/packages/react/src/hooks/useDatasetDimensionLabels.ts, ui/packages/plugin-report/src/index.tsx, packages/spec/src/data/aggregation-policy.ts, packages/spec/src/api/analytics.zod.ts, packages/spec/src/ui/chart.zod.ts, packages/spec/liveness/README.md, packages/services/service-analytics/src/analytics-service.ts, packages/services/service-analytics/src/dataset-executor.ts, packages/services/service-analytics/src/dimension-labels.ts, ui/packages/plugin-report/vite.config.ts, ui/packages/plugin-report/package.json, skills/objectstack-ui/rules/dashboards.md, .changeset/config.json, AGENTS.md
DELTA review from
1c290e5b070a546ca6766404948a08053beaa1c4(record 7239843832: PASS, should-fix S4, nits N3 and N4) to this head. The record stands on its own for this head: the PR was re-read at it, not only the one new commit.Inputs read: card #36722, its body and all seven comments, the newest being claim amendment 3 (7239865924) and the claim for this head (7240395587); PR #38284, its body as it stands, the 31-file list (+900, -12), the net diff from merge base
e42520c6and the delta from the earlier head (1 commit, 13 files, head strictly ahead); the 77 latest check-runs on this head: 66 success, 11 skipped, none red, none pending.Check Changesetwas still running at first read and was success when read again.① Derived judgments
report.chart.showEmptyGroupsis a new optional boolean with no default on a closed chart shape. The delta changes its TSDoc and.describe()text only. No refinement was added: the key is accepted on every chart type, and where it acts is a matter of the renderer and of the contract text, judged in ④.report.chartonly; one reader,DatasetReportChart.ReportChartandReportChartParsed.chartDrawsEmptyGroups,offersShowEmptyGroupsandchartKeepsEmptyGroupsare new module exports inside plugin-report; the package index names none of them, so the published export surface of@object-ui/plugin-reportdoes not move.ui/ReportChart:showEmptyGroups; live 41, classified 44. Neither file is in the delta, and neither should be.showEmptyGroupsrow's evidence now names the third condition of the call,chartDrawsEmptyGroups(chart.type), and its note states the filled families, the unfilled ones, and the builder's two sets. Each sentence matches the code at this head. The evidence paths are the four files they were.Spec property livenessis success.showEmptyGroupsrows ofreferences/ui/report.mdxcarry the new.describe()text verbatim.Skills-docs: none, still true. No skill is touched.Check Changeset,Spec property liveness,Validate Package Dependencies,Type Check UI,TypeScript Type Check, everyTest UIandTest Coreshard,Build DocsandCheck Documentation Linksare success on this head.② Semver level
@objectstack/specminor,@object-ui/plugin-reportand@object-ui/i18npatch, the three in onefixedgroup.Clause-②: yes (widening)andMetadata-protocol: addedstand in the PR body and in both changeset bodies. The delta makes the renderer act on fewer chart types than it did at the earlier head, but nothing of this PR has been released, so againstmainthe change is still one added key and no narrowing.reportBuilderModel.tsnow importsemptyOptionGroups.ts, which is the module that imports@objectstack/spec/data, so the builder reaches that runtime import too. It is the same package and the same declared dependency.③ Boundary flags
open_questions: still empty.packages/spec/liveness/report.json, the path the earlier record flagged. The delta adds no path: the list is still 31 files.④ Design judgment
No must-fix, no should-fix.
.describe(), and both are true of the renderer.reconciledeletes the key only outsideKEEPS_EMPTY_GROUPS, still the 13 types ofplanReportChart's series plan. A stored funnel keeps the key acrosspickMeasureandpickGrouping, a stored gauge drops it, and a test holds the set equal to the series plan overChartTypeSchema.drillRawRowswherever a raw row carries the x-axis key, with spellings as the fallback only.chartDrawsEmptyGroupsinemptyOptionGroups.ts, is true for bar, column, horizontal-bar, line, area, radar and combo, and both sides read it:chart.showEmptyGroups === true, no order reaching the chart, andchartDrawsEmptyGroups(chart.type). On pie, donut, funnel, treemap, sankey and scatter the chart is handed the answer's rows untouched, so the unsized-rows footnote, the dropped rows and the funnel hazard cannot come from this key. A renderer test pins the five value-sized types as unchanged and area and column as filled;offersShowEmptyGroups, which is that predicate over the stored chart type and an x axis that is not a date dimension. So it is offered on bar and line among the builder's own choices and on a stored column, area, horizontal-bar, radar or combo, and not on a donut, a funnel or any other value-sized type;Against
AdvancedChartImpl.tsx, which the delta does not touch, the seven types are the ones that draw a row as a category whatever its value:columnis read asbar. The file's own measured note says a zero paints a zero-height rectangle on bar, horizontal-bar and combo and a point on line and area. None of the row-dropping notes in the file (unsized-rows,omitted-rows,unplotted-points) belongs to these arms;ComposedChartwith the same categoryXAxisover the rows, so the added option is a tick with a zero-height bar or a point at zero;RadarChartand labels its spokes from the x-axis key throughPolarAngleAxis, with no filter and no footnote. An added option is a labelled spoke, and a0is the polygon's vertex at the centre.For combo this rests on the code and on the file's measured note. For radar it rests on the code alone: the file carries no measurement for it, and recharts is not installed in this clone to read. See N5.
packages/spec/src/ui/report.zod.ts, the sentences the delta added, each against the code:chartDrawsEmptyGroups(chart.type)in the fill condition; the chart arms aboveshowLegendisDatasetReportChartreturns for the single-value and tabular plans before the fill, as it does before the chrome is lowered.describe(): on a chart with a category axis (the seven named); nothing is added on any other chart typeThe sentences carried from the earlier heads still hold:
0for count, sum and count_distinct; no value for avg, min, max and a derived measure; only a field that declares options; nothing under an order that reaches the chart; no chart on a zero-row answer; a filter-excluded option reads as empty; a date axis untouched; omitted means off; the same selection posted either way; a mark on an added group opens no list.ui/packages/plugin-report/src/emptyOptionGroups.ts: agrees with the contract. The predicate's comment gives the reason for each excluded family in the chart's own terms, and the fill itself is unchanged since the earlier head.ui/packages/plugin-report/src/DatasetReportRenderer.tsx: the fill condition now carries every bound the contract states. It readschart.type, the authored string the plan also draws, so the type that is tested is the type that is drawn.ui/packages/plugin-report/src/builder/reportBuilderModel.tsandReportBuilder.tsx: the two questions are now two sets with their own names, and a test pins both over the whole chart vocabulary: kept equals the series plan, offered equals the predicate, and the offered list is spelled out. One consequence, judged acceptable: a person who turns the switch on for a bar and then picks a donut saves a donut that still carries the key, with no switch showing. The contract says the key adds nothing there, the key is harmless on it, and it is what brings the switch back on when the chart returns to a bar. Deleting it would reopen S2.packages/spec/liveness/report.json,state-counts/report.md,authorable-surface/ui.json,references/ui/report.mdx: consistent with the schema and with each other at this head.Nits:
orderreaches the chart still show it, because the builder reads neither a dimension's options nor the order's scoping; on both the renderer adds nothing, as the contract says. The PR body's acceptance notes state the two cases, and the seat ruled the PR carries it.S1, S2, S3 and S4 are closed on this head. Nothing is open on it.
Implemented-by:
claude/project-thread-19thpzReviewed-by:
session_01L9qibwSEecrzDjKjbk24r1VERDICT: PASS
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T14:10Z
L1-a delta: ACCEPT on PR #38284 at
2ac50c0e6f6f86da8574c22e00fa13fd1ff82648, after my REWORK 7239857340 at1c290e5b.chartDrawsEmptyGroups, is true for bar, column, horizontal-bar, line, area, radar and combo.showEmptyGroups === true && !chartOrder && chartDrawsEmptyGroups(chart.type).chart.typeis required byChartConfigSchema, so an omitted type cannot skip the fill by accident.offersShowEmptyGroups: a category-axis type over a non-date axis.reconcilestill keeps an authored key on all 13 series types (KEEPS_EMPTY_GROUPS), so S2 stays closed.report.mdxis regenerated verbatim.reports.mdx, the README, the ledger note and both changesets follow. The ui changeset's "never" is now softened to "wherever the answer has it".packages/spec/liveness/report.json.Follow-ups, no change on this head:
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T15:23Z · 收口:PR #38284 经合并队列合入(a56e1da0),本卡随 Fixes 关闭;去掉 pm:dispatched。L1 记的 N3(文本或查找轴、带排序的报表仍显示无效开关)和 N5(雷达图未实测)只作备注,不另立卡。