Repository navigation
feat(studio): New similar on a read-only base's permission set, opening the copy where the clone door landed it - #28669
Merged
Conversation
… Access pillar The Access pillar of a read-only package offers "New similar" on the open permission set. It calls the clone door with a name and a label only, and opens the copy in the package the door's answer names, with the copy selected. An answer naming no package or no copy opens nothing and says so. Walled posture and a caller without manage_metadata draw it disabled. The action reads "New similar" on Setup's catalog too, and AccessPillar is keyed by package like its siblings so the hop to the copy's package remounts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUn8pWsnfJNsrCm68c
This was referenced Nov 1, 2026
…-q3n56w # Conflicts: # ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx
Contributor
Author
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y 席位核对 · ACCEPT · 2026-11-01T13:49ZHead-sha:
Generated by Claude Code |
This was referenced Nov 1, 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 #28573
Clause-②: no
Metadata-protocol: none
维护者速读
hotcrm.custom),Studio 就打开那个包的访问支柱并选中副本。Setup 目录页的按钮文字也从「克隆后自定义」改为「新建类似」。.custom包里。服务端已由 runtime: the permission-set clone door lands "new similar" in a writable target package, by default the source package's <base>.custom, never package-less #28563(PR feat(runtime)!: the permission-set clone door lands "new similar" in a writable target package, by default the source package's .custom (#28563) #28636)把复制目标改到.custom,这张卡(N-20b)补上 Studio 侧的入口。以前 Studio 从不提供复制,只有 Setup 目录页有。manage_metadata时按钮置灰并给出原因。访问支柱现在按包重新挂载(与其他支柱一致)。回滚即 revert 本 PR。studio-design/StudioDesignSurface.tsx的AccessPillar(onNewSimilarSaved和按钮的禁用判断)、metadata-admin/permission-set-clone.ts(读答复里的package)、i18n/src/namespaces/studio/{en,zh}.ts(文案)。cd ui && pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface.accessNewSimilar-28573.test.tsx,预期 9 个用例全绿。What changes
PermissionSetCloneDialog, which posts exactly{ name, label }toPOST /api/v1/security/permission-sets/:name/clone. The client sends no package and no facet.clonePermissionSetnow reads the answer'spackage(the shape feat(runtime)!: the permission-set clone door lands "new similar" in a writable target package, by default the source package's .custom (#28563) #28636 added:{ permissionSet, package, notice }), as sent: a string,null, or absent. With a package, the pillar navigates to/studio/<package>/access?surface=permission:<copy>, and the server's notice rides the navigation state and shows on the copy (access-new-similar-strip). With no package (absent ornull) or no copy name, the strip says so and nothing opens. The landing is never derived from the base.useWalledCatalogReadOnly) the button is disabled withengine.catalog.readOnly.walled; withoutmanage_metadata(useCanAuthorMetadata) withengine.edit.capabilityReadOnly. The sentence is the button's accessible description and its title.<AccessPillar key={packageId}>, as the Data, Automations and Interfaces pillars already are. Without it, the hop to the copy's package kept the base's open set, rail and?surface=capture, because the route keeps the surface mounted.perm.clone.actionnow reads "New similar" (zh 新建类似), on Setup's catalog too. The guidance strings that named the old label (perm.readOnly.artifact.hint,perm.clone.hint,perm.clone.guidance,perm.save.locked,perm.clone.dialogTitle) now name the new one. They also stop calling the copy "an ordinary permission set authored in this system": since feat(runtime)!: the permission-set clone door lands "new similar" in a writable target package, by default the source package's .custom (#28563) #28636 the server saves a base's copy in the package that holds your changes. Setup's../COPYhop is unchanged.engine.studio.access.newSimilar.{noPackage,done,dismiss}, all in the studio namespace (ui/packages/i18n/src/namespaces/studio/{en,zh}.ts, typedRecord<string, string>). Nolocales/*pack carries this family, so the change isClause-②: no(the seat amended the claim, 6557419813).Tests
studio-design/StudioDesignSurface.accessNewSimilar-28573.test.tsx, 9 cases. It covers the en label with no override gesture on the base, the exact{ name, label }body, and the copy opening inhotcrm.custom's Access pillar, selected, with the done line and the notice. It also covers a package that is absent ornull(opens nothing, says so), no copy name, a 409 verbatim, walled disabled, capability disabled, and a writable package's set offering no New similar. The realAccessPillar,PermissionMatrixEditPageandPermissionSetCloneDialogare routed under/studio/:packageId/accessand keyed by package, asStudioDesignSurfacemounts them.PermissionMatrixEditor.cloneToCustomize.test.tsxandpackagedItemWriteGate-12169.test.tsxread "New similar" / 新建类似 for Setup's button and guidance.if (typeof copy.package !== 'string') {was replaced byif (false as boolean) {throughscripts/ablation-replace.mjs. The anchor went 1 → 0, and the absent andnullpackage cases turned red (2 failed | 7 passed). Restore showed the blob equal to HEAD andgit diff HEADempty.Acceptance notes
StudioDesignSurface's mount. The surface itself is not rendered in that suite.location.state, read once at mount, and only when it names the pillar's own package.perm.clone.*family lives only in the studio namespace, which has en and zh. Other locales fall back to en, as for every studio string.Verification
Builds and type-check (at d224186, after merging origin/main dd6349e)
turbo run build --concurrency=2 --filter='@object-ui/app-shell^...' --filter=@objectstack/formula --filter=@objectstack/sdui-parser --filter=@objectstack/lint --filter=@objectstack/client: 64/64 tasks, lock VERDICT command-exit 0.pnpm --filter @object-ui/app-shell --filter @object-ui/i18n run type-check: both Done, VERDICT command-exit 0.Tests
AccessPillar,PermissionSetCloneDialog,permission-set-clone,perm.cloneorStudioDesignSurface. That is 172 files in three locked batches (86 + 43 + 43): 451 + 227 + 447 = 1125 tests passed. The incoming main commits touchedPackagedAutomationPageandpackages/spec/src/api, neither of which these files read. CI's Test UI runs the rest of app-shell.pnpm exec vitest run packages/i18n/: 94 files, 1438 passed, 13 skipped.Derived gates (dispatch-gates --commands --repo objectstack-ai/objectstack, at d224186)
All 34 derived commands exit 0, reconciled with
dispatch-gates --ran. Among them:node scripts/check-sdui-manifest.mjs(exit 0, no registry change),pnpm --dir ui exec vitest run scripts/(169 files, 4900 tests),pnpm check:type-check-debt(0 errors above record),pnpm check:query-options-erasure,pnpm check:nul-bytes, andpnpm check:cross-package-test-inputs. The PR-body gates (check-adr-0087-registration --base origin/main,check-changeset-no-major --base origin/main,check-closing-keyword-parity) ran against this body throughGITHUB_EVENT_PATH.Human Minimum
packages/specholds no runtime logic. (No spec change.)pnpm lintpasses. (Left to CI's Lint UI.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code