Repository navigation
Commit c082af6
docs(spec): a promoted bulk lookup param carries its field's picker settings, and the spec now says so (#27255)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLWnL4JRuSrtWuf1RiKCCsJ)_
Fixes #27050
Ruling-ref: none (triage 6460237597)
Claim: 6468678025
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:** 只改文字:`bulk-action.zod.ts` 中 `BULK_PARAM_WIDGET_CONFIG_KEYS`
上方的 JSDoc 与拒收处方、`liveness/view.json` 的 `list.bulkActionDefs` 行、v18 迁移条目
`ui-bulk-action-param-unknown-keys-refused` 的升级说明,改为:批量操作的字段型查找参数会把字段的
`lookupFilters` / `lookupColumns` / `lookupPageSize` /
`descriptionField` 带到选择栏的选择器,与单条记录对话框一致;`idField` / `titleFormat` 仍不带。
- **为什么改:** #27049 已让批量路径转发这四项,规格文字仍说「被丢弃」,会让作者去绕一个已不存在的问题。
- **风险与回滚:** 不改任何 schema,接受集合不变;只改发布包里的说明文字。回滚 = revert 本 PR。
- **先看:** `packages/spec/src/ui/bulk-action.zod.ts`(拒收处方字符串那一段)。
- **两分钟验证:** `git grep -n -E "dropped (by|on) the bulk|drops the lookup
settings" -- packages ':!**/CHANGELOG.md'` 预期零命中。
- **需要你做的:** 无,席位落地。
## What changes
Prose only. The accept set of `BulkActionParamSchema` does not change,
and no key is added to or removed from `BULK_PARAM_WIDGET_CONFIG_KEYS`.
- **`packages/spec/src/ui/bulk-action.zod.ts`, JSDoc above
`BULK_PARAM_WIDGET_CONFIG_KEYS`.** The promoted route now carries the
field's lookup settings `lookupFilters` / `lookupColumns` /
`lookupPageSize` / `descriptionField` to the selection bar's picker, as
the single-record dialog does. "From THIS list only `accept` and
`maxSize` make the trip" becomes "only those four and `accept` /
`maxSize`", "all but two of these keys" becomes "all but six", and
"declare it on the field and let the dialog inherit" is right for those
six. The `idField` sentence stays: `idField` has no `FieldSchema`
spelling, and the resolver's snake `id_field` read is still not carried
onto the bulk param.
- **Same file, the `BULK_PARAM_WIDGET_CONFIG_KEYS` refusal
prescription.** It now lists the four picker settings among what the
promoted route carries, says only `accept` / `maxSize` and those four
arrive that way, and its remedy says "for one of those six move the
param onto a promoted action".
- **`packages/spec/liveness/view.json`, row `list.bulkActionDefs`.**
"…and drops the lookup settings." becomes "…and that field's lookup
settings `lookupFilters`, `lookupColumns`, `lookupPageSize` and
`descriptionField`, which reach the selection bar's picker as they reach
the single-record dialog's (objectstack#26951); `idField` /
`titleFormat` are still not carried."
- **Another copy the merge made false:
`packages/spec/src/migrations/entries/semantic/18.ui-bulk-action-param-unknown-keys-refused.ts`.**
Its `replacement` and `reason` said only `accept` / `maxSize` reach the
dialog and the four picker settings are "resolved and then dropped on
the bulk path". Both now name the six keys. This is the upgrade guidance
`os migrate meta` prints, so it ships in the package.
- **`packages/spec/src/ui/bulk-action.test.ts`.** One comment said "only
`accept` / `maxSize` make that trip"; it now names the four picker
settings too. The assertions are unchanged and still hold: the
prescription still contains the text `accept` / `maxSize`.
- **Changeset.** `@objectstack/spec` patch (the prescription and the
migration entry text ship in the package).
Not touched: the `packages/spec/CHANGELOG.md` /
`packages/rest/CHANGELOG.md` lines that quote the old text (release
history). `skills/**`, `content/docs/**` and `ui/**` hold no copy of the
claim (grep below), so this PR is not governed. Nothing generated reads
these strings: the grep finds no generated copy of the prescription, the
JSDoc or the liveness note, so there is nothing to regenerate.
## Measure first
`ui/packages/plugin-grid/src/resolveBulkActions.ts` `toBulkParam` on
`origin/main` `d745bb5e` (PR #27049 merged as `c4ad55ca`, an ancestor:
`git merge-base --is-ancestor c4ad55c HEAD` → exit 0):
```ts
...(resolved.descriptionField !== undefined && { descriptionField: resolved.descriptionField }),
...(resolved.lookupColumns !== undefined && { lookupColumns: resolved.lookupColumns }),
...(resolved.lookupFilters !== undefined && { lookupFilters: resolved.lookupFilters }),
...(resolved.lookupPageSize !== undefined && { lookupPageSize: resolved.lookupPageSize }),
```
and its JSDoc: "`idField` / `titleFormat` are still not carried: the
resolver reads them off undeclared snake keys only, and no bulk reader
has asked for them." `toBulkParam` has no `idField` or `titleFormat`
line. The resolver (`ui/packages/fields/src/resolveActionParams.ts`)
fills them from `field.id_field` and `field.title_format`, and the other
four from `field.descriptionField`, `field.lookupColumns`,
`field.lookupFilters` and `field.lookupPageSize`, which `FieldSchema`
declares (`packages/spec/src/data/field.zod.ts` L1823–1835).
Copy sweep: `git grep -n -E "dropped (by|on) the bulk|resolved and then
dropped|drops the lookup settings|dropped with the lookup settings|make
the trip|only .?accept.? (and|/) .?maxSize"` over `packages/**`,
`ui/**`, `skills/**` and `content/docs/**`, CHANGELOGs excluded. On base
it found the three sentences on the card, the migration entry (two
places) and the test comment. On head, every hit of the last two
patterns names the six keys, and the first four patterns have zero hits
(`git grep` exit 1).
## Verification
Base `origin/main` `d745bb5e`; head `0b20e1f14`. Every reading below is
from that head.
<details><summary>Spec tests and typecheck</summary>
- `pnpm --filter @objectstack/spec build` under `os-verify-lock` → exit
0.
- `pnpm --filter @objectstack/spec test && pnpm --filter
@objectstack/spec typecheck` under `os-verify-lock` → `VERDICT
command-exit 0`; Test Files 743 passed (743), Tests 22263 passed, 1
todo; `check:test-typecheck: OK`.
- `test:repo` not run locally: the diff edits no repo-project test and
the derived list does not name it. CI's Test Core runs it.
</details>
<details><summary>Gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` → 83 commands, each run serially and
recorded as `CMD :: exit N`.
- 81 exit 0, among them `check-adr-0087-registration --base
origin/main`, `check:liveness`, `check-changeset-no-major`. Two first
exited 3 on a prerequisite and were re-run after it was met:
`check-plugin-teardown-shape --self-test` (pinned fixture commit
fetched) → exit 0; `check:doc-formula-expressions` (formula and lint
built) → exit 0.
- NOT MEASURED, reason: `check:dual-build-cjs-loads` and
`check:lean-entry-closure` exit 3, PREREQUISITE NOT MET (they load every
package's built entry points, which needs a full build). CI's Build Core
runs them.
- `dispatch-gates --ran` → `✓ 83 derived famil(ies) accounted for — 81
run, 2 NOT-MEASURED`.
- `check-changeset-no-major` with this body as a pull_request event →
exit 0 (`Metadata-protocol: none`, patch).
- Control-byte scan of the three edited prose files → no hits.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzh5MQsqK7dBe3KZ9Aa
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzh5MQsqK7dBe3KZ9Aa)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1287b2f commit c082af6
5 files changed
Lines changed: 39 additions & 24 deletions
File tree
- .changeset
- packages/spec
- liveness
- src
- migrations/entries/semantic
- ui
| 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 | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
0 commit comments