Repository navigation
Commit 159113f
docs(skills): objectstack-ui teaches the board's lane statistic and card settings (#37063)
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes #36422
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用 AI
助手搭看板的应用作者,拿到的看板配置会带上每条泳道底部的统计(计数、合计、平均、最小、最大),以及卡片上「是否显示字段名」「是否隐藏空字段」两个开关;此前助手只会写旧的求和写法。
- 为什么做:这是「看板视图有了自己的设置」这项工作的收尾,技能文档此前没有教这些新设置。
- 出错会怎样:助手会照着错的说明去写看板配置;本次只改文字,可以直接撤回。
- 要你做什么:无。
## What changes
`skills/objectstack-ui/rules/list-views.md`, section "Configuring Kanban
Views":
- The board example writes `kanban.summary` (`{ type: 'sum', field:
'estimate_hours' }`) in place of `summarizeField`, and sets
`showFieldLabels` and `hideEmptyFields`, each with its default (`true`)
in the trailing comment.
- One note under the example: the six `summary.type` values (`none`,
`count`, `sum`, `avg`, `min`, `max`); the four aggregates take a `field`
and are computed by the query over every record of the lane, not only
the loaded cards; the known gap the spec names (lanes over a lookup
field, or a view with grouping: `sum` covers one fetched page and the
other three show nothing); `summary` takes precedence over the older
sum-only `summarizeField`.
- `summarizeField` is still an accepted key (`KanbanConfigSchema` in
`packages/spec/src/ui/view.zod.ts` declares it, no tombstone, no
conversion), so it is named once as the older spelling and no longer
taught as the way to write a lane statistic. No other file under
`skills/` mentions it (`git grep summarizeField -- skills` at this head:
one hit, the new note).
Every sentence was written from the spec's describe text and JSDoc for
`KanbanLaneSummarySchema`, `summary`, `showFieldLabels` and
`hideEmptyFields` at main a68b475.
### Paid for in the same file
The file had 4 bytes of token headroom, so the new teaching is paid by
cutting restatement in `list-views.md` itself. No ratchet row moves.
| Cut | Restates |
|:---|:---|
| search example comment "No `searchableFields` ..." | the "key omitted"
row of the table below it |
| search example comment "This list only ..." | the `searchableFields`
line under it |
| "The full `dropdown / tabs / toggle` range applies only to page lists
..." | "`tabs` is page-only" in the same bullet |
| "the whole search box, for every user and every term: no result at
all" | its own heading, "One bad entry 400s EVERY search on that list" |
| "errors, not warnings" | "fails the build" in the same sentence |
| comment "no search box" | the sentence introducing the example |
| "one lane per option" on `groupByField` | the `lanes` note under the
example |
| "the default `list` and every other view untouched" | "a NEW
`listViews` entry that coexists with the views the object has" |
| gantt comments "task bar start" / "task bar end" | the key names
`startDateField` / `endDateField` |
### Skills size readings
| | before (a68b475) | after (7d7ca6d) |
|:---|:---|:---|
| `rules/list-views.md` lines | 409 | 411 |
| `rules/list-views.md` bytes / tokens | 17788 / 4447 | 17775 / 4444
(ceiling 4448) |
| all `SKILL.md` files, lines | 4942 | 4942 (none touched) |
| bundle total, tokens | 295195 (the measured after, plus this file's 3)
| 295192 (measured) |
Net lines in `skills/**`: +2 (17 added, 15 removed), against a budget of
+12.
## Tests
Head 7d7ca6d. Text only: no tested behaviour changes, so no ablation.
- `pnpm --filter @objectstack/spec run check:skill-examples` (spec and
the client-react closure built first, under the verify lock): exit 0,
"350 prose examples type-check across 3 surface(s)". This is the gate
that type-checks the board example against `ListView`.
- `node scripts/check-skills-token-ratchet.mjs`: exit 0,
"skills/objectstack-ui/rules/list-views.md is 4444 tokens (ceiling 4448;
headroom 4)".
## Acceptance notes
- Card acceptance: the board example uses all three keys the board
gained (`summary`, `showFieldLabels`, `hideEmptyFields`); the scope
addition's three statistics (`avg`, `min`, `max`) are named with what
they cover.
- No eval case was added. No case in
`evals/views-apps-actions-pages.json` exercises these keys, and a case
was drafted, but `scripts/pm/overlap-check.mjs` answered exit 1 against
open PR #37043, which appends to the same file. The case was dropped so
this branch does not queue behind that pull (overlap-check at this head:
`VERDICT clean exit 0`). A case for the lane statistic can follow once
that pull lands.
- The example sets `showFieldLabels: false` and `hideEmptyFields:
false`, the non-default values, so the keys are visible in the example;
the comments carry the defaults.
## Verification
First files to read: `skills/objectstack-ui/rules/list-views.md` (the
hunk at "Configuring Kanban Views" is the teaching; every other hunk is
a cut).
Two-minute check: open the spec describe text for `summary`,
`showFieldLabels` and `hideEmptyFields` in
`packages/spec/src/ui/view.zod.ts` beside the new note. Expected: every
clause of the note has a source sentence there.
Local gate subset (derived by `dispatch-gates.mjs --commands`, 48
families): 43 exit 0; 5 exit 3, PREREQUISITE NOT MET because the full
workspace is not built here (`check:doc-formula-expressions`,
`check:dts-closure`, `check:dual-build-cjs-loads`,
`check:lean-entry-closure`, `check:sourcemap-no-sources-content`). Those
five are NOT MEASURED locally and left to CI; none reads a skills file's
prose.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 896bfc4 commit 159113f
2 files changed
Lines changed: 27 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
171 | | - | |
172 | 169 | | |
173 | 170 | | |
174 | | - | |
175 | 171 | | |
176 | 172 | | |
177 | 173 | | |
| |||
196 | 192 | | |
197 | 193 | | |
198 | 194 | | |
199 | | - | |
200 | | - | |
| 195 | + | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
| |||
207 | 202 | | |
208 | 203 | | |
209 | 204 | | |
210 | | - | |
| 205 | + | |
211 | 206 | | |
212 | 207 | | |
213 | 208 | | |
| |||
221 | 216 | | |
222 | 217 | | |
223 | 218 | | |
224 | | - | |
| 219 | + | |
225 | 220 | | |
226 | 221 | | |
227 | 222 | | |
| |||
270 | 265 | | |
271 | 266 | | |
272 | 267 | | |
273 | | - | |
| 268 | + | |
274 | 269 | | |
275 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
276 | 273 | | |
277 | 274 | | |
278 | 275 | | |
| |||
284 | 281 | | |
285 | 282 | | |
286 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | | - | |
293 | | - | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
329 | | - | |
330 | | - | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
| |||
0 commit comments