Skip to content

fix(app-shell): Studio's cross-package metadata list keeps its URL and lists every package - #29581

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-lol2gg
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-lol2gg

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #29566

Clause-②: no
Metadata-protocol: none

The two lines are copied from the claim (comment 6586144352).

维护者速读

  • 改了什么:Studio「全部元数据」的跨包列表(/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 new allLeg flag is true under the area's cross-package leg outside the environment scope (host present, packageId null, no ?scope=environment). On that leg:
    • the ?package= repair effect never runs (it now returns for any host, since a package's area was already exempt);
    • the list is scoped to no package: activePackage is null, and scopedItems keeps 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;
    • the "No project packages installed" empty state and the packages-pending wait do not apply, because the leg needs no project package to list;
    • Create picks a package through the existing pick, now named 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.
  • A package's area (host with a packageId) and Setup's list (no host) take the same branches as before; pickedPackage is the old activePackage memo minus its host line.
  • Comment-only: metadata-admin/metadataAreaHost.ts (the packageId doc and the scope bullet) and studio-design/metadataArea.ts (the ~all leg doc and areaLocationRedirect's no-?package= bullet) now say that the cross-package leg lists a type across packages and repairs no package in.

Tests

  • New 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/object and /studio/~all/metadata/object?package=all keep 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;
    • Create on the cross-package list lands on /studio/com.example.crm/metadata/object/new?package=com.example.crm;
    • controls: a package's area keeps its leg and lists only its own rows; Setup's list (no area) still repairs ?package= onto a project package.
  • Red on main: with ResourceListPage.tsx restored to the main blob (fce5d4d2, allLeg count 0 on disk), 4 of 6 go red: both ~all/object cases, the ~all/flow case and the create case. Both controls stay green. Restored with git checkout HEAD --; git diff HEAD empty and the blob hash equals HEAD's.
  • 35 test files that name ResourceListPage, MetadataResourceListPage, metadataAreaHost, metadataArea or StudioMetadataArea: 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 in ResourceListPage.tsx are the same 23 the main blob has.
  • node scripts/check-sdui-manifest.mjs: exit 0.

Acceptance notes

  • What the cross-package list shows. Every row the read returns, including platform packages' items and rows of no package, as the leg is defined (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.
  • The claim names studio-design/metadataAreaHost.ts; the file is metadata-admin/metadataAreaHost.ts. It is the one metadataAreaHost.ts in the tree, and the edit there is comment-only, as claimed.
  • Not re-measured on a live console; the routing is pinned in jsdom through the real area and list.

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.
  • Repo-wide lint and the full ui suites are CI's.
The 34 derived gate families, each with its exit code
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jSSoutjNPjB5tGKhSw


Generated by Claude Code

…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
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu

席位核对 · ACCEPT · 2026-11-02T20:07Z

Head-sha: 28c07a5400e936e67e5921c3e6bf435cdaa1677f

  • Shape:
    • The PR is a draft against main. The first card line is Fixes #29566, under claim 6586144352.
    • 5 files, +235 / −22: ResourceListPage.tsx (+34 / −17), comment-only edits in metadata-admin/metadataAreaHost.ts and studio-design/metadataArea.ts, the new StudioMetadataArea.allList-29566.test.tsx and a changeset. That is the claimed surface; the claim named metadataAreaHost.ts under studio-design/, and the file lives under metadata-admin/, comment-only as claimed. check-governed-merges --pr 29581: not governed, 257 changed lines, under the human-merge threshold.
    • Clause-②: no and Metadata-protocol: none start their lines in the body and the changeset, as claimed. No export, prop, string or wire shape is new. The changeset is patch.
  • Read in the diff:
    • allLeg is true only with an area host, a null packageId and no environment scope. On it activePackage is null, the row filter keeps every row (as the environment scope does), and the ?package= repair returns early for any host, so ~all is never rewritten onto one package's leg.
    • The old activePackage pick is kept as pickedPackage, no longer reading host. Setup's list (no host) still scopes and repairs exactly as before, and a package area still takes its route's package.
    • Create on ~all uses that pick (else the first project package) and opens ./new?package=…, which the area's redirect moves onto that package's create; with no project package it offers create-base. While packages are still loading, the click does nothing, which is a narrow edge and does not hold the PR.
    • packagesPending and the "No project packages" empty state no longer apply under any area host, so the ~all list does not wait on the package list it no longer needs.
  • Pins changed: none. The new file pins the leg.
  • Gates (check-runs on this head): 44 success, 11 skipped, 0 failed or pending. mergeable_state is clean.
  • Tests (dev):
    • New pin 6 of 6 through the real area routes: /studio/~all/metadata/object, with and without ?package=all, stays put and lists rows of two packages. Controls: a package area keeps its leg and rows, and Setup's list still repairs ?package=. With main's file, 4 go red and both controls stay green; the restore is proven.
    • 35 related files, 478 tests; app-shell type-check 65 of 65; ui scripts/ 170 files; eslint 0 errors; derived gates 34 of 34, 0 NOT-MEASURED.
  • NOT MEASURED: the seat ran no live session, and the dev measured in jsdom only, not against a running server. The card's acceptance names the Setup redirect (/apps/setup/metadata/object) and the package-less automation bookmark; both land on this leg, and neither was replayed live.
  • Findings: none filed. ~all now shows platform-package and package-less rows, which is the leg's definition as claimed.
  • Serial: none open.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #29566 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 20:09
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 2, 2026 20:09
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 50e35a2 Nov 2, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-lol2gg branch November 2, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio: /studio/~all/metadata/<type> cannot be opened; ResourceListPage's ?package= repair rewrites the cross-package list to one package's leg

1 participant