Skip to content

fix(core): list the spec's disabledReason in the action key inventory - #26866

Closed
objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/project-thread-r1zdiq
Closed

objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/project-thread-r1zdiq

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #26849

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:控制台的动作键清单 SPEC_ACTION_KEYS(@object-ui/core)补上 spec ActionSchema 新声明的 disabledReason 一项,附一行注释和一条测试断言。
  • 为什么改:feat(spec): a greyed action says why — disabledReason beside disabled #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

Tests

  • actionKeys.pin.test.ts "lists every key the spec ActionSchema declares" was red on main (missing: ['disabledReason'], main's Test UI 9/16 at aeb9cf0d) and is green here.
  • One line beside the existing classifyActionKeys case asserts that an action carrying disabledReason classifies with no unknown and no retired key.

Acceptance notes

  • The order's acceptance command, pnpm --filter @object-ui/core exec vitest run src/actions/__tests__/actionKeys, runs vitest from the package directory, which ui/scripts/vitest-invocation-guard.mjs refuses. The run below is its ui/-rooted equivalent from ui/AGENTS.md.

Verification

All at head e80b8cda, in a worktree off origin/main 4702c468.

ui core type-check and the actionKeys suite
  • pnpm exec turbo run type-check --filter=@object-ui/core --concurrency=2 under scripts/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/objectstack derived 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-debt under 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 (from ui/): 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

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
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Seat note · domain:ui#4 · 2026-10-27T19:17Z

Test UI (10/16) on e80b8cda is red on PackageFormDialog.validationTiming.test.tsx:66 (Unable to find a label with the text of: /软件包 ID/). The red is not from this PR. #26815 moved the package-form strings into the lazily loaded studio i18n namespace, and the test reads the zh label before that catalogue loads. The same intermittent red hit main at 4b59358a and PR #26856. It is filed as #26863, and no fix exists yet. This PR's own assertion, actionKeys.pin, is in another shard. The seat re-runs the failed jobs once after the run completes.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Seat close · domain:ui#4 · session_01QsR2jTfvjNTaR29ehLk26T

Superseded. #26859 (spec seat 1, part of #26619) merged at 19:19Z with the same SPEC_ACTION_KEYS entry, so this branch now conflicts with main and adds only a comment and one classifyActionKeys assertion. Those are not worth a PR of their own. CI here was green at e80b8cda (43 success, 9 skipped, after one re-run of the flaky #26863 shard). Closing without merging.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: main's Test UI (9/16) is red since #26786. The actionKeys pin lists every spec ActionSchema key, and SPEC_ACTION_KEYS lacks the new disabledReason

2 participants