Repository navigation
fix(app-shell): on a read-only item, the Properties panel shown with nothing selected says why its controls are disabled - #29958
Merged
Conversation
…ays why The metadata editor page now wraps the panels it draws itself (the registered default inspector shown with nothing selected, and the generic SchemaForm beside or without a canvas) in InspectorReadOnlyReason, handing them the same reason the scoped inspector already gets. A locked item's disabled controls explain themselves on hover, on keyboard focus and as an accessible description; a writable item renders as before. Claude-Session: https://claude.ai/code/session_01WGufziRkHRHwEC3eQwnrwx Co-authored-by: Claude <noreply@anthropic.com>
…on; add changeset Claude-Session: https://claude.ai/code/session_01WGufziRkHRHwEC3eQwnrwx Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#1 · os-support-ai · session_01WGufzjDyeFwq6AuFu3vwTd 维护者速读(席位终稿)
席位核对 · ACCEPT · head
|
This was referenced Nov 3, 2026
8 tasks done
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 3, 2026
This was referenced Nov 3, 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 Yibo Wang · project thread
Fixes #29897
维护者速读
InspectorReadOnlyReason包一层,不改任何注册检查器的契约;可写条目渲染与之前完全一致。回滚即还原ResourceEditPage.tsx一个文件。ResourceEditPage.tsx的withReadOnlyReason及三处包裹点;ResourceEditPage.inspectorReadOnlyReason-29079.test.tsx新增的 objectstack#29897 describe 块。/_console/studio/~all/metadata/object/showcase_task,不选中任何字段,悬停「Label」输入框,应弹出以「This item is locked and cannot be edited or deleted.」开头的原因提示;按 Tab 能停到属性面板并弹出同一句;换一个可写包的条目,面板可编辑且无提示。Clause-②: no
Metadata-protocol: none
What changes
@object-ui/app-shell,ResourceEditPage.tsx. The page wraps the panels it draws itself inInspectorReadOnlyReason(the wrapper the flow node and edge inspectors already use), handing them the sameinspectorReadOnlyReasonthe scoped inspector gets. Three sites: the registered default inspector shown with nothing selected (object, view, dashboard, page, report, dataset, action, hook), the genericSchemaFormbeside a canvas when the type registers no default inspector (flow), and theSchemaFormof a page with no canvas. The wrapper draws nothing unless the form is read-only and the reason is non-blank, so a writable item and view mode render exactly as before.MetadataDefaultInspectorPropsis untouched and no registered default inspector was edited: the host draws the reason around whatever is registered. The scoped-inspector branch is unchanged (the inspector wraps itself, as since fix(app-shell): the metadata editor page tells its scoped inspector why it is read-only #29203).engine.edit.inspector.properties, "Properties"), an existing key in every locale.Tests
New top-level
describein the existing page harnessResourceEditPage.inspectorReadOnlyReason-29079.test.tsx(the real page, the realObjectDefaultInspectorand the realSchemaForm; only the canvases and data reads are stubbed):tabindex=0group named "Properties" whose accessible description is the lock sentence plus the served lock reason, and every form control in it is disabled (or, for the generic form's text inputs, read-only).Ablation (drop the prop)
node scripts/ablation-replace.mjsreplaced the wrapper'sreason={inspectorReadOnlyReason}withreason={undefined /* ablated-29897 */}(anchor 1 → 0, bloba324e465→520890e8), then ran the file: 6 failed | 7 passed (13). The six failures are exactly the six new locked-item cases; the control and the six existing #29079 cases stayed green. Restored: blob == HEAD (a324e465),git diff HEADempty.Acceptance notes
mdf-name,mdf-labelon a flow) are renderedreadonly, notdisabled, so they still take focus on their own; the reason reaches them through the described panel group around them. The disabled controls (the flow's Type select, the object panel's inputs) are the ones the tooltip and the group speak for.inspectorReadOnlyReasonreturns none for view mode, as before. The comment oninspectorReadOnlyReasonnow says so.JsonSourceEditor) is unchanged; it is out of this card's scope.Verification
All readings at head
d9aae973onobjectstack-ai/objectstack, merge base21510bba; heavy runs underscripts/pm/os-verify-lock.shon a shared box.Local package checks
pnpm turbo run build --filter='@object-ui/app-shell^...' --concurrency=2: 64/64 tasks, exit 0.pnpm --filter @object-ui/app-shell build: exit 0.pnpm --filter @object-ui/app-shell run type-check(tsc --noEmitandtsc -p tsconfig.test.json): exit 0.pnpm --dir ui exec eslinton the two touched ui files: 0 errors, 51 warnings, none on a line this PR adds or changes.pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/ResourceEditPage.inspectorReadOnlyReason-29079.test.tsx: 13 passed (13).pnpm --dir ui exec vitest run --maxWorkers=3 packages/app-shell/: Test Files 2166 passed, 1 skipped (2167); Tests 19243 passed, 9 skipped; exit 0.Derived gates (dispatch-gates --commands, 35 families)
node scripts/pm/dispatch-gates.mjs --ran: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN, exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufziRkHRHwEC3eQwnrwx