Repository navigation
fix(app-shell): read-only flow node inspector gives its reason on hover, focus and to assistive tech - #29073
Merged
Conversation
…er, focus and to assistive tech MetadataInspectorProps gains an optional readOnlyReason the host fills in; FlowNodeInspector draws the focusable, aria-describedby reason group around its panel while read-only, and Studio's Automations pillar passes the read-only package sentence. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTpDoNt6xHzNNCFygz
… display rule The node-name guard holds every id-shaped site in the flow designer; the group's accessible name now reads flowNodeDisplayName like the rest. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTpDoNt6xHzNNCFygz
This was referenced Nov 2, 2026
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T07:09ZHead-sha:
|
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #28985
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
readOnlyReason),Studio 自动化页传「只读软件包」那句。ux-conventions.disabled-control-reason因此判失败。FlowNodeInspector.tsx末尾新增的只读原因分组;inspector-registry.ts的readOnlyReason;StudioDesignSurface.tsx流程宿主调用处新增的一行。ui/下运行pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.readOnlyReason-28985.test.tsx packages/app-shell/src/views/studio-design/StudioDesignSurface.automationsReadOnly-11124.test.tsx,预期 2 个文件、16 个测试全绿。What changes
MetadataInspectorProps.readOnlyReason?: string(inspector-registry.ts, exported from the@object-ui/app-shellentry). The inspector is shared by hosts whose read-only causes differ: Studio's Automations pillar is read-only because the package is, while the metadata editor page is also read-only in view mode or on a walled item. So the host says why, and an inspector that honours the prop draws it whilereadOnlyis true. Optional, so every existing host and inspector compiles and renders unchanged.FlowNodeInspectorwraps its panel, whenreadOnlyand the reason is non-blank, in the treatment Studio's field rail and validation-rule editor carry: arole="group"named by the node,tabIndex={0},aria-describedbyansr-onlycopy of the reason, and the trigger of a tooltip that shows it. One trigger for the panel, not one per control, because the reason is the same for all of them. The wrapper is inline, as in those two surfaces: no exported wrapper exists to reuse (the two are inline JSX andDisabledReasonTriggeris private to@object-ui/components).engine.studio.pkg.readonlyHintasreadOnlyReasonwheneditLocked, one prop at the flow inspector's call site inStudioDesignSurface.tsx.Tests
FlowNodeInspector.readOnlyReason-28985.test.tsx, 6 cases on anupdate_recordnode:StudioDesignSurface.automationsReadOnly-11124.test.tsx. The read-only case now asserts the opened node inspector sits inside the described group with the package's reason, through the real pillar,FlowPreviewandFlowInspector; the writable control asserts no group.FlowNodeInspector.tsxandStudioDesignSurface.tsxrestored fromab085a04, the two files ran 4 failed and 12 passed: the three new reason cases and the host case fail, every control passes. With the fix, 16 of 16 pass.Acceptance notes
ResourceEditPage) passes no reason yet, so its read-only node inspector is unchanged; its causes (no write access, a walled item, view mode) each need their own sentence, which is out of this card's scope and reported to the seat.FlowEdgeInspector(a selected connection) disables its controls onreadOnlythe same way and is not covered by this card; reported to the seat. It now receives the reason through the same props and ignores it.Verification
All readings on head
447e0f65unless named (fix608e38ed, node-name follow-up447e0f65), baseab085a04.Tests
pnpm exec vitest run(fromui/) on the two pinned files plusflowNodeLabels.sites-13200.test.ts: 3 files, 51 tests passed.FlowNodeInspector.tsxandStudioDesignSurface.tsxrestored fromab085a04: 4 failed, 12 passed (the three reason cases and the host case). Restored withgit checkout HEAD,git diff HEADempty.git grepfinds namingFlowNodeInspector,FlowInspector,AutomationsPillarorMetadataInspectorProps, in three locked batches at--maxWorkers=2: 38/38 files (415 tests), 38/38 (474), 40/40 (330). The first run of the middle batch caughtflowNodeLabels.sites-13200.test.ts(an id-shaped node name in the group'saria-label);447e0f65names it throughflowNodeDisplayName, and that batch re-ran green on the final head. 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.eslinton the four changed ui files other thanStudioDesignSurface.tsx: 0 errors (3 existing warnings inFlowNodeInspector.tsx, untouched lines).Gates
node scripts/pm/dispatch-gates.mjs --commandsderived 34 families; all 34 ran with exit 0, the 33 unlocked ones with this body as the PR event (check-adr-0087-registration,check-changeset-no-major,check-closing-keyword-parity,check-sdui-manifestamong them), andpnpm --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.Generated by Claude Code