Skip to content

Commit a20824f

Browse files
fix(ui): the action key inventory lists disabledReason (#26859)
Part of #26619. This is a main-red hotfix for the spec half (#26786). The console half is still the PR that closes the card. Clause-②: no Metadata-protocol: none Skills-docs: none (a test-inventory row, no authoring surface) ## 维护者速读 - **改了什么:** `ui/packages/core` 的 `SPEC_ACTION_KEYS` 补上一行 `disabledReason`。 - **为什么改:** #26786 给 `ActionSchema` 加了 `disabledReason`,但 objectui 的动作键清单没跟上,`actionKeys.pin.test.ts` 在 main 上报 missing `['disabledReason']`,Test UI 红,所有合并 main 的分支都受影响。 - **风险与回滚:** 一行数据,只影响「是否算未知键」的判断。回滚就是 revert 本 PR。 - **需要你做的:** 无,席位落地。 ## What changes - `ui/packages/core/src/actions/actionKeys.ts`: `SPEC_ACTION_KEYS` gains `'disabledReason'` after `'disabled'`. The list restates every key the spec's `ActionSchema` declares, and #26786 added that key. An action that carries it is no longer counted as having an unknown key. - `.changeset/26619-action-keys-disabled-reason.md`: `@object-ui/core` patch. (The root `.changeset`, which the changeset gate counts; `ui/.changeset` is the imported objectui directory.) ## Why `actionKeys.pin.test.ts` compares `SPEC_ACTION_KEYS` with the keys of the built `ActionSchema`. Since #26786 merged (`13dc413f`), it fails on `main` with `missing: ['disabledReason']`. That turns Test UI red on `main` (`8eef9a8d`) and on every branch that merges `main`. The failure was reproduced by another card's dev (standing-down comment 6450604330 on PR #26831). ## Verification - The failure was read on `main` `8eef9a8d`: the pin's `missing` set is `['disabledReason']` and nothing else. - The UI workspace dependencies are not installed in this container, so the pin was not run locally. CI's Test UI on this head is the check. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` is not touched.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (apart from the maintainer quick-read block). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzfhobWEgUUrjz4rrbh)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5787df4 commit a20824f

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@object-ui/core': patch
3+
---
4+
5+
`SPEC_ACTION_KEYS` lists `disabledReason`, the key `@objectstack/spec` added to `ActionSchema` beside `disabled` (objectstack#26786). An action that carries it is no longer counted as having an unknown key, and the inventory pin is green again.
6+
7+
Clause-②: no
8+
Metadata-protocol: none

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export const SPEC_ACTION_KEYS = [
246246
// key, which is the only thing the inventory is consulted for.
247247
'description',
248248
'disabled',
249+
'disabledReason',
249250
'errorMessage',
250251
// No `execute`: its spec-17 tombstone (`retiredKey()`, objectstack#3855) aged
251252
// out of `ActionSchema` at objectstack#25767 — the spec now refuses it as an

0 commit comments

Comments
 (0)