Skip to content

fix(studio): a customization pair's dashboard or report opens in its base app's edit state - #37348

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-37237-custom-pair-base-app
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-37237-custom-pair-base-app

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #37237

Clause-②: no
Metadata-protocol: none

维护者速读

  • 在 Studio 里打开定制包(某个已安装应用的定制都存在这个配对包里)的仪表盘或报表,之前停在通用条目页,现在直接进基础包应用的编辑状态(仪表盘进编辑、报表进构建器),右上角关闭回到原来的列表。
  • 属于「Studio 重构」专题,是上一张「仪表盘和报表在所属应用里打开」改动留下的配对包缺口。
  • 出错时作者会落到通用条目页或基础包的另一个应用里,不会改动任何数据;撤回本次改动即恢复原样。
  • 无。

What changes

StudioAreaAppOpen (the area's step between a Studio list and an app page) reads the open package's published apps. When the open package is a customization pair (<base>.custom, by customizationPairBaseOf, the shipped pairing rule) and it has no published app of its own, it now reads the base's published apps (one extra read, on the pair leg only, and only for an item open) and runs the same decision-6 rule (studioAppEditSegment) over them with the base's id: the remembered app when it is one of the base's (or its menu opens the item), else the base's first app.

  • A pair's dashboard opens at /apps/BASE/dashboard/NAME in its edit state; a pair's report opens the base app's builder. ?studio= carries the pair's list, so × returns to it.
  • A pair whose base has no published app keeps the generic item page (decision 3).
  • A pair that publishes an app of its own opens there, and the base is not read.
  • A plain package is unchanged: one app read, as before.
  • The item read (does it have a published version?) is still asked of the pair.
  • The report list's New (decision 13) is unchanged on the pair leg (see Acceptance notes).

No server, spec or route change. studioAppEdit.ts only gains a doc paragraph naming the pair leg.

Tests

ui/packages/app-shell/src/views/studio-design/StudioAreaAppOpen-36906.test.tsx, a new top-level describe in the shared harness (through the real StudioMetadataArea and its routes):

  • a pair dashboard opens in the base app's edit state, × returns to the pair's list, the reads are exactly [app PAIR], [app BASE], and the item is read from the pair;
  • reached from the base's list: a pair row's ?package=PAIR link re-roots the area onto the pair and opens the base app;
  • a pair report opens the base app's builder, picked by decision 6 among several base apps (remembered app, then first app);
  • a pair whose base has no app keeps the generic item page;
  • a pair with its own app opens there, with no base read;
  • CONTROL: the existing "package with no published app" case now also pins a single app read.

The old pin "a pair row keeps the generic item page" is replaced: that is the behaviour this card changes.

Test run and ablations (4 legs, each red, each restored to HEAD)

pnpm --filter @object-ui/app-shell exec vitest run --root ../.. --maxWorkers=2 …/StudioAreaAppOpen-36906.test.tsx …/studioAppEdit.test.ts → Test Files 2 passed (2), Tests 29 passed (29).

pnpm --filter @object-ui/app-shell run type-check → exit 0.

Ablations via scripts/ablation-replace.mjs on StudioAreaAppOpen.tsx (vitest resolves the source directly; no dist leg):

leg mutation red
A1 no pair leg customizationPairBaseOf(packageId) : null → null : null 3 failed: pair dashboard, pair report, base-without-app
A2 pair id in segment packageId: appPackageId, apps → packageId, apps 1 failed: pair dashboard (/apps/PAIR/…)
A3 own app ignored && apps.length === 0 ? → && true ? 1 failed: pair with its own app
A4 CONTROL, leg on any package ?? 'com.example.hr' fallback 1 failed: plain package's single read

Each leg printed ok restored: blob == HEAD … git diff HEAD is empty. A first A3 try missed its anchor (refused, exit 3, nothing ran) and a second was refused for an ambiguous marker; the third run above is the reading.

Acceptance notes

  • Reachability (the card's confirmation): the pair-as-scope case is reachable from Studio's menu through a package's list. A pair's row links ./NAME?package=PAIR (ResourceListPage metadataRowInfo), and areaLocationRedirect re-roots any leg whose ?package= names another package onto that package, so the area mounts on the pair. The new reach pin drives that redirect. The menu's environment entry (~all with ?scope=environment) keeps rows in the environment scope and does not re-root; the plain ~all leg does. Confirmed with a pin, not in a browser.
  • The report list's New on a pair's own area still uses the area's create. It does not go to the base app's new-report page. The card names opening items only.

Verification

Two-minute check: run the test file above. Expected: 29 passed. Or in a HotCRM-shaped stack, open Studio → the base package → Dashboards → a row from .custom. Expected: the base app's dashboard opens in edit mode, and × lands back on the list.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head 7e57a1c7a41cc23840df1d2896f8dd61838f4838 · 2026-11-25T22:03Z

PR #37348 → card #37237 (sub-card of #36890). Final report 7174682607. Zone head freeze 7175473312 (2026-11-25T21:43Z). Everything below was read against GitHub and a throwaway worktree at the head. None of it is taken from the report.

Checklist

  • Shape (l1-face.mjs --pr 37348: CLEAN, 13 items, none flagged). The PR is an open draft against main. Its first line is Fixes #37237, and no closing keyword binds another card. Nothing touches content/docs/releases/. There is one changeset, and it is not empty. Lint & Repo Gates and TypeScript Type Check are both success. Fixes is right: the diff delivers the whole card (dashboard and report through the base app, × back to the list, the three pinned cases, and the reachability confirmation).

  • Fix matches the card. StudioAreaAppOpen.tsx reads the open package's apps once. If the target is an item, that read is empty, and customizationPairBaseOf(packageId) names a base, it makes one read of the base's apps. It then runs the unchanged decision-6 rule (studioAppEditSegment) with packageId: appPackageId (the base). customizationPairBaseOf is the existing shipped helper. It is pure and wraps spec's customizationBasePackageId (.custom suffix plus a round-trip check), and StudioDesignSurface and StudioPermissionSetPage already use it. The diff stays inside the claim's file surface: studioAppEdit.ts (doc paragraph only), StudioAreaAppOpen.tsx, the shared test file, and a changeset. There is no server, spec or route change.

  • Extra read only in the stated case. The base read is guarded by target.kind === 'item' && apps.length === 0 && pairBase !== null.

    • A plain package with apps makes one read, as before.
    • A plain package with no app makes one read. The CONTROL pin toEqual([['app', { packageId: PKG }]]) now asserts this.
    • A pair with its own app makes one read, pinned.
    • New-report never takes the leg, because of the kind guard. Q1 A holds: New on the pair's own area is unchanged.
    • On the pair leg, the remembered-app menu read (client.get('app', …)) is now skipped when the remembered app is one of the base's. So the pair leg costs at most one extra request, and sometimes none.
    • A cancelled check comes before the second read.
  • Replacing the old pin is justified. I ran main's test file (merge-base a182fbe3) against the head source. Exactly one case went red: 「a pair row keeps the generic item page: the pair has no published app of its own」. The other 24 stayed green (Tests 1 failed | 24 passed (25)). That pin asserted the item page plus a single [app PAIR] read, which is the defect the card names. Its two assertions are still covered:

    • The generic page on a pair is covered by 「a pair whose base has no published app」.
    • The single read is covered by the plain CONTROL and by 「a pair with a published app of its own」.

    The old pin mounted /studio/PAIR/… through the same PackageArea route that the new cases use, so no route lost coverage.

  • Reachability (Q2 A). areaLocationRedirect (metadataArea.ts:291) re-roots any leg whose ?package= names another package, whether or not a customization prop is present. The reach pin mounts /studio/BASE/…?package=PAIR and lands on /apps/BASE/dashboard/headcount with ?studio= set to the pair's list. StudioDesignSurface sends pillar URLs of a pair to the base, but explicitly not the area (props.area). So the pair-scoped area is a real route.

  • Declarations. readClause2Line (scripts/pm/clause2-line.mjs) gives {kind: declared, value: no, arm: null} for the card's newest Claim: comment 7172779719, the PR body, and the changeset body, all three identically. readMetadataProtocolLine gives declared · none for all three. No Skills-docs: line is owed.

  • Changeset. The @object-ui/app-shell entry is a patch. The package is private: true, but it is versioned under privatePackages and listed in fixed, and main already has 189 changesets for it, so this follows convention. patch agrees with Metadata-protocol: none. I checked each sentence against the diff:

    • 「They now open in the base package's app」: true.
    • 「The app page's × goes back to the Studio list you left」: true. ?studio= is the pair's list.
    • 「A customization package whose base has no published app keeps the generic item page」: true.
    • 「…that does publish an app of its own opens there, as before」: true.
    • 「Every other package is unchanged. No props, exports or routes change」: true.
    • 「picked the same way as for any package: the app you came from … otherwise the base's first app」: abbreviated, see N2.
  • Pins at head and ablation. In the worktree at 7e57a1c7 I ran vitest run --root ../.. StudioAreaAppOpen-36906.test.tsx studioAppEdit.test.ts and got Test Files 2 passed (2), Tests 29 passed (29). I then ran four ablations through scripts/ablation-replace.mjs. Each landed (anchor 1 → 0, blob changed), and each was restored with blob == HEAD … git diff HEAD is empty:

    leg mutation red at head
    A1 customizationPairBaseOf(packageId) : null → null : null 4 failed: pair dashboard, reach from the base list, pair report, base without an app
    A2 packageId: appPackageId, apps → packageId, apps 2 failed: pair dashboard, reach from the base list
    A3 && apps.length === 0 ? → && true ? 1 failed: pair with its own app
    A4 CONTROL ?? 'com.example.hr' fallback on the leg 1 failed: package with no published app (single read)
  • Check-runs at head. There are 51 runs: 38 success, 13 skipped, 0 failed, 0 pending. l1-face judges all 13 skips expected (0 unexpected). Nothing is dogfood-owed: the title has no ! and there is no (narrowing) arm.

  • Merge-tree and overlap. Against current origin/main 134b71db, git merge-tree --write-tree exits 0, and no main-side commit touches the PR's files. fix(console): "customized" means overrides + extensions everywhere; Setup → Packages names arrangements apart #37351 (c9c1d9e4) and fix(studio): a permission set's review link opens the draft review on its matrix page #37347 (f781168f) share no file with this PR. Pairwise merge-tree exits 0 for each, and so does a three-way merge of main plus fix(studio): a customization pair's dashboard or report opens in its base app's edit state #37348 with each of them.

  • K = 7. That is git rev-list --count HEAD..origin/main at 134b71db. The zone's freeze read 6, and main has moved one commit since. All 7 commits are outside these files.

  • 维护者速读 accuracy. All four lines hold:

  • Contract review. None is owed. The PR declares Clause-②: no with no (narrowing) arm. It touches no packages/spec/src/** and no governed path: all four files are under ui/packages/app-shell/src/** or .changeset/.

Findings

No must-fix, no should-fix.

  • N1 — The header docblock of StudioAreaAppOpen-36906.test.tsx (lines 17–19) still says 「a read-only base: its own rows open in its app, a pair row keeps the generic page」. This PR inverts that behaviour, and the file's new objectstack#37237 describe pins the opposite. It is a test-only comment and does not affect correctness. I accept it as a deviation, to be fixed on the file's next touch.
  • N2 — The changeset's paraphrase of decision 6 (「the app you came from when it is one of the base's, otherwise the base's first app」) leaves out rule 1's menu leg. That leg is an outside app whose menu opens the item (studioAppEditSegment, rememberedMenu), and the code keeps it. Studio 重构(3-4):Studio 列表点仪表盘、报表,直接进应用里的编辑状态;× 回 Studio 列表;报表「新建」进 /apps/<应用>/reports/new #36906's changeset names it. The sentence's lead clause, 「picked the same way as for any package」, is accurate. Accepted.
  • N3 — The PR body's ablation table was taken before the reach pin landed in 7e57a1c7. At head, A1 reds 4 rather than 3 and A2 reds 2 rather than 1, and every leg is still red. Separately, the report's gates field lists Test Core and Dogfood Regression Gate as success, but both are expected skips at head on this ui-only diff. These are evidence-accuracy notes only. No action.

Landing

  • The zone lands it, Tier S: not governed, +118/−19 (well under 3,000), no L2 owed. K = 7 (< 15), so the zone does not need to merge main first. Re-read the check-runs at the landing head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Landing · 2026-11-25T22:05Z · head 7e57a1c7 · zone a4-S (#37237)

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 22:05
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 903697b Nov 25, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37237-custom-pair-base-app branch November 25, 2026 22:26
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…p → Packages (objectstack-ai#37362)

Fixes objectstack-ai#37139
Fixes objectstack-ai#37349

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 在 Studio
打开一个软件包时,有「管理元数据」权限的人会在顶栏左侧应用名(没有应用时是包名)右边看到「⋯」,里面是编辑软件包信息、导出、复制为新软件包、还原到上次发布、收编散落项、在设置中管理;「设置
> 软件包」页头的「新建」旁边多了「导入」。
- 属于 Studio 重构专题:Studio 首页删掉后,这些整包动作在界面上没有入口,这次补回来;顺带删掉 17
条已经没有页面在用、也从没发布过的界面文案。
- 出错时最多是某一项该灰没灰、或该能点却灰了,真正的操作仍由服务器把关,开发视图不变,可以直接撤回。
- 请确认一件事:「复制为新软件包」在只读的安装包上按开发视图的做法灰掉了(服务器本来就拒绝复制只读包),而菜单表里这一项写的是「—」。

## What changes

**One copy of each whole-package action.**
`metadata-admin/packageActions.tsx` (new) holds what the development
face's detail sheet used to write inline: the page's `/api/v1/packages`
request helper, `revertPackage`, `exportPackageFile`, `adoptLooseItems`
(+ `adoptedText`), `EditPackageDialog` (moved; still re-exported from
`PackagesPage`), the Adopt confirmation (`AdoptLooseItemsDialog`) and
the Duplicate form (`DuplicatePackageForm`). `PackageDetailSheet` now
imports them; its testids, texts, requests and answers are unchanged
(the existing sheet suites pass as they were).

**Studio's 「⋯」 (`studio-design/StudioPackageMenu.tsx`, new).** Drawn by
`StudioDesignSurface` into a new `menu` slot of `StudioBackToApp`, right
of the app / package name and left of the Studio mark, only when the
page has a current package that exists (never `~org` or `~all`) and
`useCanAuthorMetadata()` holds. The six items, in the table's order:

| Item | Runs | Greyed when |
|:--|:--|:--|
| Edit package info / 编辑软件包信息 | `EditPackageDialog` on the manifest
`/api/v1/packages` lists | read-only package |
| Export / 导出 | `exportPackageFile` | never |
| Duplicate as a new package / 复制为新软件包 | `DuplicatePackageForm` in a
dialog → `duplicatePackage` | read-only package (see Acceptance notes) |
| Revert to last publish / 还原到上次发布 | a confirmation, then
`revertPackage` | read-only package, or a known pending count of 0 |
| Adopt loose items / 收编散落项 | `AdoptLooseItemsDialog`, then
`adoptLooseItems` | read-only package |
| Manage in Setup… / 在设置中管理… | navigates (through the unsaved-work veto)
to `setupPackagePath(id)` | never |

A greyed item carries its reason as its `title`. Writability or a
pending count Studio has not learned yet greys nothing (the server's
gate stays the authority, the same courtesy posture as the rest of
Studio). Answers are toasts. After a revert or an adoption the surface
bumps its publish nonce (pillars and the pending count re-read) and
emits the metadata-refresh pulse; saved package info renames the bar's
package name in place. 「发布全部草稿」 is not in the menu.

**Setup → Packages (`PackagesPage.tsx`).** Import now sits in the
administration face's header beside New Package, the same input and
handler as the development face (also in the folded `⋯` on a narrow
header). `?package=ID` on that page opens the package's detail sheet
once the list has loaded, then drops the param with a replace (the
`?new=package` pattern); an id the list does not name opens nothing.
`PACKAGES_PACKAGE_PARAM` and `setupPackagePath` live in
`packageSource.ts`. This is a page-local query param, not a route.

**i18n.** Additive:
`engine.studio.packageMenu.{trigger,editInfo,duplicate,revert,manageInSetup,noChanges,duplicateTitle,duplicateDescription,revertTitle,revertDescription}`
in studio `en` and `zh`. Export and Adopt reuse the development face's
own labels.

**Rider objectstack-ai#37349 (its own commit, `chore(i18n): remove the studio rows no
screen reads`).** Removes 17 rows from studio `en` and `zh`:
`engine.studio.menu.typeCount` and
`engine.studio.newApp.{title,description,advancedHint,id,help.id,help.name,help.description,help.namespace,help.version,help.type,help.defaultDatasource,help.dependencies,nsDerived,created,exists,failed}`.
`ui/scripts/check-i18n-dead-keys.mjs` lists exactly these 17 as
confirmed, and a `git grep` outside the catalogue finds no reader.
`engine.studio.newApp.nameTaken` and `engine.studio.newApp.appFailed`
are still read by `PackageFormDialog` and stay. Released-ness, measured
on `npm pack @object-ui/i18n@18.6.0`: its `dist/namespaces/studio/en.js`
and `zh.js` carry none of the 17 (only the different
`engine.studio.landing.newApp` / `newAppDescription`); control
`engine.studio.changes` is present. So this is a plain removal:
`Clause-②: no`, no Removed-translation-keys list.

⛔ No server, spec or route change. The development face is not retired.

## Tests

- `studio-design/StudioPackageMenu-37139.test.tsx` (new, 26 cases), real
`StudioDesignSurface`, metadata client and `MePermissionsProvider` over
a fetch stub:
- en and zh-CN: the 「⋯」 sits right of the name with the six items in
order, labelled; no publish-all item.
- en and zh-CN: greyed states — writable with changes greys nothing; a
read-only installed package greys Edit, Duplicate, Revert, Adopt with
the read-only reason; no pending changes greys Revert alone with its
reason.
- en and zh-CN: none on `~org`, none on `~all`, none without
`manage_metadata` (with a same-page control that has it).
- behaviour: Export reads the export door and downloads; Revert's Cancel
sends nothing and its confirm sends `POST …/revert`, after which the
pending count clears; Adopt confirms then sends `POST …/adopt-orphans`
and says 3 moved; Duplicate opens on 「Copy of Sales」 / `ID-copy` and
sends the duplicate body; Edit opens the edit dialog on the listed
manifest; Manage in Setup… lands on
`/apps/setup/component/developer/packages?face=admin&package=ID`.
- one copy: both surfaces import the six shared names from
`packageActions`, and neither spells the revert or adopt request in
place.
- `metadata-admin/PackagesPage.installedAppsUpdates-34722.test.tsx` (the
admin face's harness): the three assertions that said the admin face has
no Import now say it has; new describes pin, in en and zh, Import before
New Package in one header group and Import installing the file and
re-reading the list (development-face control); and `?package=ID`
opening that package's detail (Disable, Delete) and dropping the param,
with an unknown id opening nothing.

<details><summary>Local runs (head 178bfae; its tree is the f332471b
tree the runs read)</summary>

```
# scoped set, after rebasing on 80da086 (objectstack-ai#37351 and objectstack-ai#37348 included)
pnpm --dir ui exec vitest run --maxWorkers=2 PACKAGES_PAGE_SUITES PACKAGE_FORM_DIALOG_SUITES \
  EditPackageDialog CreatePackageDialog* StudioDesignSurface*  StudioPackageMenu-37139 \
  PackageCustomizationsPanel StudioAreaAppOpen-36906 studioAppEdit  packages/i18n/
 Test Files  223 passed (223)
      Tests  2862 passed | 13 skipped (2875)
os-verify-lock: VERDICT command-exit 0

pnpm --filter @object-ui/app-shell type-check        VERDICT command-exit 0   (src + tsconfig.test.json; --listFilesOnly reads both pin files)
pnpm check:type-check-debt                            re-measure OK, 0 raw tsc errors; VERDICT command-exit 0
```

NARROWED, declared: app-shell's whole package suite (2432 test files)
was started and stopped by me after 31 minutes on the shared 4-core box
with no file reported; the 223-file set above replaces it locally. CI's
`Test UI` runs the whole package.
</details>

<details><summary>Ablations: each pin group red alone (ablation-replace,
anchor x1 -> x0, restored to the HEAD blob, git diff HEAD
empty)</summary>

The tests import source through the ui vitest aliases, so there is no
dist leg.

```
1 StudioBackToApp: the {menu} slot deleted                  -t "six items"                 x en-US, x zh-CN        2 failed
2 menu: readOnly = false                                    -t "read-only installed"       x en-US, x zh-CN        2 failed
3 menu: noChanges = false                                   -t "nothing changed"           x en-US, x zh-CN        2 failed
4 surface: packageId !== null -> scopeSegment.length > 0    -t "~org"                      x en-US, x zh-CN        2 failed
5 surface: canAuthorPackage -> true                         -t "without manage_metadata"   x en-US, x zh-CN        2 failed (control passed)
6 PackagesPage: actions back to adminFace ? newPackageButton -t "Import beside New Package" x header en/zh, x import en/zh  4 failed (control passed)
7 PackagesPage: ?package= effect opens nothing               -t "one package"               x opens-that-package    1 failed
```

Ablations 1 and 4 were first sent with a spelling the tool refused
before running anything (an empty replacement; a replacement contained
in its own anchor), so those first attempts measured nothing; the rows
above are the re-runs with `--delete` and a distinct replacement.
</details>

<details><summary>Gates</summary>

- Derived union (`dispatch-gates.mjs --commands`, the same 39 on the
pre-rebase head 975fe6a3 and on 178bfae): `--ran` reconciliation 39
derived, 39 run, 0 NOT-MEASURED, exit 0.
- 37 ran on 975fe6a3 (the same two commits before the rebase onto
80da086), all exit 0.
- `check:type-check-debt` first answered exit 3 (PREREQUISITE NOT MET:
it queued behind my own suite on the lock), then exit 0 under the lock
on the rebased tree; `pnpm --dir ui exec vitest run scripts/` exit 0
there (172 files passed).
- Push gates on 178bfae's tree: `check:test-source-alias` exit 0,
`check:i18n-keys` exit 0, `overlap-check.mjs` VERDICT clean exit 0,
`check:new-line-citations` 0 new.
- `ui/scripts/check-i18n-dead-keys.mjs` lists the 17 rider rows as
confirmed before the rider; the rider grep is empty after it.
</details>

## Acceptance notes

- **Duplicate is greyed on a read-only package**, though the table's
column says 「—」 for it. The server refuses that duplicate
(`DUPLICATE_SOURCE_NOT_A_BASE`, `requireDuplicableSource`) and the
development face does not offer it there, so 「behave exactly as on the
development face」 and the server both point that way. Raised in the
report's open questions; flipping it is one line.
- **Revert asks first in the menu; the development face's Revert still
runs at once.** The table asks for the confirmation; the dispatch keeps
the development face unchanged, so the confirmation is the menu's own
(new `revertTitle` / `revertDescription` keys). The request is the
shared `revertPackage`.
- **Carried from objectstack-ai#37134's report:** a Studio-only author (holds
`manage_metadata`, not Setup → Packages' `setup.access` +
`manage_platform_settings`) still has no New Package door. Not in this
card's menu table, so not built here. Relatedly, such an author's
「Manage in Setup…」 leads to a page Setup refuses them; the table gives
that item no greyed state, so it is drawn as specified. Both are in the
report's open questions.
- The development face is not retired; per the card, that is asked once
this lands.

## Verification

Read first: `studio-design/StudioPackageMenu.tsx` (the greyed-state
rules and where each answer goes), then
`metadata-admin/packageActions.tsx` (the moved code; diff it against the
removed lines of `PackagesPage.tsx`), then the `?package=` effect in
`PackagesPage.tsx`.

Two-minute check: from the repo root, `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/StudioPackageMenu-37139.test.tsx`.
Expect 26 passed.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYmjeYX4T3tqfUCDu4K)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ts dashboards (objectstack-ai#37368)

Fixes objectstack-ai#36907

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 管理员在 Studio
的仪表盘列表点「新建」,会直接打开对应应用,「设计布局」已开、「添加菜单项」停在仪表盘一栏;建好的仪表盘挂在菜单上并进入编辑,点 × 回到
Studio 列表;手机宽度不出现「新建」,包里没有可打开的应用时也不出现,并写明原因。
- 属于「Studio 重构」专题,落实你定的「新建跳到设计模式加菜单」,让新仪表盘不会游离在所有菜单之外。
- 出错时管理员在 Studio 里可能新建不了仪表盘,或进不了设计模式;已有仪表盘、报表和菜单不受影响,纯前端改动,可直接撤回。
- 无

## What changes

The Studio dashboard list's New now uses design mode's existing 「Add
menu item → New dashboard…」 flow (objectstack-ai#36364), the maintainer's
「新建跳到设计模式加菜单」 (dashboard half). The report half (decision 13) is
unchanged.

**The arrival (`layout/designModeArrival.ts`,
`layout/useDesignModeArrival.ts`).** A second navigation-state arrival,
`designModeAddDashboard`, sits beside `designModeNewDashboard` and
carries the Studio list it came from. `ConsoleLayout` reads it once per
history entry through `useDesignModeArrival`. It first replaces the
entry without the arrival, so a reload or Back enters nothing. Then it
asks the mode to `enterOpening({ column: 'dashboard', studioReturn })`.
- ⛔ No URL enters design mode. The arrival rides navigation state only;
the landing address carries no `?studio=` and no mode.
- `enterOpening` is `enter` plus a one-shot "opening" held in the mode
store. Where `enter` refuses (an editor holds the mode out, PR objectstack-ai#36848),
nothing is held and the mode's own `designMode.editorOpen` toast says
why. On a phone the arrival is cleared and nothing more happens.
- The held-out count moved from state to a ref. An editor that opens in
the same commit the arrival lands in is then still judged (pinned;
ablation A5c below). `enter()` keeps its zero-argument contract: a click
event is never an opening.

**`DesignModeMenu`** takes the opening once (`useDesignModeOpening`). It
opens the picker on 「Dashboards」 for an entry at the end of the top
level, as that level's 「Add menu item」 would. A dashboard created from
that picker navigates with `withStudioReturn(href, studioReturn)`, so
the dashboard page's existing × goes back to the Studio list
(`?studio=`). Closing that picker drops the return, and later adds are
plain.

**Studio (`StudioAreaAppOpen.tsx`, `studioAppEdit.ts`,
`StudioMetadataArea.tsx`).** `StudioAreaAppTarget` gains `{ kind:
'new-dashboard' }`. `AreaCreate` sends `dashboard/new` through it, under
the same condition the report leg uses (`!readOnly || pairCreate`). It
replaces the Studio address with `/apps/SEGMENT` (`appHomePath`) and the
arrival.
- The app comes from decision 6 via `studioAppCreateSegment`.
- The `.custom` pair leg from objectstack-ai#37348 applies: a pair with no app of its
own reads its base's apps. That reading is factored into
`readStudioTargetApps`, which the item leg now shares too.
- With no app, or on a phone, the fallback is the area's own create, as
for a report.

**The list (`ResourceListPage.tsx`).** `useStudioDashboardNew` gates the
area's dashboard 新建 by the same reads. It never shows at phone width,
and it is not drawn while the apps are being read. With no target app
the header shows no 新建 and shows a `role="note"` reason instead
(`engine.list.dashboardNewNoApp`); the empty state says the same.

**Riders from seat 4's L1 on PR objectstack-ai#37348.**
- N1: the `StudioAreaAppOpen-36906` test header now says a pair row
opens in the base's app.
- N2: this changeset carries a note on the objectstack-ai#37237 entry: rule 1's menu
leg (the remembered app counts when its menu opens the item) applies on
the pair leg too.

Additive en and zh keys: `engine.list.dashboardNewNoApp` and
`engine.list.dashboardNewWiderScreen` (the phone empty state, from the
L1 S1 round) in the `studio` namespace (it is en/zh only). No server,
spec or route change.

## Read first

1. `ui/packages/app-shell/src/layout/useDesignModeArrival.ts`: the
consume-then-enter order. Risk: it navigates (replace) in the same
commit `AppRootLanding`'s redirect may navigate. Child effects run
first, so the landing redirect re-applies on the next render; see
Acceptance notes.
2. `ui/packages/app-shell/src/layout/designMode.tsx`: `enterWith` /
`enterOpening` / `takeOpening`, and `heldOut` moving to a ref.
3.
`ui/packages/app-shell/src/views/studio-design/StudioAreaAppOpen.tsx`:
the `new-dashboard` leg and `useStudioDashboardNew`.

## Tests

Pins, each with an ablation that turned it red (and restored
hash-verified through `scripts/ablation-replace.mjs`). Every file below
imports the subject from source, so no build or dist preflight applies:

| Pin | File (new top-level describe) | Ablation → red |
|:--|:--|:--|
| Studio 新建 lands in the target app, design mode open, dashboard column
open | `StudioAreaAppOpen-36906` (`dashboard list's New…`),
`DesignModeMenu-36363` (`the arrival…`) | A6 `AreaCreate` dashboard
branch off → 5 red; A1 `enterOpening` call removed → 6 red; A2 picker
kind `null` → 2 red |
| A created dashboard is in the menu and opens for editing, × back to
the list | `DesignModeMenu-36363` | A3 `withStudioReturn` dropped → 1
red |
| CONTROL: the report 新建 is unchanged | existing 36906 report-New tests
and pair report-New control; list control `CONTROL — the report list` |
(control: green under every ablation) |
| No 新建 at phone width | `ResourceListPage.pairCreate-36897` (`dashboard
list's 「新建」…`) | A8 phone read as false → 1 red |
| No 新建 without a target app, reason shown | same | A9 gate ignores
`no-app` → 3 red; A10 reason not drawn → 2 red |
| A refused `enter()` does nothing | `DesignModeMenu-36363` | A5 hold
ignored → 2 red; A5c render-time snapshot of the hold → the same-commit
pin red, the prior-editor pin green |
| The pair leg | `StudioAreaAppOpen-36906`,
`ResourceListPage.pairCreate-36897` | A7 pair leg off (Studio) → 2 red;
A7b (list) → 1 red |
| The arrival is consumed (reload / Back enter nothing) |
`DesignModeMenu-36363` | A4 replace removed → 4 red |

Moved by this change, and re-pinned rather than deleted:
- 36906's "a dashboard New is not this card" half is now the new
describe.
- 36906's "a dashboard made by the area's create … Back lands on the
list" runs at phone width, the one place the area's own dashboard create
is still reached from a list.

<details><summary>Local runs on the final head 6fbbdd9 (rebased on
d5ae7a4)</summary>

- `cd ui && npx vitest run --maxWorkers=2` over the 4 pinned files
(`DesignModeMenu-36363`, `designMode-36362`, `StudioAreaAppOpen-36906`,
`ResourceListPage.pairCreate-36897`) gave `Test Files 4 passed (4) ·
Tests 114 passed (114)` before the L1 S1 round. At the final head
`cc7bb340`, with the S1 and N2 pins added, the seat's L1 run over the
same files gives 119/119 passed.
- `pnpm --filter @object-ui/app-shell type-check` (both `tsconfig.json`
and `tsconfig.test.json`) gives lock `VERDICT command-exit 0`.
- The 156 app-shell/i18n test files that name a touched surface
(ResourceListPage, designMode, DesignModeMenu, StudioAreaAppOpen,
StudioMetadataArea, ConsoleLayout, studioAppEdit) were run on the
pre-rebase head `b0fc2e64`, giving `Test Files 156 passed (156) · Tests
1743 passed (1743)`. The rebase brought in one commit, objectstack-ai#37347, which
touches none of this PR's files. The full app-shell suite (2,431 files)
is left to CI's `Test UI` (a declared narrowing).
- Gates derived by `node scripts/pm/dispatch-gates.mjs --commands`: all
38 commands exit 0, run on `b0fc2e64`.
- Pre-push gates on `6fbbdd9b`: `pnpm check:test-source-alias` exit 0,
`pnpm --dir ui check:i18n-keys` exit 0, `node
scripts/pm/overlap-check.mjs` gives `VERDICT clean exit 0`. It reports
one open PR, objectstack-ai#37362, that shares the studio en/zh namespace files and
merges cleanly.
- In-flight branches, by `git merge-tree`:
  - `claude/issue-37139-studio-package-menu` merges clean.
- `claude/issue-36909-studio-pillar-dead-code` merges clean. It shares
`StudioMetadataArea.tsx` with this PR, in different hunks.

</details>

<details><summary>Ablations (each through scripts/ablation-replace.mjs,
restored, git diff HEAD empty)</summary>

- A1: drop the `enterOpening` call in `useDesignModeArrival` →
`DesignModeMenu-36363`: 6 failed | 50 passed.
- A2: `setPickerKind(null)` → 2 failed.
- A3: navigate without `withStudioReturn` → 1 failed.
- A4: drop the consuming `navigate(..., { replace: true })` → 4 failed.
- A5: `if (false)` in place of the held-out check → 2 failed.
- A5b: a held-out getter that always reads 0 → 2 failed.
- A5c: judge the hold at render time (`heldOutAtRender`) → only "the
same refusal when the editor opens in the very commit the arrival lands
in" fails among this card's pins. The prior-editor pin stays green.
- A6: `AreaCreate`'s dashboard branch never taken →
`StudioAreaAppOpen-36906`: 5 failed | 22 passed.
- A7: pair leg off in `readNewDashboardSegment` → 2 failed. A7b (list) →
`ResourceListPage.pairCreate-36897`: 1 failed.
- A8: `useStudioDashboardNew` reads no phone → 1 failed.
- A9: `canCreate` ignores `dashboardNew` → 3 failed.
- A10: reason note not drawn → 2 failed.

</details>

## Acceptance notes

- **Double replace at the app root.** `useDesignModeArrival` replaces
the history entry it read, in the same commit `AppRootLanding` may
redirect to the app's landing. Child effects run first, so the landing
redirect re-applies on the next render. In the browser, the showcase
landed on its first page (`/page/showcase_capability_map`) with the mode
on and `history.state.usr === null`. A self-built app whose menu holds
only links stays on `/apps/ID`, with the same result.
- **An app whose menu is split into `areas`** keeps its plain menu under
design mode, because `UnifiedSidebar` draws the editor only when
`areas.length === 0`. That predates this PR. There the arrival enters
the mode but no picker opens. No example app uses `areas`. See the
report's open question.
- **The arrival does not repeat the 「Design layout」 door's own gate**
(`useStudioEntryGate` and the customization wall). The Studio list's 新建
is already gated by `canCreate` (`walled`, `pairCreate`), and the server
judges every write again.
- **The held-out count moved from state to a ref** (`designMode.tsx`).
Nothing rendered from it; `enter` is the only reader. The existing 36692
pins pass unchanged.
- **The pair leg is applied to the dashboard New only.** A pair's report
New still falls back to the area's own create, pinned as CONTROL per the
dispatch's "report 新建 unchanged". Whether it should gain the leg is in
the report's open questions.
- While the package's apps are being read, the list draws no 新建, so a
no-app package never flashes one.

## Verification

- Browser walk on the showcase stack: `pnpm dev -- --fresh -p 38461`
(seeded admin), and the Console from `ui/` sources via `pnpm --filter
@object-ui/console dev` on :5180 pointed at it. Driven with Playwright
from a scratch script, not committed.
- **Showcase** (`com.example.showcase`, a read-only code package; the
HotCRM shape): Studio › dashboard list › 新建 lands on
`/apps/com.example.showcase/page/showcase_capability_map` with the
Design layout bar and the 「Add menu item」 picker on Dashboards (「New
dashboard…」 first). The history entry's state was cleared.
- Create lands on
`/apps/com.example.showcase/dashboard/walk_showcase?studio=/studio/com.example.showcase/metadata/dashboard?package=com.example.showcase`
in its edit state, with the × drawn. The entry is in the menu, and the
dashboard was saved to `com.example.showcase.custom`.
- A reload of that page shows no design bar. × returns to the Studio
list.
- **Self-built** (`com.walk.selfbuilt`, created through `POST
/api/v1/packages` with one app `walk_app`): 新建 lands on
`/apps/com.walk.selfbuilt` with the bar and picker. Create opens
`/apps/com.walk.selfbuilt/dashboard/walk_selfbuilt?studio=…`, and the
dashboard was saved to `com.walk.selfbuilt`. × returns to the list.
- **No app** (`com.walk.noapp`): no 新建, and the note reads "A new
dashboard is made in an app's design mode, so that it hangs in a menu.
This package has no app to make it in."
  - **Phone** (390 px): no 新建 and no note.
- Two-minute check: in Studio, open any package's Dashboards list and
press 新建. Expect the app with the purple Design layout bar and the 「Add
menu item」 dialog already on Dashboards.

---

_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYoLfUxK6MRhuSp7nAt)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…e redirect; the pillar-era code with no reader goes (objectstack-ai#37383)

Fixes objectstack-ai#36909

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:Studio 的旧地址(以前的「数据 / 自动化 / 权限 / 界面」分区链接、收藏夹、AI
给过的链接、服务器发的草稿审阅链接)都还能打开原来要看的页面,而且一次就跳到位;清理本身用户无感。
- 为什么做:Studio 重构专题的收尾——分区已经被左侧菜单和全屏设计器取代,这一单删掉分区留下的、已经没人读的代码。
- 出错会怎样:如果哪条旧地址漏了,打开它会落到「页面不存在」或错误的列表页;这是纯前端改动,撤回这个 PR 即可恢复。
- 要你做什么:无。

## What changes

No Studio pillar draws a page any more. This PR makes the route, not the
builder, answer every retired pillar address, and deletes what the
redesign left with no reader.

**1. One redirect table, mounted on the route**
(`studioPillarRedirectModel.ts`, `StudioPillarRedirect.tsx`,
`StudioRoute.tsx`).
`/studio/PACKAGE` and `/studio/PACKAGE/:tab` now render
`StudioPillarRedirect`. A retired pillar address redirects once; any
other segment renders the builder (the sharing overview `owd`, or the
not-found state).

| old address | lands on |
|---|---|
| `/studio/PACKAGE`, `/studio/PACKAGE/data` |
`/studio/PACKAGE/metadata/object?package=PACKAGE` |
| `/data?surface=object:NAME` (all three spellings, `?action=` kept) |
`/studio/PACKAGE/metadata/object/NAME?package=PACKAGE` |
| `/data?changes=review` (the server's `studioChangesReviewLink`) |
`/studio/PACKAGE/metadata/object?changes=review&package=PACKAGE` |
| `/automations[?surface=flow:NAME]` | the flow list, or
`/metadata/flow/NAME?package=PACKAGE` |
| `/access[?surface=permission:NAME / owd:overview]` | the permission
set list, the set's matrix (its holder read, as before), or `/owd` |
| `/interfaces[?…]` | the object list, with the "interface editing
moved" notice |
| `/studio/~org` and every `/studio/~org/…` |
`/studio/~org/metadata/flow[/NAME]?source=runtime` |

A base's `.custom` pair keeps each pillar's old rule (Data and
Automations in the pair's area; Access and Interfaces on the base).

**2. One hop (carry item from 7157423170).** Every target in the area is
put where the area would put it (`settledAreaAddress`, built on a new
`studioAddressParts` parser in `studioAddress.ts`), so the area never
redirects a second time. Before: `/data` took two redirects, bare
`/studio/PACKAGE` three, `/studio/~org` two. The publish toast's "Open
Access" now opens the package's permission sets, and the Changes sheet's
link to a permission set opens that set's page, directly instead of
through the old Access address.

**3. Removed, with every reader gone** (all in `@object-ui/app-shell`,
`private: true`, last published 18.2.0 — nothing published narrows):
- `AREA_PILLAR_FOR_TYPE`, `areaItemPillarPath`, `studioPillarItemPath`
(`metadataArea.ts`); `StudioMetadataArea`'s pillar redirect branch.
- `STUDIO_ITEM_PILLAR` (empty since objectstack-ai#36903), `studioItemPillar`,
`studioPillarItemAddress`, `studioSurfaceQuery`,
`StudioItemOptions.spelling` (`studioAddress.ts`). `studioItemPath` now
always returns the metadata address.
- `STUDIO_ORG_SCOPE_PILLAR` (`studioAddress.ts`, its `studioScope.ts`
re-export and the package entry). Kept only as data where a redirect
needs it: the literal `'automations'` inside the redirect table.
- `STUDIO_HOME_PILLAR` from the package entry (the console no longer
reads it). It stays inside app-shell: `studioHomePath` /
`studioChangesReviewPath` mirror the server's `/data?changes=review`
link, which this card may not change.
- The `?surface=` mirror half and the capture half with it
(`useSurfaceDeepLink`, `useSurfaceDeepLinkCapture`,
`useSurfaceDeepLinkMirror`, `parseSurfaceTarget`,
`resolveSurfaceDeepLink`) and their test file.
`useSurfaceActionDeepLink` and the qualifier keys stay (the object
designer and the redirects read them).
- The channel's subscriber half: `useRequestedSurface`, `SurfaceRequest`
and the `requested` state (carry item: no reader since objectstack-ai#37168).
`useSurfaceNavigator` + `SurfaceDeepLinkProvider` stay: the Changes
sheet's security block uses them.
- In `StudioDesignSurface`: the in-surface Data / Automations /
Interfaces redirects, `PILLARS`, the Access landing branch,
`PILLAR_FOR_SURFACE_TYPE`, and the pillar re-entry counter whose value
nothing read.
- `studioMenuModel.ts` needed only the sharing overview's section, not a
pillar map: `PILLAR_TYPE` went; the menu marks nothing current on a
retired address (it never draws one).

**4. `studio.app.ts`: no change needed.** All 15 `metadata:resource` /
`metadata:directory` entries were walked through the console's real path
(`/apps/studio/metadata/TYPE?package=PACKAGE` →
`setupMetadataStudioPath`): each lands on
`/studio/PACKAGE/metadata/TYPE?package=PACKAGE` (or `~all` with no
package), a settled area address, none on a pillar. Reading in
Verification.

**5. Card item 3** (`engine.studio.pillar.*`) was already gone on main
(the claim's Premise). This diff removes no translation call site;
`ui/scripts/check-i18n-dead-keys.mjs` exits 0.

## Tests

Pins (each ablated, below):
- **Table** — `studioPillarRedirectModel.test.ts` walks 22 old addresses
(every package pillar, bare package, a `.custom` pair, every `~org`
address, the three `?surface=` spellings) to their literal targets, plus
the Access mapping; `studioAddress.test.ts` holds every
`STUDIO_ITEM_TYPES` row's `redirectsTo` equal to what the table returns
for each spelling. Route-level:
`StudioRoute.metadataArea-28561.test.tsx` walks 14 old addresses through
the real `studioRoutes` and the real redirect.
- **`/data` single hop** — `the old /data address reaches the object
list in one redirect` (the area's `areaLocationRedirect` answers null
for the target); route-level, the location probe records exactly `[old,
new]`.
- **CONTROL** — `/owd`, `/owd?object=…`, area addresses and an unknown
segment are not redirected (pure and route-level: the probe records
`[url]` only).
- **Changes sheet → permission set** —
`StudioDesignSurface.heldDataCreate-26845.test.tsx` (last describe): the
sheet's request for a permission set lands on
`/studio/PACKAGE/metadata/permission/NAME` on a writable base, and on
the `.custom` pair's address on a read-only base with a pair. Narrowing
`requestSurface` back to objects alone turns both red (`Tests 2 failed |
3 passed`).

Updated: 38 app-shell surface tests now mount the console's route shape
(`StudioPillarRedirect` around the builder on `:tab`); the console route
tests expect the new landings; the publish toast test expects the
permission set list.

## Acceptance notes

Not filed (dead code / drift, no defect class); carrier: none.
- Client producers still write old addresses that now cost one redirect:
`studioHomePath` callers (command palette, app no-access state, AI chat
page, `appRoute`, `PackagesPage`, `PackageCustomizationsPanel`) and
`setupMetadataRedirect`'s `packagedAutomationStudioPath` /
`packagedActionsStudioPath` (two hops for those legacy Setup bookmarks).
Left alone: two of those files belong to an in-flight branch, and the
address they write still works.
- The copilot's surface context (`StudioAiCopilot`) still reads `:tab`
and `?surface=` as its pillar context (cloud#1610 contract); on current
pages it reads the area path instead.
- The surface keeps its `~org` non-area fallback and its pair→base
redirect for owd/unknown segments; the route no longer reaches the
first.

Finding for the seat (class a, user-visible misleading text), not fixed
here: the not-found state at `/studio/PACKAGE/bogus_pillar` says "pick
Data, Automations, Interfaces, Access or All metadata above"
(`engine.studio.notFound.pillar`, en and zh) — none of those exist any
more.

## First read (by risk)

1.
`ui/packages/app-shell/src/views/studio-design/studioPillarRedirectModel.ts`
— the table; the `.custom` pair rules and the `~org` catch-all.
2. `ui/apps/console/src/components/StudioRoute.tsx` — the two routes
that now render the redirect, and the lazy boundary it rides.
3.
`ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx`
— the removed in-surface redirects and the `requestSurface` permission
branch.

## Verification

Two-minute check: open
`/studio/com.example.showcase/data?changes=review` in the Console
(`OS_PORT=3000 pnpm dev`, Console on :5180). Expected: the address bar
shows
`/studio/com.example.showcase/metadata/object?changes=review&package=com.example.showcase`,
the Objects list is open, and the Changes drawer is open over it.

All readings below are on tree `26ec30e1` (the rebased head),
byte-identical to the pushed head `2322b402` (`git diff --quiet` between
them exits 0; see Process notes).

<details><summary>Type-check</summary>

- `pnpm --filter @object-ui/app-shell type-check` (both programs,
`tsconfig.json` and `tsconfig.test.json`): `VERDICT command-exit 0`, 0
`error TS`.
- `pnpm --filter @object-ui/console type-check`: `VERDICT command-exit
0`, 0 `error TS` (run on the pre-rebase head `3a7bc226`; the rebase
brought no console change).
</details>

<details><summary>Tests</summary>

- Full app-shell suite, pre-rebase head `3a7bc226` + the guard fix:
`Test Files 1 failed | 2429 passed | 1 skipped (2431)`, `Tests 1 failed
| 23308 passed`. The one failure was `studioAddress.guard.test.ts` (my
parse prefix spelled the Studio root outside `studioAddress.ts`); fixed
by `studioAddressParts`, then that guard passes.
- Rebased head `26ec30e1`: `vitest run
packages/app-shell/src/views/studio-design
packages/app-shell/src/views/metadata-admin
packages/app-shell/src/console apps/console/src/components` → `Test
Files 1442 passed (1442)`, `Tests 14059 passed | 1 skipped`.
- Pins: `studioPillarRedirectModel.test.ts` +
`StudioRoute.metadataArea-28561.test.tsx` → 64 tests pass.
</details>

<details><summary>Ablations (one per pin; each via
`scripts/ablation-replace.mjs`, anchor hit x1, mutation landed on disk,
restored to HEAD blob `85ed9932ab4b`, `git diff HEAD` empty
after)</summary>

- **Table** — the Automations case maps through `dataPillarRedirect`
instead: red, exactly the Automations rows — 4 in
`studioPillarRedirectModel.test.ts` and 2 route-level ones.
- **`/data` single hop** — `settledAreaAddress(...)` dropped from the
Data case: `Tests 14 failed | 50 passed (64)`, the one-hop pin `the old
/data address reaches the object list in one redirect` among them, and
every route-level `/data` and bare-package row (the probe saw a second
hop).
- **CONTROL** — the `default:` arm redirects to the object list instead
of `null`: `Tests 8 failed | 56 passed (64)`: all pure and route-level
CONTROL cases, plus the `/access?surface=owd:overview` row (its `/owd`
target then redirects again).
- Restored leg: both files plus a scratch walk of `studio.app.ts` →
`Test Files 3 passed`, `Tests 66 passed`.
</details>

<details><summary>`studio.app.ts` walk (scratch test, not
committed)</summary>

Each `metadata:resource` / `metadata:directory` entry through
`/apps/studio/metadata/TYPE?package=PACKAGE` →
`setupMetadataStudioPath`, then `areaLocationRedirect` on the result: 15
of 15 land on `/studio/PACKAGE/metadata/TYPE?package=PACKAGE`
(directory: `/studio/PACKAGE/metadata?package=PACKAGE`), section
`metadata`, settled (no second redirect). With no package: 15 of 15 on
`/studio/~all/metadata/TYPE`, settled. Types: object, app, view, page,
dashboard, report, dataset, action, hook, flow, agent, tool, skill,
email_template.
</details>

<details><summary>Gates</summary>

- Before the pushes: `pnpm check:test-source-alias` exit 0; `ui` `pnpm
check:i18n-keys` exit 0; `node scripts/pm/overlap-check.mjs` `VERDICT
clean exit 0` against origin/main and open PRs objectstack-ai#37380, objectstack-ai#37368, objectstack-ai#37362
(and earlier objectstack-ai#37351, objectstack-ai#37347, objectstack-ai#37348).
- `node ui/scripts/check-i18n-dead-keys.mjs` exit 0; the diff removes no
translation call site.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: OK, 2 anchors judged, 0 lost.
- `dispatch-gates --commands`: 38 derived families. 37 exit 0 locally
(list in the report). `pnpm check:type-check-debt` is NOT MEASURED
locally: the first run hit my 500 s timeout while waiting on the verify
lock my own test run held (exit 124, not a red); CI's run is the
reading.
- `pnpm check:nul-bytes` exit 0.
</details>

## Process notes

- One push (`3a7bc226`) went out before I re-ran the three pre-push
gates; I ran them on that head right after (all exit 0).
- The final rebase could not be pushed: the permission classifier
refused the `--force-with-lease`. I did not retry it. Instead the branch
keeps its pushed history, merges `origin/main` (`1691563a`) and replays
the two later commits; the resulting tree is byte-identical to the
rebased, tested tree.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页)

2 participants