Repository navigation
Commit 830ff8b
fix(list): a data-laned kanban's footer counts the whole query, as its lanes do (#38681)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ844kETyNGBBt9atKc1Snfzd)_
Fixes #38558
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:列表里按查找字段或文本字段分道的看板,页脚现在显示整个视图的记录数(例如 70
条),与各道计数之和一致;只有看板确实只画了第一页的道时,才保留「只显示前 N 条」。
- 为什么做:同一块看板上页脚写 25 条、各道加起来却是 70 条,两个数字互相矛盾(看板页脚计数卡)。
- 出错会怎样:最坏是页脚数字或「只显示前 N 条」提示显示错,不影响数据本身;可直接撤回本 PR。
- 要你做的:无。
## What changes
- `ui/packages/plugin-list/src/ListView.tsx`, the record-count bar under
a board the list hands its window to (`kanbanLaneStatisticHosted`). With
a numeric `fetchedTotal`, the count is the query's total instead of the
window's length, which is the number the board's lanes add up to. The
same figure feeds the view switcher's count (`leadingRecordCount`).
- The "Showing first N" line is dropped only where the board reaches
every record by itself (`kanbanHostedBoardReachesEveryRecord`): lanes
from the data, a lookup or text lane field, no declared lanes, no
swimlanes, and a source with `queryGroupHeaders`. Number, boolean and
date lane fields, declared lanes, swimlanes and a source with no grouped
door draw only the page's lanes, so the line stays there. i18n wording
is unchanged.
- Pin: a new top-level describe in the shared harness
`ui/packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx`
(AGENTS.md shared-harness rule). Text-laned and lookup-laned boards read
"70 records" with no warning, and the text board's lane sum equals the
footer figure. CONTROLs: a number-laned board and a source with no
grouped door keep "Showing first 25 records".
- Changeset `.changeset/38558-kanban-footer-count.md` (patch,
`@object-ui/plugin-list`).
## Tests
Head `e4b485a5`, after building the `@object-ui/app-shell^...` closure
under os-verify-lock (command-exit 0):
- `pnpm exec vitest run --maxWorkers=2
packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx`
(under the lock): 1 file, 49 tests passed (45 existing, the #38506 pin
included and still green, plus 4 new).
- `pnpm exec vitest run --maxWorkers=2 packages/plugin-list/`: 190
files, 2083 tests passed.
- `@object-ui/plugin-list` `type-check` (tsc + tsconfig.test.json): exit
0.
- Ablation A1 (`hostedBoardTotal` forced to null): all 4 new tests red
(footer lacks "70 records"). Ablation A2 (the warning gate's `&&
kanbanHostedBoardReachesEveryRecord` removed): 2 CONTROLs red, 2 pins
green. Both restored, blob == HEAD.
## Acceptance notes
- The warning gate is static: if the lane read is refused or cut at
runtime, the board shows page counts marked `+` and no lane past the
page, while the footer reads the full total with no "Showing first N".
The total is still true, but past-page records are not reachable on the
board in that state.
## Verification
- `dispatch-gates --commands` at `e4b485a5`: 38 derived families, 38
run, all exit 0 (the `ui scripts/` vitest under the lock: 172 files
passed, 2 skipped; 5159 tests passed). `--ran`: 0 NOT-MEASURED.
- `overlap-check.mjs` at `e4b485a5` against origin/main `0ba5e06a`:
clean (#38550 shares ListView.tsx and merges cleanly).
- CI check-runs: read on this PR.
Files to read first: `ListView.tsx` hunks at
`kanbanHostedBoardReachesEveryRecord` and `hostedBoardTotal` (the risk
is the warning gate).
Two-minute check: open a list-view kanban laned by a lookup field with
more records than its page size. The footer should read the full count,
equal to the sum of the lane badges, with no "Showing first N".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbamiNxp7695qyaEYsH
<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbamiNxp7695qyaEYsH -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 714124a commit 830ff8b
3 files changed
Lines changed: 161 additions & 3 deletions
File tree
- .changeset
- ui/packages
- app-shell/src/__tests__
- plugin-list/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1022 | 1022 | | |
1023 | 1023 | | |
1024 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4077 | 4077 | | |
4078 | 4078 | | |
4079 | 4079 | | |
| 4080 | + | |
| 4081 | + | |
| 4082 | + | |
| 4083 | + | |
| 4084 | + | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
| 4093 | + | |
| 4094 | + | |
| 4095 | + | |
| 4096 | + | |
| 4097 | + | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
4080 | 4101 | | |
4081 | 4102 | | |
4082 | 4103 | | |
| |||
7088 | 7109 | | |
7089 | 7110 | | |
7090 | 7111 | | |
| 7112 | + | |
| 7113 | + | |
| 7114 | + | |
| 7115 | + | |
| 7116 | + | |
| 7117 | + | |
| 7118 | + | |
| 7119 | + | |
7091 | 7120 | | |
7092 | | - | |
| 7121 | + | |
| 7122 | + | |
7093 | 7123 | | |
7094 | 7124 | | |
7095 | 7125 | | |
| |||
7102 | 7132 | | |
7103 | 7133 | | |
7104 | 7134 | | |
7105 | | - | |
| 7135 | + | |
7106 | 7136 | | |
7107 | 7137 | | |
7108 | 7138 | | |
| |||
9107 | 9137 | | |
9108 | 9138 | | |
9109 | 9139 | | |
9110 | | - | |
| 9140 | + | |
9111 | 9141 | | |
9112 | 9142 | | |
9113 | 9143 | | |
| |||
0 commit comments