Repository navigation
fix(core): list the spec's disabledReason in the action key inventory - #26866
objectstack-fleet[bot] wants to merge 1 commit into
Conversation
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCnmxMuS4uyUq5ZHo
|
Seat note · Test UI (10/16) on Generated by Claude Code |
|
Seat close · Superseded. #26859 (spec seat 1, part of #26619) merged at 19:19Z with the same Generated by Claude Code |
Requested by Steedos · project thread
Fixes #26849
Clause-②: no
Metadata-protocol: none
维护者速读
SPEC_ACTION_KEYS(@object-ui/core)补上 specActionSchema新声明的disabledReason一项,附一行注释和一条测试断言。disabledReasonbesidedisabled#26786 给 spec 加了disabledReason后,这份「逐条复述 spec 声明键」的清单没跟上,main 的 Test UI 在actionKeys.pin.test.ts上一直红,并传染到每个合过 main 的 ui PR。ActionDef、运行时读取、spec 都不动。回滚即还原这一行。ui/packages/core/src/actions/actionKeys.ts(新增条目与注释);ui/packages/core/src/actions/__tests__/actionKeys.pin.test.ts(新增一行断言)。pnpm --dir ui exec vitest run packages/core/src/actions/__tests__/actionKeys.pin.test.ts,预期 19 个测试全绿。What changes
SPEC_ACTION_KEYSgains'disabledReason', after'disabled', with a comment of the kind'description'carries: the array restates the spec's declared keys, the entry follows feat(spec): a greyed action says why —disabledReasonbesidedisabled#26786, and the key's readers ship with the console half of [Decision] A greyed-out record action can only say 对此记录不可用 — re-ask for an authored disabled reason now that a second app needs it (re-file per #24034 B′) #26619.ActionDefis not changed and nothing in the runner reads the key. Nopackages/spec/**, server or new-key change.@object-ui/corepatch.Tests
actionKeys.pin.test.ts"lists every key the spec ActionSchema declares" was red on main (missing: ['disabledReason'], main's Test UI 9/16 ataeb9cf0d) and is green here.classifyActionKeyscase asserts that an action carryingdisabledReasonclassifies with no unknown and no retired key.Acceptance notes
pnpm --filter @object-ui/core exec vitest run src/actions/__tests__/actionKeys, runs vitest from the package directory, whichui/scripts/vitest-invocation-guard.mjsrefuses. The run below is itsui/-rooted equivalent fromui/AGENTS.md.Verification
All at head
e80b8cda, in a worktree offorigin/main4702c468.ui core type-check and the actionKeys suite
pnpm exec turbo run type-check --filter=@object-ui/core --concurrency=2underscripts/pm/os-verify-lock.sh:VERDICT command-exit 0, 4/4 tasks (type-check covers the test file).pnpm --dir ui exec vitest run packages/core/src/actions/__tests__/actionKeys.pin.test.ts:Test Files 1 passed (1),Tests 19 passed (19).Derived dispatch gates (34/34)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 34 commands; every one exited 0, the PR-body gates (check-closing-keyword-parity,check-adr-0087-registration,check-changeset-no-major) against this body.pnpm --dir ui exec vitest run scripts/under the lock:Test Files 178 passed | 2 skipped (180),Tests 5065 passed | 2 skipped (5067).pnpm check:type-check-debtunder the lock:0 raw tsc error(s) total, none above its recorded number.dispatch-gates --ran:34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED.pnpm check:new-line-citations(fromui/):0 new citation(s).No ablation: the diff adds one data entry to a list the pin test compares against the spec; the red-before reading is main's own Test UI (9/16) at
aeb9cf0d.Generated by Claude Code