Repository navigation
fix(studio): the read-only header offers an overlay only for a type that takes one - #27927
Merged
Merged
Conversation
…hat takes one Claude-Session: https://claude.ai/code/session_01Utp6CZrsFMFmWFsxTaq2Bu Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrsFMFmWFsxTaq2Bu Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
This was referenced Oct 30, 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 Bill · project thread
维护者速读
allowEnvironmentOverlay时,才显示「Read-only · Customize with an overlay」,并直接打开该条目在 Setup 的页面;其他类型(对象、流程、页面、权限集等)只显示带锁的「Read-only」,不再是链接。StudioDesignSurface.tsx里的StudioReadOnlyLink(读useMetadataTypes判定 overlay),以及四个 pillar 的调用点传入的item。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioReadOnlyLink.overlay-27356.test.tsx,应见 5 passed。Part of #27356 (row 13, hotcrm#2320 Studio S2: the read-only header offers an overlay only where one exists)
Clause-②: no
Metadata-protocol: none
What changes
StudioReadOnlyLink, the mark at the right of an open item's header in a read-only package, used to read "Read-only · Customize with an overlay" on every pillar and link to the package's metadata directory (overlayPath). It now takes the open item ({ type, name }, ornull) and reads the served type registry (useMetadataTypes,/meta/types). When that item's type declaresallowEnvironmentOverlay: true(ADR-0005), the mark keeps its text and Layers icon and links to the item's own Setup page,/apps/setup/metadata/TYPE/NAME, where the overlay is edited. Otherwise, and also with no item open or the registry not yet read, it is a plain<span>with a Lock icon reading "Read-only" (the existingengine.studio.pkg.readonlykey). It keeps the samedata-testid, tooltip (the pillar's read-only sentence) and fold-to-glyph behaviour (objectui#12707).currentitem. Access passes{ type: 'permission', name }for an open permission set andnullon the OWD overview.overlayPathitself is unchanged and still used by the Studio home's read-only package card.Tests
StudioReadOnlyLink.overlay-27356.test.tsx(5 tests, registry mocked atuseMetadataTypes): an overlay-able type links to its Setup page with the overlay text; a non-overlay type, a type missing from the registry, no open item, and an empty (not yet read) registry each render a plain "Read-only" span with no href.StudioDesignSurface.readOnlyPosture-12453.test.tsx: the mark on a read-only object is a span reading "Read-only" with no href.StudioDesignSurface.readOnlyChipFold-12707.test.tsx: the folded mark carries the read-only text, with no href; it reads text content rather than the link's accessible name.DataPillar.headerActions-12511.test.tsx: the header's only control is the rail toggle; the mark reads "Read-only".Readings (head 281d785, branch rebuilt from origin/main d770b15 after #27882 merged)
readOnlyWording-11781andStudioItemHeader.statusPlace-12524unchanged): 6 files, 31 passed.StudioDesignSurfaceorStudioReadOnlyLink(190 files): 190 passed, 1430 passed.pnpm --filter @object-ui/app-shell run type-check: exit 0 (lock VERDICT command-exit 0).scripts/ablation-replace.mjs:const overlayable = item !== null && entries.some(...)toconst overlayable = item !== null;(every open item offered the overlay): 3 failed / 2 passed (the three non-overlay cases red); restored blob = HEAD blobb97b32176c04,git diff HEADempty. vitest resolves@object-ui/*to source, so no rebuild leg.pnpm --dir ui run check:i18n-drift: no en value changed in this range (packs and designer table).Acceptance notes
view,dashboard,report,translationandemail_templateas overlay-able. Items of typeobject,flow,page,permission,appanddataset(among others) no longer offer an overlay; in practice most Data and Automations items, Interfaces pages and every Access permission set show the plain mark. That is the intent of row 13: offer the overlay only where the server accepts one.Verification
On head
281d7857:dispatch-gates --commandsderived 34 families for this diff; all 34 were run locally, each exit 0, and--ranreconciled 34 run, 0 NOT-MEASURED, 0 UNRUN.check:new-line-citations: 0 new. CI check-runs were in progress when this was opened.Generated by Claude Code