Skip to content

Commit 93505c9

Browse files
committed
fix(ui-core): ActionDef stops mirroring the aged-out shortcut and bulkEnabled action keys
CI's Build Core went red on the merged head in ui/packages/core: `ActionDef` declared `shortcut?: SpecActionInput['shortcut']` and `bulkEnabled?: SpecActionInput['bulkEnabled']`, two mirrors of spec-17 `retiredKey()` tombstones that resolved to `undefined` for as long as the tombstones stood. The ≤16.x kits left the schema one major on, so the indexed access has nothing to name and tsc refuses it. The two members leave `ActionDef` with their rows in `ACTION_DEF_KEYS` and `SPEC_ACTION_KEYS` (the key inventories the pin tests hold against the spec's `ActionSchema` shape), and `SPEC_ACTION_KEYS` drops its `execute` row for the same reason: the pin that walks the spec shape reported it stale once that tombstone aged out. `RETIRED_ACTION_KEYS` keeps the console's own `execute` rename prescription (a stored row can reach the runner unparsed), and `ActionEngine.registerAction(action, { shortcut, bulkEnabled })` keeps both as host-passed options, as before; the closed-surface pin's comment and the tombstone test's title say what refuses the key now. Claude-Session: https://claude.ai/code/session_01H37vtTJRVBf1LkyYNW5yfo Co-authored-by: Claude <noreply@anthropic.com>
1 parent 34b0688 commit 93505c9

4 files changed

Lines changed: 18 additions & 23 deletions

File tree

‎ui/packages/core/src/actions/ActionRunner.ts‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,22 +502,14 @@ export interface ActionDef {
502502
* active language before dispatch, because the runner has no language.
503503
*/
504504
outcomeMessages?: SpecActionInput['outcomeMessages'];
505-
/**
506-
* @deprecated Retired in `@objectstack/spec` 17 as a `retiredKey()` tombstone —
507-
* authoring it is a hard parse rejection, so this resolves to `undefined` and
508-
* assigning a value is a compile error. A HOST may still pass a shortcut
509-
* explicitly via `ActionEngine.registerAction(action, { shortcut })`; it is
510-
* only no longer sourced from authored metadata. No replacement key.
511-
*/
512-
shortcut?: SpecActionInput['shortcut'];
513-
/**
514-
* @deprecated Retired in `@objectstack/spec` 17 as a `retiredKey()` tombstone —
515-
* authoring it is a hard parse rejection, so this resolves to `undefined` and
516-
* assigning a value is a compile error. Use the list view's `bulkActions` /
517-
* `bulkActionDefs` instead; `ActionEngine.registerAction(action, { bulkEnabled })`
518-
* remains available to a HOST passing it explicitly.
519-
*/
520-
bulkEnabled?: SpecActionInput['bulkEnabled'];
505+
// No `shortcut` and no `bulkEnabled`: spec 17 retired both as `retiredKey()`
506+
// tombstones and this interface mirrored each as `SpecActionInput['…']`
507+
// (always `undefined`) until objectstack#25767 aged the ≤16.x kits out of
508+
// the schema one major on, which left nothing to mirror. A HOST still passes
509+
// either one explicitly through `ActionEngine.registerAction(action,
510+
// { shortcut, bulkEnabled })`; neither is sourced from authored metadata,
511+
// and a bulk action is declared in the list view's `bulkActions` /
512+
// `bulkActionDefs`.
521513
}
522514

523515
/**

‎ui/packages/core/src/actions/__tests__/actionDef-closed-surface.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const _typoTarget: ActionDef = { type: 'script', targt: 'saveRecord' };
6767

6868
// A retired SPEC key that is not a tombstone, to show the closure is general
6969
// rather than a list of two special cases.
70-
// @ts-expect-error - `bulkEnabled` is a retiredKey() tombstone in spec 17
70+
// @ts-expect-error - `bulkEnabled` is not an `ActionDef` key: its spec-17 tombstone aged out at objectstack#25767 and the mirror left with it
7171
const _retiredBulk: ActionDef = { type: 'api', bulkEnabled: true };
7272

7373
// ── The unified `visible` / `disabled` shape: three arms each ────────────────

‎ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe('action key inventory (objectstack#4075 step 1)', () => {
140140
expect({ missing, stale }).toEqual({ missing: [], stale: [] });
141141
});
142142

143-
it('`execute` is still a live spec tombstone, so it must not count as known', () => {
143+
it('`execute` is still refused by the spec (the 17 tombstone aged out at objectstack#25767; the strict unknown-key refusal took over), so it must not count as known', () => {
144144
const parsed = SpecActionSchema.safeParse({
145145
name: 'mark_done',
146146
label: 'Mark Done',

‎ui/packages/core/src/actions/actionKeys.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ export const ACTION_DEF_KEYS = [
199199
// Spec 17.6.0's success copy per handler outcome (objectui#11344), declared
200200
// when the runner learned to read it: the success toast's first rung.
201201
'outcomeMessages',
202-
'shortcut',
203-
'bulkEnabled',
202+
// `shortcut` and `bulkEnabled` left with their spec tombstones
203+
// (objectstack#25767): `ActionDef` no longer declares either.
204204
] as const;
205205

206206
/**
@@ -234,7 +234,6 @@ export const SPEC_ACTION_KEYS = [
234234
'body',
235235
'bodyExtra',
236236
'bodyShape',
237-
'bulkEnabled',
238237
'component',
239238
'confirmText',
240239
// Added to `ActionSchema` in @objectstack/spec 17.0.0-rc.6. Listed here purely
@@ -248,7 +247,12 @@ export const SPEC_ACTION_KEYS = [
248247
'description',
249248
'disabled',
250249
'errorMessage',
251-
'execute',
250+
// No `execute`: its spec-17 tombstone (`retiredKey()`, objectstack#3855) aged
251+
// out of `ActionSchema` at objectstack#25767 — the spec now refuses it as an
252+
// unknown key naming the protocol upgrade guide — so the spec no longer
253+
// declares it and this inventory, which restates the spec's declared keys,
254+
// drops the row. `RETIRED_ACTION_KEYS` below still carries the console's own
255+
// rename prescription: a stored row can reach the runner unparsed.
252256
// Added to `ActionSchema` in @objectstack/spec 17.5.0 (objectui#11073): the
253257
// bulk dispatch contract the action's body is written for, in
254258
// `bulkActionDefs`' own `'perRecord' | 'aggregate'` vocabulary. Listed for the
@@ -310,7 +314,6 @@ export const SPEC_ACTION_KEYS = [
310314
// question.
311315
'requiresMembershipReach',
312316
'resultDialog',
313-
'shortcut',
314317
'successMessage',
315318
'target',
316319
'type',

0 commit comments

Comments
 (0)