Commit da0ec3c
feat(spec): list-view grouping — the four *_filled / *_empty summaries derive from one COUNT(field) node; the existing query door; scalar keys; unknown-member refusal
Contract review conditions (seat comment on the card, 2026-09-04):
- alias_collision also refuses a grouping field named `count` (checked up
front, and the per-summary collision check now precedes the count
early-return); pinned.
- fold sentence: `count_distinct` does not fold across leaves — listed with
`avg`; an outer-level `count_unique` needs the `depth` query; pinned (8 vs 4).
- the "no aggregate route" premise corrected: both queries ride the existing
`POST /data/:object/query` → `protocol.findData` → `engine.aggregate` door
(answering `{ object, records, total, hasMore }`), `client.data.query()`
and the RPC `method: 'aggregate'`; the platform half pins that door.
- an unknown ColumnSummary value → `summary_unknown` (INVALID_QUERY / 400);
`summary_unmapped` (NOT_IMPLEMENTED / 501) kept for a declared member with
no counterpart (none today); both pinned.
- group keys are scalar-valued: `group_key_not_scalar` (INVALID_QUERY) for an
array/object key; per-instant date grouping and unbounded header
cardinality recorded in the GroupingConfigSchema JSDoc.
- fork (i) ruling implemented: count_filled / count_empty / percent_filled /
percent_empty compile to ONE `{ function: 'count', field, alias:
'count_<field>' }` node (deduplicated, never the fieldless count) and
`deriveColumnSummary(row, summary, field)` computes them on the header row
(percent_filled 0 when count is 0; percent_empty = 1 − percent_filled);
describes and the changeset updated; pinned on the fixture's nullable field
in both row orders.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2oQebDDxYKfWZusyd8GXk1 parent dd2685a commit da0ec3c
4 files changed
Lines changed: 459 additions & 140 deletions
File tree
- .changeset
- packages/spec/src/ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | | - | |
47 | | - | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments