Skip to content

fix(app-shell): a read-only flow edge inspector says why its controls are disabled - #29206

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-1r2gue
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-1r2gue

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #29077

Clause-②: no
Metadata-protocol: none

Claim: issue comment 6572861977 (branch claude/project-thread-1r2gue, session session_01QsR2jU7NRnC2NpRec6yEYE).

维护者速读

  • 改了什么:Studio 流程画布上,只读包里选中一条连线后,连线属性栏现在会说明控件为什么是灰的:悬停任一灰色控件弹出原因,键盘 Tab 能停在属性栏上,读屏把原因当描述读出。与节点属性栏(Studio flow node inspector: on a read-only package every control is disabled with no reason on hover, keyboard focus or to assistive tech #28985)同一做法,两边共用一个新的共享组件,不再各写一份。
  • 为什么改:宿主早已把「只读软件包」的原因传给连线属性栏,但它没读,控件灰着却什么也不说;平台清单 ux-conventions.disabled-control-reason 在这个面上仍判失败。
  • 风险与回滚:低。只有「只读且宿主给了原因」时才多包一层可聚焦分组;不传原因的宿主(如元数据编辑页)与可写状态完全不变。节点属性栏改用共享组件后 DOM 不变,其原有测试未改即通过。回滚即还原本 PR。
  • 先看:_shared.tsx 新增的 InspectorReadOnlyReason;FlowEdgeInspector.tsx 末尾的包裹;FlowNodeInspector.tsx 换成共享组件的那一段。
  • 两分钟验证:在 ui/ 下运行 pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowEdgeInspector.readOnlyReason-29077.test.tsx packages/app-shell/src/views/studio-design/StudioDesignSurface.automationsReadOnly-11124.test.tsx,预期 2 个文件、17 个测试全绿。
  • 需要你做的:无,席位落地。

What changes

Tests

  • New: FlowEdgeInspector.readOnlyReason-29077.test.tsx, 6 cases on an approval's out-edge (so the Approval branch picker draws too): read-only with a reason makes the panel a tab stop named by the connection and described by the reason, holding every disabled control (at least six); hovering the disabled "Remove connection" opens the tooltip; Tab lands on the panel and opens it. Controls: no reason gives no group and no tab stop; a blank reason counts as none; a writable panel ignores a reason and its controls are live.
  • Changed: StudioDesignSurface.automationsReadOnly-11124.test.tsx, one new case: through the real pillar, FlowPreview and FlowInspector, clicking the start → end connection on a read-only package opens the edge inspector inside the described group with the package's reason.
  • Red on main. With the three source files restored from base 0d6d4061, the two edge files plus the Studio flow node inspector: on a read-only package every control is disabled with no reason on hover, keyboard focus or to assistive tech #28985 node file ran 4 failed, 19 passed: the three edge reason cases and the host edge case fail (no flow-edge-readonly-reason group), every control and every node case passes.

Acceptance notes

  • Other surfaces still inline the same group (Studio's field rail, the validation-rule editor, the flow ledger switch, the field inspector's per-control locks); they are not moved here. Each can adopt InspectorReadOnlyReason when next touched.
  • The tooltip also opens when hovering the header's close button, since the whole panel is the trigger; the node inspector behaves the same.

Verification

All readings on head f844add6 unless named (fix 07c2c014, title follow-up f844add6), base 0d6d4061.

Tests
  • pnpm exec vitest run (from ui/) on the two edge files plus FlowNodeInspector.readOnlyReason-28985.test.tsx: 3 files, 23 tests passed.
  • Red on main: the same three files with _shared.tsx, FlowNodeInspector.tsx and FlowEdgeInspector.tsx restored from 0d6d4061: 4 failed, 19 passed (the three edge reason cases and the host edge case, each on the missing group; the Studio flow node inspector: on a read-only package every control is disabled with no reason on hover, keyboard focus or to assistive tech #28985 node cases pass, so the node DOM is unchanged). Restored with git checkout HEAD, git diff HEAD empty.
  • Sweep of the 120 app-shell test files that git grep finds naming FlowEdgeInspector, FlowNodeInspector, FlowInspector, AutomationsPillar, InspectorShell, _shared or flowNodeLabels, in three locked batches at --maxWorkers=2: 38/38 files (425 tests), 42/42 with the new file (580), 41/41 (339). The first run on 07c2c014 caught flowNodeLabels.sites-13200.test.ts, which pins the edge title's flowEdgeDisplayName expression in place; f844add6 keeps it there, and all three batches re-ran green on f844add6. Narrowed on purpose: CI's Test UI runs the rest of app-shell.
  • pnpm exec turbo run type-check --filter=@object-ui/app-shell: 65 of 65 tasks successful.
  • eslint on the five changed ui files: 0 errors (13 existing warnings, all on untouched lines).
Gates
  • node scripts/pm/dispatch-gates.mjs --commands derived 34 families; all 34 ran with exit 0, the unlocked ones with this body as the PR event (check-adr-0087-registration, check-changeset-no-major, check-closing-keyword-parity, check-sdui-manifest among them), and pnpm --dir ui exec vitest run scripts/ locked: 169 files passed, 2 skipped (4,900 tests).
  • dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.
  • check:new-line-citations: 0 new citations.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (Not touched.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jU7NRnC2NpRec6yEYE


Generated by Claude Code

… are disabled

The connection inspector now honours the host's readOnlyReason the way the
node inspector does. The node inspector's inline reason group moves into one
shared InspectorReadOnlyReason that both panels draw, with the node panel's
DOM unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jU7NRnC2NpRec6yEYE
…node-name rule pins it

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jU7NRnC2NpRec6yEYE
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu

席位核对 · ACCEPT · 2026-11-02T09:37Z

Head-sha: f844add69beffb218db015d1ccfed5f36b7965be

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/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant