Skip to content

feat(studio): a dashboard list's New opens the app's design mode on its dashboards - #37368

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36907-studio-new-dashboard-design-mode
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36907-studio-new-dashboard-design-mode

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #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 (#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 fix(console): report editing is its own entry, mutually exclusive with design mode #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 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 #37348.

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.
Local runs on the final head 6fbbdd9 (rebased on d5ae7a4)
  • 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, fix(studio): a permission set's review link opens the draft review on its matrix page #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, feat(console): a 「⋯」 package menu in Studio's top bar; Import on Setup → Packages #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.
Ablations (each through scripts/ablation-replace.mjs, restored, git diff HEAD empty)
  • 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.

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

…ts dashboards

Studio's dashboard list New now opens the package's app (decision 6, the
.custom pair leg included) with a one-time navigation-state arrival:
ConsoleLayout reads it once, clears it from the history entry, and asks the
design mode to enter with the Add menu item picker open on its dashboards.
A refused entry does nothing more and says why; a phone does nothing. The
dashboard created there opens for editing with ?studio= back to the list.

The list offers no New at phone width, and none without a target app,
saying why. The report New is unchanged.

Claude-Session: https://claude.ai/code/session_01QSeKYoLfUxK6MRhuSp7nAt
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head 6fbbdd9b30785084fcbb3251019939c4c4bd5f7d · 2026-11-26T01:04Z

PR #37368 → card #36907 (Studio 重构 3-4b, sub-card of #36890). Final report 7178524998. Zone head freeze 7179044983 (2026-11-26T00:42Z). I checked everything below against GitHub and against a throwaway worktree at the head. None of it comes from the report.

