Repository navigation
fix(app-shell): Studio's cross-package metadata list keeps its URL and lists every package - #29581
Merged
Merged
Conversation
…d lists every package The list's ?package= repair ran whenever the area named no package, so /studio/~all/metadata/TYPE was rewritten to the first package and then moved onto that package's leg. On the cross-package leg the list now keeps no package, lists every row the read returns, and picks a package only for Create. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSSoutjNPjB5tGKhSw
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T20:07ZHead-sha:
|
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 #29566
Clause-②: no
Metadata-protocol: none
The two lines are copied from the claim (comment 6586144352).
维护者速读
/studio/~all/metadata/TYPE)不再自己往地址里补?package=,也不再被带去某一个包的页面;它列出读到的所有行(各个包的条目,加上不属于任何包的条目),每行点开时进入它所属的包。只有「新建」时才挑一个包(沿用 Setup 列表原来的挑法),并打开那个包的新建页。?package=,区域随即把页面转到那个包。于是跨包列表根本打不开,带?package=all也一样。所有不带包的 Setup 元数据旧链接和「已打包自动化」书签都落在这里(验收项 platform-core.setup-metadata-redirects-to-studio 的 acceptance[0] 和 [3])。ResourceListPage.tsx里跨包分支的范围判断(宿主存在、packageId 为空、不在环境范围)。某个包的区域和 Setup 自己的列表行为不变,有对照用例钉住。跨包列表现在会显示平台包和无包条目,这是该分支的既定含义。回滚即撤销本 PR。ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx(allLeg、pickedPackage/activePackage的拆分、修补 effect 里的if (host) return、handleCreate的跨包分支);新测试StudioMetadataArea.allList-29566.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioMetadataArea.allList-29566.test.tsx,预期 6 个用例全过;把ResourceListPage.tsx换回 main 的版本时其中 4 个转红。What changes
ResourceListPage.tsx(DefaultMetadataList): a newallLegflag is true under the area's cross-package leg outside the environment scope (host present,packageIdnull, no?scope=environment). On that leg:?package=repair effect never runs (it now returns for any host, since a package's area was already exempt);activePackageisnull, andscopedItemskeeps every row the read returns, as the environment scope already does. Each row still links with its owning package's?package=, so opening a row moves onto that package's leg (areaLocationRedirect); a package-less row opens by name on the cross-package leg;pickedPackage(the current app's package, then the project package owning the most rows of the type, then the first project package), and navigates to./new?package=PICK, which the area opens as that package's create. With no project package it opens the existing create-a-package dialog.packageId) and Setup's list (no host) take the same branches as before;pickedPackageis the oldactivePackagememo minus its host line.metadata-admin/metadataAreaHost.ts(thepackageIddoc and the scope bullet) andstudio-design/metadataArea.ts(the~allleg doc andareaLocationRedirect's no-?package=bullet) now say that the cross-package leg lists a type across packages and repairs no package in.Tests
studio-design/StudioMetadataArea.allList-29566.test.tsx, through the area's real routes (/studio/~all/metadata/*,/studio/:packageId/metadata/*) with the real list page. Only the metadata client, the types list, the locale, the author gate and the writable probe are doubled:/studio/~all/metadata/objectand/studio/~all/metadata/object?package=allkeep their URL and list rows of two project packages, a platform package and a package-less row; each row's href names its owning package;/studio/~all/metadata/flow(the Packaged automation landing) keeps its URL and lists both packages' flows;/studio/com.example.crm/metadata/object/new?package=com.example.crm;?package=onto a project package.ResourceListPage.tsxrestored to the main blob (fce5d4d2,allLegcount 0 on disk), 4 of 6 go red: both~all/objectcases, the~all/flowcase and the create case. Both controls stay green. Restored withgit checkout HEAD --;git diff HEADempty and the blob hash equals HEAD's.ResourceListPage,MetadataResourceListPage,metadataAreaHost,metadataAreaorStudioMetadataArea: 478/478 passed.turbo run type-check --filter=@object-ui/app-shell: 65/65 tasks, exit 0. ESLint on the four changed files: 0 errors; the 23 warnings inResourceListPage.tsxare the same 23 the main blob has.node scripts/check-sdui-manifest.mjs: exit 0.Acceptance notes
metadataArea.ts: every package plus the environment's own items). The seat accepted this reading in the claim; a project-packages-only list would be a follow-up.studio-design/metadataAreaHost.ts; the file ismetadata-admin/metadataAreaHost.ts. It is the onemetadataAreaHost.tsin the tree, and the edit there is comment-only, as claimed.Verification
All readings at head
28c07a54.node scripts/pm/dispatch-gates.mjs --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --dir ui exec vitest run scripts/(locked): 170 files passed, 2 skipped; 4972 tests passed.pnpm check:type-check-debt(locked): 0 raw tsc errors, none above its recorded number.The 34 derived gate families, each with its exit code
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSSoutjNPjB5tGKhSw
Generated by Claude Code