From 04ae2ae5c97b023437484dee32deb75dab11927a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 10:36:24 +0000 Subject: [PATCH] docs(spec): a lookup-lane board's lane count is the whole lane's, not the page's Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibwT22DXnLz8V1Bgcxs --- .changeset/37941-kanban-lane-count-whole-lane.md | 10 ++++++++++ content/docs/references/ui/view.mdx | 6 +++--- packages/spec/src/ui/view.zod.ts | 14 +++++++++----- 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 .changeset/37941-kanban-lane-count-whole-lane.md diff --git a/.changeset/37941-kanban-lane-count-whole-lane.md b/.changeset/37941-kanban-lane-count-whole-lane.md new file mode 100644 index 00000000000..78933662d41 --- /dev/null +++ b/.changeset/37941-kanban-lane-count-whole-lane.md @@ -0,0 +1,10 @@ +--- +'@objectstack/spec': patch +--- + +docs(spec): a lookup-lane board's lane `count` is the whole lane's, not the page's + +Clause-②: no +Metadata-protocol: none + +The `KanbanLaneSummarySchema` doc comment and the `kanban.summary` describe said that a list view board whose lanes come from a lookup field counts the one page it was handed. Since objectstack#37327 that board reads each lane's record count from the same grouped read its `sum`, `avg`, `min` and `max` ride, so a foot `count` shows the whole lane, as the lane header does; only a source that cannot answer that read leaves the page's count, marked `+`. The text now says so, and the generated reference page follows. No schema shape changes. diff --git a/content/docs/references/ui/view.mdx b/content/docs/references/ui/view.mdx index 0a7a0317890..8fb196f952c 100644 --- a/content/docs/references/ui/view.mdx +++ b/content/docs/references/ui/view.mdx @@ -829,7 +829,7 @@ HTTP methods a view data source may request — the subset of `HttpMethod` witho | **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. | | **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. | | **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) | -| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | +| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | | **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. | | **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. | | **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. | @@ -1191,7 +1191,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. | | **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. | | **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) | -| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | +| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | | **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. | | **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. | | **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. | @@ -1660,7 +1660,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **groupByField** | `string` | ✅ | Field to group columns by (usually status/select). NO leading or trailing whitespace: the board reads this name off every card verbatim, so a padded spelling collapses the whole board into one `Uncategorized` lane. | | **lanes** | `string[]` | optional | The lanes the board draws, in this order: stored option values of the groupByField field (the option `value`, not its label). Omit to draw one lane per option in the options' own order. A record whose value is not listed is not hidden: it lands in the `Uncategorized` lane, as a record whose value matches no lane does. To keep records off the board, filter the view. List each value once. | | **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) | -| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. Only on a board handed its records whole, without their query, does `sum` total the records handed in and the other three show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | +| **summary** | `{ type: 'none' } \| { type: 'count' } \| { type: 'sum'; field: string } \| { type: 'avg'; field: string } \| … +2 more` | optional | The statistic each lane shows at its foot. `{ type: 'count' }` counts the lane records; `{ type: 'sum', field: 'amount' }` totals a number field over all of the lane records, `avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query (a field the reader may not read shows no figure); `{ type: 'none' }` shows nothing. A list view board whose lanes come from a lookup field draws one page of records: its `count`, `sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer that read, `count` counts the page, marked `+`). Only on a board handed its records whole, without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. Takes precedence over summarizeField. Omit to keep summarizeField's sum, or no statistic without it. | | **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. | | **hideEmptyFields** | `boolean` | optional | Whether a card leaves out a field that holds no value. Omit for true (left out); false keeps the field with an empty value. | | **cardFooter** | `{ comments?: boolean; attachments?: boolean }` | optional | The counts each card shows at its foot, each read for the whole board over its loaded cards in grouped reads, never one per card. Omit to show none. | diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index 6bcc1c123a8..b8e64b22c8a 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -2389,8 +2389,11 @@ export const EmptyStateSchema = lazySchema(() => strictObject({ * objectstack#36871: the list view hands a board whose lanes it cannot know * before the query (lanes over a lookup field) the page of records it fetched * AND the query of that page, so that board asks the same read and its four - * aggregates cover every record of each lane too. Its `count` counts the - * page it was handed, as its lane header does. Only a board handed its cards + * aggregates cover every record of each lane too. objectstack#37327: the same + * read answers each lane's record count, so its `count` counts the whole lane, + * as its lane header does, not the page it was handed; only a read that cannot + * answer (no grouped door, a refusal, a cut answer) leaves the page's count, + * marked `+`. Only a board handed its cards * without their query (records handed in whole) adds up a `sum` over those * cards, and draws none of the other three. */ @@ -2518,10 +2521,11 @@ export const KanbanConfigSchema = lazySchema(() => strictObject({ + '`{ type: \'sum\', field: \'amount\' }` totals a number field over all of the lane records, ' + '`avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query ' + '(a field the reader may not read shows no figure); `{ type: \'none\' }` shows nothing. ' - + 'A list view board whose lanes come from a lookup field draws one page of records: its `sum`, ' - + '`avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. ' + + 'A list view board whose lanes come from a lookup field draws one page of records: its `count`, ' + + '`sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer ' + + 'that read, `count` counts the page, marked `+`). ' + 'Only on a board handed its records whole, ' - + 'without their query, does `sum` total the records handed in and the other three show nothing. ' + + 'without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. ' + 'Takes precedence over summarizeField. Omit to keep summarizeField\'s sum, or no statistic without it.', ), /**