Repository navigation
feat(studio): an All metadata area in the builder, per package and across packages - #28623
Merged
Merged
Conversation
…ross packages Mounts the metadata-admin directory, lists, generic item page, history and diagnostics in Studio at /studio/<package>/metadata and /studio/~all/metadata. Pillar types open their pillar; a read-only package's item page offers no write. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
…read-only gates Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
…unt five tabs The four pillar names fit the 1024 px row; the fifth tab is named from xl so the row does not overflow at lg. The existing header tests now count the area's link beside the pillars. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
The real surface and area on the console's two builder routes: the header links the area beside the pillars and marks it current on its route, a kernel package opens it read-only, a missing package has none, and the package-less scope offers no area link. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
…legs On the real studioRoutes: a package's area is the pillar builder with its area open, the cross-package leg is the area alone in the landing's frame, every other ~all URL lands on it, and the entry gate refuses both legs. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
Contributor
Author
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y 席位核对 · ACCEPT · 2026-11-01T09:13ZHead-sha:
Generated by Claude Code |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9
Contributor
Author
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y 席位核对 · ACCEPT (head moved) · 2026-11-01T11:14ZHead-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 #28561
Clause-②: no
Metadata-protocol: none
维护者速读
/studio/<包>/metadata/…,跨包是/studio/~all/metadata/…,后者服务环境目录(岗位、能力、权限集、共享规则,?scope=environment)。支柱类型(object、flow、page、dashboard、report、view、permission)从区域打开时跳到对应支柱并带?surface=,其余类型打开通用条目页。?package=时完全相同。只读包(含切换器隐藏的内核包)上,条目页、历史、权限编辑器和新建都只读。Setup 的页面没有改动:所有新行为都挂在一个只有区域才提供的 context 上,没有 provider 时页面行为不变。回滚就是 revert 本 PR。studio-design/metadataArea.ts(两条路由腿和跳转规则)、studio-design/StudioMetadataArea.tsx(区域本身与只读判断)、metadata-admin/metadataAreaHost.ts(页面读到的 context)。/studio/<可写包>/metadata,确认目录只列该包、顶栏「全部元数据」高亮;点一个 flow 应落到 Automations 并带?surface=flow:<名>;点一个 translation 应打开通用条目页。再打开一个只读包的 translation,应看到只读提示、没有编辑或重置按钮。最后从 Studio 首页的「环境目录」进入/studio/~all/metadata。/apps/setup/metadata/datasource,两边都重定向就会循环。What changes
/studio/<package>/metadata/…mounts the metadata-admin pages Setup mounts, with the route shapes Setup has under/apps/setup/metadata. The pages are lazy and load through the same specifier (../metadata-admin/index.js) thatAppContentuses. Studio and Setup share one chunk, so the builder's own chunk does not grow by them. The header links the area beside the four pillars and names it from 1280 px, because the 1024 px row was sized for the four pillar names. The console route is:packageId/metadata/*. Without it,:packageId/:tabmatches one segment only, and an area URL such as/studio/crm/metadata/flowwould match no route./studio/~all/metadata/…serves the environment catalog with no package: position, capability, permission and sharing_rule, each opened with?scope=environment. It is the area alone, in the frame the Studio landing draws. The landing's "Not in a package" row gains an "Environment catalog" card.~allis a reserved segment that no package id can spell (metadatais a legal package id, so there is no bare/studio/metadata). It is not~org, the package-less flows scope. Every other~allURL lands on the area.areaLocationRedirect):?package=naming another package re-roots onto that package.?scope=environmentand?package=allmove to the cross-package leg.?package=gets its own. The item page binds its saves to?package=(readActivePackageBinding).?review=1opens the generic item page and its review.?surface=: object → Data, flow → Automations, page, dashboard, report and view → Interfaces, permission → Access. Every other type opens the generic item page, and so does any item on the cross-package leg, which names no package. The choice is made once per item, so the item page dropping?review=1after it opens the review does not send an open review on to the pillar.GET /api/v1/packagesthroughfetchListedPackageManifests, which keeps the kernel packages that the switcher hides. A package listed as not writable gets a read-only area:SetupAssignmentsLink), not drawn.MetadataAreaHostContext, which only the area provides. With no provider each page renders as it does today.Outside the card's file surface, with reasons:
item-tools/ResourceHistoryPage.tsx: the routed history page gets the rollback gate and its "back to item" link under the area.i18nstudioen.ts/zh.ts: the six new strings and the not-found sentence naming "All metadata".app-shellsrc/index.ts: exports the area and its route constants for the console.studioBuilder.ts: the one lazy boundary the console loads the builder through.Tests
studio-design/metadataArea.test.ts: the legs, every redirect rule with the case that would break it, and the pillar map.studio-design/StudioMetadataArea.routes-28561.test.tsx(stub pages that print the host) covers:?surface=;?review=1opening and staying on the review;metadata-admin/metadataAreaHost.gates-28561.test.tsx(real item pages) covers:metadata-admin/metadataAreaHost.scope-28561.test.tsx(real directory and list) covers:?scope=environmentpermission list;studio-design/InterfacesPillar.offNavDeepLink-28561.test.tsx: a view, report, page and app-less dashboard open by link, with controls.studio-design/StudioDesignSurface.metadataArea-28561.test.tsx(real surface and area) covers:console/StudioRoute.metadataArea-28561.test.tsx(realstudioRoutes) covers:~alllandings;Each new gate was checked to fail with its fix taken out. Without the area's
canWritegate, 2 cases fail. Without the off-nav deep link, 3 fail. Without the surface'sareaprop, 3 fail. Without the two new console routes, 4 fail.Acceptance notes
~all) opens the generic page, because it names no package to open a pillar on.PageShell's metadata base is the area's root, so itsindexOf('/metadata')derivation is not used there.MetadataTypeActions, the permission set's "Clone to customize" and the landing's "Open in Setup" overlay link (that last one is for N-28).../<name>, which may be a pre-existing quirk there. The area builds that link from its root instead.Verification
@object-ui/i18nsuite plus the studio-namespace tests (98 files): green.@object-ui/app-shell(tests included),@object-ui/consoleand@object-ui/i18n: green.check:i18n-keys,check:i18n-driftandcheck:i18n-dead-keys: green.node scripts/check-sdui-manifest.mjs: green.vite build, thencheck:eager-closure: 2052.2 KB gzipped eager, against a budget of 2431.6 KB. Every per-chunk ceiling holds, and the 41 ineffective dynamic imports are all already pinned, none new.dispatch-gates --commands: 34 derived, 34 run, all exit 0.--ranreconciles 34 of 34.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSErqBgsh8YbjzzqZ9