Repository navigation
Commit 581ca7d
Fixes #22780
Clause-②: no
Text only. Four sentences in `packages/spec/src/ui/bulk-action.zod.ts`
said the bulk surface has no field-backed param route. Since objectui
`29b99490`, a PROMOTED bulk action's field-backed param resolves through
the single-record dialog's resolver, and the console pin now carries
that commit. Each sentence now names the promoted route. The authored
`bulkActionDefs[].params` refusal stays; only its reason and remedy
change. No schema shape, accept set or export moves.
Implemented by `os-dev` for the `domain:spec` seat 2, PM session
`session_016njDy8ozy9B9Ns5Y8kAWEK`, branch
`claude/issue-22780-bulk-promoted-route-text`.
## What changed
1. **`BulkActionParamSchema` `guidance.field`** (shipped in every
`field` rejection). The reason is now "an authored
`bulkActionDefs[].params` entry has no such route: it reaches the dialog
as written". The remedy offers two fixes. Declare the param inline
(`name` + `type`, plus `object` / `labelField` for a picker). Or declare
the action on the object with the field-backed param (`{ field }`, plus
`objectOverride`) and name it in the view's `bulkActions`. It also says
the promoted form runs the action once per selected record, because that
changes what the button does.
2. **The `BULK_PARAM_WIDGET_CONFIG_KEYS` prescription** (shipped in
every widget-config rejection). The "does not reach this dialog either"
clause is replaced. A key declared on the FIELD reaches the bulk dialog
only through a promoted action. The prescription names what that route
carries, and says that of the refused keys only `accept` / `maxSize`
arrive that way.
3. **The JSDoc above `BULK_PARAM_WIDGET_CONFIG_KEYS`** says the same,
with the measurement it rests on.
4. **The `dependsOn` JSDoc** now reads "one vocabulary, two doors". The
FIELD is read by the single-record dialog and by a promoted bulk def.
The param is where an authored def writes the key.
## What the promoted route carries, re-measured on objectui `main`
`dca25aff2`
These are read from source: plugin-grid `resolvePromotedBulkParams` /
`toBulkParam`, and `@object-ui/fields` `resolveActionParam`.
- **Carried from the field:** `type`, translated `label`, `options`
(with translated option labels), `required`, `description` (as the help
text; the resolver reads `field.help ?? field.description`),
`placeholder`, `defaultValue`, `multiple`, `accept`, `maxSize`. For a
reference-bearing field (`EXPANDABLE_FIELD_TYPES`) it also carries
`reference` (as `object`), `displayField` (as `labelField`) and
`dependsOn`.
- **Resolved, then dropped by `toBulkParam`:** `lookupFilters`,
`lookupColumns`, `lookupPageSize` and `descriptionField`, plus the
snake-only `id_field` / `title_format` reads.
- **Never read off the field:** the rest of the widget-config list
(`min`, `max`, `step`, `precision`, `scale`, `rows`, `crop`, `capture`,
`dimensions`, `defaultName`, `allowCreate`, `picker`, `subtitle`,
`avatarField`).
- **`idField`** is not named as "dropped" in the shipped text.
`FieldSchema` refuses `idField` (`unrecognized_keys`, measured), so no
field can declare it.
- **Unchanged since `29b99490`:** `git log 29b99490..origin/main` over
`resolveActionParams.ts`, `resolveBulkActions.ts` and
`bulkParamToField.ts` lists no commit. The two commits since then that
touch `ObjectGrid.tsx` (`752504520`, `69bca0af6`) change the write
census and the paged footer's fan-out query, not the param path;
`BulkActionDialog.tsx` is unchanged.
This agrees with the card's list and objectui#12119's contract review.
It adds `required`, `description`, `placeholder` and `multiple`, which
the resolver also inherits.
## Premise checks
- **Console pin:** `.objectui-sha` = `0df67f237c`. `git merge-base
--is-ancestor 29b99490 0df67f237c` exits 0 in `../objectui`. An exit 0
proves itself, so no control leg is owed.
- **Phrase family:** I grepped `packages/spec`, `content/docs` and
`skills`. Two other places carry the "no field-backed route" claim.
Neither is edited here (see Acceptance notes). `content/docs` and
`skills/**` carry no hit.
- **Generated artifacts:** none of the four sentences reaches a
generated artifact. `check:generated` reports all 14 up to date, and
`check:docs` reports 226 generated files in sync. No reference page
moves.
## Pins
The two cases in `bulk-action.test.ts` that read these strings are
re-pointed at named subjects instead of prose:
- the widget-config case asserts `` `bulkActions` `` and `` `accept` /
`maxSize` `` (it pinned `'no field-backed param route'`);
- the `field` case asserts no rename arrow, plus `` `object` `` and ``
`bulkActions ``; it pinned `'FIELD-BACKED'` and `'Declare the param
inline'`.
**Reverse verification.** The fix was committed first. The base text of
`bulk-action.zod.ts` was then restored into the tree with `git restore
--source=1eff3224d7` (blob `281e495c`), and the file run went red:
`Tests 2 failed | 37 passed (39)`, exactly the two re-pointed cases.
Restored with `git checkout HEAD --`: blob `2e798a0b` equals the HEAD
blob, and `git status` is clean. At HEAD: `Tests 39 passed (39)`.
## Tests and gates
Taken at `cbce5d7831`, which is `origin/main` `31b5a5f7f5` merged in.
Since then `main` has moved by two commits (metadata-protocol,
`scripts/pm/os-regen-merge.sh`, one docs page). Neither touches
`packages/spec` or these files.
- `pnpm --filter @objectstack/spec build`: exit 0.
- `pnpm --filter @objectstack/spec typecheck`: exit 0, including
`check:test-typecheck` OK.
- `pnpm --filter @objectstack/spec test`: `Test Files 648 passed (648)`,
`Tests 19342 passed | 1 todo`.
- `pnpm --filter @objectstack/spec check:generated`: "All 14 generated
artifacts are up to date".
- **`dispatch-gates --commands --repo objectstack-ai/objectstack`:** 85
commands derived, all run with exit codes recorded. `--ran`
reconciliation: "85 derived famil(ies) accounted for — 84 run, 1
NOT-MEASURED".
- Two gates first refused on an unbuilt prerequisite and went green once
those packages were built: `check:doc-formula-expressions`
(`@objectstack/formula` / `@objectstack/lint`) and
`check:lean-entry-closure` (`@objectstack/objectql`).
- NOT MEASURED: `check:dual-build-cjs-loads`. Reason: it reads every
package's `dist/` (88 unbuilt), a whole-repo build left to CI.
- **Lint, narrowed to the two changed `.ts` files:**
- Population: `eslint.config.mjs` `files: ['**/*.{ts,…}']` and
`['packages/**/*.{ts,…}']`; neither file was reported ignored.
- Count: `--no-inline-config --format json` gave 2 results, 0 errors, 0
warnings.
- Invariance: the config sets no `parserOptions.project` /
`projectService`, so no type-aware linting. `--print-config` shows
`parserOptions` = `{ ecmaVersion, sourceType }`. This diff cannot change
a verdict on an untouched file. Repo-wide `pnpm lint` is CI's.
## Acceptance notes (noted, not filed)
- **The same claim in the major-18 migration entry.**
`packages/spec/src/migrations/entries/semantic/18.ui-bulk-action-param-unknown-keys-refused.ts`
(`reason`, and the `replacement` clause "field-backed ACTION-param
contracts the bulk surface does not implement") still says "the bulk
surface has no field-backed param route". The text is generated into
`registry.ts` and printed by `objectstack migrate meta`. It is not
edited here, for two reasons: it is outside this card's claimed file
surface, and it brings its own gate family (`gen:migration-registry`,
`check:spec-changes`, `check:upgrade-guide`, and the cli's
`migrate-meta-engine-guidance` test). It is named for the seat in the
report. Its conclusion for the widget-config keys still holds, except
`accept` / `maxSize` on a promoted def.
- **`packages/spec/CHANGELOG.md` (17.5.0 entry)** carries the same
sentence. That file is release-owned, and the sentence was true when it
shipped, so nothing is owed there.
- **Read from source, not pinned in objectui:** an authored `execution:
'aggregate'` def that names a declared action and authors no `params`
gets that action attached, and `resolvePromotedBulkParams` then resolves
the action's field-backed params too. The shipped text names only the
`bulkActions` route, the one objectui#12119 pins.
- **The objectui-side remainder is unchanged:** forwarding the lookup
settings on the bulk path. The prescription now states the gap instead
of implying it.
- **Two other comments in the file are still true and are not edited:**
the module header's "converter for the PROMOTED direction
(`toBulkParam`)" and the alias comment "`toBulkParam` maps the same
three".
---
_Generated by [Claude
Code](https://claude.ai/code/session_016njDy8ozy9B9Ns5Y8kAWEK)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0e0678c commit 581ca7d
3 files changed
Lines changed: 79 additions & 21 deletions
File tree
- .changeset
- packages/spec/src/ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
413 | 417 | | |
414 | 418 | | |
415 | 419 | | |
416 | | - | |
| 420 | + | |
417 | 421 | | |
418 | | - | |
419 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
155 | 171 | | |
156 | 172 | | |
157 | 173 | | |
| |||
193 | 209 | | |
194 | 210 | | |
195 | 211 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
200 | 222 | | |
201 | 223 | | |
202 | 224 | | |
| |||
232 | 254 | | |
233 | 255 | | |
234 | 256 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
238 | 268 | | |
239 | 269 | | |
240 | 270 | | |
| |||
265 | 295 | | |
266 | 296 | | |
267 | 297 | | |
268 | | - | |
269 | | - | |
270 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
271 | 306 | | |
272 | 307 | | |
273 | 308 | | |
| |||
0 commit comments