Skip to content

Commit 8db60b1

Browse files
docs(spec): a lookup-lane board's lane count is the whole lane's, not the page's (#38279)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoFAW3Y9BBmgxJwzSTjuLS1X)_ Fixes #37941 repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Clause-②: no Metadata-protocol: none ## 维护者速读 - 在 Studio 或文档里读看板「道底统计」说明的作者,现在读到的是:按查找字段分道的列表看板,道底的计数数的是整条泳道,和看板上显示的一致;以前说明写的是只数一页。 - 看板体验专题:运行时早已改成数整条泳道,说明没跟上,这次只改说明文字。 - 不改任何行为和元数据形状,出错最多是说明措辞不准,可以直接撤回。 - 无 ## What changes - `packages/spec/src/ui/view.zod.ts`, `KanbanLaneSummarySchema` doc comment: the sentence "Its `count` counts the page it was handed" becomes: since objectstack#37327 the same grouped read answers each lane's record count, so `count` counts the whole lane, as the lane header does; only a read that cannot answer (no grouped door, a refusal, a cut answer) leaves the page's count, marked `+`. - Same file, `kanban.summary` describe: "its `sum`, `avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page" becomes "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 `+`)". With `count` now in that list, the next sentence's "the other three" would read ambiguously, so it names them: "`avg`, `min` and `max` show nothing". - `content/docs/references/ui/view.mdx`: regenerated by `pnpm --filter @objectstack/spec gen:docs`. The same describe appears three times there (`KanbanConfig` is expanded in three places), and all three rows change. No other generated file moved. - `.changeset/37941-kanban-lane-count-whole-lane.md`: `@objectstack/spec` patch. The describe ships in `files[]`, so this is a patch changeset, not `skip-changeset`. - Scope is the lookup-lane sentences only (seat ruling S1 in the claim). Swimlane and no-option boards are not rewritten here. ## Tests No new test (seat ruling P1 in the claim). The card's second box, "a lookup-lane board's `count` is the lane's, not the page's", is already pinned at runtime on main: - `ui/packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx:527`, "a foot `count` reads the whole lane too": a lookup-laned list view board is handed one page of 25 of 70 deals, and its foot `count` reads 30 and 30. - Its contrast at `:535`, "CONTROL: over a source with no grouped door each count is the page's, marked `+`": 13+ and 12+. Describe wording is not pinned: os-dev pins no prose unless a consumer parses it. <details><summary>Local runs at 04ae2ae</summary> - `pnpm --filter @objectstack/spec build` + `gen:docs`: exit 0 (lock VERDICT command-exit 0). - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ui`: Test Files 194 passed (194), Tests 6694 passed (6694). `pnpm --filter @objectstack/spec typecheck`: exit 0. This is narrowed to `src/ui`, the directory of the edited file. The full spec suite runs in CI. - Derived gate list (`dispatch-gates.mjs --commands`): 109 commands. 102 exit 0. 7 exited 3 (PREREQUISITE NOT MET: an unbuilt workspace closure, plus one shallow-clone fixture) and are re-run after the closure build. The report records the re-run. - `overlap-check`: clean against origin/main e2a0e90 and #38168 (same two files, disjoint lines). </details> ## Acceptance notes - The runtime facts behind the new text, read on main f19350b: `KanbanLaneStatistic.ts` (`LANE_COUNT_ALIAS`, the #37327 section of its header); `ObjectKanban.tsx`, which adds `laneCount: true` to the lane read when the host hands the query (`hostLaneRead`); and `KanbanImpl.tsx` `LaneFootStatistic`, whose `count` is the lane header's count (`hostCount`). `ListView.tsx` `kanbanLaneStatisticHosted` hands that query for a board it does not page by lane. - Prior rulings read: lane summary, kanbanlanesummary, lanecounts, lookup lane → 0 hits; none; thread: none. ## Verification Read first: `packages/spec/src/ui/view.zod.ts`, the `summary` describe of `KanbanConfigSchema`. Two-minute check: `git grep -n "counts that page" -- packages/spec content/docs` answers nothing. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwT22DXnLz8V1Bgcxs)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibwT22DXnLz8V1Bgcxs Co-authored-by: Claude <noreply@anthropic.com>
1 parent ab339d7 commit 8db60b1

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): a lookup-lane board's lane `count` is the whole lane's, not the page's
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
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.

‎content/docs/references/ui/view.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ HTTP methods a view data source may request — the subset of `HttpMethod` witho
829829
| **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. |
830830
| **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. |
831831
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
832-
| **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. |
832+
| **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. |
833833
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
834834
| **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. |
835835
| **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
11911191
| **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. |
11921192
| **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. |
11931193
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
1194-
| **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. |
1194+
| **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. |
11951195
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
11961196
| **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. |
11971197
| **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
16601660
| **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. |
16611661
| **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. |
16621662
| **summarizeField** | `string` | optional | Field to sum at top of column (e.g. amount) |
1663-
| **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. |
1663+
| **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. |
16641664
| **showFieldLabels** | `boolean` | optional | Whether each card names its fields beside their values. Omit for true (names shown); false shows the values alone. |
16651665
| **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. |
16661666
| **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. |

‎packages/spec/src/ui/view.zod.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2389,8 +2389,11 @@ export const EmptyStateSchema = lazySchema(() => strictObject({
23892389
* objectstack#36871: the list view hands a board whose lanes it cannot know
23902390
* before the query (lanes over a lookup field) the page of records it fetched
23912391
* AND the query of that page, so that board asks the same read and its four
2392-
* aggregates cover every record of each lane too. Its `count` counts the
2393-
* page it was handed, as its lane header does. Only a board handed its cards
2392+
* aggregates cover every record of each lane too. objectstack#37327: the same
2393+
* read answers each lane's record count, so its `count` counts the whole lane,
2394+
* as its lane header does, not the page it was handed; only a read that cannot
2395+
* answer (no grouped door, a refusal, a cut answer) leaves the page's count,
2396+
* marked `+`. Only a board handed its cards
23942397
* without their query (records handed in whole) adds up a `sum` over those
23952398
* cards, and draws none of the other three.
23962399
*/
@@ -2518,10 +2521,11 @@ export const KanbanConfigSchema = lazySchema(() => strictObject({
25182521
+ '`{ type: \'sum\', field: \'amount\' }` totals a number field over all of the lane records, '
25192522
+ '`avg` averages it, and `min` / `max` show its smallest / largest value, each computed by the query '
25202523
+ '(a field the reader may not read shows no figure); `{ type: \'none\' }` shows nothing. '
2521-
+ 'A list view board whose lanes come from a lookup field draws one page of records: its `sum`, '
2522-
+ '`avg`, `min` and `max` still cover every record of each lane, and its `count` counts that page. '
2524+
+ 'A list view board whose lanes come from a lookup field draws one page of records: its `count`, '
2525+
+ '`sum`, `avg`, `min` and `max` still cover every record of each lane (where the source cannot answer '
2526+
+ 'that read, `count` counts the page, marked `+`). '
25232527
+ 'Only on a board handed its records whole, '
2524-
+ 'without their query, does `sum` total the records handed in and the other three show nothing. '
2528+
+ 'without their query, does `sum` total the records handed in and `avg`, `min` and `max` show nothing. '
25252529
+ 'Takes precedence over summarizeField. Omit to keep summarizeField\'s sum, or no statistic without it.',
25262530
),
25272531
/**

0 commit comments

Comments
 (0)