Skip to content

Commit 74f7339

Browse files
os-zhuangclaude
andauthored
feat(spec)!: prune dead aria/performance from ReportSchema + dogfood the live report chart (report-liveness close-out) (#3496)
* feat(spec)!: prune dead aria/performance from ReportSchema + dogfood the live report chart (report-liveness close-out) Follow-up to the #3463 report cleanup, closing out the 2026-06 ReportSchema liveness audit. That audit flagged `aria` and `performance` as dead — declared on ReportSchema (editable in the Studio report form) but read by no renderer. - spec: removed ReportSchema.aria (AriaPropsSchema) + ReportSchema.performance (PerformanceConfigSchema) and the now-orphan imports. Both schemas stay exported (still used by views/pages/charts); ReportChart keeps its own aria from ChartConfigSchema. No manifest/export change; report.mdx regenerated. Ships minor per the launch-window breaking-as-minor policy. - showcase: added `showcase_hours_by_status_chart` — a summary report with a `chart` block (est_hours by status, bar) + an Analytics nav item. This dogfoods the live DatasetReportChart path (chart.xAxis/yAxis over the bound dataset), which had no showcase coverage; browser-verified rendering. - docs/audits: the 2026-06 report-liveness audit is refreshed with a resolution banner (chart = WIRED not dead, aria/performance pruned, re-exports removed, joined preview fixed), and the audits README section 2 annotates the resolved report slice while leaving the open chart-view/dashboard debt untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(showcase): bump report-count assertion to 4 for the new chart report seed.test.ts hardcoded 3 reports; the new showcase_hours_by_status_chart makes it 4 (summary, chart, matrix, joined). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent c95ac80 commit 74f7339

8 files changed

Lines changed: 62 additions & 14 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
feat(spec)!: prune the dead `aria` / `performance` props from ReportSchema (report-liveness close-out)
6+
7+
Follow-up to the #3463 report cleanup. The 2026-06 ReportSchema liveness audit
8+
flagged `aria` and `performance` as dead — declared on `ReportSchema` (and
9+
editable in the Studio report form) but read by **no renderer**. This removes
10+
them. Every other finding from that audit is now closed too: `chart` turned out
11+
to be **live** (`DatasetReportRenderer` plots `chart.xAxis`/`yAxis` via
12+
`DatasetReportChart`), and the obsolete sub-schemas / naming-drift / joined-preview
13+
items were resolved by #3463 and earlier work.
14+
15+
- Removed `ReportSchema.aria` (`AriaPropsSchema`) and `ReportSchema.performance`
16+
(`PerformanceConfigSchema`), dropping the now-orphan imports. Both schemas
17+
remain exported and are still used by other metadata types (views, pages,
18+
charts) — only the report's use of them is removed. `ReportChart` keeps its
19+
own `aria` (inherited from `ChartConfigSchema`).
20+
- No manifest key or public export changes (`aria`/`performance` were properties,
21+
not schemas); `report.mdx` regenerated.
22+
23+
**Migration**: nothing an author writes changes — no first-party or example
24+
report set `aria`/`performance`. Reports carry no ARIA/performance overrides;
25+
use the dataset/view surface for those concerns. Ships as `minor` per the
26+
launch-window breaking-as-minor policy.

content/docs/references/ui/report.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const result = JoinedReportBlock.parse(data);
6060
| **runtimeFilter** | `any` | optional | Render-time scope filter |
6161
| **drilldown** | `boolean` || Click-through to underlying records |
6262
| **chart** | `{ type: Enum<'bar' \| 'horizontal-bar' \| 'column' \| 'line' \| 'area' \| 'pie' \| 'donut' \| 'funnel' \| 'scatter' \| 'treemap' \| 'sankey' \| 'gauge' \| 'solid-gauge' \| 'metric' \| 'kpi' \| 'bullet' \| 'radar' \| 'table' \| 'pivot'>; title?: string; subtitle?: string; description?: string; … }` | optional | Embedded chart configuration |
63-
| **aria** | `{ ariaLabel?: string; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes |
64-
| **performance** | `{ lazyLoad?: boolean; virtualScroll?: object; cacheStrategy?: Enum<'none' \| 'cache-first' \| 'network-first' \| 'stale-while-revalidate'>; prefetch?: boolean; … }` | optional | Performance optimization settings |
6563
| **blocks** | `{ name: string; label?: string; description?: string; type: Enum<'tabular' \| 'summary' \| 'matrix'>; … }[]` | optional | Sub-reports for type=joined |
6664
| **protection** | `{ lock: Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>; reason: string; docsUrl?: string }` | optional | Package author protection block — lock policy for this report. |
6765
| **_lock** | `Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>` | optional | Item-level lock — controls overlay & delete (ADR-0010). |

docs/audits/2026-06-reportschema-property-liveness.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
**Date**: 2026-06-15 · **Scope**: `packages/spec/src/ui/report.zod.ts` (ADR-0021 single-form). **Live path**: `objectui` `ReportRenderer``DatasetReportRenderer` (dataset-bound). Pre-9.0 object/columns-query renderers retired; old JSON limps through the lossy `specReportToPresentation` bridge.
44

5+
> **✅ Fully resolved — 2026-07-25** (#3463 + follow-up). Every finding below has since been actioned; the dated body is kept as the point-in-time snapshot.
6+
> - **`chart` — WIRED, not dead.** `DatasetReportRenderer` now plots `report.chart.xAxis`/`yAxis` over the bound dataset via `DatasetReportChart` (`DatasetReportRenderer.tsx:429-465,773-786`); #3441 corrected the `.describe()`, and the showcase gained a `chart`-bearing report (`showcase_hours_by_status_chart`) so the path is dogfooded.
7+
> - **`aria`, `performance` — PRUNED** from `ReportSchema` (2026-07 report-liveness close-out).
8+
> - **`ReportColumnSchema` / `ReportGroupingSchema` (+ objectui `SpecReportColumn*`/`SpecReportGrouping*` re-exports) — REMOVED** (#3463 → framework #3488 / objectui #2816).
9+
> - **`ReportChartSchema` naming drift — RESOLVED**: the legacy `ReportViewer` chart branch that read `xAxisField`/`yAxisFields` was retired (objectui #2816); the live renderer reads the spec's `xAxis`/`yAxis`; the unread `groupBy` was pruned (#3488).
10+
> - **Studio joined preview — FIXED**: `ReportPreview` branches on `dataset || blocks` (`isJoinedWithBlocks`).
11+
512
## LIVE & well-wired (dataset shape — the canonical path)
613
`name`, `label`, `description`, `type` (summary/tabular/matrix/joined), `dataset`, `rows`, `columns` (matrix-across only, matches spec), `values`, `runtimeFilter` (`?? filter`, ANDed via `mergeFilters`), `drilldown` (default-on; cells clickable), `blocks` (joined, per-block dataset/rows/columns/values/runtimeFilter). Evidence: `DatasetReportRenderer.tsx:486-575`, `:493-543`. Wired types: tabular/summary/matrix (true cross-tab + server totals + drill)/joined.
714

docs/audits/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ The most serious cluster — properties that imply a security boundary but enfor
3838
- **Role `parent`** / **SharingRuleSchema** — manager rollup & spec sharing rules disconnected from the live engine.
3939

4040
### 2. 🔴 ADR-0021 analytics migration debt
41-
Spec moved to `dataset`+`values`/`dimensions`, but: the **chart view variant** + **dashboard renderer + Studio WidgetConfigPanel** still read the *removed* legacy `object/valueField/categoryField/aggregate` shape; **report `chart`** is dead; `ReportColumn`/`ReportGrouping` are obsolete re-exports. (Same debt that invalidated the showcase dashboard/report seeds.)
41+
Spec moved to `dataset`+`values`/`dimensions`, but: the **chart view variant** + **dashboard renderer + Studio WidgetConfigPanel** still read the *removed* legacy `object/valueField/categoryField/aggregate` shape. (Same debt that invalidated the showcase dashboard/report seeds.)
42+
43+
**✅ Report slice resolved (#3463 + 2026-07 close-out).** `report.chart` is **wired** (`DatasetReportRenderer` plots `chart.xAxis`/`yAxis` via `DatasetReportChart`, now dogfooded by the showcase `…_chart` report); `ReportColumn`/`ReportGrouping` (+ objectui `SpecReport*` re-exports) and the unread `chart.groupBy` + dead `aria`/`performance` are **removed**; the legacy `ReportViewer` chart fallback is **retired**. See [`2026-06-reportschema-property-liveness.md`](./2026-06-reportschema-property-liveness.md). The **chart-view / dashboard / WidgetConfigPanel** legacy-shape readers above remain open.
4244

4345
### 3. 🟠 Naming drift → silent no-ops (spec key ≠ consumed key)
4446
field `maxLength`/`minLength`/`referenceFilters`/`maxRating`; page `type``pageType` & `label``title` & `visibility`; dashboard `title` vs `label`; app `accentColor`/`badgeVariant`/`separator` (renderer reads, **not in spec**); action `disabled``enabled`; flow `http` vs `http_request`; skill `requiredPermissions` vs `permissions`; agent `knowledge.{topics→sources}`; webhook `object``object_name`, `isActive``active`.

examples/app-showcase/src/ui/apps/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export const ShowcaseApp = App.create({
9595
{ id: 'nav_charts', type: 'dashboard', dashboardName: 'showcase_chart_gallery', label: 'Chart Gallery', icon: 'layout-dashboard' },
9696
{ id: 'nav_report_tabular', type: 'object', objectName: 'showcase_task', viewName: 'tabular', label: 'Task List', icon: 'table' },
9797
{ id: 'nav_report_summary', type: 'report', reportName: 'showcase_hours_by_status', label: 'Hours by Status', icon: 'sigma' },
98+
{ id: 'nav_report_chart', type: 'report', reportName: 'showcase_hours_by_status_chart', label: 'Hours by Status (Chart)', icon: 'bar-chart-3' },
9899
{ id: 'nav_report_matrix', type: 'report', reportName: 'showcase_status_priority_matrix', label: 'Status × Priority', icon: 'grid-3x3' },
99100
{ id: 'nav_report_joined', type: 'report', reportName: 'showcase_task_overview', label: 'Task Overview', icon: 'layers' },
100101
],

examples/app-showcase/src/ui/reports/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,29 @@ export const TaskOverviewReport = defineReport({
6868
],
6969
});
7070

71+
/** 5 ── Summary with an embedded chart. Exercises the live `DatasetReportChart`
72+
* path: `chart.xAxis`/`yAxis` name the bound dataset's dimension/measure and
73+
* are plotted via a second `queryDataset` call (ADR-0021). */
74+
export const HoursByStatusChartReport = defineReport({
75+
name: 'showcase_hours_by_status_chart',
76+
label: 'Hours by Status (Chart)',
77+
description: 'Estimated hours by status, plotted as a bar chart.',
78+
type: 'summary',
79+
drilldown: true,
80+
dataset: 'showcase_task_metrics',
81+
rows: ['status'],
82+
values: ['est_hours'],
83+
chart: {
84+
// Chart type from ChartConfig; xAxis = dataset dimension, yAxis = measure.
85+
type: 'bar',
86+
xAxis: 'status',
87+
yAxis: 'est_hours',
88+
},
89+
});
90+
7191
export const allReports = [
7292
HoursByStatusReport,
7393
StatusPriorityMatrixReport,
7494
TaskOverviewReport,
95+
HoursByStatusChartReport,
7596
];

examples/app-showcase/test/seed.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe('showcase stack', () => {
2222
expect((stack.views ?? []).length).toBeGreaterThan(0);
2323
expect((stack.dashboards ?? []).length).toBeGreaterThan(0);
2424
// ADR-0021 single-form: the former flat `tabular` TaskListReport was
25-
// reclassified as a ListView (a flat list is a row lens, not analytics),
26-
// leaving 3 dataset-bound analytics reports.
27-
expect((stack.reports ?? []).length).toBe(3);
25+
// reclassified as a ListView (a flat list is a row lens, not analytics).
26+
// Four dataset-bound analytics reports: summary, chart, matrix, joined.
27+
expect((stack.reports ?? []).length).toBe(4);
2828
expect((stack.flows ?? []).length).toBeGreaterThan(0);
2929
// Nine flat positions (contributor/manager/exec/auditor/ops/
3030
// field_ops_delegate/client_portal_user, plus finance/legal for the v16

packages/spec/src/ui/report.zod.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataProtectionFields } from '../kernel/metadata-protection.zod';
66
import { FilterConditionSchema } from '../data/filter.zod';
77
import { ChartConfigSchema } from './chart.zod';
88
import { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';
9-
import { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';
10-
import { PerformanceConfigSchema } from './responsive.zod';
9+
import { I18nLabelSchema } from './i18n.zod';
1110

1211
/**
1312
* Report Type Enum
@@ -126,12 +125,6 @@ export const ReportSchema = lazySchema(() => z.object({
126125
/** Visualization */
127126
chart: ReportChartSchema.optional().describe('Embedded chart configuration'),
128127

129-
/** ARIA accessibility attributes */
130-
aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),
131-
132-
/** Performance optimization settings */
133-
performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),
134-
135128
/**
136129
* Joined report blocks — only meaningful when `type: 'joined'`.
137130
*

0 commit comments

Comments
 (0)