Checklist

  • Shape (l1-face.mjs --pr 37368: CLEAN, 13 items, none flagged).

  • The fix matches the card.

    • designModeAddDashboardArrival is a navigation-state arrival beside dashboardEditArrival, as step 1 asks. ConsoleLayout reads it through useDesignModeArrival, replaces the entry without it, then calls enterOpening({ column: 'dashboard', studioReturn }).
    • DesignModeMenu takes the opening once and opens the picker on 「Dashboards」, at the end of the top level. A dashboard created there navigates with withStudioReturn, so its × goes back to the Studio list. This is 设计模式(三)在「添加菜单项」里新建仪表盘、新建报表:建完落在占好的位置,直接进入编辑 #36364's create path, unchanged apart from the return.
    • AreaCreate sends dashboard/new through StudioAreaAppOpen { kind: 'new-dashboard' }, under the report leg's condition (!readOnly || pairCreate). The app is studioAppCreateSegment over readStudioTargetApps(…, pairLeg: true): decision 6, plus fix(studio): a customization pair's dashboard or report opens in its base app's edit state #37348's .custom pair leg.
    • heldOut moving to a ref is safe. heldRef is synced in a useLayoutEffect, so takeOpening in a child's passive effect reads the current hold. enter keeps its zero-argument contract.
  • URL and deep-link reach. The app side holds: the landing address carries no mode and no ?studio=, and the arrival is cleared by a replace. The Studio create route itself is a deep link into the arrival (N1). That is not a card breach.

  • The phone path.

    • useDesignModeArrival(designMode, !phone) clears the arrival and enters nothing. StudioAreaAppOpen falls back to the area's own create on a phone (my ablation A6p, if (phone) → if (false): 2 red). useStudioDashboardNew offers no New on a phone (A8: 1 red).
    • The arrival hook's own enabled guard is not pinned on its own (N2).
    • On a phone, an empty dashboard list now says the type is read-only (S1).
  • areas apps, Q1 A: justified.

    • UnifiedSidebar.tsx:758 draws DesignModeMenu only when areas.length === 0. That predates this PR, and 「Design layout」's own door behaves the same for such an app: the mode enters and no menu editor is drawn.
    • No example or packages/apps app declares areas. I grepped examples/ and packages/apps/, and the only hits are comments and an OpenAPI file.
    • In an areas app the held opening is never taken. It is harmless: opening reads null once the mode is off, and leaving the mode or the app drops it.
  • Riders.

  • Translation keys.

    • I ran released-keys-removed.mjs --tag @object-ui/i18n@18.6.0 --json at the merge-base d5ae7a47 and at the head. Both give total 77, with identical groups and movedBetweenModules; only ref/refSha differ. So the PR removes no released key. The 77 are main's existing 18.6.0 retirements; current origin/main reads 80.
    • The new engine.list.dashboardNewNoApp sits in the studio namespace, whose catalogues are en.ts and zh.ts (index.ts loads zh lazily). Both locales carry it, beside the sibling engine.list.* keys.
  • Declarations and levels.

    • readClause2Line gives {kind: declared, value: no, arm: null} for each of the card's newest (and only) Claim: comment 7176717578, the PR body and the changeset body. readMetadataProtocolLine gives declared · none for all three. No Skills-docs: line is owed.
    • Both changeset entries are patch, which agrees with kind none (AGENTS.md Post-Task step 3).
    • @object-ui/i18n is published (no private, files: [dist, …]). @object-ui/app-shell is private: true and versioned by convention, so its new exports widen no published surface. The studio catalogue is typed Record<string, string>, so a new key adds no declared member. Clause-②: no holds.
  • Changeset, sentence by sentence.

    • 「opens the package's app with Design layout already on and the 「Add menu item」 picker open on its Dashboards, 「New dashboard…」 first」: true.
    • 「the app you came from when it is one of the package's, otherwise the package's first app」: true (studioAppCreateSegment).
    • 「For an installed app, what you save there goes to its customization package」: true. That is design mode's existing save.
    • 「<base>.custom that has no app of its own, the base package's app opens」: true.
    • 「After Create … end of the menu's top level … opens for editing … × goes back to the Studio list」: true.
    • 「Closing the picker instead leaves you in Design layout, with nothing added」: true.
    • 「On a phone-width window the dashboard list offers no New」 and 「A package with no app … offers no New either, and the list says why」: true. But see S1 for what the phone's empty list says instead.
    • 「never the address: a reload, a shared link or Back does not turn it on」: true for the app's address. A Studio create link does turn it on (N1).
    • 「If a dashboard's or a report's own editor is open … refuses with the usual message」: true.
    • 「The report list is unchanged」: true.
    • The note on Studio:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页) #37237's entry: true (see Riders).
    • 「New Studio string engine.list.dashboardNewNoApp, in English and Chinese」: true.
  • Pins at head, and ablation. The worktree is at 6fbbdd9b, with spec and the @objectstack/* closure ui/ imports built. vitest run over DesignModeMenu-36363, designMode-36362, StudioAreaAppOpen-36906 and ResourceListPage.pairCreate-36897 gives Test Files 4 passed (4) · Tests 114 passed (114). Each ablation below went through scripts/ablation-replace.mjs. Each landed (anchor x1 → x0, blob moved), and each was restored with blob == HEAD … git diff HEAD is empty.

    leg mutation result at head
    A1′ mode.enterOpening(…) → mode.enter() in useDesignModeArrival 3 red (DesignModeMenu-36363)
    A3 navigate without withStudioReturn 1 red
    A5 if (heldOut.current > 0) → if (false) 4 red (36363 + 36362)
    A6 AreaCreate's dashboard branch → if (false) 5 red (StudioAreaAppOpen-36906)
    A6p StudioAreaAppOpen's if (phone) fallback → if (false) 2 red
    A7 readNewDashboardSegment pair leg true → false 3 red (36906 + 36897)
    A8 useStudioDashboardNew reads no phone 1 red
    A9 canCreate = canCreateHere 3 red
    AP if (enabled) mode.enterOpening( → if (true) … green 56/56 (N2)
    A4′ the clearing navigate's replace: true → replace: false green 56/56 (N2)
  • Check-runs at head. There are 58 runs: 45 success, 13 skipped, 0 failed, 0 pending. l1-face judges all 13 skips expected. Lint & Repo Gates and TypeScript Type Check are success, and so are Test UI, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, the Dogfood Regression Gate aggregate, Check Changeset, PR-body guards and the Governed Surface Queue Guard. No dogfood is owed: there is no ! and no (narrowing) arm.

  • Merge-tree and overlap.

  • K = 8. That is git rev-list --count 6fbbdd9b..origin/main at 15a5be1d. The zone's freeze read 6, and main has moved two commits since.

  • Size and tier. check-governed-merges.mjs --pr 37368: 0 of 15 paths are governed, and the PR has 941 changed lines (≤ 3000). It is not Tier H, so the zone lands it.

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

  • 维护者速读 accuracy.

Findings

  • S1 (should-fix) — On a phone, an empty Studio dashboard list in a writable package now says 「This type is read-only — instances are defined by code artifacts in packages.」
    • Cause: useStudioDashboardNew returns 'phone', so canCreate is false, and the empty-state description in ResourceListPage.tsx falls through: canCreate ? createHint : dashboardNew === 'no-app' ? dashboardNewNoApp : readOnlyHint. The Studio host sets no emptyListHint for a package, and the dashboard config has no emptyStateHint.
    • The same false sentence also shows while 'pending' on desktop, for as long as the app read takes.
    • Measured: I ran a throwaway probe (a copy of the 36897 harness with an empty dashboard list, deleted afterwards). At 390 px it prints ["This type is read-only — instances are defined by code artifacts in packages"], and at 1280 px it prints Click "New" above to create the first Dashboard. Control: under canCreate = canCreateHere, the 390 px reading is the create hint, as main has it.
    • It is a regression this PR introduces. On main the phone's list offered the area's own New with the create hint. It is false copy on a surface the card names.
    • Fix:
      • Don't fall through to readOnlyHint for 'phone' or 'pending'. Draw no description while pending. On a phone, draw no hint, or a short one that says a dashboard is made in an app's design mode on a wider screen (a new en/zh key in studio).
      • Pin the phone empty state's text in ResourceListPage.pairCreate-36897, with an ablation that turns it red.
  • N1 — The Studio create route is a deep link into the arrival.
    • Opening /studio/<pkg>/metadata/dashboard/new?package=<pkg> directly lands in the app with the mode on. The new 36906 describe mounts exactly that URL.
    • It is the same shape Studio 重构(3-4):Studio 列表点仪表盘、报表,直接进应用里的编辑状态;× 回 Studio 列表;报表「新建」进 /apps/<应用>/reports/new #36906 shipped (a Studio item URL opens the app's edit state through dashboardEditArrival; report/new opens the new-report page). The route is transient: it is replaced before it is shown, so it is not copied from the address bar. The card's "no address" is about the mode and the app page, and both hold.
    • The route is gated by Studio's studio.access and AreaCreate's !readOnly || pairCreate. It is not gated by the door's useStudioEntryGate (workspace admin with manage_metadata), nor by the list's walled. The server judges every write again. This disposes of the report's out-of-scope finding (「the arrival does not repeat the door's own gate」) as Acceptance notes.
    • The changeset's 「a shared link … does not turn it on」 is true of the app's address. Accepted.
  • N2 — Two guards are unpinned on their own.
    • AP (if (enabled) dropped from useDesignModeArrival) stays green. The controller's own enabled masks it, and it differs only if a phone widens past 768 px with the opening held.
    • A4′ (push in place of replace) stays green. The read-once pin's 「reload」 leg mounts a fresh router with state: null, which is the premise, not a result. Back to the arrival entry is never exercised. The dev's A4 (navigate removed) does go red.
    • Optional in S1's patch round. Not required.
  • N3 — On the cross-package leg (?package=all, host.packageId === null), useStudioDashboardNew returns 'off'. That leg's New is still offered on a phone and for a package with no app, and it lands in AreaCreate's fallback, the area's own create. This is main's behaviour, not a regression, and the card names the package list. Noted.
  • N4 — The claim's file surface did not list designMode.tsx, useDesignModeArrival.ts (new), ResourceListPage.tsx or StudioMetadataArea.tsx. All four carry card steps 1–3. The report names the StudioMetadataArea.tsx share with Studio 重构(4-1):删掉分区路由和残留(:packageId/:tab 路由、AREA_PILLAR_FOR_TYPE、pillar 文案、旧 Studio 应用的菜单项) #36909 (PR fix(studio): every retired pillar address lands on its new page in one redirect; the pillar-era code with no reader goes #37383, merges clean), and the PR body names the others. No action.
  • N5 — The zone's Q2 B ruling (a pair's report New takes the pair leg, a small follow-up) is recorded only in comment 7179044983 on Studio 重构(3-4b):仪表盘列表的「新建」跳到应用的设计模式并直接打开「添加菜单项 → 仪表盘」(设计模式加一个到达入口) #36907, and Fixes #36907 closes that card on merge. Filing-gate: 「已落地工作欠的后续照立卡」. File it when the PR lands, as review follow-ups of PR #37368 (with N2 if not folded into S1), or carry it in the wind-down brief.
  • N6 — Evidence notes only. The report's gates lists 「Test Core success; Dogfood Regression Gate success」. Those are the aggregates; their shards and Build Core are expected skips on this ui-only diff. The zone's K read 6, and it is 8 now. No action.

Next

  • REWORK: one patch round through SendMessage to the original dev (session_01QSeKYoLfUxK6MRhuSp7nAt), same claim and branch, for S1 (N2 optional). I will re-read the delta at the new head.
  • Once that delta is ACCEPTed, the zone lands it at Tier S. It is not governed, has 941 changed lines and owes no L2. K = 8 (< 15), so the zone does not need to merge main first. Re-read the check-runs at the landing head, and file N5 when it lands.

… read-only

On a phone the withheld dashboard New left canCreate false, and the empty
state fell through to the read-only hint; it did too while the package's
apps were read. A phone now says a dashboard is made in an app's design
mode on a wider screen, and the pending read draws no hint. Pins for both,
and for the arrival hook's phone guard and its replacing (not stacking)
clear.

Claude-Session: https://claude.ai/code/session_01QSeKYoLfUxK6MRhuSp7nAt
Co-authored-by: Claude <noreply@anthropic.com>
…udio-new-dashboard-design-mode

Claude-Session: https://claude.ai/code/session_01QSeKYoLfUxK6MRhuSp7nAt
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head cc7bb340a3d68eef3fedd10f66f5819f10bc1e1a · 2026-11-26T03:53Z

PR #37368 → card #36907 (Studio 重构 3-4b, sub-card of #36890). This is round 2. Round 1 was REWORK at 6fbbdd9b for S1, with N2 optional. Since then the zone has posted two addenda: the S1 round at 1ef76ecc (7180046700, 2026-11-26T01:42Z) and the main merge at cc7bb340 (7181625360, 2026-11-26T03:20Z). I checked everything below against GitHub and against a throwaway worktree at the head. None of it comes from the addenda.

Checklist

  • Delta 6fbbdd9b..cc7bb340. There are two first-parent commits:

    • 1ef76ecc is the S1 round, one commit on 6fbbdd9b. It changes 6 files, +120/−16: the changeset, ResourceListPage.tsx, studio en.ts and zh.ts, and the 36897 and 36363 tests. I read all of it.
    • cc7bb340 merges origin/main e8740c55 into 1ef76ecc.
  • S1 is closed. An empty dashboard list in a writable package no longer falls through to the read-only hint.

    • ResourceListPage.tsx:865-876 at the head computes emptyHint once. Under canCreate false, 'no-app' gives dashboardNewNoApp, 'phone' gives the new engine.list.dashboardNewWiderScreen, and 'pending' gives null. Only what is left reaches readOnlyHint.
    • ResourceListPage.tsx:1490 draws <EmptyDescription data-testid="metadata-list-empty-hint"> only when emptyHint !== null, so nothing is drawn while the apps are read.
    • The ternary is exhaustive. StudioDashboardNew is 'off' | 'pending' | 'phone' | 'no-app' | 'offered' (StudioAreaAppOpen.tsx:139). canCreate = canCreateHere && (dashboardNew === 'off' || dashboardNew === 'offered') (ResourceListPage.tsx:836). So readOnlyHint is reached only through 'off' with canCreateHere false.
    • That remaining path is a package that really is not writable. useStudioDashboardNew is asked only under canCreateHere && type === 'dashboard' && host?.packageId (:833-835). It returns 'off' for a null id before it reads the phone (StudioAreaAppOpen.tsx:156-157). A read-only package on a phone therefore still says read-only, which is correct.
    • The precedence is unchanged. host.emptyListHint and then config.emptyStateHint still come first, as before.
    • The en and zh strings both exist, at studio/en.ts:4093-4094 and studio/zh.ts:3628. pnpm --dir ui check:i18n-keys exits 0 at the head.
    • Three new pins in ResourceListPage.pairCreate-36897 carry S1:
      • The phone pin asserts the new key's text, not readOnlyHint, and no New.
      • The pending pin holds the app read: the title is drawn and there is no hint. Once the read is released, the create hint and the New appear.
      • A no-app CONTROL.
    • The phone pin sets innerWidth to 390, and afterEach restores DESKTOP_WIDTH.
  • N2 was taken. Both guards are now pinned on their own, in DesignModeMenu-36363.

    • AP is pinned by 「an arrival read on a phone holds nothing: the window widening later opens no mode」.
    • A4′ is pinned by 「the arrival entry is replaced, not stacked: Back from it goes to the page before, and enters nothing」. Its MemoryRouter starts at ['/apps/crm/home', arrival] with initialIndex={1}, and a real navigate(-1) takes it back.
    • Both ablations now go red (table below).
  • The changeset round. The 「When there is no New」 bullet now says what a phone's empty list shows, that a pending read shows no hint, and that the list 「never says a writable package is read-only」. The strings line names both keys. I read each sentence against the code above, and each is true.

  • The merge is merge-only.

    • The PR's own file set is the same 15 files on both bases (d5ae7a47..6fbbdd9b and e8740c55..cc7bb340).
    • The -U0 changed lines of those 15 files in diff(d5ae7a47..1ef76ecc) and diff(e8740c55..cc7bb340) are byte-identical: 1057 lines each. diff(d5ae7a47..6fbbdd9b) has 941 lines, and the gap is exactly the S1 commit.
    • Post-images are identical for 13 files. Only studio en.ts and zh.ts differ, and only by main's own lines.
    • git merge-tree --write-tree 1ef76ecc e8740c55 gives tree 3ac54582…, which equals cc7bb340^{tree}. The merge commit carries no hand edits.
  • Pins at head. I built a worktree at cc7bb340 with pnpm install --frozen-lockfile, spec built (OS_SKIP_DTS=1), and a turbo build of the @objectstack/{client,formula,lint,sdui-parser} closure (44/44 tasks).

    • vitest run over DesignModeMenu-36363, designMode-36362, StudioAreaAppOpen-36906 and ResourceListPage.pairCreate-36897 gives Test Files 4 passed (4) · Tests 119 passed (119). That is 114 plus the 5 new pins.
    • The PR touches three of these test files. designMode-36362 is the neighbouring pin.
  • Ablations. Each went through scripts/ablation-replace.mjs. In each, the anchor went from 1 to 0 and the blob moved, and the restore printed blob == HEAD … git diff HEAD is empty. git status --porcelain read 0 lines after each.

    leg mutation result at head
    S1a phone branch ? t('engine.list.dashboardNewWiderScreen', locale) → ? t('engine.list.readOnlyHint', locale) (round 1's false sentence) 1 failed / 13 passed (36897 phone pin)
    S1b : dashboardNew === 'pending' → : false (pending falls to readOnlyHint) 1 failed / 13 passed (36897 pending pin)
    S1c {emptyHint !== null && <EmptyDescription → {true && <EmptyDescription (an empty description is drawn while pending) 1 failed / 13 passed (36897 pending pin)
    S1d : dashboardNew === 'phone' → : dashboardNew === ('-' as string) (phone branch removed) 1 failed / 13 passed (36897 phone pin)
    AP if (enabled) mode.enterOpening( → if (true) mode.enterOpening( 1 failed / 57 passed (36363 phone-arrival pin; round 1: green)
    A4′ replace: true, → replace: false, in useDesignModeArrival 1 failed / 57 passed (36363 Back pin; round 1: green)

    I removed the worktree afterwards with git worktree remove. Its status and its git diff HEAD were both empty first.

  • Shape (l1-face.mjs --pr 37368: CLEAN, 13 items, none flagged).

    • The PR is an open draft against main, first line Fixes #36907. No other closing keyword, no content/docs/releases/ path, one non-empty changeset. Clause-②: no · Metadata-protocol: none. No skills-docs or dogfood is owed.
    • Its pr-state read mergeable_state as unknown after 1 read (INCOMPLETE). The local merge-tree below stands in for it.
  • Check-runs at head (REST commits/cc7bb340…/check-runs). There are 58 runs: 45 success, 13 skipped, 0 failed, 0 pending.

    • Required contexts on main: TypeScript Type Check success, Test Core success, Dogfood Regression Gate success, and Build Core skipped. Build Core is skipped by path filter on a ui-only diff, as at round 1, and l1-face judges all 13 skips expected.
    • Lint & Repo Gates, Test UI (16/16 shards plus the aggregate), Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset, Check PR Size and Governed Surface Queue Guard are all success.
  • Merge-tree and K.

    • Against origin/main ee11fce9, git merge-tree --write-tree exits 0.
    • K = 7 (git rev-list --count cc7bb340..ee11fce9), and the merge base is e8740c55. None of those 7 main commits touches any of the PR's 15 files (git log cc7bb340..ee11fce9 -- <15 files> is empty).
    • Main moved twice while I read: da7c5599, then ee11fce9. The reading is pinned to ee11fce9.
  • Tier (check-governed-merges.mjs --pr 37368). 0 of 15 paths are governed (17 surfaces). The size is 1057 changed lines (+966/−91), which is ≤ 3000. It is not Tier H.

  • Declarations. readClause2Line / readMetadataProtocolLine (scripts/pm/clause2-line.mjs) agree on all three sources:

    • the card's newest Claim:, 7176717578 (still the only one): {declared, no, arm: null} · {declared, none};
    • the PR body: {declared, no, arm: null} · {declared, none};
    • the changeset at the head: {declared, no, arm: null} · {declared, none}.
    • Both changeset entries are still patch, which agrees with kind none. The new studio key is a Record<string, string> entry, so Clause-②: no still holds.

Findings

No must-fix, no should-fix.

  • N1 — The PR body was not patched for the S1 round.
    • Its line 「Additive en and zh keys: engine.list.dashboardNewNoApp」 names one key, and the head adds two. The changeset names both.
    • Its test line reads 114 passed, which is pinned to 6fbbdd9b. The head gives 119.
    • The dev says so in addendum 7180046700. No sentence became false about behaviour. Optional: correct the body before landing if it feeds the squash message.
  • N2 — Carried from round 1, unchanged by this delta:
    • round 1's N1, the Studio create route as a deep link into the arrival: accepted;
    • round 1's N3, the cross-package leg's 'off': main's behaviour;
    • round 1's N5: file the Q2 B follow-up (a pair's report New takes the pair leg) when the PR lands. It is recorded only in comment 7179044983, and Fixes #36907 closes the card. Round 1's N2 no longer needs to ride along, because it is closed here.
  • N3 — Evidence notes only. Main moved during the read (K = 7 at ee11fce9; the zone's merge was onto e8740c55). l1-face's mergeable_state came back unknown. Re-read both at the landing head.

Landing

Tier S, not governed, 1057 changed lines, no L2 owed. The zone (a4-S) lands it on ACCEPT. The PR is still a draft, so the zone marks it ready, re-reads the check-runs and mergeable_state at the landing head, and files the N2 follow-up when it lands. K = 7 (< 15), with no main commit on the PR's files, so no further main merge is needed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Landing · 2026-11-26T03:55Z · head cc7bb340 · zone a4-S (#36907)

  • L1: seat repo:objectstack#4 REWORK 7179410343 (S1), then delta ACCEPT 7182110550 at cc7bb340. No contract review is owed.
    • S1 is closed: phone and pending each have their own empty state, and the read-only hint is reachable only through 'off'. The seat's four ablations turned red, and 119/119 passed.
    • N2 was taken: AP and A4′ now go red when ablated.
    • The main merge is merge-only: the changed lines are byte-identical apart from the S1 commit, and the auto-merge tree equals cc7bb340.
  • N1, done through the relay before landing: the PR body now names both new keys (engine.list.dashboardNewNoApp, engine.list.dashboardNewWiderScreen) and the final test count. Read back identical; the head did not move.
  • Follow-up owed (Fixes #36907 closes this card): a pair's report New takes the pair leg, the zone's Q2 B. Seat 4 carries it on its next-round list. It is not filed tonight.
  • check-governed-merges.mjs --pr 37368: NOT governed; +966 / −91, under 3,000.
  • Checks on the head: 45 success, 13 expected skips, 0 failed. The body-triggered checks re-run on the edit; the queue waits for them.
  • K: under 15 (the seat read 7). merge-tree with origin/main is clean.
  • Clause-②: no, Metadata-protocol: none.
  • Action: ready, then auto-merge through the merge queue.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 03:55
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit ab91323 Nov 26, 2026
63 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36907-studio-new-dashboard-design-mode branch November 26, 2026 04:45
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… lists every type a package could hold (objectstack-ai#37380)

Fixes objectstack-ai#37360
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:在 Studio
左侧菜单的「高级」折叠区最下面,多了一行「全部类型」;点开是类型目录页,列出六个分组里的所有类型,这个应用还没有的类型标着「还没有」,并写明在这里能否新建。
- 为什么做:属于 Studio 左侧菜单改版;替从零新建应用的开发者解决邮件模板、文档、字段映射这类东西的第一条无处新建的问题。
- 出错会怎样:打开「全部类型」的开发者可能看到某个类型的「还没有」标错;「高级」里原有的行不受影响,本改动可以整体撤回。
- 要你做什么:本改动在架构决策记录里加了一句修订,需要你亲手合并或批准。

## What changes

Implements ruling **A** on objectstack-ai#37360 (ruling record [comment
7177310364](objectstack-ai#37360 (comment)),
maintainer, verbatim: 「37360 同意」).

- **The row.** On a package, the 高级 Advanced fold ends with one row,
「全部类型」 All types, below its groups and under no group's label. It opens
the area's type directory (`/studio/PKG/metadata`), and on that page it
is the current entry, so the fold opens by itself there without writing
its cookie. A menu search lists it last when its name matches. `~org`
and `~all` draw no fold and no row. The row is not part of
`buildStudioMenu`'s groups, so the fold's rule does not change: a 高级
type is drawn when the package holds one, and appears there by itself
once it does.
- **The directory.** On a package under Studio's area, the page lists
the types the package holds exactly as before (the shared
`scopeDirectoryEntries` rule is untouched, so the menu and the directory
still agree on what a package holds) and, after them in each group,
every other served type of the menu's six groups
(`directoryNotHeldEntries`). Each of those is marked "None yet" / 「还没有」
in place of an item count, with the existing state word for what can be
done there (read-only / can be customized / can be added / writable). A
tile opens the type's list, which carries New. A failed diagnostics
sweep says nothing about what the package holds, so then nothing is
marked or added. The cross-package leg and Setup's directory list as
before.
- **ADR-0084** gains one dated amendment line under "Entries that are
not a type": the fifth entry, 全部类型, the fold's last row, the one entry
under no group; the fold's rule stands.
- Studio catalogue keys (en, zh): `engine.studio.menu.allTypes`,
`engine.directory.notHeld`, `engine.directory.notHeldTitle`,
`engine.directory.notHeldReadOnlyTitle`. The palette's entry-icon map
gains the new entry kind (the palette lists only the menu's groups, so
it draws nothing new).

Read first (by risk):
1. `ui/packages/app-shell/src/views/metadata-admin/DirectoryPage.tsx` —
`directoryNotHeldEntries` and the `notHeldEntries` memo (the `diagError`
guard), and the tile's not-held badge.
2. `ui/packages/app-shell/src/views/studio-design/StudioMenu.tsx` —
`renderAllTypes` inside the fold region, after
`renderGroups(tiers.advanced, 'advanced')`, and `currentIsAdvanced`.
3. `ui/packages/app-shell/src/views/studio-design/studioMenuModel.ts` —
`studioMenuAllTypesEntry` and the area-root branch of
`studioMenuCurrentKey`.

## Tests

Pins (each ablated once, below):
- **The row exists and is last, under no group** — `StudioMenu.test.tsx`
› 全部类型 All types: the last link of the fold region, after every
`studio-menu-advanced-group-*`, inside no `data-sidebar="group"` and
under no group label; href `/studio/PKG/metadata`. Model pins in
`studioMenuModel.test.ts` (package only; in no group of the menu or
either tier).
- **The directory lists held and not-held types correctly** —
`DirectoryPage.allTypes-37360.test.tsx`: held types first with their
counts and no mark; then each group's not-held types marked "None yet"
with no count and the right state word (`api` read-only, `doc` addable,
`email_template` writable); a type outside the six groups and the hidden
`field` are never listed; a failed sweep marks nothing; the
cross-package leg is unchanged.
- **A not-held type's tile reaches a list with New** — same file:
clicking the `email_template` tile routes to
`/studio/PKG/metadata/email_template?package=PKG`, where the real list
page renders `metadata-list-create`.
- **CONTROL: the fold still omits a not-held type** —
`StudioMenu.test.tsx` (rendered: `email_template` and `position` served,
held by none, absent from the open fold while 全部类型 is there) and
`studioMenuModel.test.ts` (the shared rule plus `buildStudioMenu`).

Rewritten on purpose (each marked in place): `studioMenuModel.test.ts`
"nothing at the directory" → the directory's current entry is
`allTypes`; `StudioDesignSurface.metadataArea-28561.test.tsx` "The
directory is no one entry's page" → the current link is
`studio-menu-entry-allTypes`; `metadataAreaHost.scope-28561.test.tsx`
kernel-package directory read "No matches" → it lists the kernel
package's not-held types, scoped to it, URL unrepaired.

Ablations (one per pin, each through `scripts/ablation-replace.mjs`,
anchor hit 1 → 0, blob changed, restored to the HEAD blob with `git diff
HEAD` empty; tests import the source by relative path, so no `dist/` is
involved):

| Pin | Mutation | Result |
|---|---|---|
| Row last, under no group | drop the row's render in the fold | red:
`Unable to find an element by:
[data-testid="studio-menu-entry-allTypes"]` |
| Directory lists held + not-held | `directoryNotHeldEntries` returns
nothing | red: `expected [ 'hook', 'object' ] to deeply equal [ Array(5)
]` |
| Not-held tile reaches list with New | a not-held tile links to `.` |
red: the tile's `href` assertion |
| CONTROL fold omits not-held | the menu's `always` list becomes every
served type | red: `expected ... to be null` on
`studio-menu-entry-type:email_template` |

Readings are in the details blocks under Verification.

## Acceptance notes

- **The six types that cannot be created in Studio are listed, marked
read-only** (the choice the ruling left to execution). Reasons: the
ruling's own words are "every type of the six groups", and leaving six
out would need a second hand-kept exception list beside the registry the
page reads; listing them tells a builder the type exists and that its
items come from code, which is the question the page answers; the page
already carries the read-only word and the "Hide read-only" filter,
which drops them in one click (pinned).
- **Not-held types are listed on a read-only package too**, with the
same state word the page already draws there: a read-only base's New
lands in its `.custom` pair (ADR-0146 D3), so the list can still make a
first item.
- **A failed diagnostics sweep adds and marks nothing**: it answered
nothing about what the package holds, and "None yet" on every type would
be a wrong claim (pinned).
- The menu's ⌘K palette does not list 全部类型: it lists the menu's groups,
and the row sits in none. Its icon map gained the kind only because the
map is typed over every entry kind.
- Files beyond the claim's surface: `StudioPaletteGroups.tsx` (one icon
row, required by its typed map), and two test files whose pins described
the old directory (`StudioDesignSurface.metadataArea-28561.test.tsx`,
`metadataAreaHost.scope-28561.test.tsx`), each rewritten on purpose.
- Browser walk on a new empty package (the card's suggested end-to-end
check): NOT MEASURED, reason: not run in this container; the routing
from tile to list and New is pinned over the real directory and list
pages in jsdom.

## Verification

Two-minute check: open Studio on a new, empty app, expand 「高级」 and click
its last row 「全部类型」; expect every type under its group, e.g. 邮件模板 tile
with 「还没有」 and 「可写」, and clicking it opens the empty email-template list
with 「新建」.

All readings on head `45ed0a4bf5c` unless noted.

<details><summary>Affected package tests (narrowed, declared)</summary>

- `ui`: `pnpm exec vitest run --maxWorkers=2
packages/app-shell/src/views/studio-design/
packages/app-shell/src/views/metadata-admin/DirectoryPage
packages/app-shell/src/views/metadata-admin/metadataAreaHost
packages/i18n/` on `122de301019` — Test Files 2 failed / 397 passed,
Tests 2 failed / 4399 passed / 13 skipped: the two failures were the
pins that described the old directory, rewritten on purpose in
`8c09070ce61`.
- Re-run on `45ed0a4bf5c` of those two files plus the three new-pin
files: Test Files 5 passed (5), Tests 90 passed (90), lock VERDICT
command-exit 0.
- Every other test file under `ui` that names the menu, the palette or
the directory (22 files: the console `AppContent.*` landings,
`UnifiedSidebar.studioNoHome-12113`,
`ResourceListPage.setupPosture-12606`, `check-i18n-call-site-keys`, …)
on `45ed0a4bf5c`: Test Files 22 passed (22), Tests 607 passed (607),
lock VERDICT command-exit 0.
- Declared narrowing: the rest of `@object-ui/app-shell`'s suite (about
2,000 files that import none of the changed modules) is left to CI's
Test UI.

</details>

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

`pnpm --filter @object-ui/app-shell --filter @object-ui/i18n run
type-check` on `45ed0a4bf5c`: both `Done`, lock VERDICT command-exit 0.
(The first run, before `45ed0a4bf5c`, was red on the palette's
entry-icon map, `TS2741 Property 'allTypes' is missing`; fixed there.)

</details>

<details><summary>Derived gate families</summary>

`node scripts/pm/dispatch-gates.mjs --commands` on `45ed0a4bf5c`: 48
commands, all run, each exit 0 (exit captured before any pipe),
including `pnpm --dir ui exec vitest run scripts/` (Test Files 172
passed / 2 skipped). `--ran` reconciliation: "48 derived famil(ies)
accounted for — 48 run, 0 NOT-MEASURED (a DERIVED zero — all 48 recorded
an exit code and none of them is 3)".

`node scripts/pm/overlap-check.mjs` on `45ed0a4bf5c`: origin/main merges
cleanly; objectstack-ai#37368 and objectstack-ai#37362 (share the studio catalogues) merge cleanly;
VERDICT clean exit 0.

</details>

<details><summary>Ablations</summary>

Each through `node scripts/ablation-replace.mjs --file F --anchor A
--replacement R -- (the pin's test, under the verify lock)`; every leg
printed "ok mutation landed: anchor 1 -> 0" and "ok restored: blob ==
HEAD … and `git diff HEAD` is empty"; tree clean after (0 changed
paths).

- A, `StudioMenu.tsx` row render → `{null}`: Tests 1 failed — `Unable to
find an element by: [data-testid="studio-menu-entry-allTypes"]`.
- B, `directoryNotHeldEntries` → `return []`: Tests 1 failed — `expected
[ 'hook', 'object' ] to deeply equal [ Array(5) ]`.
- C, tile `to={notHeld ? '.' : href}`: Tests 1 failed — the tile's
`href` assertion.
- D, `studioMenuData.ts` `always:` → every served type: Tests 1 failed —
`expected … to be null` (the fold drew `type:email_template`).

</details>

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

---------

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/xl tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants