From e80b8cda5db591165663761014634b17b84b476e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 18:32:42 +0000 Subject: [PATCH] fix(core): list the spec's disabledReason in the action key inventory ActionSchema declares disabledReason; SPEC_ACTION_KEYS, which restates every key the schema declares, did not list it, so the inventory's pin test failed and the dev warning named the key as unknown. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01QsR2jRCnmxMuS4uyUq5ZHo --- .changeset/26849-action-keys-disabled-reason.md | 10 ++++++++++ .../core/src/actions/__tests__/actionKeys.pin.test.ts | 1 + ui/packages/core/src/actions/actionKeys.ts | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 .changeset/26849-action-keys-disabled-reason.md diff --git a/.changeset/26849-action-keys-disabled-reason.md b/.changeset/26849-action-keys-disabled-reason.md new file mode 100644 index 00000000000..dd74f63f26b --- /dev/null +++ b/.changeset/26849-action-keys-disabled-reason.md @@ -0,0 +1,10 @@ +--- +'@object-ui/core': patch +--- + +fix(core): the action key inventory lists the spec's `disabledReason`, so an action carrying it is no longer reported as having an unknown key + +Clause-②: no +Metadata-protocol: none + +`@objectstack/spec`'s `ActionSchema` declares `disabledReason`, the display-only sentence a greyed action shows to say why. `SPEC_ACTION_KEYS` in `@object-ui/core`, which restates every key that schema declares, did not list it, so the dev-mode unknown-key warning named it on a spec-valid action and the inventory's pin test failed. The entry is added. `ActionDef` is unchanged and nothing in the runner reads the key: its readers ship with the console's disabled-reason work. diff --git a/ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts b/ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts index 7c560b9c743..5fba66d496c 100644 --- a/ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts +++ b/ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts @@ -323,5 +323,6 @@ describe('unknown-key warning', () => { unknown: ['targt'], retired: ['execute'], }); + expect(classifyActionKeys({ type: 'script', disabledReason: 'Closed deals are locked' })).toEqual({ unknown: [], retired: [] }); }); }); diff --git a/ui/packages/core/src/actions/actionKeys.ts b/ui/packages/core/src/actions/actionKeys.ts index 9184acb74c2..e7f884db588 100644 --- a/ui/packages/core/src/actions/actionKeys.ts +++ b/ui/packages/core/src/actions/actionKeys.ts @@ -246,6 +246,13 @@ export const SPEC_ACTION_KEYS = [ // key, which is the only thing the inventory is consulted for. 'description', 'disabled', + // Added to `ActionSchema` by objectstack#26786: the display-only sentence a + // greyed action shows to say why. Listed for the reason `description` is — + // this array restates the spec's declared keys, so an action carrying it is + // not reported as having an unknown key. `ActionDef` does NOT declare it and + // nothing here reads it: its readers ship with the console half of + // objectstack#26619. + 'disabledReason', 'errorMessage', // No `execute`: its spec-17 tombstone (`retiredKey()`, objectstack#3855) aged // out of `ActionSchema` at objectstack#25767 — the spec now refuses it as an