Skip to content

feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order - #37168

Merged
os-zhuang merged 22 commits into
mainfrom
claude/issue-36904-object-designer-fullscreen
Nov 25, 2026
Merged

os-zhuang merged 22 commits into
mainfrom
claude/issue-36904-object-designer-fullscreen

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Fixes #36904
Refs #36513 (its section 一, the tab order, is delivered here; its section 二 was superseded by epic #36890)
Clause-②: no
Metadata-protocol: none

维护者速读

  • Studio 里点开一个对象,设计器在右侧整屏打开,有自己的地址;左上角 × 回对象列表,右上角 ‹ › 看上一个、下一个,设计器左边那一列对象列表没有了。
  • 这是 Studio 改版专题里的对象设计器一张,也按之前定的把对象页签排成:记录、字段布局、验证、操作、设置、钩子、API。
  • 出错时管理员会打不开或改不了对象(Studio 最常用的路径),旧链接也会落到对象列表;整张合并即可撤回。
  • 这张约 4200 行(4,177 行),超过 3000 行:其中删掉的测试约 1700 行(六个整份删掉的测试文件约 1000 行,测的是左侧列表、页内新建、空包页面和实时请求,这些本卡都去掉了),改写和新增的测试约 1000 行,产品代码约 1400 行;需要您审核后合并。

What changes

This rework round (L1 7149684173)

  • M1: the rail-switch suite's four cases are carried onto the designer's × and › on the real surface (StudioDesignSurface.heldDataLeave-26705, new top-level describe): an unsaved edit that is not held asks on › and ×; an edit whose Save was refused asks; a saved edit leaves without asking; nothing pending leaves at once and sends nothing.
  • S2: the Changes-sheet object link uses draftScope ?? packageId (StudioDesignSurface.tsx), pinned in heldDataCreate-26845 (a read-only base with a listed pair lands on the pair's address).
  • S3: /metadata/object/X/history opens the designer on History (StudioMetadataArea.routes-28561); ?tab=hooks and ?tab=history open those tabs, ?tab=nonsense opens Records (DataPillar.flatTabs-12450).
  • S4: copilotChangesLine-34725 asserts the partly-refused discard's message is still on screen after the object re-read.
  • S5: metadata-address cases in studioSurfaceContext (the object, its history address, and the create page, the list and a generic item naming nothing) and studioSurfaceLabel-8219 (the chip shows the label only for the object the address names).
  • S6: ui/packages/app-shell/README.md sends an object to its designer's address; the changeset is rewritten in user terms.
  • S7: areaItemOpensObjectDesigner and metadataAddressArtifact are replaced by feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089's helper (above); after feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089 landed, main is merged and the list holds both types.
  • N8, found on the browser walk: an address naming no object offered it as an "Unpublished new object"; it now says "Object not found" (objMissing, DataPillar.tsx; pinned in draftOnlyNoLayers-12508).
  • Added by seat a4-S: the object create publishes pinned (publishCreated, If-None-Match: *), as the flow create does, so an object another writer published under the name since the check is refused, not replaced. Pinned in MetadataListCreateDialog.pairCreate-36897, with the in-package taken notice and its Open.
  • N2, N3, N4: stale comments corrected (SidebarItemMenu.tsx, studioAddressTable.ts, studioInterfacesRetired.ts, the header-label comment in DataPillar.tsx, which now says what the code does: the draft's label when there is one); two controls carried over (a package with no namespace previews and saves the bare identifier, in MetadataListCreateDialog.pairCreate-36897; a label-less draft-only object is titled by its name, in DataPillar.draftOnlyNoLayers-12508). N7: areaDesignerItemOf reads /metadata/object/new as the create page.

Tests

  • New: objectDesignerTabs.test.ts (order word for word, address round trip, tool tabs, values that open nothing); metadataArea.test.ts (the designer-page helper, dataPillarRedirect, areaDesignerItemOf); DataPillar.flatTabs-12450 rewritten for the ruled order, the two-step fold and ?tab=.
  • Rehosted on the list dialog (the create's home now): the OWD default, the stored-name preview (with and without a namespace) and the taken-identifier refusal into MetadataListCreateDialog.pairCreate-36897; the app-menu join suite, the OWD select, the labels and the taken-identifier object block onto MetadataListCreateDialog.
  • Converted: about 60 designer and surface suites now open the object on its address (objectName, area routes).
  • Deleted, behaviour removed by this card, each with the pin that remains: StudioDesignSurface.emptyPackage (no in-page empty state), StudioDesignSurface.createObjectOwd (duplicated in MetadataListCreateDialog.pairCreate-36897: chosen and default sharingModel, mode: 'draft'), DataPillar.railSwitchFlush-27511 (its four cases now on the designer's × and ›, heldDataLeave-26705), DataPillar.surfaceRequest (the pillar's own live-request apply; the surface's navigation is pinned in heldDataCreate-26845), DataPillar.draftObjectLabel-11843 (the rail's label read; the header's label is pinned in draftOnlyNoLayers-12508, both the labelled and the label-less draft), StudioDesignSurface.aiApplyRefresh (the rail growing on the pulse); and the rail-only cases inside autosaveSwitch-11232, celGate, actionDeepLink-34724, heldDataLeave-26705 (the rail switch case became × back to the list), StudioRail.noMatches-26733 (Data rail), oneSurface-28572 (pair rows on the rail).
Local runs at a9e7bb7, the CI follow-up at 562d068, the main merges at 046762e and 64a5a2d, and the seat's additions at d09f2b3 / 2bf127d

Main merge after #37185, 64a5a2d7: app-shell closure rebuilt (VERDICT exit 0); app-shell type-check 0 error TS (VERDICT exit 0); every app-shell suite naming the designer, the area, the copilot, the menu model, the permission page, the access redirect or the create dialog, plus every app-shell test #37185 touched (359 files): Test Files 359 passed (359), Tests 3237 passed (3237), VERDICT exit 0. dispatch-gates --commands (39 families) all exit 0; --ran "39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN". Declared narrowing: pnpm --dir ui exec vitest run scripts/ was killed by the container's memory limit at the default worker count (twice, once with nothing else running), so it ran with --maxWorkers=2: Test Files 172 passed | 2 skipped (174), exit 0; CI runs it at its own width. check:test-source-alias exit 0; overlap-check: origin/main merges cleanly.

Seat additions, d09f2b31 (code) and 2bf127d4 (changeset wording): the create dialog's suites plus the create-adjacent surface suites (8 files): Test Files 8 passed (8), Tests 67 passed (67), VERDICT exit 0; app-shell type-check 0 error TS (VERDICT exit 0); eslint 0 errors, no warning on an added line; check:test-source-alias, check:nul-bytes, check:cross-package-test-inputs and check-empty-changeset exit 0; overlap-check: origin/main 0a1b69c0 merges cleanly.

CI at the head, 64a5a2d7: 62 check-runs, 47 success, 15 skipped, 0 failed. CI at 2bf127d4: the same, 45 success, 13 skipped, 0 failed. CI at 046762e5: 58 check-runs, 45 success, 13 skipped, 0 failed (Test UI, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Test Core, Dogfood Regression Gate, Governed Surface Queue Guard, Check Changeset, Check PR Size among the successes).

Main merge, 046762e5 (after #37089 landed; 139 files, +1,601 / −2,489 = 4,090 changed lines against the new merge base): pnpm install, then the app-shell dependency closure rebuilt (lock VERDICT command-exit 0); app-shell type-check 0 error TS (VERDICT exit 0); every app-shell suite naming the designer, the area, the copilot, the menu model, the permission page or the access redirect (258 files): Test Files 258 passed (258), Tests 2237 passed (2237), VERDICT exit 0; dispatch-gates --commands (39 families) all exit 0, --ran "39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN" (a derived zero); overlap-check: origin/main 8b74082f merges cleanly.

Tree of a9e7bb72 = tree of the tested commit 3b4d4722 (79415e13, compared byte for byte; the commits were reworded for the trailer rule before the push, no file changed).

CI follow-up, 562d0689: Test UI (5/16) failed at a9e7bb72 on objectDesignerTabs.test.ts's order pin (this card's own test, unchanged this round): the studio namespace fetches its zh catalogue on demand, so in a worker where no earlier suite had loaded it, t(key, 'zh-CN') answered English. Reproduced locally by running the file alone (1 failed); fixed with the module-top await loadStudioCatalogue('zh') other suites use (alone: 4 passed); app-shell type-check 0 error TS (VERDICT exit 0); check:test-source-alias exit 0; overlap-check: origin/main merges cleanly.

  • The suites this round edits (10 files): Test Files 10 passed (10), Tests 103 passed (103), lock VERDICT command-exit 0 (before the not-found fix; its suite is in the broad run below).
  • Every app-shell suite naming DataPillar, StudioDesignSurface, StudioMetadataArea, StudioAiCopilot, metadataArea or a metadata/object address (259 files): Test Files 259 passed (259), Tests 2211 passed (2211), lock VERDICT command-exit 0.
  • @object-ui/app-shell type-check (src tsc --noEmit, then tsconfig.test.json): 0 error TS, lock VERDICT command-exit 0. eslint --no-inline-config on the edited files: 0 errors (40 warnings, none in a line this round added).
  • dispatch-gates --commands (39 families): all 39 exit 0; --ran reconciliation: "39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN", a derived zero. Re-run at 3b4d4722 after the last commits: check:test-source-alias, check:cross-package-test-inputs, check:nul-bytes, check-empty-changeset, check-changeset-no-major, each exit 0.
  • overlap-check before the push: origin/main merges cleanly; the sibling drafts conflict textually (Acceptance notes).

Ablations, each through scripts/ablation-replace.mjs on committed code, restored, git diff HEAD empty after (the app-shell suites import the source, so no build leg):

Mutation Turned red
unsavedPillarWork without saveBar.dirty (M1) 3 of the 5 new departure cases (› and × over an unsaved edit, the refused Save); the saved-edit and nothing-pending controls stayed green
the Changes link back on packageId (S2) the read-only base's pair-address case
objects back on the history exemption (S3) the object history-address case
the designer tab not seeded from ?tab= (S3) ?tab=hooks and ?tab=history
the discard refusal back on error (S4) the partly refused discard case
the copilot's address read removed (S5) the address cases in both copilot suites (3)
objMissing always false (N8) the not-found case
the object create's publishCreated dropped (d09f2b31) the pinned-publish case and the pair-create case's call shape
the taken holder never this package (d09f2b31) the in-package notice-and-Open case (a first attempt was refused by the tool as a replacement it could not count, so nothing ran; re-run with a countable replacement)

Acceptance notes

Verification

Read first (risk order): views/studio-design/DataPillar.tsx (the removed rail and create, the header and tab block), views/studio-design/StudioMetadataArea.tsx + metadataArea.ts (the mount, the designer-page helper and dataPillarRedirect), views/studio-design/StudioDesignSurface.tsx (the /data redirect, requestSurface and unsavedPillarWork).

Two-minute check: on the showcase app, open an app's 「对象设置」. Expected: the URL is /studio/PKG/metadata/object/NAME, the designer fills the right pane with no object column, the tabs read 记录、字段布局、验证、操作、设置、钩子、API、被引用、历史、源码; › opens the next object on the same tab; × returns to the object list.

Browser walk (rework S1), showcase

Run at a9e7bb72 on a live stack: the showcase backend (objectstack dev --seed-admin, its own port and database, closure built at this head) with the Console's dev server from this branch's ui/ source, Chromium through Playwright, signed in as the seeded admin. In this boot com.example.showcase is a read-only package, so the walk also covers the .custom pair. Every step below passed unless it says otherwise.

Step What was done What the browser showed
1 Object list, click the Account row /studio/com.example.showcase/metadata/object/showcase_account?package=…; the designer fills the right pane beside the left menu, no object column; tab row Records, Field layout, Validations, Actions, Settings, (Hooks, API folded into Advanced at this width), Referenced by, History, Source; ‹ 1 / 24 ›
2 Advanced → Hooks, then › ?tab=hooks; › opened showcase_announcement on the same tab, 2 / 24
3 History tab ?tab=history, the History panel
4 × back to /studio/com.example.showcase/metadata/object?package=…
5 Old link /studio/PKG/data?surface=object:showcase_account&view=x&action=nope /metadata/object/showcase_account?action=nope&package=…&tab=actions (view dropped)
6 Old home /studio/PKG/data the object list
7 /metadata/object/showcase_account/history the designer on ?tab=history
8 Field layout → Add field "Walk Probe" (unsaved), then × the native question "You have unsaved changes. Leave this page anyway?"; dismissed, the designer and the top bar's Save stayed. The walk's next page load was then held by the browser's leave prompt (first run: the navigation aborted while that prompt was dismissed)
9 The running app's Accounts list → ⋮ → Object settings /studio/com.example.showcase/metadata/object/showcase_account?package=…, the designer
10 Object list → 新建 "Walk Gadget" on the read-only package created in the pair: /studio/com.example.showcase.custom/metadata/object/showcase_custom_walk_gadget?package=com.example.showcase.custom, the designer open on it
11 /metadata/object/no_such_object_36904 first run: "Unpublished new object", offered as a new object to design. Fixed in this round (objMissing in DataPillar.tsx, pin in draftOnlyNoLayers-12508); re-run: "Object not found" with the name, × in the header
12 Viewport 1100px Validations, Actions and Settings fold too: Records, Field layout, Advanced, Referenced by, History, Source

Console: 36 Failed to load resource errors over the whole walk; the five read were a 401 (before sign-in) and 404s. Not traced one by one, and nothing on screen failed.

HotCRM: NOT MEASURED. Reason: this session's GitHub access is scoped to objectstack-ai/objectstack, so the HotCRM app (its own repository) cannot be cloned and booted here. The HotCRM leg the card names carries to #36910 (the end-to-end walk-through card) as NOT MEASURED, with this reason.


Generated by Claude Code

…ect the Data pillar

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…the designer suites their object

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
… object's address

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…sts route the area

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
… drop the rail-only cases

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…ilot suites to the designer's address

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…ts reach the designer's address

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…ns the designer's address

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
…iew keeps the generic page

Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 25, 2026
…pported locales, the retired rail's census row, ⌘K on a pillar

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Finalized head for L1 · 2026-11-25T01:20Z · efd179cc41 · zone a4-S (#36904, critical path)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head efd179cc41b2a14ac54f5b02373204871d33f5d5 · 2026-11-25T01:32Z

L1 for card #36904 (Studio 3-2, the object designer on its metadata address). Read-only; nothing built or run at the seat. 135 files, +1,278/−2,460 = 3,738 lines ⇒ Tier H by size (ruling 7145880574): after ACCEPT this hands off to the maintainer; it does not self-land.

Delivery holds on reading: the address switch, redirects, leave guards, tab order and fold (钩子 and API fold first at 1200px, then 1000px), the three tool tabs per decision 8, and 新建 handed to the list dialog. Brief line 1 (ItemToolTabs) is delivered. Brief line 2 (AreaHistoryRedirect): keeping the generic exemption for flows until #36903 / PR #37169 is accepted; objects drop out because they left the pillar table. Declared deviations (copilot address read, the retired-Interfaces latch, the WIP pushes before the overlap check) are accepted.

i18n: clean. No i18n file is touched; seven @object-ui/i18n@18.6.0 keys become unread and stay in place (as on #37089): engine.studio.data.createTaken, .firstObjectHint, .firstObjectTitle, .noObjects, .objects, .pickObject, .searchObjects.

Open

  • M1 — a live guard lost its pin. Deleting DataPillar.railSwitchFlush-27511.test.tsx removed the only test of a guard that still runs on the designer's × and ‹ ›: leaving an object over an unsaved (not held) edit, or one whose Save was refused, asks first; a saved edit leaves without asking. StudioDesignSurface.heldDataLeave-26705 now covers only a held edit, and nothing pins saveBar.dirty on the designer's departures. Fix: carry its four cases onto the designer's × and › on the real surface. Check: dropping saveBar.dirty from unsavedPillarWork (StudioDesignSurface.tsx:485) turns them red.
  • S1 — the browser walk-through is owed on this card. Per the seat's feat(studio): ⌘K on every Studio design page lists the package's menu and items #37108 L1 (7144125191, D2) it cannot be deferred to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910. Run the showcase or a self-built app leg before the hand-off; HotCRM may carry to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910 only as NOT MEASURED, with the reason.
  • S2 — Changes-sheet link uses the wrong scope. StudioDesignSurface.tsx:1230 builds studioItemPath(packageId, 'object', …); on a read-only base with a .custom pair, an object the pair adds lands on an address that does not resolve (the old rail found it). Use draftScope ?? packageId (:451), plus a test.
  • S3 — two behaviours untested: /metadata/object/X/history opening the designer's History tab (the object half of brief line 2), and opening with ?tab=hooks / ?tab=history. Add to StudioMetadataArea.routes-28561 and DataPillar.flatTabs-12450.
  • S4 — the partly-refused discard fix (DataPillar.tsx:1507-1531) has no test that fails on revert; assert the message is still on screen after the re-read in copilotChangesLine-34725.
  • S5 — copilot reading the item from the address (StudioAiCopilot.tsx:90) is tested only through the helper; add a metadata-address case to studioSurfaceContext and studioSurfaceLabel-8219.
  • S6 — internal wording: ui/packages/app-shell/README.md:638-641 still sends an object to /data?surface=object:; the changeset body puts .custom, ?tab=, ?action=, ?view=, ?nav=, ?changes=review and route templates into the CHANGELOG (same class as feat(studio): ⌘K on every Studio design page lists the package's menu and items #37108 S4) — say it in user terms.
  • S8 — undeclared loss: the list dialog's "name taken" notice has no 「打开已有的」 button (DataPillar's had one). Declare it in the PR body, or link the notice to the object's address.
  • Nits (fix or answer in one line each): N1 useRequestedSurface has no product reader left (note for Studio 重构(4-1):删掉分区路由和残留(:packageId/:tab 路由、AREA_PILLAR_FOR_TYPE、pillar 文案、旧 Studio 应用的菜单项) #36909); N2 stale comments at SidebarItemMenu.tsx:57-58, studioAddressTable.ts:73, :112, and the retired-Interfaces redirect goes through /data twice; N3 two control cases not carried over (stored-name preview with no namespace; a label-less draft-only object showing its name in the header); N4 the header now shows the machine name beside the label (Studio 数据栏:「添加字段」常驻工具栏,点列头改字段,名称列排第一,字段属性面板先显示名后内部名 #34794 kept it in the tooltip) — declare it; DataPillar.tsx:841 vs the comment at :330; N7 metadataAddressArtifact reads /metadata/<type>/new as an item named "new"; N8 a designer address naming a missing object shows only a refusal strip.
  • 维护者速读 bullet 4 overstates the deletions: deleted test lines are 1,667 of 3,738 (45%), and the six deleted suites (1,018 lines) also covered in-page 新建, the empty-package page and the live request. Reword it to say so; test changes are 2,365 lines, product code 1,358.

Not blocking this head: S7 — #37089 and #37169 each add their own areaDesignerItemOf with different context shapes; the zone settles on one helper across the three PRs. N5 — #36513 is Refs only; the seat closes it after merge.

Gates. Check-runs at this head: 45 success, 13 expected skip, 0 failed. Clause-②: no and Metadata-protocol: none hold; the app-shell patch bump is right. K = 12, not stale: #37108 and #37121 are inside the merge base; the 12 main commits since touch no Studio file. Whichever of #37089 / #37168 / #37169 lands second merges main.

Next: fix M1 and S1–S6, S8, the nits and the 速读 wording; then the seat reads the delta and hands off to the maintainer (Tier H by size).

The L1 review's M1 and S2-S8 with the nits:
- the unsaved-edit guard (saveBar.dirty) is pinned on the designer's x and next, on the real surface;
- a Changes-sheet object request opens in the package holding the draft (draftScope);
- the history address and ?tab= open their tabs, the partly refused discard keeps its message,
  and the copilot reads the item off the designer's address, each pinned;
- the zone's designer-page helper (AREA_DESIGNER_PAGE_TYPES, areaItemOpensDesignerPage,
  areaDesignerItemOf) replaces the object-only helpers;
- an address naming no object says it was not found (found on the browser walk);
- README, changeset and stale comments in user terms; two dropped controls carried over.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYoFqGdRM9Qmg7M2o2B
…llscreen

Two conflicts, both a collection-time comment beside an import both sides
kept (entryReadsOnce-11797, itemDraftLine-12725): main's comment taken.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYoFqGdRM9Qmg7M2o2B
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 64a5a2d7332aa8f3f78c3eabd53250e1615cb14f
Local-runs: probe — the L1's pin-revert ablations: vitest on nine pinned app-shell suites in a throwaway worktree at this head, baseline green, then nine single-line mutations each restored (worktree clean after, removed)
Scope: no reviewFace hits — record-recognisers.mjs --paths (141 files) decides no face, and the changeset's Clause-②: no carries no (narrowing) arm, so the review is routed to the declaration face (--face declaration, TIER_DEFAULT); the whole diff was read at that tier

① Derived judgments

  • Clause-②: no holds. No packages/spec path, no published schema, and no governed path. No ui/packages/i18n file is in the diff, so no @object-ui/i18n@18.6.0 key is removed. Five released keys become unread in product code: engine.studio.data.firstObjectHint, .firstObjectTitle, .objects, .pickObject and .searchObjects. All five are still in namespaces/studio/en.ts and zh.ts at this head, so the 19.0.0 removal declaration is not owed. engine.studio.data.createTaken is read again (the list dialog's in-package taken notice).
  • Metadata-protocol: none holds. The object create's publish now passes publishCreated (If-None-Match: *). That is an existing MetadataClient.publish option, which the flow create on main already sends (Studio Save: the object extension, hook, action and flow editors still publish unpinned, so two admins saving one of them, the later save silently overwrites the earlier (after #36601) #36726), as does the object Save for a draft-only object. No route, door or wire shape changes.
  • Published exports: @object-ui/app-shell is private: true, and no index, package.json or exports file is touched. @object-ui/components is published but changes only one test file (src/__tests__/clickableNonControlCensus-13461.test.ts), which is outside its files: ['dist', …]. So no shipped content changes, and l1-face's changeset flag on it is a false positive.

② Semver level

@object-ui/app-shell: patch is right. It is a private package and the change is user-visible behaviour with no export change, the same convention as main's app-shell changesets (e.g. #37232). @object-ui/components: no bump owed (test-only).

③ Boundary flags

  • The dev's deviations are answered. The primary-checkout edits were moved to a worktree with nothing lost, and the primary checkout was put back on the branch. The trailer re-commit has the same tree (79415e13). Six pushes, two of them forced by sibling merges. The body went through the relay. The seat's added items were done in-round. open_questions is empty, and security_findings is none.
  • SQL push-down: no new id materialisation and no in-app join over records. The taken-holder check reads the target package's object list (loadPackageSurfaces) and tests one name client-side. That is a metadata catalogue read, the same shape as feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169's flow side and the retired rail, with no SQL in play. Not a finding.
  • Both merges are clean against git merge-tree --write-tree of their parents:
    • 046762e5: 15 conflicted files, and the tree differs from merge-tree only in those 15. Each was resolved toward both designers.
    • 64a5a2d7: 2 conflicted files, and the only difference is the conflict markers dropped with main's comment kept.
  • The red at d09f2b31 was concurrency cancellation from the 2bf127d4 push (20 cancelled lanes, and the three aggregators failing on cancelled). 2bf127d4 changes only the changeset line. Both 2bf127d4 and this head show 47 success, 15 skipped and 0 failed.

Implemented-by: claude/issue-36904-object-designer-fullscreen
Reviewed-by: session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head 64a5a2d7332aa8f3f78c3eabd53250e1615cb14f · 2026-11-25T08:16Z

This is the delta L1 on the rework of L1 7149684173 (2026-11-25T01:32Z, head efd179cc), for card #36904. Since that head there are four commits of this PR's own (a9e7bb72, 562d0689, d09f2b31, 2bf127d4) and two merges of main (046762e5, 64a5a2d7). The diff is 141 files, +1,676/−2,501 = 4,177 lines, so it is Tier H by size (ruling 7145880574) and goes to the maintainer after this.

Prior findings

  • M1 — closed. heldDataLeave-26705 carries the rail-switch suite's four cases onto the designer's › and × on the real surface, plus a nothing-pending control. Ablated here by dropping saveBar.dirty from unsavedPillarWork: 3 of the 5 new cases go red (› and × over an unsaved edit, the refused Save). The two controls stay green.
  • S1 — closed. The PR body has a 12-step showcase walk at a9e7bb72, including the read-only base's .custom create. It found N8, and N8 was re-run after the fix. HotCRM is recorded as NOT MEASURED, with the reason that the repository is outside the session's GitHub scope, and is carried to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910 (see "For landing").
  • S2 — closed. requestSurface builds the object address on draftScope. Ablated here back to packageId: the pair-address case in heldDataCreate-26845 goes red.
  • S3 — closed.
    • Putting objects back on the history exemption turns the history-address case in StudioMetadataArea.routes-28561 red.
    • Not seeding the tab from ?tab= turns the ?tab=hooks and ?tab=history cases in DataPillar.flatTabs-12450 red.
  • S4 — closed. The refusal is now its own discardRefusal state. Rendering only error turns the partly-refused case in copilotChangesLine-34725 red.
  • S5 — closed. Removing the copilot's address read turns the address cases red in studioSurfaceContext (2) and studioSurfaceLabel-8219 (1).
  • S6 — closed. app-shell/README.md now sends an object to its designer's address. The changeset is in user terms and no longer carries .custom, query keys or route templates.
  • S7 — closed. feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089's AREA_DESIGNER_PAGE_TYPES / areaItemOpensDesignerPage / areaDesignerItemOf are adopted, and the list reads ['permission', 'object']. metadataAddressArtifact and areaItemOpensObjectDesigner are gone. AreaItemOpen mounts by type, and only objects defer to the generic page on ?review=1 or the environment scope.
  • S8 — closed. When the target package holds the name, the list dialog shows engine.studio.data.createTaken with 「打开」 to studioItemPath(target, 'object', name); otherwise it shows createTakenElsewhere with no Open. onOpenExisting?: (path: string) => void and the ResourceListPage wiring match feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169 byte for byte, and only the holder test differs (at, the create's target, against feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169's here). Making the holder never this package turns the in-package case red.
  • Seat-added publish — closed. The object create publishes with publishCreated. Dropping it turns two cases red: the pinned-publish case and the pair-create call shape.
  • N1, N2, N4 — answered in Acceptance notes:
  • N3 — closed. The bare-identifier preview (pairCreate-36897) and the label-less draft-only title (draftOnlyNoLayers-12508) are carried over.
  • N5 — open, on the seat. Studio 对象页页签顺序(业务在前、技术在后)和顶部导航的排法(去掉「界面」后的四个分区):顶部导航先出图再做 #36513 stays Refs, and the seat closes it after merge.
  • N7 — closed. areaDesignerItemOf reads TYPE/new as the create page and pins it.
  • N8 — closed. objMissing shows engine.form.objectNotFound, an existing key. Forcing it false turns the not-found case red.
  • 速读 bullet 4 — closed, apart from N9. Tests −1,684, the six deleted files 1,018 lines, tests +1,051, product code 1,417: all match the head diff.

Zone claims checked

  • Merges:
  • The red at d09f2b31 was cancellation, not code: the 2bf127d4 push cancelled 20 lanes and the three aggregators failed on cancelled. 2bf127d4 changes one changeset line, and its own check-runs show 47 success, 15 skipped, 0 failed.
  • AreaHistoryRedirect: the pillarItem line is kept, and feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169's head keeps it too. Whichever lands second deletes it.
  • i18n: no ui/packages/i18n file is in the diff, so no @object-ui/i18n@18.6.0 key is removed. The five keys that become unread in product code (engine.studio.data.firstObjectHint, .firstObjectTitle, .objects, .pickObject, .searchObjects) stay in the studio catalogue. Clause-②: no holds, and no 19.0.0 declaration is owed.

Gates and shape

  • Shape: open, draft, base main, Fixes #36904 on line 1. No closing keyword binds another card. Clause-②: no and Metadata-protocol: none hold (no protocol, route or wire change; the publish precondition is an existing client option).
  • Check-runs at head: 62 runs, 47 success, 15 skipped (all expected), 0 failed. Lint & Repo Gates and TypeScript Type Check are both success.
  • K = 8 against origin/main d62f9e9c, merge base ad604c10. Not stale: none of the 8 touches a file this PR changes. feat(studio): one table holds the menu's type order and its 常用 / 高级 tier #37232 adds studioMenuPlacement.ts only, and origin/main merges cleanly.
  • Published exports: none. @object-ui/app-shell is private: true, with no exports/index change, and the patch bump is right. l1-face flags @object-ui/components for a missing changeset. That is a false positive: the only change is one test file outside its files: ['dist', …].
  • Changeset, read sentence by sentence against the code:
    • "beside the left menu … own address" holds (AreaItemOpen).
    • "no column … 「新建」 … OWD, menu, customization package" holds.
    • "already used by an object in that package … offers to open it" holds (at is the create's target package).
    • The tab order and fold sentences hold (objectDesignerTabs.ts, dataTabsFold.ts).
    • "Old links still work" holds (dataPillarRedirect keeps ?changes=review).
    • The two "Fixed on the way" sentences hold (discardRefusal, objMissing).
  • Pins: nine pin-revert ablations were run at this head in a throwaway worktree. The baseline was green (9 files), all nine mutations went red as listed above, and the tree was clean after each.
  • Overlap:

Nits

  • N9 — 速读 bullet 4 says 约 4100 行. The head diff is 4,177 lines (约 4200).
  • N10 — the PR body's CI tally at head (58 runs, 45 success, 13 skipped) is stale. The head now has 62 runs: 47 success, 15 skipped, 0 failed.
  • N11 — pairCreate-36897's pinned-publish case asserts only that publishCreated is passed (publishSavedItem is mocked). Its title says a later row "is refused", but the refusal path through the object create is not exercised, and d09f2b31 was not on the browser walk. The live risk is low, because the object Save for a draft-only object already sends the same If-None-Match: * publish.

For landing (seat)

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

维护者速读

席位意见:通过。上轮的必改项和应改项都已修好;9 个关键测试逐一撤回改动后都会变红;两次合并主干都干净;检查全绿。剩 3 处小瑕疵(速读行数、正文里的 CI 计数、一个测试只验了参数),不影响合并。与 #37166、#37169 有冲突,后落地的那张合入主干。

Hand-off · 2026-11-25T08:17Z · @os-zhuang — PR #37168 (card #36904) is ready for your review. Tier H by size (4,177 changed lines). Seat ACCEPT 7156828103 and contract review PASS 7156818159 (TIER_DEFAULT), Head-sha 64a5a2d7332aa8f3f78c3eabd53250e1615cb14f; 0 failed check-runs. After your approval the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 25, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 25, 2026 08:18
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 1b91538 Nov 25, 2026
71 of 72 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36904-object-designer-fullscreen branch November 25, 2026 08:40
os-justin pushed a commit that referenced this pull request Nov 25, 2026
…side the flow designer; the designer-item history exemption goes with the last pillar type)

Claude-Session: https://claude.ai/code/session_01QSeKYnHH41MS5hWVGPia4F
Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ess; the sharing overview gets its own route (objectstack-ai#37089)

Fixes objectstack-ai#36905

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:管理员在 Studio 里点开一个权限集,右侧整块显示权限矩阵,左上角 ×
回到权限集列表,页签里能看引用、历史和源码;「谁能看到哪些记录」有了自己的页面,在左侧菜单「访问」里;旧书签自动跳到新地址。
- 为什么做:Studio 重构专题里「权限集矩阵全屏、默认共享总览独立」这一项,让权限集和其他元数据一样从列表点开、全屏编辑。
- 出错会怎样:有未保存修改时点 ×、切菜单、刷新或关标签页会先问(浏览器后退键不问);AI 留下的草稿有提示并可一键放弃;本改动可以直接撤回。
- 要你做什么:这个改动超过 3,000 行(主要是删掉旧的权限侧栏和只为它服务的测试),按您的安排开发完等您审核合入。

## What changes

A permission set now opens full-screen at its metadata address, and the
organization-wide default sharing overview has a route of its own. The
Access pillar draws no page any more: every address it answered
redirects.

Three facts for the reviewer, up front:

- **No published string is removed.** The 15 studio catalogue rows only
the pillar read (`engine.studio.access.*` of its rail and create dialog,
and `engine.studio.owd.railLabel`, en and zh) ship in the released
`@object-ui/i18n`, so they stay in
`ui/packages/i18n/src/namespaces/studio/en.ts` and `zh.ts`,
byte-for-byte as on `main`, unread. `check:i18n-dead-keys` lists them as
candidates (report only), as it does other unread rows.
- **Merged with objectstack-ai#37108** (⌘K on every Studio design page): `origin/main`
is merged at `709d2c1e`, and objectstack-ai#37108's palette and ⌘K pins now expect the
set's address and the overview's route.
- **The browser's Back button is not guarded** (epic objectstack-ai#36890 decision
12): ×, ‹ ›, the left menu, ⌘K, Back to app, a reload and a tab close
ask before unsaved edits are dropped; Back does not.

1. **The set's full-screen page** (`StudioPermissionSetPage`, new). On a
package's leg, `/studio/PACKAGE/metadata/permission/NAME` opens the
matrix (`PermissionMatrixEditPage`, its Studio presentation) in the area
instead of sending the set to the Access pillar
(`AREA_DESIGNER_PAGE_TYPES` / `areaItemOpensDesignerPage` in
`metadataArea.ts`). The header is the full-screen detail's
(`ResourceDetailHeader`, from objectstack-ai#36892/objectstack-ai#36901): × back to the list with
its context, ‹ › through it, label (the machine name on its tooltip),
type and package, ⋯. The tab row is the matrix's five sections, then
`ItemToolTabs`' References, History (with the audit log) and Source; a
tool tab is addressable (`?tab=`) and keeps the matrix mounted and
hidden. The matrix gains one optional seam for this, `studio.frame`
(`renderHeader`, `toolOpen`, `toolPanel`, `onDraftChangesRead`); without
it the matrix draws its own header exactly as before. The cross-package
leg (`/studio/~all/...`) keeps the matrix's environment page.
2. **What the pillar drew around the matrix comes along.** Discard
draft, Explain access, the suggested-audience strip, and on a read-only
base "New similar": in ⋯ on the page, and as a row action on the base's
own rows in the list of sets (`ResourceListPage`; not on its pair's
rows). The copy opens at its own metadata address with the strip saying
where it landed (`permissionNewSimilar.tsx`, shared by the page and the
list). Unsaved edits: the matrix registers with the shell's leave guard
and the top bar's Save, so ×, ‹ ›, the menu, a reload and a tab close
ask first; the browser's Back is not guarded (epic decisions 1 and 12).
A discard sends a never-published set back to the list only when the
package's sets were read and it is not among them: an unanswered read
keeps the page on the set.
3. **Card item 6, decided here.** An AI-written pending draft (copilot
or MCP) gets the designers' notice (`StudioAiDraftNotice`) with 「放弃 AI
的改动」, which drops that one set's draft at its package and asks first
only when the matrix holds unsaved edits: the rule objectstack-ai#37026 applied to the
generic item page. A person's own leftover draft keeps Discard draft
(decision 14). The matrix reports the draft's `draftChanges` from the
read it already makes; no new request. Issue objectstack-ai#36660 stays open: this PR
applies its rule on the permission set page only; hooks, added actions
and the sharing overview's rows are still its scope.
4. **The sharing overview's own route**, `/studio/PACKAGE/owd`
(`StudioOwdOverviewPage`, new; `studioOwdOverviewPath`,
`STUDIO_OWD_SECTION`), the Access group's menu entry
(`studioMenuModel.ts`: its `to` and the current-entry mapping). A set's
per-object visibility badge opens it on that object (`?object=NAME`).
Its one read-only mark is the header's (objectui#12453), so the panel's
own duplicate is gone.
5. **Address switch.** `permission` leaves `STUDIO_ITEM_PILLAR`, so
`studioItemPath` (the palette, the AI artifact links, every producer)
answers the metadata address; the menu's designer types are named
explicitly so a permission set keeps its entry.
`/studio/PACKAGE/access?surface=permission:NAME` redirects to the set's
address, `?surface=owd:overview` to the overview, a bare `/access` to
the list of sets, other parameters kept (`accessPillarRedirect.ts`). A
set a read-only base's `.custom` pair adds (every "New similar" copy
among them) was listed on the base's pillar and opened at the pair,
writable, while the address named the base: its old address now opens at
the pair's, `/studio/PAIR/metadata/permission/NAME?package=PAIR`. For an
address that names a set, `AccessPillarLanding`
(`accessPillarLanding.tsx`, new) reads the base's and the pair's sets,
published and draft, as the pillar listed them, and
`accessPillarSetHolder` decides: the base when it holds the name, else
the pair when it does, else the base; a failed pair read lists none of
the pair's sets, a failed base read stays on the base. The pair is the
spec's pairing rule (`customizationPackageId`), as the list of sets
derives it. Every other address redirects at once.
`.../permission/NAME/history` opens the History tab:
`AreaHistoryRedirect`'s own-editor exemption no longer covers a designer
page. The address table's rows say where each moved (`redirectsTo`).
6. **The copilot keeps its context.** The pillar put the set in
`?surface=`; the page's address carries it in the path, so the copilot's
surface context reads a designer page's address too
(`areaDesignerItemOf`, pillar `metadata`), and the page reports its
label, so the chip still reads 「正在看:权限 · 组织成员」 (objectstack#35018). Only
designer-page types are read this way, and
`PACKAGE/metadata/permission/new` (the area's create page) is no item;
every other area item is unchanged.
7. **Card item 5: the Access pillar and its rail are deleted**
(`AccessPillar.tsx`, maintainer's answer on epic objectstack-ai#36890, comment
7145880574: this card, reviewed by the maintainer as Tier H by size).
Five test files go with it (`accessCreateTaken-26836`, `accessGuard`,
`accessRailLabelLive-26846`, `accessRailLabels-11862`,
`accessTabs-12456`), and the Access cases of
`StudioRail.noMatches-26733`, `emptyStates-12514`,
`readOnlyWording-11781`. Not all of that was pillar-only:
`accessTabs-12456`'s matrix cases (the five tabs and sections, the facet
panels kept mounted for the Save gate, the bulk strip with keyboard
focus, the CRUD write, the sharing chip and the object count) and
`accessCreateTaken-26836`'s discard cases (a declined question, a
never-published set, a read-only package) moved to the page's pin; what
went is the rail, the pillar's own header and its create dialog. The
other pins of behaviour that lives on moved to the page too: the
matrix's Studio Save (`studioSave-36511`, `saveSurface-12725`), New
similar (`accessNewSimilar-28573`, now through ⋯), the suggestions strip
on a read-only package (`accessSuggestionsReadOnly-33158`), the zh
wording (`accessWording-34795`), the status place (`statusPlace-12524`)
and the read-only banner. The page keeps objectstack#34795's ruling: the
set's machine name is the title's tooltip, so its header draws no
API-name chip.

## Tests

<details><summary>New pins</summary>

- `StudioPermissionSetPage.fullScreen-36905.test.tsx` (26 in round 1):
the detail header and no matrix header; section and tool tabs; a tool
tab addressable and the matrix kept mounted; × to the list; Discard
draft at the set's package, CONTROL none without a draft; a declined
question discards nothing; a never-published set's question and its
discard back to the list, CONTROL a published set stays and re-reads; no
discard on a read-only package; an unanswered sets read keeps the AI
discard on the set; the AI notice for copilot and mcp drafts and its
discard without a question on a clean page, CONTROL a person's draft;
New similar in ⋯ landing at the copy's address with the strip, the
no-package answer, CONTROL none on a writable package; the matrix's five
sections (order and landing, each section, facets kept mounted, the bulk
strip on every row, keyboard focus, CRUD and the header's count, the
sharing chip opening the overview on its object and the object count).
- `metadataAreaHost.scope-28561.test.tsx` (+4, "New similar" on a
read-only base's rows): the base's row offers it and its pair's row does
not; the copy opens at its metadata address in the package the clone
door names; an answer naming no package opens nothing and says so;
CONTROL a writable package offers none. The list's create button is
queried by its new test id (`metadata-list-create`), not its label,
which "New similar" no longer collides with.
- `accessPillarRedirect.test.ts` (7): set, overview, bare and unknown
surfaces, parameters carried; a set held in the pair opens at the pair's
address while the overview and the list stay on the base; the set name
an address opens; the holder decision (the pair's set, CONTROL the
base's own set even when the pair holds the name too, neither, a failed
pair read, a failed base read).
- `StudioDesignSurface.accessPairCopy-29674.test.tsx` (+4, the retired
pillar's address through the real surface):
`/studio/BASE/access?surface=permission:COPY` lands on
`/studio/PAIR/metadata/permission/COPY?package=PAIR`, the copy reads
Custom and an edit saves at the pair; a set created in the pair, still a
draft, lands there too; the address's other parameters reach the
redirect and ride along (`?ref=bookmark`; `?changes=review` is consumed
by the surface, which opens the drawer); CONTROL the base's own set's
old address stays on the base and reads Package.
- `StudioPermissionSetPage.fullScreen-36905.test.tsx` (+3, the sharing
chip's leave guard): with a dirty matrix the chip asks the unsaved-edits
question once, and declined the page stays on the set with the edit;
confirmed it opens the overview on its object; CONTROL a clean matrix
asks nothing.
- `StudioMetadataArea.routes-28561.test.tsx` (+4): the set opens in
place on writable and read-only packages, CONTROL the cross-package leg
keeps the generic page, the old history address opens the History tab.
- `metadataArea.test.ts`, `studioAddress.test.ts`,
`studioMenuModel.test.ts`: the predicate, the address reader (the create
page is no item), `studioOwdOverviewPath`, the moved rows agree with the
redirect, the menu entry and current key.

</details>

<details><summary>Pins moved to the new addresses</summary>

- From objectstack-ai#37108 after the merge: `StudioDesignSurface.metadataArea-28561`
(⌘K's Default sharing from a set's page opens `/studio/PACKAGE/owd`),
`StudioPaletteGroups.surfaceScope-36900` (an item opens at
`/studio/PACKAGE/metadata/permission/NAME?package=PACKAGE`, the menu
entry at `/studio/PACKAGE/owd`), `studioPaletteModel-36900` (leave,
re-enter and stay read on the set's address; the overview's route is a
leave).
- `StudioRoute.metadataArea-28561` (console): the Studio gate refuses
`/studio/PACKAGE/owd` as it refuses the old overview address.
- `StudioDesignSurface.pillarNavGuard.test.tsx`: decision 12 on the set
page and the overview page (menu, Back to app, the shell seam; dirty
matrix and dirty overview rows; CONTROL clean).
- `StudioDesignSurface.accessPairCopy-29674.test.tsx`: a pair's copy at
the pair's address lists the base's objects, saves at the pair, names
the base by its label, reads Custom; CONTROL the base's own set. Its
docstring now claims only the header's half it reads.
- `StudioItemHeader.statusPlace-12524`: the read-only link is a direct
child of the page's action group, the group a direct child of the
actions slot.
- `StudioDesignSurface.aiChipLabel.test.tsx`: the chip and the agent's
surface context on the set page.
- `accessSegment-12452`: the old Access address lands on the list of
sets with its entry current. `notFound-26708`, `readOnlyPosture-12453`,
`pillarsClaimSlot-12725`, `rightSlot-12725`, `backToApp-36501`,
`changesCount-11787`, `copilotDraftBadge-12725`, `publishPosture-12517`
used the Access pillar as "a package page that claims nothing"; they use
the overview page now.

</details>

<details><summary>Ablations (four, each reverted)</summary>

- Round 1: `const aiDraft = …` forced to `false` through
`scripts/ablation-replace.mjs`: anchor 1 → 0, blob `3dc44aa6` →
`fdd76cfd`; the AI-draft describe went 2 failed, 1 passed (the CONTROL);
restored blob == HEAD `3dc44aa6`, `git diff HEAD` empty.
- This round, on `11aaddcc`: the never-published test put back to
`!read?.published.has(name)` through `scripts/ablation-replace.mjs`:
anchor 1 → 0, blob `3ac18e32` → `0923112b`; the page's discard cases
went 1 failed (the unanswered-read pin), 9 passed (the published CONTROL
among them); restored blob == HEAD `3ac18e32`, `git diff HEAD` empty. A
first pass on `3d7c1d00` stayed green: the pin asserted the address
right after the reset and raced the navigation, so it now waits for the
re-read only a page that stays makes.
- Round 3, on `7d5d87bd` (tree identical to `79987757`): the landing's
holder ignored (`{ setHeldIn: holder ?? packageId }` → `{ setHeldIn:
packageId }` in `accessPillarLanding.tsx`) through
`scripts/ablation-replace.mjs`: anchor 1 → 0, blob `f9502964` →
`169d7fcc`; `accessPairCopy-29674` went 3 failed (the copy, the pair's
draft, the carried query), 8 passed (the base's CONTROL among them);
restored blob == HEAD `f9502964`, `git diff HEAD` empty.
- Round 3, on `7d5d87bd`: the chip's guard removed
(`confirmUnsavedLeave(() => navigate(…))` → a bare `navigate(…)` in
`StudioPermissionSetPage.tsx`) through `scripts/ablation-replace.mjs`:
anchor 1 → 0, blob `3ac18e32` → `2b68c388`; `fullScreen-36905` went 2
failed (declined and confirmed both ask once), 27 passed (the clean
CONTROL among them); restored blob == HEAD `3ac18e32`, `git diff HEAD`
empty. A first spelling was refused by the tool before anything ran (its
replacement was a substring of the anchor, so the replacement count
could not rise).

</details>

## Acceptance notes

- `StudioDesignSurface`'s `PILLAR_FOR_SURFACE_TYPE` still routes a
`permission` surface request through `/access?surface=`, and its "open
Access" toast action through bare `/access`; both now land via the
redirect. They go with the pillar routes in objectstack-ai#36909.
- `PermissionMatrixEditor`'s Studio header without a `frame` (its own
`StudioItemHeader`, History button and ⋯) has no Studio host since the
pillar is gone; 13 of the matrix's own unit tests still render it, so it
stays this round and its doc comments say so. Deleting it with those
tests' rewrite goes with objectstack-ai#36909. The matrix's prop docs no longer name
the Access pillar as their host.
- On a pair's leg the provenance chip reads Custom for every set
(`customizationMark: 'added'`): a permission set takes no override
(ADR-0005), so a set the pair holds is one it adds.
- The suggested-audience strip draws on every set page, as it drew above
every set in the pillar.
- `node scripts/pm/overlap-check.mjs` on `7d5d87bd` (tree identical to
`79987757`): `origin/main` (`3b4f0b98`) merges cleanly; objectstack-ai#37185 merges
cleanly; objectstack-ai#37168 and objectstack-ai#37169 (open) conflict on `StudioAiCopilot.tsx`,
`StudioDesignSurface.tsx`, `StudioMetadataArea.tsx`, `metadataArea.ts`,
`studioAddress.ts`, `studioMenuModel.ts` and their tests; objectstack-ai#37166 now
conflicts on `StudioDesignSurface.notFound-26708.test.tsx`, a file this
round does not touch. Whichever lands second rebases.
- The seat's L1 REWORK (7150986891) on the contract review (7150969735):
M1 fixed (item 5, pinned in `accessPairCopy-29674` and
`accessPillarRedirect.test.ts`, ablated); S1 fixed (the chip's
dirty-matrix cases, ablated); N1 fixed (the carried-query case through
the real surface). The pair redirect reads the spec's pairing rule
rather than the surface's `pairId`: that value is set only once the
package list and its manifests answer, and a failed manifests read
leaves it unset, which would hold the redirect forever.
- Review nits from the seat's L1 (7147848289): N1 above; N2, N3, N4, N7,
N8 and N10 fixed in the pins and comments named in Tests; N5 fixed
(`areaDesignerItemOf` reads `permission/new` as no item); N6 fixed and
pinned (the unanswered-read case, ablated above); N9 in item 3.

## Verification

First to read:
1.
`ui/packages/app-shell/src/views/studio-design/StudioPermissionSetPage.tsx`
— the page; the discard paths (`dropDraft`) and the New similar landing.
2.
`ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx`
— the `frame` branch of `renderStudio`: the sections stay mounted under
a tool tab.
3. `ui/packages/app-shell/src/views/studio-design/StudioAiCopilot.tsx` —
the copilot's context now reads a designer page's path.

Two-minute check: on HotCRM, open
`/studio/PACKAGE/access?surface=permission:NAME` from an old bookmark —
it lands on `/studio/PACKAGE/metadata/permission/NAME?package=PACKAGE`,
the matrix full-screen with × in the header (for a "New similar" copy on
a read-only base, on
`/studio/PACKAGE.custom/metadata/permission/NAME?package=PACKAGE.custom`,
writable); the menu's Access group opens 「谁能看到哪些记录」 at
`/studio/PACKAGE/owd`.

<details><summary>Local runs</summary>

Round 3, head `79987757` (tree identical to `7d5d87bd`, where these ran;
only the two commit messages' trailer pair was reworded), through
`scripts/pm/os-verify-lock.sh`:

- `ui/packages/app-shell/src/views/studio-design/` whole directory: 299
files passed, 2206 tests.
- `ui/packages/app-shell` `type-check` (both `tsc` programs): exit 0, 0
errors.
- eslint `--no-inline-config` on the six touched source and test files:
exit 0, 0 errors (11 warnings, every one on an untouched line of
`StudioDesignSurface.tsx`).
- Run one by one, exit captured before any pipe, each exit 0:
`check:test-source-alias` (also on `79987757`), `check:nul-bytes`,
`check:cross-package-test-inputs`, `check:undeclared-dep-imports`,
`check:tier-file-adoption`, `check:published-files`,
`check-empty-changeset.mjs`, `check-adr-0087-registration.mjs`,
`check-changeset-no-major.mjs`, `check-closing-keyword-parity.mjs`. The
other 28 families of the same 38-family derivation read no file this
round changes and were green on `bcde26a0`; CI runs them all.

Round 2:

`objectstack-ai/objectstack`, head `bcde26a0` (origin/main merged at
`709d2c1e`), through `scripts/pm/os-verify-lock.sh`:

- Affected UI set on `80bd343a` (73 files: every test this PR adds or
edits, plus each that names the page, the list page, the area's address
reader, the palette or the overview's route): 73 passed, 938 tests; the
15 files `bcde26a0` then edited re-run there: 15 passed, 108 tests. CI
runs the whole UI farm.
- `ui/packages/app-shell` `type-check` (both `tsc` programs) on
`bcde26a0`: exit 0.
- `check-i18n-call-site-keys.mjs` exit 0; `check-i18n-dead-keys.mjs`
exit 0 (report only; the 15 restored rows are listed as candidates).
- `dispatch-gates.mjs --commands` (same 38 families on `80bd343a` and
`bcde26a0`): run one by one, exit captured before any pipe.
`check:test-source-alias` exit 1 on `80bd343a` (15 surface tests this PR
edits now reach the palette's `import('@object-ui/plugin-detail')` since
objectstack-ai#37108; collection-time import added in `bcde26a0`), re-run exit 0;
every other family exit 0; `pnpm --dir ui exec vitest run scripts/` 172
files passed, 2 skipped, 5130 tests. `--ran` reconciliation: 38 derived,
38 run, 0 NOT-MEASURED, every line with its exit code. On `bcde26a0`
re-run: `check:test-source-alias`, `check:undeclared-dep-imports`,
`check:cross-package-test-inputs`, `check:type-check-debt`,
`check:nul-bytes`, each exit 0.

</details>

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

<!-- 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
…dio-design reads and writes send the stored bearer token (objectstack-ai#37185)

Fixes objectstack-ai#37080

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:浏览器里只剩登录令牌(会话 Cookie 被替换、拦截或清掉)的用户,侧边栏、应用头部、命令面板和 Studio
入口里的应用包列表不再消失,AI 对话列表、建议权限绑定、提交历史、草稿面板等也正常加载;只用 Cookie 登录的用户看不到任何变化。
-
为什么做:控制台其它请求都会带上登录令牌,这一批读写漏带,属于"控制台登录状态体验"这一块的缺陷,替所有处于这种登录状态的用户解决,并加了一道测试防止以后再写出漏带令牌的请求。
- 出错会怎样:最坏情况是这些地方重新读不到数据,与修复前一样;不改服务端接受什么、不改登录方式,可以直接撤回。
- 要你做什么:无。

## What changes

Same-server `/api/` reads and writes in app-shell and the console that
called the bare global `fetch` with `credentials: 'include'` (the
session cookie and nothing else) now go through
`createAuthenticatedFetch` from `@object-ui/auth`, exactly as objectstack-ai#37077 did
for the Setup pages: built per call (`createAuthenticatedFetch()(input,
init)`, a local `authFetch` in each module), `credentials: 'include'`
kept on every call, so the cookie still rides along and a `401` now
reaches the console's session-ended check. No second auth-fetch helper
and no new export. Nothing changes in what the server accepts.

The measured case: under a bearer-only session, `readPackagesPayload`
(`GET /api/v1/packages`, the session's held package list read by the
sidebar, the app header, the command palette and the Studio entries)
sends the bearer and the list loads (pinned below).

### The family, measured at `origin/main` 63ab479

79 non-test files under `ui/packages/app-shell/src` and
`ui/apps/console/src` contain `credentials: 'include'`. Read call by
call (AST scan of every `credentials: 'include'` property and the call
it is handed to):

**Converted here: 64 calls in 39 files.**

| File | Calls |
|---|---|
| `app-shell/.../studio-design/packages-io.ts` | `readPackagesPayload`
(`GET /api/v1/packages`, the measured case),
`ensureCustomizationPackage`, `duplicatePackage` |
| `app-shell/.../studio-design/packageCustomizations-io.ts`,
`PackageSwitcher.tsx`, `AutomationsPillar.tsx`, `FlowItemMoreMenu.tsx` |
1 each (customizations read, switcher list, automation status, flow
clone) |
| `app-shell/src/hooks/useConversationList.ts` | 4 (list, detail,
rename, delete) |
| `app-shell/src/hooks/useChatConversation.ts` | 3 (read, create,
update) |
| `app-shell/src/console/ai/buildDebugApi.ts` | 1 (build-debug report) |
| `app-shell/src/hooks/useAiUsage.ts` | 1 |
| `app-shell/src/services/suggestedBindingsApi.ts` | 4 (list, confirm,
dismiss, reopen) |
| `app-shell/src/preview/commitHistory.ts` | 2 (timeline, revert) |
| `app-shell/src/preview/DraftChangesPanel.tsx`,
`UnpublishedAppBar.tsx`, `usePendingDrafts.ts` | 2, 1, 1 |
| `app-shell/src/preview/flowDraftChecks.ts` | the default transport
(`opts.fetchImpl ?? createAuthenticatedFetch()`) |
| `app-shell/src/views/changeOwner.ts` | the fallback transport
(`apiFetch ?? createAuthenticatedFetch()`) |
| `app-shell/src/views/metadata-admin/` `PackageFormDialog.tsx`,
`catalog-activation.ts`, `permission-set-clone.ts`,
`sharing-rule-catalog.ts` | 1, 2, 1, 1 |
| `app-shell/src/views/metadata-admin/inspectors/`
`FlowReferenceField.tsx`, `connector-input-fields.ts` | 2, 1 |
| `app-shell/src/views/metadata-admin/previews/` `FlowRunsPanel.tsx`,
`useFlowNodePalette.ts`, `PagePreview.tsx` | 1, 1, 2 |
| `app-shell/src/views/setup/` `packagedActionLedger.ts`,
`packagedFlowLedger.ts` | 2, 1 |
| `app-shell/src/hooks/` `useRecordApprovals.ts`, `sharedUserFeeds.ts`,
`useInboxBell.ts` | 1 each |
| `app-shell/src/console/` `AppNoAccessEmptyState.tsx`,
`connect/ConnectAgentWidget.tsx`,
`deployment-notice/deploymentNoticeState.ts` | 1, 2, 2 |
| `app-shell/src/console/marketplace/marketplaceApi.ts` | 5 same-server
calls onto the existing `serverFetch` (`/cloud-connection/install`,
`install-namespace`, `installation`, and on the control plane its own
`install_package` action and installed-state route) |
| `app-shell/src/layout/designModeMenuSave.ts` | 1
(`/api/v1/i18n/locales`) |
| `app-shell/src/layout/ContextSelectors.tsx` | 1, with `{
sameOriginOnly: true }`: the endpoint is author-written
(`optionsSource.endpoint`) and may name another host |
| `console/src/pages/developer/` `AgentConnectSection.tsx`,
`IntegrationsPage.tsx` | 2, 1 |
| `console/src/pages/auth/DeviceAuthPage.tsx` | 3 (claim, approve, deny:
a signed-in act) |

Of the card's named ones: `packages-io.ts` `readPackagesPayload`,
`useConversationList`, `useChatConversation`, `suggestedBindingsApi` and
the studio-design writes (ensure-customization, duplicate,
customizations, flow clone) are all converted. `suggestedBindingsApi`,
`useRecordApprovals`, `sharedUserFeeds`, `useInboxBell`,
`ConnectAgentWidget`, `deploymentNoticeState` and three `marketplaceApi`
calls already set the bearer header by hand (`authHeaders` /
`bearerAuthHeaders` / `withEnvAuth`), so those were not cookie-only;
they are converted anyway for the session-ended check and the one
mechanism, and their hand-rolled header is left in place (the wrapper
sets the same value).

**Already authenticated or injected (not the family): 24 files.**
`settings/api.ts`, `AuditLogPage.tsx`, `approvalsApi.ts`,
`studioEntry.ts`, `ExcelImportBar.tsx`, `CloudAiModelStatus.tsx`,
`useEnvironmentEntitlements.ts`, `storageUsageEndpoint.ts`,
`ImpersonationBanner.tsx`, `useImpersonationExit.ts`,
`RecordAttachmentsPanel.tsx`, `RecordDetailView.tsx`,
`useConsoleActionRuntime.tsx`, `AccessExplainPanel.tsx`,
`MetadataTypeActions.tsx`, `PackagesPage.tsx`,
`DatasourceResourcePage.tsx`, `personalViews.ts`,
`connectorConnections.ts`, `connectorCredentials.ts`, and the injected
transports of `myPreferences.ts`, `slackDoors.ts`, `orgEnvironments.ts`,
`useLauncherApps.tsx`. `App.tsx` names the string in a comment only.

**Left, on the pin's shrink-only list: 21 calls in 15 files**, each with
its reason in the pin (`sameServerFetch.bearer.ratchet.test.ts`,
`ALLOWED`):

- `console/src/LocalizationFetchProvider.tsx` (1) and
`console/src/languageSeed.ts` (not counted by the pin: it hands
`sharedGetJson` a transport argument that may be `undefined`): the boot
read of `/api/v1/auth/me/localization`, shared in flight by a key built
from the init with the early request `index.html` sends. A session it
cannot see reads `authenticated: false` and falls back to the browser
language rather than failing. Its transport is its own decision
(Acceptance notes).
- `console/src/components/FormPage.tsx` (1): the bare channel is the
public form route's on purpose.
- `console/src/lib/auth-preflight.ts`,
`console/src/lib/early-discovery.ts` (1 each): set the bearer header
themselves on purpose.
- `console/src/pages/auth/OAuthConsentPage.tsx` (3),
`followAuthorize.ts` (1), `handoffClientName.ts` (1): the OAuth
hand-off, whose authorize step is a top-level navigation that can only
carry the cookie.
- `console/src/pages/auth/SetupPage.tsx`,
`app-shell/src/console/auth/bootstrapStatus.ts`,
`console/src/pages/auth/VerifyEmailPage.tsx`,
`app-shell/src/chrome/ConditionalAuthWrapper.tsx`,
`app-shell/src/runtime-config.ts` (1 each): read before or without a
session.
- `app-shell/src/console/ai/AiChatPage.tsx` (1): an open PR (objectstack-ai#37123)
edits this file; its call moves with that work.
- `app-shell/src/console/marketplace/marketplaceApi.ts` (5): each
targets `getCloudBase() || SERVER_URL`, the cloud control plane's own
origin whenever one is configured, which must never see this runtime's
bearer.
- `app-shell/src/views/metadata-admin/previews/ActionPreview.tsx` (1):
the test request of an `api` action preview, sent to the author-written
target; its transport is not decided here.

The other two fenced files hold no family call: `RecordDetailView.tsx`
and `useConsoleActionRuntime.tsx` already route every `credentials:
'include'` call through their `authFetch`. Neither was edited.

## Tests

- `ui/packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts`
(new, the enumeration pin; runs in **Test UI**, app-shell's `unit`
project): parses every non-test source file of both trees with the
TypeScript parser and refuses a bare cookie-only call (the transport is
the global `fetch`, `window.fetch`, `globalThis.fetch`, `self.fetch`,
one of those as a `??` / `||` fallback, or `sharedGetJson` without its
transport argument; the init carries `credentials: 'include'`, inline or
as a `const` of the file, `as const` included). The URL is not judged: a
call that must stay bare is a counted row with its reason. Four cases:
the scan reads both trees (more than 500 and 100 files); a 13-case
detector battery (each bare spelling found, each authenticated one not);
every bare call is a counted row; every row is still exact (a file that
sheds a call must shrink its row).
-
`ui/packages/app-shell/src/views/studio-design/packages-io.bearerSession.test.ts`
(new): against a server that refuses any request without the bearer,
with a token stored, `fetchPackages` loads the list and its one request
carries `Authorization: Bearer TOKEN` and `credentials: 'include'`;
`fetchListedPackageIds` likewise; the duplicate write, the commit
timeline and revert, suggested bindings and the build-debug report carry
the bearer. Each with a cookie-only control (no token stored: no
`Authorization`, `credentials: 'include'`).

Test doubles that moved (118 files, no assertion weakened):

- 102 files: hand-rolled `Response` doubles (`{ ok, status, json }`)
gain `headers: new Headers()`, the headers a real `Response` carries and
the authenticated fetch reads (`set-auth-token`), as objectstack-ai#37077 did. The
102nd, `StudioPaletteGroups.surfaceScope-36900` (the command-palette
suite that reached `main` after round 0), doubles `GET
/api/v1/packages`: without the headers the converted
`readPackagesPayload` threw on the double and the palette drew no
Packages group. For `fetchInstalledPackageRow-7881` and
`StudioDesignSurface.readOnlyPosture-12453` the headers are added at the
one stub instead of each answer.
- 8 files whose `@object-ui/auth` mock answered
`createAuthenticatedFetch: () => vi.fn()` (a transport that answers
nothing) now hand the authenticated fetch's requests to the global
`fetch` the file already stubs: the four `RecordApprovalsPanel` suites
and `RecordDetailView` `editLockedByState-32756`, `phoneFace-27058`,
`userActionPredicates`, `harness`.
- 5 `RecordDetailView` approval suites whose `authFetchSpy` stands for
the action door: approvals reads (now through the authenticated fetch
too) are handed to the file's wire double, as before
(`approvalRecallGate`, `accessEndedAfterDecision-26589`,
`approvalDeclaredActions`, `approvalLock-12220`, `approvalLock-25934`).
- `StudioRoute.searchPalette-11863` (console): its auth mock answers the
Studio permissions read and hands every other request (the package list)
to the wire double.
- 3 assertions read the init the wire received (the last two files are
also among the 101): `useConversationList` and `BuildDebugDrawer` assert
`{ credentials: 'include', headers: expect.any(Headers) }` (exact keys,
as before); `DraftChangesPanel.flowChecks-34818` reads `Accept-Language`
off a `Headers`.
- `RecordDetailView.headerApiInterpolation`: the flow-trigger case
asserts exactly one call to the trigger door, filtered by its path,
since the page's own reads now share that spy.

## Acceptance notes

- Same defect family outside the two trees, not touched (the card scopes
the `plugin-*` hooks out unless measured here): `credentials: 'include'`
with the bare `fetch` remains in `ui/packages/plugin-chatbot`
(`useAgents`, `useAiModels`, `useHitlInChat`, `usePendingActions`),
`plugin-detail` (`queueClaim`, `stageChangeStarts`,
`useRecordEditable`), `plugin-grid` (`useRecordCrudVerdicts`,
`useRowApprovalLocks`), `plugin-dashboard` (`DatasetWidget`),
`plugin-charts` (`ObjectChart`), `fields` (`ShareableObjectRefField`,
`preferenceOptions`), `components` (`ShareDialog`) and `permissions`
(`MePermissionsProvider`). Not each read call by call.
- A bare `fetch('/api/…')` with no init at all is cookie-only as well
(the default `same-origin` credentials) and is outside the pin's
spelling: `views/metadata-admin/widgets.tsx` `fetchFieldSelectorOptions`
(`GET /api/v1/objects/:name/fields`).
- `LocalizationFetchProvider` and `languageSeed` read
`/api/v1/auth/me/localization` cookie-only; under a bearer-only session
that read answers anonymously and the console falls back to the browser
language instead of the user's own locale. Not measured in a browser;
left because the request key is shared with the early request
`index.html` sends.
- The hand-rolled bearer helpers left beside converted calls
(`authHeaders` in `suggestedBindingsApi`, `bearerAuthHeaders`,
`withEnvAuth`) are now redundant there; not removed here.

## Verification

<details><summary>The measured case and the pins (green at the
head)</summary>

`packages-io.bearerSession.test.ts` and the ratchet are in the rerun
below (all green). The ratchet's detector battery first went red on a
real detector issue: at a script's top level `await (x)(…)` parses as a
call of `await`, so the `(apiFetch ?? fetch)` case read 0; the cases now
run inside an async function.
</details>

<details><summary>Ablation: one conversion reverted, both pins
red</summary>

Through `scripts/ablation-replace.mjs` on `packages-io.ts`: anchor
`const res = await authFetch('/api/v1/packages', {` hit 1 → 0, blob
`d3c93d771344` → `42f8862ba05e`; the ratchet and the bearer-session file
run under the lock:

```text
FAIL sameServerFetch.bearer.ratchet.test.ts > every bare cookie-only call is a counted row of the shrink-only allow-list
  + "packages/app-shell/src/views/studio-design/packages-io.ts:398 :: fetch('/api/v1/packages', …)"
FAIL packages-io.bearerSession.test.ts > loads the package list, sending the stored bearer beside the cookie
FAIL packages-io.bearerSession.test.ts > answers the listed-id read from the same authenticated request
Test Files  2 failed (2)
     Tests  3 failed | 14 passed (17)
```

The cookie-only control stayed green. Restored: blob `d3c93d771344`
equal to `HEAD`, `git diff HEAD` empty.
</details>

<details><summary>Suites</summary>

The whole `@object-ui/app-shell` and `@object-ui/console` suites, under
the shared verify lock, in six shards (`cd ui && pnpm exec vitest run
--maxWorkers=3 --shard=k/6 packages/app-shell apps/console`) at
`32505939` (the final source; only test files changed after it). These
are the readings BEFORE the doubles moved, and they are how the moved
doubles were found:

```text
shard 1/6: Test Files  21 failed | 440 passed (461) · Tests  121 failed | 4304 passed (4425)
shard 2/6: Test Files  16 failed | 446 passed (462) · Tests  64 failed | 4352 passed | 1 skipped (4417)
shard 3/6: Test Files  23 failed | 439 passed (462) · Tests  104 failed | 4111 passed (4215)
shard 4/6: Test Files  17 failed | 445 passed | 1 skipped (463) · Tests  87 failed | 4383 passed | 8 skipped (4478)
shard 5/6: Test Files  26 failed | 436 passed (462) · Tests  116 failed | 4636 passed (4752)
shard 6/6: Test Files  14 failed | 448 passed (462) · Tests  77 failed | 4286 passed (4363)
```

The 117 failing files are exactly the 117 moved doubles. Each was re-run
after its fix (the two new pin files with them): `Test Files 116 passed
| 3 failed (119)`, then the three fixed again `Test Files 3 passed (3)`.
After the last two type fixes `Test Files 2 passed (2)`, and after the
collection-time imports the 34 files that gained one `Test Files 34
passed (34)` / `Tests 319 passed (319)`, at `5dde589a8c`. The 2,655
files that passed in the shards were not edited. A full re-run after the
fixes was not done locally (NOT MEASURED, reason: about 90 minutes of
shared lock); Test UI runs the full affected set on this PR.

Type-check through turbo (dependency closure built):
`@object-ui/app-shell` and `@object-ui/console` `type-check` `Tasks: 77
successful, 77 total` at `3080a68173`; `@object-ui/app-shell` again at
`5dde589a8c` after the last test edits, `Tasks: 69 successful, 69
total`. The first run found two type errors in my test edits (a typed
tuple, an object literal against a declared parameter type), fixed in
`3080a68173`.

`pnpm --dir ui exec vitest run scripts/` after building the seven
`@objectstack` packages as Test UI does: `Test Files 172 passed | 2
skipped (174)`, `Tests 5131 passed | 2 skipped (5133)`.
</details>

<details><summary>Gates</summary>

`node scripts/pm/dispatch-gates.mjs --commands` (no paths, merge base
`63ab4794`): 39 families. All 39 run locally, each exit captured before
any pipe; 37 lock-free families re-run at `5dde589a8c`, all exit 0;
`pnpm check:type-check-debt` exit 0 (`0 raw tsc error(s) total, none
above its recorded number`); the ui `scripts/` suite above exit 0.
Reconciled: `dispatch-gates --ran`: `39 derived famil(ies) accounted for
— 39 run, 0 NOT-MEASURED (a DERIVED zero)`.

`check:test-source-alias` first went red on the edited suites (exit 1):
34 of them reach a dynamic `import('@objectstack/lint')`,
`import('@objectstack/formula')` or `import('@object-ui/plugin-detail')`
in the source under test with no collection-time load. Each gained the
module-top side-effect import the gate prescribes (`5dde589a8c`), then
exit 0.

`overlap-check` before every push: at `4a990ef7` it merges cleanly with
`origin/main` (`93bd4595`) and with objectstack-ai#37204, objectstack-ai#37188 and objectstack-ai#37148, and exits
1 on textual conflicts with three open Studio PRs that edit the same
test files: objectstack-ai#37166, objectstack-ai#37168, objectstack-ai#37169 (in `StudioDesignSurface.*`,
`BuilderLanding.*`, `CommandPalette.studioScope-11863`,
`StudioRoute.searchPalette-11863`, and objectstack-ai#37166/objectstack-ai#37169 also in
`PackageSwitcher.tsx`, `FlowItemMoreMenu.tsx`). Whichever lands second
takes the merge.
</details>

<details><summary>Round 1: main merged at 3b4f0b9, re-measured at
e055596</summary>

CI at `5dde589a` was red on two causes, both from `main` moving (the ⌘K
palette work):

- `check:test-source-alias` exit 1: four edited suites
(`StudioDesignSurface` `entryReadsOnce-11797`, `itemDraftLine-12725`,
`notFound-26708`, `readOnlyPosture-12453`) now reach
`import('@object-ui/plugin-detail')` through the surface's command
palette and its record preview. Each gained the prescribed module-top
`import '@object-ui/plugin-detail';` (38 files carry a collection-time
import in all). Then exit 0.
- `StudioPaletteGroups.surfaceScope-36900`: 3 failed, 8 passed; after
its package-list double gained `headers` (above), 11 passed. No
assertion changed.

Readings at `e0555965`, under the shared verify lock:

```text
ratchet + bearer-session pin + main's 35 incoming app-shell/console test files + the 5 edited files:
  Test Files  41 passed (41) · Tests  394 passed (394)
whole @object-ui/app-shell + @object-ui/console (cd ui && pnpm exec vitest run --maxWorkers=3 packages/app-shell/ apps/console/):
  Test Files  1 failed | 2779 passed | 1 skipped (2781) · Tests  2 failed | 26745 passed | 9 skipped (26756)
```

The one failing file is `ReportNewPage-36692.test.tsx`, which this
branch does not touch (nor its page); it passed 3 of 3 runs alone
(`Tests 6 passed (6)` each). Its second failure received the first
case's save call, late: its cases flush by `setTimeout(0)` rounds while
the page loads its Han romanizer lazily, so on a loaded box the save can
land after the case ends.

`@object-ui/app-shell` `type-check` through turbo: `Tasks: 69
successful, 69 total`. `pnpm --dir ui exec vitest run scripts/`: `Test
Files 172 passed | 2 skipped (174)`, `Tests 5131 passed | 2 skipped
(5133)`.

Gates: `dispatch-gates --commands` (merge base `3b4f0b98`): 39 families,
all run, each exit captured before any pipe, all exit 0.
`check:type-check-debt` first answered exit 3 (its closure build queued
behind the suite above and never got the lock: not measured), then exit
0 under the lock (`0 raw tsc error(s) total, none above its recorded
number`). `dispatch-gates --ran`: `39 derived famil(ies) accounted for —
39 run, 0 NOT-MEASURED (a DERIVED zero …)`.
</details>

## Read first

1. `ui/packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts`:
the detector and the `ALLOWED` rows (each reason is a claim about a call
left bare).
2. `ui/packages/app-shell/src/layout/ContextSelectors.tsx`: the one
conversion with `sameOriginOnly`, because its URL is author-written.
3. `ui/packages/app-shell/src/console/marketplace/marketplaceApi.ts`:
which calls moved onto `serverFetch` and which stay bare because they
may target the cloud origin.

Two-minute check: `cd ui && pnpm exec vitest run
packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts
packages/app-shell/src/views/studio-design/packages-io.bearerSession.test.ts`,
expect `Test Files 2 passed (2)`.


<details><summary>Round 2: main merged at 93bd459, re-measured at
4a990ef</summary>

- objectstack-ai#37089 landed on `main` after round 1 and left this PR conflicting in
`StudioDesignSurface.notFound-26708` and
`StudioDesignSurface.readOnlyPosture-12453`: both sides add the same
`import '@object-ui/plugin-detail';` with a different comment. The merge
(`48321c62`) keeps one import with `main`'s comment, so against `main`
those two files differ only by round 0's doubles.
- Main's ten new commits add no `credentials: 'include'` line under
`ui/packages/app-shell/src` or `ui/apps/console/src`, and their one new
hand-rolled Response double already carries `headers: new Headers()`.
- The two changesets (`4a990ef7`) now name every converted door in user
terms (flow clone, permission-set clone, page preview, the no-access
state and the design-mode language list were missing) and claim only
"the other same-server console requests", since the 21 listed calls stay
cookie-only.

Readings at `4a990ef7`, under the shared verify lock (`packages/spec`
moved on `main`: the seven `@objectstack` packages Test UI builds were
rebuilt first, and `pnpm --filter @objectstack/spec check:generated`
reads `All 14 generated artifacts are up to date`):

```text
the ratchet, the bearer-session pin, the 5 test files edited in round 1, every existing test file the merge touched
in the two trees, and the suites named for each source file it touched:
  Test Files  311 passed (311) · Tests  2133 passed (2133)
```

`check:test-source-alias` exit 0. `@object-ui/app-shell` `type-check`
through turbo: `Tasks: 69 successful, 69 total`. `dispatch-gates
--commands` (merge base `93bd4595`): the same 39 families, all run, each
exit captured before any pipe, all exit 0 (`check:type-check-debt`: `0
raw tsc error(s) total, none above its recorded number`; the ui
`scripts/` suite `Test Files 172 passed | 2 skipped (174)`).
`dispatch-gates --ran`: `39 derived famil(ies) accounted for — 39 run, 0
NOT-MEASURED (a DERIVED zero …)`. The whole app-shell and console suites
were not re-run this round (NOT MEASURED, reason: about 70 minutes of
shared lock for a merge that changed no source line of this PR); Test UI
runs the affected set on this PR.
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D)_
<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYmRepQK9DkZeU7F53D -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…p shell from 768 px up (objectstack-ai#37241)

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Fixes objectstack-ai#37197
Part of objectstack-ai#37150 — this PR carries its last open item (item 2, the
standalone `/docs` portal's frame, ruled B in objectstack-ai#37150 comment
7151721568); items 1, 3 and 4 landed in objectstack-ai#37193.

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
电脑上打开独立文档门户(文档首页、书、文章)时,顶栏没有了,左侧是和应用页面同样的侧栏:顶部是中性的「文档」入口(点开是你的应用列表和「添加应用」),正文是按应用分组的全部文档目录,「全部文档」排第一行;应用内文档的侧栏也把「全部文档」挪到了「返回应用」下面、目录之上的第一行;手机不变。
- 属于「去掉顶栏和平台首页那一层」专题,是「文档页进应用外壳」那张卡的最后一项:两个文档入口从此是同一种外观,按你批准的设计图做的。
- 出错时电脑上的文档门户会少了目录或入口,打开门户不会改动「上次使用的应用」;改动只在前端,直接撤回这个改动即可恢复原样。
- 无。

## What changes

From 768 px up, `/docs…` now renders in an app-less variant of the app
shell, as designed in stage 1 and approved on objectstack-ai#37197 (comment
7153085446, the maintainer: 「5 处都按建议,批准设计」).

- **New `DocsPortalShell`** (`ui/packages/app-shell/src/console/docs/`,
exported from `@object-ui/app-shell`): on a phone it is `HomeLayout
variant="docs"`, unchanged; from 768 px up it mounts the real `AppShell`
with `showHeader={false}`, `UnifiedSidebar` in a new `docsPortal` mode,
the docs-navigation slot from objectstack-ai#37193, the page header's group and expand
button (`ShellPageActionsScope sidebarExpand appless`), Home's AI drawer
and Home's command palette (`HomeCommandPalette`, now exported from
`HomeLayout`). Like `ConsoleLayout`, it draws a non-shrinking box at the
top of the content holding `ChromeBannerHost` and `ConnectionBanner`, so
the standing banners (impersonation, read rate, storage) and a
lost-connection notice sit beside the fixed sidebar instead of over its
head (seat L1 S2). The connection state comes from the data adapter, as
`AppContent` reads it. It sets the navigation context to `home`, as
Home's frame does, and never sets the current app, remembers a last app
or applies an app's branding.
- **`UnifiedSidebar` `docsPortal`** (+ `docsPortalSearch`): the shell
head and foot as in an app, a neutral 「Documentation」 head
(`SidebarDocsPortalMenu`) instead of the app's name menu, and the
docs-navigation target as the body. The search field is drawn only when
a palette is mounted (Home's palette needs a host app).
- **`SidebarDocsPortalMenu`** (in `SidebarAppMenu.tsx`): the app menu's
list, extracted into `AppMenuList` and shared by both menus, under 「Your
apps」, with no row checked and no app-scoped row (「Design layout」, 「Edit
app」), plus 「Add app」 for the viewers who may build. Choosing an app
opens `/apps/APP`.
- **`ShellPageActionsScope appless`**: the page header's group without
an app: the assistant, and `HelpMenu inApp={false}` with no app package.
Without it the group resolves the app from the navigation context or the
URL's second segment, which on the portal would be the last app or a
book slug.
- **`PortalDocsNav`** (console `DocsNav.tsx`): every book the portal's
index lists, under its app's heading, in the index's order
(`groupBooksByApp`, the index's own grouping). Each book is named by its
index card's label, so an implicit platform book reads as its app does
(「系统设置」), not as its package id's last segment (「Setup」). `DocShell` and
`DocPage` hand it to the sidebar on `/docs…`.
- **「All documentation」 the first docs row in both docs sidebars** (seat
ruling on objectstack-ai#37241: the back link is shell navigation, not a docs row):
whenever the column is in the shell sidebar, `DocsNav` draws it as the
first docs entry, marked current on the portal index. In an app's docs
reader and in `AppDocsNav` it sits directly under 「← Back to APP」 and
above the filter and the books; on the portal, which has no back link,
it is the column's first row. The phone guard is the slot itself: a
phone mounts no docs sidebar, so the column the page draws keeps the
link at its foot, unchanged.
- **DELIBERATE CORRECTION** of objectstack-ai#37193's pending changeset
`.changeset/37150-docs-pages-in-app-shell.md` (seat ruling on objectstack-ai#37241).
One sentence. It was "The `/docs` portal is not changed by this
release." and now reads "The `/docs` portal draws in the same frame from
768 px up too, in a variant that belongs to no app (its own entry
describes it)." `check-empty-changeset` is red on this by design; the
dispatching seat's record confirms it.
- `content/docs/frontend/app-shell.mdx`: the stale line "the app bar …
on an app's docs pages, which mount no sidebar" is corrected. An app's
docs pages draw the shell from 768 px up, and the portal draws the same
frame with a neutral head.
- `App.tsx`: `DocsPortalRoute` mounts `DocsPortalShell` in place of
`DefaultHomeLayout variant="docs"`. No route, redirect or URL changes.

Files to read first, by risk:
1. `ui/packages/app-shell/src/console/docs/DocsPortalShell.tsx`: the
variant switch, and what it does not write.
2. `ui/packages/app-shell/src/layout/UnifiedSidebar.tsx`: the
`docsPortal` hunks (`shellChrome`, the head, the body condition,
`hasCommandPalette`).
3. `ui/apps/console/src/pages/DocsNav.tsx`: `inSidebar` (the first-row
move and its phone guard), and `PortalDocsNav`'s labels.

## Tests

- New `DocsPortalShell-37197.test.tsx`: real `DocsPortalShell`,
`AppShell`, `ShellPageActionsScope`, docs slot and `NavigationProvider`.
- `/docs`, `/docs/crm` and `/docs/crm/crm_intro` at 768 and 1440 px: no
`header` element, the sidebar in `docsPortal` mode with no
`activeAppName`, the page's tree drawn in the sidebar. PHONE CONTROL for
each path at 390 px: Home's docs frame, no sidebar.
- No app guessed: opened cold (1440 and 390), the context is `home`, no
current app, and no last-app key is in storage; that storage check
carries the pin. The `rememberApp` spy is only a tripwire for a future
frame that would remember an app. After an app was open, on a
package-named path, the head names no app, the help menu gets
`inApp=false` and no package, and the current app stays as it was.
- The app-less group, and the collapsed expand button in the docs header
with no corner fallback; phone control.
- Design point 5, the default accent (seat L1 S1): after an app whose
`branding.primaryColor` was open, with `--primary`/`--accent` left on
the root, the portal's root carries neither. Phone control.
- The banners (seat L1 S2): at 1440 px a standing banner mounted above
the routes (as `ConsoleShell` does) is drawn exactly once, inside the
portal's banner box at the top of the content. A disconnected adapter
shows the connection notice in that box; a connected one shows none.
PHONE CONTROL: the banner stays where the shell mounts it, drawn once,
with no box and no notice.
- `docs-portal.test.tsx`, new block `objectstack#37197`: the portal tree
in the shell (first row, `aria-current` on the index, sections in the
index's order, no back link, no in-page column). A book open in the tree
with the article current. The label fix (an app labelled `System
settings`, so not 「Setup」). Every portal URL form in the shell: index,
SLUG, book NAME, NAME/DOC, doc-name-is-also-a-book-name, canonical
SLUG/DOC, implicit package book, slug-that-is-another-book's-name. In an
app's reader and docs index, 「All documentation」 is the first docs row:
the back link stays the column's top row, and 「All documentation」
precedes the filter and the first book. PHONE CONTROL: the in-page
column of the portal and of an app keeps it last.
- `SidebarAppMenu-36112`, new block: the portal head reads
「Documentation」, lists the apps under 「Your apps」 with none checked,
opens any app by its address, gives 「Add app」 to an admin who may author
and no app-scoped row; member control.
- `UnifiedSidebar.footerSlot-36739`, new block: in Home's context with a
remembered app, `docsPortal` draws the portal head (not the app's), the
page's tree as the body and the account foot; no search field without a
palette; control without `docsPortal`.
- **objectstack-ai#37193's N1**, in `ConsoleLayout.noTopBar-36112`: a docs route with
`connectionState: 'disconnected'` shows `ConnectionBanner` in the
banners box at 1440 px. A collapsed docs route draws the expand button
in the docs header (a `DocShell` stand-in that reads the shell's expand
slot) and no corner fallback. Each has a phone control.

Ablations, each via `scripts/ablation-replace.mjs`: anchor 1 to 0 on
disk, restored blob equal to HEAD, `git diff HEAD` empty. The tests
import `src`, so there is no `dist` leg.
1. The variant switch, `DocsPortalShell` `if (phone) {` changed to `if
(phone || true) {`: `Tests 7 failed | 4 passed (11)`. Every desktop pin
went red; the four phone controls stayed green.
2. The first-row switch, `DocsNav` `inSidebar` forced false: `Tests 4
failed | 76 passed (80)`. The two portal-tree tests and the two
app-sidebar tests went red; the PHONE CONTROL stayed green. Re-run after
the reorder, at `2961b4a9`: the same 4 red, PHONE CONTROL green,
restored blob == HEAD.
3. The label fix, `{ ...resolved, label: card.label }` changed to
`resolved`: the label test went red (`1 failed`).
4. The app-less group, `appless` removed from the scope: the
no-guessed-app help test went red (`1 failed | 10 passed`).
5. S1, `AppShell` handed the host app's `branding` (anchor
`navbar={null}` replaced): `Tests 1 failed | 15 passed (16)`, the
default-accent pin red, its phone control green. A first attempt put the
anchor inside its own replacement; the tool refused it ("a drop of 0")
and restored the file, so it measured nothing and was re-run.
6. S2, `ChromeBannerHost` deleted: `1 failed | 15 passed (16)`, the 1440
banner pin red. `ConnectionBanner` deleted: `1 failed | 15 passed (16)`,
the notice pin red. The PHONE CONTROL stayed green in both.

Local runs. Each ran under `os-verify-lock` with `--maxWorkers=2`; every
one reports `VERDICT command-exit 0` unless it says otherwise.

<details><summary>Test readings</summary>

- At `95a165e3`, before the main merge, the five touched or new suites
with `--reporter=verbose` (every new block listed): `Test Files 5 passed
(5) / Tests 140 passed (140)`.
- After merging `origin/main` (`0a1b69c0`), the closure was rebuilt
(`turbo run build --filter='@object-ui/console^...'`, `Tasks: 75
successful, 75 total`). Then a NARROWED suite ran at `1ffad1a4`: 186
files, every app-shell and console test naming `ConsoleLayout`,
`UnifiedSidebar`, `SidebarAppMenu`, `ShellPageActions`, `HomeLayout`,
`DocsPortalShell`, `sidebarDocsNavSlot`, `DocsNav`, `DocShell` or
`DocPage`, plus every console `pages/` test. Result: `Test Files 3
failed | 183 passed (186) / Tests 3 failed | 1680 passed (1683)`. The
three reds were tests that count what this change adds:
- `App.docsPortalLazy` stubbed the old portal frame but not the new one,
so the real shell's bell and agent reads escaped to the network;
- `expressionUser.mountSites.ratchet` counts expression mount sites, and
`DocsPortalShell` is a new one;
- `unsavedEditsLeave.census-13253` counts `UnifiedSidebar`'s
`onAppChange` reads, and the portal head's wrapped read is a new one.
All three were fixed in `7977d28b`, which changes tests only, and
re-run: `Test Files 3 passed (3) / Tests 12 passed (12)`.
- DECLARED NARROWING: the full app-shell and console suites were not run
locally; CI `Test UI` runs them.
- `type-check` for `@object-ui/app-shell` and `@object-ui/console` at
`1ffad1a4`: `VERDICT command-exit 0` (the later commit changes tests
that the same programs compile). Lint on the changed files: 0 errors,
and no new warning after typing the shared list's props.

</details>

<details><summary>Rework 2 readings at fecd4e2 (seat L1 7155677032: S1
accent pin, S2 banner host, S3 + N1 note wording, N2)</summary>

- The closure was rebuilt (`Tasks: 75 successful, 75 total`). Then
`DocsPortalShell-37197`, `ConsoleLayout.noTopBar-36112`,
`App.docsPortalLazy` and `expressionUser.mountSites.ratchet` ran: `Test
Files 4 passed (4) / Tests 31 passed (31)`, `VERDICT command-exit 0`.
- `type-check` for app-shell and console at `e78f292d`: `VERDICT
command-exit 0`. For app-shell again at `fecd4e23`, after the hook was
moved to `useSyncExternalStore`: exit 0.
- Lint on the two changed source files: 0 errors and no warning. The
first spelling of the hook drew `react-hooks/set-state-in-effect`; that
is why it was rewritten.
- S3: the 37197 note now opens "was the one documentation page that
still drew a top bar on a desktop". `/organizations` and Home's
no-product-app state still draw one. N1: search is described "when there
is an app to search". The note also names the standing notices at the
top of the page's content.
- `app-shell.mdx` needed no edit: its portal sentence ("draws the same
frame there", the content area carrying the standing banners) is now
true at this head.
- The derived gate list at `fecd4e23` is unchanged (71). Of the 70 light
ones, 68 exited 0 at once. `check:skill-examples` exited 3
(`client-react` was not built in the fresh worktree); after building it,
exit 0. `check-empty-changeset` exited 1: the DELIBERATE CORRECTION,
confirmed by the seat's contract review. ui `vitest run scripts/`: `Test
Files 172 passed | 2 skipped (174)`. `--ran`: `71 derived, 71 run, 0
NOT-MEASURED (a DERIVED zero)`. overlap-check: clean against `main`,
objectstack-ai#37166, objectstack-ai#37168 and objectstack-ai#37169, and exit 1 against objectstack-ai#35129 only (accepted);
the push was gated on that.

</details>

<details><summary>Rework readings at 2961b4a (seat ruling: order,
changeset, app-shell doc)</summary>

- The closure was rebuilt (`Tasks: 75 successful, 75 total`, 74 cached).
Then `apps/console/src/pages/`, `packages/app-shell/src/console/docs/`,
`UnifiedSidebar.footerSlot-36739`, `SidebarAppMenu-36112` and
`ConsoleLayout.noTopBar-36112` ran: `Test Files 177 passed (177) / Tests
1656 passed (1656)`, `VERDICT command-exit 0`.
- `dispatch-gates --commands` at `2961b4a9` derived 71 commands (the
changeset and the doc add the docs families). Of the 70 light ones, 68
exited 0 at once.
- `check:skill-examples` exited 3: it refused for a missing
`@objectstack/client-react` build. After building that package it ran
with exit 0 (`350 prose examples type-check`).
- `check-empty-changeset` exited 1: the DELIBERATE CORRECTION above, red
by design.
- `pnpm --dir ui exec vitest run scripts/`: `Test Files 172 passed | 2
skipped (174)`.
- `--ran`: `71 derived, 71 run, 0 NOT-MEASURED (a DERIVED zero — all 71
recorded an exit code and none of them is 3)`.

</details>

## Acceptance notes

- **N2 and the stage-2 views** are real renders against the showcase
example on a fresh database: zh-CN browser locale, `deviceScaleFactor`
2, this branch's Console on Vite. They were committed at `672b06dd` and
removed in the next commit, so the PR's file list carries no binaries:
- [1 · /docs at
1440](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/1-portal-landing-1440.png):
the 「文档」 head, 「全部文档」 first and current, books under 「功能展示」 and 「系统设置」,
and the Setup book named 「系统设置」 as its card is. The page's one `header`
element is the index's own title block, not a bar.
- [2 · a doc
open](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/2-portal-doc-open-1440.png):
no `header` element on the page.
- [3 · the head menu
open](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/3-portal-head-menu-open-1440.png):
「你的应用」, the two apps and 「添加应用」; 0 checked rows; the URL is unchanged
(measured).
- [4 ·
collapsed](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/4-portal-sidebar-collapsed-1440.png):
one expand button, in the docs header, and no corner fallback
(measured).
- [5 · 768
px](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/5-portal-landing-768.png).
- Phone 390 px, unchanged: [6 ·
landing](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/6-phone-portal-landing-390-unchanged.png)
and [6b · a
doc](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/6b-phone-portal-doc-390-unchanged.png).
- [7 · an app's docs
reader](https://raw.githubusercontent.com/objectstack-ai/objectstack/0b9b82809015d40074d9aa71ea5a3528cd44b20d/design/37197/stage2/7-app-docs-reader-1440.png):
「← 返回功能展示」, then 「全部文档」 as the first docs row. Re-captured at `2961b4a9`
and committed at `0b9b8280`.
- **N2** · [8 · an app's docs page that is not the reader (not found),
the `AppDocsNav`
column](https://raw.githubusercontent.com/objectstack-ai/objectstack/0b9b82809015d40074d9aa71ea5a3528cd44b20d/design/37197/stage2/8-app-docs-not-found-appdocsnav-1440.png),
with the same order. Re-captured too.
- No last-app key was found in the browser's storage after any desktop
view (measured on each).
- Home's command palette keeps its scope: the host app it searches is
read the way Home reads it, as the portal's old frame did, and is never
written back. That is search scope, not a frame app: the sidebar head,
branding and help name no app.
- The portal's desktop sidebar carries the host's footer slot (the
administrator's 「开始使用」 checklist in the screenshots), as every shell
sidebar does.
- Book labels in an **app's** docs column (`usePackageDocsNavBooks`)
still read the book's own label. For an implicit book of an app's own
package that is the humanized package id. The approved scope was the
portal tree, so this is noted, not changed.
- `overlap-check` reports exit 1 against objectstack-ai#35129, the bot-maintained
Version Packages PR (`chore: version packages`). That PR deletes every
pending changeset, so the DELIBERATE CORRECTION above meets it as a
modify/delete conflict on `.changeset/37150-docs-pages-in-app-shell.md`.
Nothing was resolved by hand. `origin/main` and every sister PR (objectstack-ai#37166,
objectstack-ai#37168, objectstack-ai#37169) merge cleanly.

## Verification

Two-minute check: run `pnpm --dir ui exec vitest run
packages/app-shell/src/console/docs/__tests__/DocsPortalShell-37197.test.tsx`.
Expected: 16 passed, among them three per-path desktop pins and five
PHONE CONTROLs. Or open `/docs` at 1440 px: no top bar, a 「文档」 head, and
「全部文档」 first in the sidebar.

<details><summary>Gate readings</summary>

- `dispatch-gates --commands` (objectstack-ai/objectstack, 16 paths
against merge base `93bd45957`; the list is unchanged at the final head)
derived 38 commands. 37 ran at `e4db1f12`, and `pnpm --dir ui exec
vitest run scripts/` ran under the lock at `eea1765f`: `Test Files 172
passed | 2 skipped (174)`. All exited 0 except
`check:test-source-alias`. It asked for the palette's lazy
`@object-ui/plugin-detail` load to be paid at collection in the new
suite; fixed in `1ffad1a4` and green since.
- `--ran` reconciliation: `38 derived, 38 run, 0 NOT-MEASURED (a DERIVED
zero — all 38 recorded an exit code and none of them is 3)`.
- At the final head `7977d28b`, these re-ran and exited 0:
`check:test-source-alias`, `check:cross-package-test-inputs`,
`check:nul-bytes`, `check:type-check-debt`, `check:tier-file-adoption`,
`check-empty-changeset`, `check-changeset-no-major`, and under `ui/`
`check:new-line-citations` (`0 new citation(s)`).
- `overlap-check` before every push: `VERDICT clean exit 0`.
`origin/main` merges cleanly, as do objectstack-ai#37166, objectstack-ai#37168 and objectstack-ai#37169, which
share `app-shell/src/index.ts` or `SidebarAppMenu-36112.test.tsx`.
- Size at `fecd4e23`: 21 files, +1323 / -152. No governed path.

</details>

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…tire the 18.6.0 i18n keys no code reads (objectstack-ai#37230)

Fixes objectstack-ai#37223

Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no file under skills/ or content/docs names any of
the 67 retired keys (git grep, each key)

## 维护者速读

- 用户无感:合并后主干进入预发布阶段,下一次出版本得到 19.0.0-next.0;同时把 18.6.0 已发布、现已没有代码读取的 67
条界面文案在新大版本里声明退役。
- 属于「界面文案清理」大卡;按你「下一版是大版本 19.0.0」和「走预发布路线」两次裁决,照上一次开大版本(18)时的同款做法。
- 合并本身不发布任何东西:每一次预发布都要你批准才会发出,普通安装拿到的仍是
18.x;若有部署改写过这些文案,改写不再生效;在切出第一个预发布版之前,删掉三个新文件即可撤回。
- 要你做的两件事(按 7158089101 的裁决 A):① 合并前给本单加上 `allow-major` 标签,作为你对 19.0.0
大版本的人工确认;在加标签之前,「Check Changeset」因级别检查(`Metadata-protocol: none` 旁有
`major`)保持红色,属预期,门禁本身不改。② 由你亲自合并本单(和上次开 18 一样,席位只审不合)。

## What changes

1. **`.changeset/pre.json`**, written by `pnpm changeset pre enter next`
(`@changesets/cli` 3.0.3) and committed as the tool wrote it: `{ "mode":
"pre", "tag": "next" }`. ⛔ No `changeset version` output is committed,
and nothing was published.
2. **`.changeset/37223-v19-line-opens.md`**, front matter
`"@objectstack/spec": major`: the v19 line's opening note (rulings
7153326968 and 7153441862), `Clause-②: no`, and its ADR-0087
`not-required (no-migration-prescription)` disposition, in the form the
v18 opening (objectstack-ai#22084) used. Why spec: the protocol lockstep admits
`PROTOCOL_VERSION` one major ahead only in pre mode WITH a pending
`@objectstack/spec` major, and `scripts/sync-protocol-version.mjs`
derives the protocol version from spec's major.
3. **`.changeset/37223-i18n-removed-released-keys.md`**,
`'@object-ui/i18n': major`: the **BREAKING** banner, its own ADR-0087
disposition, and the 「Removed translation keys」 list (67 keys, each
once, with its locales). Two majors in one `fixed` group still give one
19.0.0; the changeset says so.
4. **`ui/packages/i18n/scripts/released-keys-removed.mjs`** (zero
third-party deps): reads the package's published catalogues out of git
at the tag `@object-ui/i18n@18.6.0` and at a ref (default
`origin/main`), and prints every key the tag has that the ref lacks,
grouped by namespace, with the locales it was removed from. Which files
are catalogues is read from the package: `package.json` `exports`, the
all-packs door `src/locales/index.ts`, and each non-pack-shaped
namespace's `index.ts` (`studio`).

No code change, no key restored, no `PROTOCOL_VERSION` edit, no
`allow-major` label, no edit to `.changeset/config.json`, to either
changeset guard, or to `release.yml`.

## Reproduction

```
$ node ui/packages/i18n/scripts/released-keys-removed.mjs
Keys in @object-ui/i18n@18.6.0 absent at origin/main (d15e439): 67
## locales (32)    every one removed from all 11 locales (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant)
## studio (35)     every one removed from both locales the namespace ships (en, zh)
```

The 35 Studio keys are the ones the card expected (objectstack-ai#36501, objectstack-ai#36652). The
32 language-pack keys are extra; some of them are also named in earlier
pending `patch` changesets, and this one lists the whole 18.6.0 set once
for the major's notes. Keys that the open PRs objectstack-ai#37169, objectstack-ai#37166 and objectstack-ai#37168
remove are still on main, so they are not reported or declared here. No
non-test file under `ui/`, `apps/` or `packages/` quotes any of the 67
keys.

## The no-major guard reads `pre.json` from the head checkout

| Leg | Reading at `e43e989948` |
|---|---|
| As committed, `node scripts/check-changeset-no-major.mjs --base
origin/main` | exit 0: `Changesets is in pre-release mode (tag: next) —
major bumps are the expected product of an RC window; skipping the
no-major guard.` |
| Control, `.changeset/pre.json` deleted from the working tree only |
exit 1: `This PR introduces changeset(s) that declare a major bump.` |
| Restored with `git checkout HEAD -- .changeset/pre.json` | `git diff
HEAD` empty (0 bytes), blob hash equals the HEAD blob, guard exit 0
again |

## Pins (throwaway detached worktree at `e43e989948`, never committed,
removed after)

- `pnpm changeset version` exits 0. All 112 `fixed`-group members read
`19.0.0-next.0`. `pre.json` is unchanged. `packages/spec/CHANGELOG.md`
and `ui/packages/i18n/CHANGELOG.md` each open `## 19.0.0-next.0` / `###
Major Changes`.
- `node scripts/sync-protocol-version.mjs` (the root `version` script's
next step) rewrites `PROTOCOL_VERSION` in
`packages/spec/src/kernel/protocol-version.ts`: `PROTOCOL_VERSION 18.0.0
→ 19.0.0 (lockstep with @objectstack/spec@19.0.0-next.0)`.
- `protocol-version.test.ts` on that tree: `Test Files 1 passed (1)`,
`Tests 3 passed (3)`.

## `release.yml` in pre mode: `next` gets the prerelease, `latest` stays
18.x

A reading of the files; nothing edited, nothing run.

- Job `publish`, step `Publish to npm + push version tags` runs `pnpm
run release`, which ends in `scripts/release-publish.sh`, which runs
`changeset publish` with no `--tag`.
- `@changesets/cli` 3.0.3 `getReleaseTag`
(`dist/getPublishPlan.mjs:599-601`): with a pre state and no `--tag`,
the tag is `preState.tag` = `next`, unless every published version of a
package is already a `next` prerelease. `dist/publish.mjs` refuses a
custom tag in pre mode.
- `npm view` today: `@objectstack/spec` and `@object-ui/i18n` read
`latest` = `18.6.0`, `next` = `0.0.0-next-20261125013212` (a snapshot,
whose prerelease id is not `next`), so neither is "only-pre". Each
publishes `19.0.0-next.0` to `next`; `latest` stays `18.6.0`.

## Acceptance notes

- **Open question: the level axis stays red.**
`check-changeset-no-major.mjs`'s level axis refuses `Metadata-protocol:
none` beside any entry at `minor` or above (verdict `none-minor`). It
runs whatever the pre mode is, and only `allow-major` skips the step.
Measured at `e43e989948` with a `pull_request` payload carrying this
body's two lines: the no-major guard is exempt (pre mode), and the level
axis exits 1. The v18 opening passed because its body had no
`Metadata-protocol:` line. This PR changes neither the gate nor the
declaration.
- **The version-PR lane refuses the protocol move.** `release.yml`'s
`version-pr` validation marks a pass that rewrites
`packages/spec/src/kernel/protocol-version.ts` as UNVALIDATED and
refuses it, because the example apps declare `engines.protocol: '^18'`
(`examples/app-crm`, `app-showcase`, `app-todo`) and the ADR-0087 D1
handshake would refuse them under 19. So the version step would sync the
constant, but that lane will not carry it: `PROTOCOL_VERSION` → 19.0.0
still needs its own reviewed PR (objectstack-ai#37229), which should also move the
example apps' `engines.protocol`. With this PR's pre mode and pending
spec major, the protocol lockstep admits the constant one major ahead.
- `pnpm check:pm-dispatch-gates` is green with `pre.json` tracked (`2313
cases pass`), and the objectstack-ai#22084 amendment (`CONSUMED_PRERELEASE_EXCLUDED`
in `scripts/check-adr-0087-registration.mjs`) is still on main. No gate
script is edited.
- Landing: the maintainer merges (precedent objectstack-ai#22084); seats review only.
The PR stays draft.

## Verification

Two-minute check: `node scripts/check-changeset-no-major.mjs --base
origin/main` prints the pre-mode exemption line and exits 0; `node
ui/packages/i18n/scripts/released-keys-removed.mjs` prints `67` on its
first line.

Read first:
1. `.changeset/pre.json` and `.changeset/37223-v19-line-opens.md`: the
line opening.
2. `.changeset/37223-i18n-removed-released-keys.md`: the list.
3. `ui/packages/i18n/scripts/released-keys-removed.mjs`, `discover()`.

<details><summary>Local gates at e43e989: 36 commands, all exit
0</summary>

```
exit 0 :: cd ui && node scripts/check-ui-root-lookups.mjs
exit 0 :: node scripts/check-adr-0087-registration.mjs --base origin/main
exit 0 :: node scripts/check-adr-0087-registration.mjs --self-test
exit 0 :: node scripts/check-changeset-fixed.mjs
exit 0 :: node scripts/check-changeset-fixed.mjs --self-test
exit 0 :: node scripts/check-changeset-no-major.mjs --base origin/main
exit 0 :: node scripts/check-changeset-no-major.mjs --self-test
exit 0 :: node scripts/check-closing-keyword-parity.mjs
exit 0 :: node scripts/check-closing-keyword-parity.mjs --self-test
exit 0 :: node scripts/check-comment-mask-corpus.mjs
exit 0 :: node scripts/check-empty-changeset.mjs --base origin/main
exit 0 :: node scripts/check-empty-changeset.mjs --self-test
exit 0 :: node scripts/check-sdui-manifest.mjs
exit 0 :: node scripts/check-sdui-manifest.mjs --self-test
exit 0 :: node scripts/ci/snapshot-next.mjs --self-test
exit 0 :: node scripts/pm/check-governed-queue-guard.mjs --self-test
exit 0 :: node scripts/pm/release-rehearsal-clone.mjs --self-test
exit 0 :: node scripts/release-pending-publish.mjs --self-test
exit 0 :: pnpm check:adr-anchors
exit 0 :: pnpm check:changeset-gate-self-tests
exit 0 :: pnpm check:closed-ceremony-text
exit 0 :: pnpm check:dispatcher-error-vocabulary
exit 0 :: pnpm check:docs-image-tag
exit 0 :: pnpm check:driver-memory-census
exit 0 :: pnpm check:gitlink-declared
exit 0 :: pnpm check:nul-bytes
exit 0 :: pnpm check:pm-dispatch-gates
exit 0 :: pnpm check:published-files
exit 0 :: pnpm check:refd-timer-probe
exit 0 :: pnpm check:registry-log-declared
exit 0 :: pnpm check:rest-log-spy-declared
exit 0 :: pnpm check:skill-identifier-liveness
exit 0 :: pnpm check:test-source-alias
exit 0 :: pnpm check:tier-file-adoption
exit 0 :: pnpm check:undeclared-dep-imports
exit 0 :: pnpm check:watch-hint-literal
```

`node scripts/check-governed-merges.mjs --pr 37230`: `0 of 4 path(s) hit
the register` · `NOT governed` · `368 changed line(s) ≤ 3000`.

Dogfood battery (`!` title): `Test Files 487 passed | 3 skipped (490)`,
`Tests 4128 passed | 68 skipped (4196)`, lock VERDICT command-exit 0,
measured at `e90f9aa1b9`. The commits after it add `.changeset/` files
and rework a script nothing imports.

</details>

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

<!-- 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
…state; × returns to the list (objectstack-ai#37226)

Fixes objectstack-ai#36906

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 管理员在 Studio 的仪表盘、报表列表里点一项会直接进入应用里的编辑状态(仪表盘进编辑态、报表打开构建器),页头的 × 回到刚才的
Studio 列表(刷新后也在),报表列表的「新建」进入应用的新建报表页。
- 属于 Studio 重构专题:Studio 是某个应用的开发界面,这一步打通了 Studio 和应用之间的往返编辑。
- 从 Studio
报表列表新建的报表改由应用的新建报表页保存,和以前一样存进该包(已安装的应用存进它的定制包),只有保存那一刻定制包恰好用不了时才存到包外并提示列表里看不到它;出错会影响打开到哪里和新报表存在哪里,可以直接撤回,已存的报表留在原处,只有草稿的仪表盘和报表、以及已安装应用定制包里的仪表盘和报表暂时仍打开
Studio 原来的详情页。
- 无。

## What changes

Epic objectstack-ai#36890, decisions 3, 6, 13 and 15.

- **Studio opens a dashboard or a report in its app.** A plain open of a
dashboard or a report in Studio's list no longer shows the generic item
page. It opens the item's page in an app, using the arrival state the
design mode already uses: the dashboard opens in its edit state, the
report opens its builder. The Studio address is replaced, not stacked,
so browser Back from the app lands on the list.
- **Which app (decision 6).** It is the app the author came from, when
that app is one of the package's published apps, or when its menu opens
the item. Otherwise it is the package's first published app. With no
app, the item keeps the generic item page (decision 3). The same happens
on the cross-package leg, and whenever the address asks the item page
for one of its own tools (a tab, the draft review, a selection), so
History and the draft door's review links still land there. The rule is
shared with Studio's back link (`studioBackTarget`), so the two cannot
disagree. It lives in a new pure module, `studioAppEdit.ts`, and the
area's step is `StudioAreaAppOpen.tsx`.
- **× back to Studio (decision 15).** The app address carries `?studio=`
with the Studio list it came from, filters and sort included. It is
built and read only through `studioAddress.ts` (`withStudioReturn`,
`readStudioReturn`) and registered as a reserved console param. The
value is read as untrusted: only a Studio address on this origin is
followed. While the param is present, the dashboard page and the report
page draw a × that returns to that list, after a reload too. The report
builder's own × does the same. Leaving unsaved edits asks first.
- **Report New (decision 13).** Studio's report list New opens
`/apps/APP/reports/new` in the app picked the same way. Its × goes back
to the list, and the saved report's page keeps the way back. With no
app, the area creates as before. Dashboard New is objectstack-ai#36907's, untouched.
- **Where that new report is saved.** Opened from Studio, the new-report
page saves the report into the app's package, the way a new view made in
an app is saved (`resolveRuntimeCreatePackage`): the package when it is
writable, else its `.custom` pair through the ensure door; when neither
can be had, naming no package, as views fall back, and then an info
notice says the report was saved outside the app's package, so the
Studio list does not show it (`report.builder.savedOutsideApp`, the
counterpart of a view's `onSavedOutsideApp` notice). The draft, the
publish and the discard of a refused publish all name that package
(`saveAndPublishInPackage`), so on every other leg the report is in the
list × returns to. The console warning `resolveRuntimeCreatePackage`
prints on that fallback now names the type it saves (it said "the view"
for a report too): the function takes the type as its second argument.
On a read-only base whose pair door is closed (walled, or a kernel
package), report New no longer opens the app page: it goes back to the
list, as every create there does.
- **An item with no published version keeps the generic item page.**
Before handing over, `StudioAreaAppOpen` reads the item once, as the app
reads it (published, no draft preview, `?package=` the open package). No
published version (a draft only: an AI draft, a create whose publish was
refused), or a failed read, keeps Studio's generic item page, which is
the page that opens the draft. Only then are the package's apps read.
- **A dashboard made in Studio lands in its app, and Back skips the
create page.** The area's own create publishes and lands on the item,
which the gate forwards to the app. In a package's area, for a dashboard
or a report, that landing now replaces the create page's history entry
(`studioCreateLandsInApp`, read by `ResourceEditPage`), so Back from the
app lands on the list. Every other type, and Setup, land as before.
- **The report builder's × and the new-report page's × ask over unsaved
edits outside Studio too.** Both handlers already received `dirty` for
the Studio leg; the ask now runs before either leg.
- **No dashboard edit on a phone.** `useDashboardEditOffered` now also
requires a window at least `sm` (640 px) wide, the width from which the
edit state's side panel is drawn. Before, only the button's CSS hid it.
A landing that asks for the edit state on a narrower window is cleared
and opens nothing, so neither Studio nor the design mode can put a phone
into the edit state.
- New `studioReturn` strings, and `report.builder.savedOutsideApp`, in
every bundled locale (additive only; no released key removed). zh-Hant
is regenerated from zh-Hans by its generator.

## Why

The maintainer asked that dashboards and reports listed in Studio open
straight into the front end's design page (epic objectstack-ai#36890). The epic's
decisions fix which app, the fallback, the report New target and the
address-borne way back.

## Tests

- New `studioAppEdit.test.ts`: decision 6, rule by rule; the new-report
variant; agreement with the back link; the app addresses.
- `studioAddress.test.ts`, new top-level describe: the `?studio=`
builder and reader, the refusals both ways (another origin,
protocol-relative, `/studiox`, a backslash, `javascript:`), and the
reserved-param registry.
- New `StudioAreaAppOpen-36906.test.tsx`, through the real
`StudioMetadataArea` routes: the app picked, the arrival carried, the
return address (list context kept, item-only params dropped), the
replace, and every open that keeps the item page (a tab, the review, no
app, the cross-package leg, other types). Also report New, and its
fallback.
- `DashboardView.inPageEdit-36372.test.tsx`, new describe: landing from
Studio, × target, × after a reload, the dirty prompt, the phone landing
(cleared, no edit, no Edit button), and an off-Studio value drawing no
×.
- `ReportView.designModeExclusion-36692.test.tsx`, new describe: landing
in the builder, the builder × to Studio, its dirty prompt, the page ×
beside Edit, and the card's check: reached with the design mode already
on, no builder and no Edit, while × still goes back.
- `ReportNewPage-36692.test.tsx`, new describe: × to Studio, and Save
keeping `?studio=`. This round: Save from Studio names `packageId: P` on
the draft and the publish; on a read-only base it names the pair
(`P.custom`, asked of the ensure door); CONTROL: a refusing ensure door
falls back to the package-less save. × over an edit asks; declining
stays with nothing sent; agreeing goes back to the Studio list (and the
clean × asks nothing). Outside Studio: Save names no package and asks no
package door, and × over an edit asks.
- `StudioAreaAppOpen-36906.test.tsx`, previous round: a draft-only
dashboard row keeps the item page and reads no app; so does a draft-only
report and a failed read; `studioCreateLandsInApp` rule by rule. Its
"dashboard create → Save lands on the app's dashboard and Back lands on
the list" case drives the area's routes over a create STUB (`CreateStub`
reimplements the landing), so it pins the gate's forward and Back over a
replaced entry, not `ResourceEditPage`'s call site; that is pinned in
the new file below. A read-only base (`readOnly`, `customization` handed
in): its dashboard row opens in the base's app; a pair-row address
(`/studio/BASE.custom/metadata/dashboard/X?package=BASE.custom`) keeps
the generic page (the starting point of objectstack-ai#37237); report New opens the
base app's new-report page; with the pair door walled, or no
customization, report New goes back to the list.
- `ReportView.designModeExclusion-36692.test.tsx`, previous round:
outside Studio, a clean builder × closes without asking; over an edit it
asks, declining keeps the builder, agreeing closes it.
- New `ResourceEditPage.createLandingReplace-36906.test.tsx` (this
round), the REAL `MetadataResourceEditPage` over a real `MetadataClient`
and an in-memory server: under a `MetadataAreaHost` with a `packageId`,
a dashboard create's Save lands on the item with a REPLACE
(`useNavigationType`); CONTROLs: a `view` create in the same area, and a
dashboard create with no area host (Setup), land with a PUSH. Each case
also pins the save's `?package=` (the area's package, or none).
- `ReportNewPage-36692.test.tsx`, this round: the refusing-door CONTROL
now also asserts the info notice (once, the
`report.builder.savedOutsideApp` key) and that the console warning names
the report; the package, pair and outside-Studio cases assert no notice.
The clock is gone from the save cases: the Han romanizer `handleSave`
awaits is paid once in a `beforeAll` (a cold dynamic import, paid at
collection), and every save case waits on the address it asserts
(`waitFor`) instead of two `setTimeout(0)` ticks, so a late save can no
longer land in the next case.
- Ablation (one, on the behaviour change the tests pin): with the phone
gate removed from `useDashboardEditOffered`, the phone pin fails 1/1.
Restored, its blob equals HEAD's and `git diff HEAD` is empty.
- This round's ablations, each through `scripts/ablation-replace.mjs`
(anchor 1 to 0, restore proven blob == HEAD and `git diff HEAD` empty),
are listed under Verification.

## Acceptance notes

- **Read first, by risk (rework 2):** the notice line after the save in
`ReportNewPage.tsx` (fires only when Studio opened the page, the app has
a package, and none could be had), and the new real-page pin
`ResourceEditPage.createLandingReplace-36906.test.tsx`.
- **Read first, by risk (rework 1):** the save hunk of
`ReportNewPage.tsx` (where a report made from Studio is written: the
package, its pair, or none), the published-version read at the top of
`StudioAreaAppOpen.tsx`'s effect, and the `replace` on the create
landing in `ResourceEditPage.tsx` (shared by every type; it reads
`studioCreateLandsInApp`, true only for a dashboard or report in a
package's area).
- **Read first, by risk (first round):** `StudioAreaAppOpen.tsx` (async
app pick and replace; the fallback), the `useDashboardEditOffered` and
arrival hunks in `DashboardInPageEditor.tsx` and `DashboardView.tsx`
(the phone gate now also governs the design mode's landing), and the
`?studio=` reader in `studioAddress.ts` (an address-bar value followed
by a navigate).
- `StudioMetadataArea.tsx` is kept narrow: one import, the item open
wrapped in `StudioAreaAppGate`, and the create split. Open PRs objectstack-ai#37089,
objectstack-ai#37168 and objectstack-ai#37169 edit the same file in other hunks. `overlap-check`
merges cleanly with all three at this head. Whichever lands later merges
main.
- **Callers of the persistence path.** `runtime-metadata-persistence.ts`
changes in one place this round:
`resolveRuntimeCreatePackage(appPackageId, type, doors?)` takes the type
it resolves for, only so its fallback warning names it; its answer is
unchanged, and its two internal callers pass the type they save
(`view`). The new-report page now also calls two of its existing
exports: `resolveRuntimeCreatePackage` (other callers:
`createRuntimeMetadata` and `saveAndPublishRuntimeMetadata` themselves,
for views only) and `saveAndPublishInPackage` (other callers:
`saveInPlace`, the in-page dashboard and report Save, and
`setup/publicForms.ts`). `saveAndPublishRuntimeMetadata`'s other callers
(`objectViewViewSharing.ts`, `objectViewViewCrud.tsx`,
`setup/publicForms.ts`) and `createRuntimeMetadata`'s
(`objectViewViewCrud.tsx`, `ObjectDataPage.tsx`) are untouched.
- **Outside Studio, a new report is saved where it was before.** The
new-report page reached from the app's own reports index still saves
naming no package, and asks no package door (pinned). Only the page
opened from Studio's report list resolves a package.
- **Draft-only check (M2): one read, not the list row's mark.** The read
covers every way into the item address: a list click, a typed or shared
address, and the area's create landing on the item. The list row's draft
mark would cover the click only. The read is asked as the app asks it,
so the two cannot disagree.
- **A pending Studio draft over a published version.** The item has a
published version, so it opens in the app, which shows the published
version. A dashboard's edit state then refuses to open, with the
existing toast 「This dashboard has unpublished changes in Studio.
Publish or discard them there, then edit it here.」, so the page stays a
viewer. A report's page shows the published version, and its builder
opens on the pending draft's content (the report's Edit reads the stored
draft layer first, `authoredBuffer`); the builder's Save is then refused
with 「This report has unpublished changes. Publish or discard them
above, then save.」, and nothing is written over the draft (the
first-write pin). Either way the draft stays Studio's to publish or
discard. Read from the code at this head, not walked.
- Reload (seat ruling: keep as shipped): after a reload, × back to the
Studio list survives, but the editor does not reopen. A reloaded or
shared address never opens an editor by itself; that is the arrival
modules' rule.
- Card item 5 (a dashboard saved on an installed app lands in `.custom`)
is pinned at unit level by the existing case "an installed package saves
into its customization pair". It is NOT MEASURED live on HotCRM: no
HotCRM checkout is in this session. That leg carries to objectstack-ai#36910.
- Follow-up card filed: objectstack-ai#37237. In this PR, a `.custom` pair's
dashboards and reports keep the generic item page (decision 6, rule 3);
objectstack-ai#37237 resolves them through the base package's apps.

## Verification

Two-minute check: open Studio for a writable package with a published
app, go to Reports, press New, pick a data source and a measure, name
it, and Save. Expected: the report's page in the app, with a 「Back to
Studio」 ×; click it, and the new report is in the Studio list.

Rework 2's readings are at head `298361bd` (this branch with
`origin/main` `057cedfa` merged in) unless a line names another head.
The previous rounds' readings below keep their own heads (`08107d2f`,
`727300e5`).

<details><summary>Live walk-through, this round (per-agent stack; CRM
example plus one writable package)</summary>

The stack is a fresh `examples/app-crm` backend (`pnpm dev:crm --
--fresh`) with the Console served by Vite from this branch's `ui/`
source, driven by Playwright as the seeded admin, at `727300e5`. In this
stack the CRM package is a read-only code package, so it walks the
read-only base leg. A second package, created writable through `POST
/api/v1/packages` with one published app, walks the writable leg.

Writable package (11 PASS, 0 FAIL):
- A dashboard staged as a draft only (`PUT ?mode=draft`), opened at its
Studio row address, stays on Studio's generic item page.
- Studio's dashboard New, then Save: lands on `/apps/PKG/dashboard/NAME`
with the way back to the dashboard list. The app page shows the
just-published dashboard in its edit state (no 「not found」). Browser
Back from there lands on the dashboard list, not on the create page.
- Studio's report New opens the app's new-report page. After picking a
data source and a measure and saving, it lands on the report's page with
the way back. `GET /api/v1/meta/report/NAME?package=PKG` answers 200
with `packageId: PKG`. × returns to the report list, and the new report
is in it.
- No page errors.

Read-only CRM package:
- Report New, then Save: the server holds the new report in
`com.example.crm.custom` (a read at `?package=com.example.crm` answers
409 naming that pair as the holder). × returns to the CRM report list,
and the new report is in it.
- Dashboard New there is the area's own create in the pair (unchanged).
Its Save lands on the pair's item page, which keeps the generic page (no
app of its own; objectstack-ai#37237). Back lands on the list.
- No page errors.

HotCRM: NOT MEASURED, carried to objectstack-ai#36910.
</details>

<details><summary>Tests, rework 2 (head `298361bd` unless
named)</summary>

- The six pin files (`ReportNewPage-36692`,
`ReportView.designModeExclusion-36692`, `StudioAreaAppOpen-36906`,
`studioAppEdit`, `studioAddress`, `DashboardView.inPageEdit-36372`) plus
the new `ResourceEditPage.createLandingReplace-36906`, default workers,
3 runs on this merged tree: each run lock VERDICT command-exit 0, Test
Files 7 passed (7), Tests 95 passed (95). The six alone, 3 runs at
`35c94a71` (merged with `origin/main` `ede9b91f`): each 6 passed (6), 92
passed (92).
- The seat's S3 red (2 failed of 92 on the merged tree) did NOT
reproduce on this box: the six at the merge commit `ad67a645`, before
the fix, ran 92 of 92 green once. So the clock is shown another way:
with `loadHanRomanizer` slowed by 100 ms (a mutation through
`scripts/ablation-replace.mjs`, restored blob == HEAD), the previous
round's test file fails its two clock-bound save cases (plus its
refusing-door CONTROL, which also lacks the new `toast.info` mock),
while this round's file passes 13 of 13.
- At `35c94a71`, the wider set: every `ResourceEditPage*`,
`runtime-metadata-persistence*`, `Report*` and `DashboardView*` test,
`urlParams.test.ts`, `views/studio-design/`, `views/studio-detail/` and
`packages/i18n/`. Lock VERDICT command-exit 0, Test Files 505 passed
(505), Tests 4838 passed, 13 skipped.
- `pnpm --filter @object-ui/app-shell run type-check`, both tsc
programs, at `35c94a71`: lock VERDICT command-exit 0, 0 `error TS`. (The
final merge brings no app-shell or i18n file.)
- eslint on this round's changed ui files: 0 errors; the 15 warnings are
existing ones (`no-explicit-any`, `only-export-components`).
- Ablations this round, each through `scripts/ablation-replace.mjs`
under the lock (anchor 1 to 0, restore proven by blob == HEAD and `git
diff HEAD` empty):
8. The call site, `replace: studioCreateLandsInApp(areaHost?.packageId,
type),` to `replace: false,` in `ResourceEditPage.tsx`: the new
dashboard REPLACE case fails (1 failed, 2 passed of 3); both CONTROLs
stay green.
9. The notice line removed from `ReportNewPage.tsx`: the refusing-door
CONTROL fails (1 failed, 12 passed of 13).
</details>

<details><summary>Tests, previous rounds</summary>

- At `08107d2f`, the seven touched test files (`ReportNewPage-36692`,
`ReportView.designModeExclusion-36692`, `StudioAreaAppOpen-36906`,
`studioAppEdit`, `studioAddress`, `DashboardView.inPageEdit-36372`,
`urlParams`): lock VERDICT command-exit 0, 7 files, 99 tests passed.
- At `727300e5`, the wider set: every `DashboardView*` and `Report*`
test, every `ResourceEditPage*` test, every
`runtime-metadata-persistence*` test, `views/studio-design/`,
`views/studio-detail/`, `src/__tests__/`, `src/preview/`,
`urlParams.test.ts` and `packages/i18n/`. Lock VERDICT command-exit 0,
585 of 585 files, 5,662 passed, 13 skipped.
- `pnpm --filter @object-ui/app-shell run type-check`, both programs, at
`08107d2f`: exit 0, 0 `error TS`.
- eslint on the nine changed ui files: 0 errors. The warnings are
existing ones.
- Ablations, each through `scripts/ablation-replace.mjs` under the lock
(anchor 1 to 0; restore proven by blob == HEAD and `git diff HEAD`
empty). ui tests resolve `src` directly, so no `dist` leg applies:
1. New-report page, the ask removed: the two "x over unsaved edits" pins
fail (2 of 13).
2. New-report page, `dirty &&` dropped (asks on a clean x): the two
clean-x pins fail (2 of 13).
3. New-report page, the package resolve replaced by `null`: the package
pin, the pair pin and the refusing-door CONTROL fail (3 of 13). The
CONTROL fails because no door is asked at all.
4. Report builder, the ask removed: the Studio dirty pin and the new
outside-Studio pin fail (2 of 8).
5. `StudioAreaAppOpen`, the no-published-version fallback disabled: the
two draft-only pins fail (2 of 16).
6. `studioCreateLandsInApp` forced to `false`: the create-then-Back pin
and the rule pin fail (2 of 16). Corrected in rework 2: this reaches the
pure rule and the create stub's own copy of the landing in
`StudioAreaAppOpen-36906`, not `ResourceEditPage`'s call site (the
seat's call-site ablation left that file green, 16 of 16). Ablation 8
above reaches the call site.
7. Report New on a read-only base, the pair-door condition removed: the
closed-door pin fails (1 of 16).
</details>

<details><summary>Local gates, rework 2 (`dispatch-gates.mjs
--commands`, 73 families)</summary>

- At `298361bd`: all 74 derived families exit 0, each recorded as `cmd
:: exit N` and reconciled with `--ran`: "74 derived famil(ies) accounted
for — 74 run, 0 NOT-MEASURED". The ui `scripts/` family ran under the
lock with `--maxWorkers=1`: Test Files 172 passed, 2 skipped. (The same
72 non-ui families also ran at `35c94a71`, all exit 0 after
`check:skill-examples` first refused with exit 3 because
`@objectstack/client-react` was not built in this worktree, then exit 0
once built.)
- Also at `298361bd`: `check:test-source-alias` exit 0, ui
`check:i18n-keys` exit 0 (every call-site key resolves against the en
pack), `check:nul-bytes` exit 0, `check-platform-checklist
--changed-from origin/main` exit 0 (0 anchored files), and
`overlap-check` VERDICT clean exit 0 (`origin/main` `057cedfa`, objectstack-ai#37249,
objectstack-ai#37210, objectstack-ai#37169, objectstack-ai#37166). The same alias and overlap checks also ran
clean before the push.
- CI runs the full farm on this PR.
</details>

<details><summary>Local gates, previous round (`dispatch-gates.mjs
--commands`, 73 families at that head)</summary>

- At `08107d2f`: all 73 derived families exit 0, each recorded as `cmd
:: exit N` and reconciled with `--ran`: "73 derived famil(ies) accounted
for — 73 run, 0 NOT-MEASURED". Two needed a second run:
`check:skill-examples` first exited 3 (it refused, measuring nothing,
because `packages/client`'s source was newer than its build after a
local history rebuild), then 0 after rebuilding `client`; the ui
`scripts/` family ran under the lock with `--maxWorkers=1`: 172 files
passed, 2 skipped.
- `check:test-source-alias` first exited 1 at `727300e5`: the new-report
page now imports the draft bar's package rule, which reaches
`@objectstack/lint`. The test file pays that load at collection (`import
'@objectstack/lint'`, the gate's prescription); exit 0 since, and at
`08107d2f`.
- Also at `08107d2f`: `overlap-check` VERDICT clean (main, objectstack-ai#37249,
objectstack-ai#37210, objectstack-ai#37169, objectstack-ai#37168, objectstack-ai#37166), `@objectstack/spec check:generated`
exit 0 after the merge, and `check-platform-checklist --changed-from
origin/main` exit 0 (no anchored file changed).
- CI runs the full farm on this PR.
</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (eslint on the changed
files locally; the repo-wide run is CI's.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

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

<!-- 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
…ress; no flow rail (objectstack-ai#36903) (objectstack-ai#37169)

Fixes objectstack-ai#36903
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under `skills/` or `content/docs/` names the
Automations rail's strings or teaches overriding a Studio console string

## 维护者速读

- 搭建者在 Studio 点开一个流程,会在右侧全屏打开它的设计器,左上角 × 回到流程列表,‹ ›
按列表顺序看上一个、下一个;原来设计器左侧那一列流程列表没有了,组织级流程也在同样的新地址上打开。流程的“审阅草稿”链接打开通用详情页并显示审阅;权限集的审阅链接照旧打开它的权限矩阵页。
- 这是 Studio 重构专题(左侧菜单 → 列表 → 右侧全屏详情)里流程设计器的一张,和对象、权限集的设计器共用同一套“设计器页面”写法。
- 出错时最可能是旧书签没跳对、或某个流程打不开;不改数据和元数据协议。原流程列表专用的 9 条界面文字随 19.0.0
大版本退役,已在变更说明里逐条列出(若有人自定义过这几条翻译,自定义将不再显示),回退这个 PR 即可恢复。
- 这个 PR 超过 3000
行,按您的裁决在席位审核后请您审核;另有一个问题请您定:流程列表要不要加“触发对象”和“运行状态”两列(需要另开一张协议卡)。

## What changes

- **The flow designer is full-screen on its metadata address.**
`/studio/PACKAGE/metadata/flow/NAME` mounts the designer
(`AutomationsPillar`, now fixed on one flow named by the route). The
area decides it through the shared designer-page helper in
`metadataArea.ts` (`AREA_DESIGNER_PAGE_TYPES`,
`areaItemOpensDesignerPage`, `areaDesignerItemOf`), now on main from
objectstack-ai#37089; after the merges the list is `['permission', 'object', 'flow']`.
Header: the shared full-screen item header (`ResourceDetailHeader`): ×
back to the list with its filters, ‹ › in the list's order (decision
10), title, type, package, and the flow's ⋯ (New similar, Delete). Tabs:
Canvas, Variables, Runs, Problems, Debug, then References, History,
Source from `item-tools/ItemToolTabs` (hand-off §2); the open tab is
`?tab=` (`flowDesignerTabs.ts`).
- **No flow rail.** The rail, its search, object groups, legend, status
dots, contributed-flow rows and the pillar's own New dialog are deleted.
Create is the list's 「新建」 (`MetadataListCreateDialog`, same presets).
- **Nine released console strings are retired, declared (M1, ruling
7153171432 「B」 with 7153326968 「下一版是大版本 19.0.0」).** The nine
`engine.studio.auto.*` keys only the rail read (`heading`, `none`,
`emptyMain`, `group.noObject`, `kind.record`, `kind.scheduled`,
`kind.screen`, `kind.autolaunched`, `legend`) are removed from `en` and
`zh` of `@object-ui/i18n`'s studio namespace. The changeset declares
`Clause-②: yes (narrowing)`, carries the BREAKING note, the ADR-0087
`not-required (no-migration-prescription)` disposition and a 「Removed
translation keys」 list, and keeps `'@object-ui/i18n': patch` (the one
`major` is objectstack-ai#37223's). `engine.studio.org.none` is kept: S5 reads it.
- **Address switch.** `flow` leaves `STUDIO_ITEM_PILLAR` (with objectstack-ai#37168's
`object` gone too, it is empty), so `studioItemPath`, ⌘K, the AI
artifact links and the Changes drawer open the new address. Old
addresses redirect (`automationsPillarRedirect.ts`):
`/automations?surface=flow:NAME` to the flow, bare `/automations` to the
list; `?view=`/`?nav=` dropped, everything else kept (including
`?changes=review`).
- **`~org` flows** live on the package-less scope's own area leg: list
`/studio/~org/metadata/flow?source=runtime`, flow
`/studio/~org/metadata/flow/NAME?source=runtime`. Its list offers no
「新建」, and when it is empty it says how a packaged flow is changed
instead (`engine.studio.org.none`, ADR-0146 D11), through a new optional
`emptyListHint` on the area host. An empty, unsearched list there reads
as empty, not as "No matches for """.
- **Copilot context** has the sisters' shape: a designer on its metadata
address sends `{ pillar: STUDIO_METADATA_AREA, artifact }`, the same
block as objectstack-ai#37089 (on main) and objectstack-ai#37168, plus `orgScopeFlowOf` for the
`~org` leg.
- **Review links, in plain words:** a flow's review link opens the
general item page with its review; a permission set's review link keeps
its matrix page; an object's opens the general item page with its
review, as objectstack-ai#37168 shipped it.
- **One predicate for the generic page.** `?review=1` and
`?scope=environment` keep an item on the generic item page through
`areaItemAsksGenericPage`, with objectstack-ai#37168's text, for a designer type whose
generic page serves that review (the flow). A type whose item page is
its own editor (`registerMetadataResource`'s `EditPage`: the permission
set's matrix) has no generic review, so it keeps its designer page,
exactly as main does. Seat 4 recorded this as the measured form of its
ruling A (7157282796). See Acceptance notes.
- **Taken name in this package.** The list dialog's flow create says
「This package already has an automation…」
(`engine.studio.auto.createTaken`) and offers Open, to the flow's
address, when the flow holding the identifier is this package's;
`createTakenElsewhere` otherwise.
- **Kept (card item 6):** the copilot's refresh after its edits
(`useMetadataRefreshNonce`) and its current-item report
(`onSurfaceLabelChange`). objectstack-ai#36726's pinned publish on Save and on the
switch is unchanged; the list dialog's flow create publishes with
`publishCreated`.
- **Run status (card item 2):** the list has no column for it or for the
trigger object (the spec's flow columns are NAME, LABEL, type,
DESCRIPTION). Both stay on the designer header's Trigger and Status
pills. No `packages/spec` change; the column question is a fork for the
maintainer.

## Empty state and old deep links (card item 7)

- A package with no flow: the flow list's own empty state. The designer
is never opened on nothing.
- An address naming a flow the package does not hold: one block, 「The
link names flow “NAME”, which is not here.」, nothing else opened. A
package-less flow opens in `~org` instead (objectui#11553).
- Old `/studio/PACKAGE/automations`, `/studio/BASE.custom/automations`
and `/studio/~org/automations` links redirect as above.
`…/metadata/flow/NAME/history` opens the History tab.
- Delete returns to the flow list (its filters kept); no other flow is
opened in the deleted one's place.

## Tests

- This round:
- `heldFlowLeave-26705`: an unsaved, NOT held edit. × asks, Cancel keeps
the edit, OK lands on the list with nothing sent; › the same, onto the
next flow; CONTROL: after Save neither asks. The Changes sheet's flow
request: over a dirty or a held edit it asks, then lands; on the open
flow it does nothing; CONTROL: no edit, no question.
- `packageLessFlows-11553`, through the real surface: the old address of
a package flow lands on its address with the designer open; a read-only
base's old address naming a pair-added flow lands on the base's address,
writable, with the pair chip; the pair's old address lands on the pair's
own address; CONTROL: the base's own flow stays read-only. Also the
`~org` Changes request landing on the scope's flow, and the empty `~org`
list's guidance.
- `tabs-12454`: `?tab=runs` and `?tab=history` open their panel on the
real designer; CONTROL: no tab, Canvas.
- `createTaken-26917`: a published flow in this package reads
`createTaken` and Open lands on `/studio/PKG/metadata/flow/escalate`;
another package's keeps `Elsewhere` and no Open.
  - `aiChipLabel`: repinned to `{ pillar: 'metadata', artifact }`.
- `customizeFlow-28570`: the Restore dialog's label is read off the
header's title.
- Earlier rounds: the remaining `AutomationsPillar.*` suites and the
`StudioDesignSurface.*` / `StudioMetadataArea.*` suites that open a
flow, converted to the address. Deleted as rail-only, each with the pin
that covers what is left: `AutomationsPillar.railSearch-11794`,
`FlowStatusDot`, `FlowStatusDot.registration-12349`,
`StudioDesignSurface.railUnboundReason-11281` (the unbound reason is on
the header's Status pill, `flowStatusTruth-11779`),
`.automationsRailOrder-12612`, `.draftObjectFlowGroup-29706`, and the
rail cases in `.emptyStates-12514`, `.homeLoop-12513`,
`.oneSurface-28572`, `.autosaveSwitch-11232`, `.heldFlowCreate-26845`,
`StudioRail.noMatches-26733`. New pins:
`automationsPillarRedirect.test.ts`, `flowDesignerTabs.test.ts`, the
helper and predicate cases in `metadataArea.test.ts`, the designer and
`/history` routes in `StudioMetadataArea.routes-28561`.

<details><summary>Ablations (each: committed fix, anchored mutation
through the ablation-replace script, restored to the HEAD
blob)</summary>

- M2, `dirty: autoDirty` → `dirty: false` at
`AutomationsPillar.tsx:803`: the two new guard cases go red on `expected
"vi.fn()" to be called 1 times, but got 0 times` (lines 315, 338), the
CONTROL goes red on Save not offered, and the 5 held-step cases stay
green (`Tests 3 failed | 5 passed (8)`). Restored: blob `068563e042de`
== HEAD, `git diff HEAD` empty.
- S4, `here: own.some(…)` → `here: false`: the in-package case goes red,
the others stay green (`1 failed | 9 passed (10)`). Restored: blob
`c5263910bff6` == HEAD.
- S5, the area host's `emptyListHint` spread deleted: the empty `~org`
list case goes red (`1 failed | 23 passed (24)`). Restored: blob
`5386130ea404` == HEAD.
- The first M2 run went red at the case's own precondition (Save not
offered), not at the question; the precondition was moved out of the
shared helper and the ablation re-run as above. Declared, not hidden.
</details>

<details><summary>Local readings (final head first; earlier heads
named)</summary>

- **Final head `9fcff540`** (the third merge of `origin/main`, at
`1b91538b` with objectstack-ai#37168, in `7a7af7ad`; then the lint fix). CI on
`7a7af7ad` was red in Lint UI only: three imports that the
retired-pillar cases left unused (`fireEvent` and `screen` in
`expectedMisses-11799`, `parseSurfaceParam` in `metadataArea.test`).
`9fcff540` removes them; no source changed. Readings on that tree, each
under the lock:
- `pnpm --dir ui --filter @object-ui/app-shell run lint`: exit 0, 0
errors.
- app-shell type-check (src and `tsconfig.test.json`): exit 0, 0 `error
TS`.
- Full run over `studio-design`, `metadata-admin`,
`CommandPalette.studioScope-11863`, `console`, `packages/i18n/`,
`clickableNonControlCensus-13461` and the console's `StudioRoute`: Test
Files 1508 passed (1508); Tests 15400 passed, 14 skipped; VERDICT
command-exit 0.
- `check:i18n-keys`: exit 0. `check:test-source-alias`: exit 0 before
the push. The 36 light derived families re-ran on `7a7af7ad`: all exit
0. `overlap-check`: `origin/main` and objectstack-ai#37226 merge cleanly; objectstack-ai#37166
conflicts.
- Full dogfood battery on `7a7af7ad` (the lint fix changes no runtime
file), `pnpm --filter @objectstack/dogfood test` under the lock: Test
Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196);
VERDICT command-exit 0.
- Ablation of the review rule after the merge: `const genericPage =
areaItemAsksGenericPage(search) &&
!getMetadataResource(type)?.EditPage;` → `const genericPage = false;` in
`StudioMetadataArea.tsx`. `routes-28561`: Tests 2 failed, 32 passed
(34). The object's `?review=1` CONTROL and the flow's `?review=1` case
go red (`expected 'flow-designer' to be 'item'`); the permission set's
matrix pin stays green. Restored: blob `c3b2d2786f9f` == HEAD.
- CI on `9fcff540`: 58 check-runs, all completed: 45 success, 13 skipped
(path filters, opt-in and queue jobs), 0 failed. Lint UI, Type Check UI,
Test UI (shards 1–16), Build & E2E UI, Live E2E UI, Lint & Repo Gates,
TypeScript Type Check, Test Core, Dogfood Regression Gate, Governed
Surface Queue Guard, Check Changeset and PR-body guards: success.
- **Review-link round, head `d3e30576`** (on top of `3f65d38b`, below):
app-shell type-check exit 0. `StudioMetadataArea.*`,
`StudioPermissionSetPage.*`, `metadataArea.*`, `packageLessFlows-11553`,
`heldFlowLeave-26705`, `oneSurface-28572` and
`AppContent.setupMetadataStudio-28578`: Test Files 8 passed (8), Tests
218 passed (218). Ablation as above. Full dogfood battery on `d3e30576`
under the lock: Test Files 487 passed, 3 skipped (490); Tests 4128
passed, 68 skipped (4196); VERDICT command-exit 0.
`check:test-source-alias`: exit 0 before the push. CI on `d3e30576`: 58
check-runs, 45 success, 13 skipped, 0 failed.
- **Final head `3f65d38b`** (the second merge of `origin/main`, at
`6211ddf4`). app-shell type-check: exit 0. `studio-design`,
`metadata-admin`, `CommandPalette.studioScope-11863`, `console/ai`,
`packages/i18n/` and `clickableNonControlCensus-13461`: Test Files 1265
passed (1265), Tests 13230 passed, 14 skipped (VERDICT command-exit 0).
Full dogfood battery, `pnpm --filter @objectstack/dogfood test` under
the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68
skipped (4196); VERDICT command-exit 0. The derived gate list is
unchanged (38); its 36 light families re-ran, all exit 0.
`check:test-source-alias`: exit 0 before the push. `overlap-check`:
`origin/main` merges cleanly; objectstack-ai#37168 and objectstack-ai#37166 conflict.
- Diff against the merge base with `origin/main` at `3f65d38b`: 94
files, +2,235 / −2,787.
- **M1 round, head `576f67d3`.** `check-adr-0087-registration --base
origin/main`: exit 0, one declared-breaking changeset with `not-required
(no-migration-prescription)`. `check-changeset-no-major`: exit 0.
`check-empty-changeset`: exit 0. `ui` `check:i18n-keys`,
`check:i18n-drift`, `check:i18n-dead-keys`: exit 0 each.
`packages/i18n/` plus `plainLanguage-11659`, `studio-locale.i18n` and
`packageLessFlows-11553`: Test Files 114 passed (114), Tests 2060
passed, 13 skipped (VERDICT command-exit 0). app-shell type-check: exit
0. The 36 light derived families re-run: all exit 0. Full dogfood
battery (owed by the `(narrowing)` arm), `pnpm --filter
@objectstack/dogfood test` under the lock: Test Files 487 passed, 3
skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT
command-exit 0. `check:test-source-alias`: exit 0 before the push.
- `pnpm --filter @object-ui/app-shell type-check` (src and
`tsconfig.test.json`): exit 0 on `49bf2233`, after the `@object-ui/*`
dependency closure was rebuilt from this tree (turbo, 68 tasks).
- Full run on `1d6b2854` (the merge plus its seam fixes), over
`packages/app-shell/src/views/studio-design`,
`packages/app-shell/src/views/metadata-admin`,
`CommandPalette.studioScope-11863`, `console/ai` and
`clickableNonControlCensus-13461`: Test Files 2 failed, 1150 passed
(1152); Tests 3 failed, 11175 passed, 1 skipped. The failures came from
the merge: `homeLoop-12513` opened on `/access`, which objectstack-ai#37089 turned
into a redirect; and `MetadataListCreateDialog.pairCreate-36897` mounts
the dialog without a router, where this round's Open used `useNavigate`.
Both are fixed at `49bf2233`, where the touched files re-ran: Test Files
24 passed (24), Tests 176 passed (176).
- `dispatch-gates --commands`: 38 families. `--ran` reconciliation: 38
derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, all with exit codes, all 0.
`pnpm --dir ui exec vitest run scripts/` was OOM-killed on its first run
beside the full suite; re-run alone under the lock it exited 0 (Test
Files 172 passed, 2 skipped). `check:type-check-debt` re-measured under
the lock: OK, 0 raw errors.
- `check:test-source-alias`: exit 0 before each push. `overlap-check`:
`origin/main` merges cleanly; objectstack-ai#37168, objectstack-ai#37166 and objectstack-ai#37185 conflict (exit
1).
- ESLint (`--no-inline-config`) over every changed `ui/` file: 0 errors,
59 warnings.
</details>

## Acceptance notes

- **M1, how it ended.** Round 2 first restored the ten released keys
(the L1's preferred fix). The maintainer then ruled retire-and-declare
(7153171432 「B」; next release is the major, 7153326968), so this round
removes the nine keys no code reads and declares them; the tenth,
`engine.studio.org.none`, is read again by the `~org` list (S5) and
stays. `studioAutomationCopy.plainLanguage-11659`'s heading case went
with its row (N1, first option). The ~35 keys main had already removed
are objectstack-ai#37223's, not declared here.
- **Merged `origin/main` at `bc3ec37a`, which holds objectstack-ai#37089 (the
permission designer).** The merge unions the two designers:
`AREA_DESIGNER_PAGE_TYPES = ['permission', 'flow']`,
`STUDIO_ITEM_PILLAR` keeps `object` only, and `AreaItemOpen` mounts
`AutomationsPillar` for a flow and `StudioPermissionSetPage` for a set.
Two consequences, both deliberate:
- **Declared deviation, accepted (seat 4, 7157282796): a permission
set's `?review=1` keeps main's behaviour and opens the matrix page.**
The ruling said uniform (A), on this branch's recommendation. Checking
it showed the premise was false. For a type whose item page is its own
editor, the generic page never draws: `MetadataResourceEditPage` hands
the item to the registered `PermissionMatrixEditPage`, which has no
draft review. Neither it nor main's `StudioPermissionSetPage` reads
`?review=1`. Uniform would therefore have sent a set's review link to
Setup's matrix editor, with no review sheet and outside the Studio page:
a regression. So `AreaItemOpen` asks the generic page only for a type
with no own `EditPage`. That is the flow here and the object in objectstack-ai#37168
(objectstack-ai#37168 should check the object's registry before relying on it). Pinned
in `routes-28561` (`?review=1` keeps the matrix page), and ablated:
dropping the `EditPage` guard reds it, `1 failed | 31 passed (32)`,
restored to the HEAD blob. The flow's `?review=1` still opens the
generic page and its review (the case beside it).
- **Carrier for the permission set's review, objectstack-ai#37269.** Two live links
write a permission set's `?review=1` today: the Packages page's
per-draft review link (`PackagesPage.tsx:1317`) and the chat's 「Review N
changes」 (`AppContent.tsx:286`). Both open the matrix page with no
review, as on main. objectstack-ai#37269 makes the matrix page show the draft's
changes; this PR does not change what those links open.
- The census rows for `AccessPillar.tsx` and `AutomationsPillar.tsx`
`setRailOpen` both go: both rails are gone.
- **Merged `origin/main` again at `6211ddf4`**, after objectstack-ai#37185 (the
authenticated fetch) and objectstack-ai#37232 (the menu's type table) landed and the
PR showed a conflict. Two files conflicted, each resolved so both sides
survive: `CommandPalette.studioScope-11863.test.tsx` (one comment above
the shared `@object-ui/plugin-detail` warm-up; main's wording kept) and
`FlowItemMoreMenu.tsx` (main's `authFetch` for the clone door kept; the
`STUDIO_HEADER_ICON_BUTTON` import this branch had dropped as unused
stays dropped). objectstack-ai#37168 had still not merged, so the exemption below
stands.
- **Merged `origin/main` a third time, at `1b91538b` (objectstack-ai#37168, the object
designer).** This PR now lands second of the pair, so it carries the
routing ruling. The 47 conflict hunks in 22 files were resolved so both
designers survive:
- `AREA_DESIGNER_PAGE_TYPES = ['permission', 'object', 'flow']`, and
`STUDIO_ITEM_PILLAR` is empty.
- `AreaItemOpen` mounts `DataPillar` for an object, `AutomationsPillar`
for a flow and `StudioPermissionSetPage` for a set. objectstack-ai#37168's `type ===
'object'` review gate is replaced by the one `EditPage` rule; it gives
the object the same answer.
- Both creates' `onOpenExisting` paths are kept: the object's at its
target package, the flow's in this package. The prop, which both PRs
added, is passed once.
  - Both old-pillar redirects (`/data`, `/automations`) are kept.
- Two suites lost their last case, every one a retired pillar's in-place
behaviour: `StudioRail.noMatches-26733` (all three rails are gone) and
`StudioDesignSurface.autosaveSwitch-11232` (main kept only the
Automations cases and this branch only the Data cases, and both pillars
are gone). Each is deleted. What they pinned for items is pinned per
item: the area keys each designer by item, and `heldFlowLeave-26705`'s ›
case pins that the next flow opens clean, with nothing sent.
- **`AreaHistoryRedirect`'s designer-item exemption (`pillarItem`) is
deleted** (seat 4's routing: the second lander of objectstack-ai#37168 and objectstack-ai#37169
deletes it). With `STUDIO_ITEM_PILLAR` empty it could no longer fire.
`routes-28561`'s CONTROL keeps its own-`EditPage` leg (the standalone
history page), and its object leg is repointed at the object designer's
History tab; the flow's `/history` opens the flow designer's History tab
(the case beside it).
- The closing line on line 1 is kept this round (N4): the maintainer is
still to answer card item 2.
- N2: the stale `/studio/~org/automations` comments in `src/index.ts`
and `studioScope.ts` now name the scope's area addresses.
- N3: not changed. The caption's `title="API name: …"` predates this PR:
main's pillar header set the same `titleProps.title`, and 20 test
lookups across 15 suites key on it. A cut label's hover still shows the
API name; the changeset now names the api-name chip instead of a
tooltip.
- N5 / `orgScopeFlowOf` (seat 4: keep it): a one-line comment at the leg
says it is dormant because the package-less scope mounts no copilot
(objectui#11553). No surface-level `~org` copilot case is possible: the
package-less scope mounts no copilot (`slotHost` needs a package,
objectui#11553; `packageLessFlows-11553` pins `chatDock.mounts === 0`).
The `~org` leg's context is pinned on the pure `orgScopeFlowOf` in
`metadataArea.test.ts`.
- N6: four `docs/qa/platform-checklist/areas/studio-authoring.json`
items still describe the deleted rail and the `~org` pillar:
`automations-rail-and-new-flow`, `org-scope-flows`,
`flow-status-matches-runtime`, `flow-edge-type-authoring`. They carry to
objectstack-ai#36910, whose item 3 owns that rewrite.
- N7: corrected. CI on `5d9bb8da` was 47 success and 15 skipped, and
"Check PR Size" was skipped, not passed.
- N8: the Restore case reads its label off the header's title
(`auto-canvas-caption`), so it still cross-checks the dialog.
- S6: `ui/packages/app-shell/README.md`'s package-less section describes
the scope's area leg; the changeset is in user terms, with no route
templates and no query parameters.
- The suites this PR edits import `@objectstack/lint` and
`@object-ui/plugin-detail` at module top, so the dynamic imports their
source reaches are paid at collection (`check:test-source-alias`).
- Overlaps at this head (`9fcff540`): objectstack-ai#37166 conflicts with this branch;
`origin/main` and objectstack-ai#37226 merge cleanly. Whichever lands later merges
main.
- Left for objectstack-ai#36909 (pillar leftovers): `groupFlowsByObject`,
`withContributedFlowGroups`, `ContributedRailRow`, `useOpenContributor`,
the console's `/studio/~org` bare route, and producers still writing the
old `/automations` (all redirect).

## Verification

First read, by risk: `StudioMetadataArea.tsx` (`AreaItemOpen`: the
designer decision for both types, the `~org` leg), `metadataArea.ts`
(the shared helper and `areaItemAsksGenericPage`),
`MetadataListCreateDialog.tsx` (the taken-name branch).

Two-minute check: open
`/studio/com.example.showcase/automations?surface=flow:showcase_urgent_task_alert`;
expect the flow full-screen at
`/studio/com.example.showcase/metadata/flow/showcase_urgent_task_alert?package=com.example.showcase`,
with × to the list and ‹ › enabled.

<details><summary>Live walk-through (showcase, earlier round, head
5d9bb8d)</summary>

Stack: `pnpm dev -- --fresh -p 38917` after `pnpm build`, and the
Console dev server, driven with Playwright. It covered the list, the
full-screen canvas, › and ×, a `~org` flow, an old bookmark, bare
`/automations` and `/history`. No page errors. HotCRM was not walked:
this container holds only this repository. This round adds no new screen
path that the cases above do not drive through the real surface; it was
not re-walked.
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYnHH41MS5hWVGPia4F)_
<!-- 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
…or Setup > Packages (objectstack-ai#37166)

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

## 维护者速读

- 管理员和开发者打开 Studio
不再看到软件包卡片页:有上次用过的软件包就直接进它;没有的话,能打开设置软件包列表的人进那个列表,打不开的开发者进「全部元数据」;已安装应用「改了什么」挪到了设置里的软件包详情;「添加应用」菜单去掉了「用
AI 搭建」,「在 Studio 中新建」改名为「新建空白应用」,凡是开放了元数据编辑的环境都会出现。
- 这是 Studio 重构专题的「去掉 Studio 首页」一步:首页的入口大多已有去处,但软件包的「管理」和「全部软件包」要等 Studio
顶栏菜单那张卡(objectstack-ai#37139)补上,一步「新建应用」要等新建软件包对话框那张卡(objectstack-ai#37134);另有三个入口没能在真实环境走过,「添加应用」菜单这一轮的变化(去掉「用
AI 搭建」、改名「新建空白应用」)也没在真实环境走过,都只有自动测试覆盖。
-
维护者已裁定统一「已定制」的口径(objectstack-ai#37236),但设置里的软件包详情和本次更新说明里的一句话目前仍把标签页等排列调整算作「已定制」;改正由那张卡完成,本
PR 不妨碍它。
- 只有 Studio 权限、没有设置权限的开发者现在没有任何页面能新建软件包,因为新建入口只在设置里;这要等 Studio
顶栏菜单(objectstack-ai#37139)和新建软件包对话框(objectstack-ai#37134)两张卡落地。
- 如果出错,用户进 Studio 会落到软件包列表或「全部元数据」页,而不是首页;这次只改界面,不改数据,可以直接撤回。
  - 服务器没有报告用户权限时,这些「新建」入口按有权限处理,把人带到设置里的新建软件包;真正能否创建仍由服务器判断,席位建议保持这样。
- 本 PR 超过 3000 行(主要是删除旧首页和它的测试),请您按大 PR 流程审核后再合并。

## What changes

Epic objectstack-ai#36890 decision 9: the package-card page at bare `/studio`
(`BuilderLanding`) is removed. This PR finds a new home for every entry
it carried and deletes the page, the code only it used, and its tests.

Every Studio exit that names no package now makes one choice,
`studioEntryFallbackPath`: Setup → Packages
(`/apps/setup/component/developer/packages?face=admin`) for a principal
holding `setup.access` and `manage_platform_settings`, and
`/studio/~all/metadata` (the All metadata area) for one who may enter
Studio but not that page. The capability set is the one Studio's entry
gate read: app-shell now exports `StudioEntryPermissionsProvider` and
`useStudioEntryPermissions`, and the console's `RequireStudioAccess`
provides the set around the `/studio` subtree. Outside that provider the
set reads as holding nothing, so nobody is sent to a page they may not
open.

| Entry the home carried | Where it goes now |
|:---|:---|
| bare `/studio` | `StudioEntryRedirect` (in the lazy Studio chunk). It
opens the newest remembered package (the recent `package` entries
`StudioRoute` records) that `GET /api/v1/packages` still lists, else
`studioEntryFallbackPath`. If the list cannot be read, it opens the
newest remembered package, and Studio reports the failed read itself. |
| New package (`/studio?new=package`) | `SETUP_NEW_PACKAGE_PATH`: the
admin face with `?new=package`. It opens New Package on arrival and
drops the param with a replace. After create it lands in Studio on the
new package (objectstack-ai#36834). Callers: Home's no-agent chip, the `/ai`
no-assistant screen, the 「Add app」 menu and the no-apps screen, all
labelled 「New blank app」 / 「新建空白应用」 now (below); for an author who may
not open Setup → Packages each of them, like the bookmark, opens the All
metadata area instead (`useNewPackageDoorPath`, `newPackageDoorPath`).
An old `/studio?new=package` bookmark goes there for a holder of the
pair, and to the All metadata area for anyone else
(`studioNewPackageEntryPath`). One-step 新建应用 is objectstack-ai#37134. |
| `~all` / `~org` cards | Already in the left menu (objectstack-ai#36899). Nothing
more to do here. |
| Per-app "n customized, m switched off" and the "Customizations in this
environment" panel | `PackageCustomizationsPanel`, shown in a read-only
base's detail sheet on the admin face. It is not shown for an authored
package, a `.custom` pair or a kernel package. It has a summary line,
rows with tabs (adds Layouts), search, Show all, and 「Customize in
Studio」. **"Customized" now counts `counts.arrangements`.** This
delivers objectstack-ai#36833's requirement in the panel's new home; objectstack-ai#36833 was closed
as not planned (ruling 7125820739), so this PR does not close it. |
| Card Manage and the All packages link (development face) | Not this
card: the door is added by objectstack-ai#37139 (card note 7146329913). The
development face stays reachable by its address. |
| Recently viewed | Now Studio's entry itself: `/studio` opens the
newest remembered package. |
| 「包不存在」 → Studio home | The button follows `studioEntryFallbackPath`:
「Open the package list」 → Setup → Packages for a holder
(`engine.studio.notFound.packageList`), 「Open All metadata」 → the All
metadata area otherwise (new key `engine.studio.notFound.allMetadata`).
|
| `AppContent` fallbacks, `packagedActionsStudioPath` fallback with no
package named | `SETUP_PACKAGES_PATH`. |
| `studio:builder` (the `@objectstack/studio` app's 「应用构建」) | Forwards
to `/studio`. |
| 「Add app」 (sidebar app menu, and the no-apps screen's buttons) |
Maintainer rulings 7153161067 and 7153400210 on objectstack-ai#36908: 「Build with AI」
(to bare `/studio`) is removed, and `new-in-studio` is pushed for every
admitted viewer on a deployment that offers metadata authoring, whether
or not the build agent is served. It is relabelled under its existing
key `home.build.inStudio`: en "New blank app", zh-Hans 「新建空白应用」, zh-Hant
regenerated (「新建空白應用」), and the eight other packs translated anew, as
`check:i18n-drift` requires of an en change. Home's no-agent chip and
the `/ai` button read the same key; their inline `defaultValue` now
matches the en value (`check:i18n-keys`); the chip's condition and
target are unchanged. It stays inside `isAiStudioEnabled()`, because
with `features.aiStudio` false the runtime offers no metadata authoring;
a viewer `useMayAddApp` admits there gets the marketplace's two entries,
so the list is never empty for an admitted viewer. `SidebarAppMenu`
reads the list itself and draws neither 「Add app」 nor its separator for
an empty list. Home's 「Build an app」 chip and Home's 「Build with AI」
drawer button are untouched. |

Removed: `BuilderLanding.tsx`, its `BuilderLanding.*` test files,
`fetchInstalledPackageRow` (only the home's Manage called it) with its
pin, and the home's console frame in `StudioRoute` (header and command
palette). Two deleted suites still pinned code that stays, and those
halves moved (see Tests): the permission matrix's read-only hint copy,
and the three new-app door cases. `LandingCustomizationsPanel` and
`landingCustomizations-io` were renamed and rewritten as
`PackageCustomizationsPanel` and `packageCustomizationRows`.
`newAppDoor.ts`, `PackageFormDialog`'s `newApp` branch and the
`engine.studio.newApp.*` strings stay for objectstack-ai#37134; the branch keeps its
three cases, now mounted on `PackageFormDialog` itself.

**Strings.** The home's `engine.studio.landing.*` keys and
`engine.studio.landingHome` that ship in the released
`@object-ui/i18n@18.6.0` (71 in each of `en` and `zh`, measured against
the published tarball; 3 of them are still read by the Packages page)
stay, the other 68 no longer read. Removing a published key is a
narrowing, so this PR removes none. The four landing keys added after
18.6.0 and never released (`manage`, `manageTitle`, `allPackages`,
`allPackagesTitle`) are removed. `engine.packages.customizations.*`,
`engine.studio.notFound.packageList` and
`engine.studio.notFound.allMetadata` are added (38 keys per language).
The PR changes no existing value.

**Changesets.** `36908-remove-studio-home.md` (app-shell, console,
platform-objects) says what users see, in their words. The i18n note is
in its own `@object-ui/i18n`-only changeset,
`36908-studio-home-strings.md`. Both carry the two declaration lines.

Checklist: `studio-authoring.package-customization-counts-and-marks`
(rev 4) and `studio-authoring.org-scope-flows` (rev 5) are re-pointed.
The rev 4 note now says objectstack-ai#36833 was closed as not planned and this card
delivers its requirement; its `acceptance[2].verify` names
`PackageCustomizationsPanel.test.tsx` as the pin. Also re-pointed off
the removed home: `automation.setup-packaged-automation-board` (rev 15:
title, `steps[1]`, `acceptance[0]`; the packaged-actions bookmark with
no `?package=` opens Setup → Packages),
`studio-authoring.first-run-loop` (rev 16, `steps[1]`: 「Build an app」
opens the last package or Setup → Packages, the other chip reads 「New
blank app」), and the fixture lines of
`automation.packaged-flow-clone-contract` (rev 14),
`studio-authoring.held-edit-leave-guard` (rev 12) and
`ux-conventions.write-feedback` (rev 18), which made their scratch
package on the Studio landing.

Size at `54e4586e`: +2,306 / −5,217 across 101 files rename-aware
(+2,680 / −5,591 across 103 without renames), mostly deletions. Per
ruling 7145880574 on objectstack-ai#36890 this lands as one PR, reviewed by the
maintainer after L1.

**Overlaps** (overlap-check at `54e4586e`, against `origin/main`
`4fb03ebb`, exit 1 for objectstack-ai#37249 below): origin/main merges cleanly. This
round merged main six times: `cf77ecb9` (K 12) was clean, and `54e4586e`
(K 9, with objectstack-ai#37169) is resolved below. Resolved:
- objectstack-ai#37089 (landed as `886e9707`): conflicted in
`StudioDesignSurface.notFound-26708`; both sides added the same
`@object-ui/plugin-detail` import, main's comment kept. The same merge
brought objectstack-ai#37198's address-guard fixtures spelling the removed
`STUDIO_LANDING_PATH`; they are dropped here.
- objectstack-ai#37185 (landed as `ad604c10`): `PackageSwitcher.tsx` keeps this
branch's side (`fetchInstalledPackageRow` and `STUDIO_LANDING_PATH`,
which objectstack-ai#37185 moved onto the authenticated fetch, are deleted here); its
edits to the six test files this branch deletes were stub adaptations (a
`headers` field, a module-top import, the gate's fetch double) with no
subject left to pin. The new customizations read goes through
`packageCustomizations-io.ts`, already on the authenticated fetch;
`PackageCustomizationsPanel.test.tsx`'s stub now carries `headers: new
Headers()`.
- objectstack-ai#37204 (landed as `bd98dd12`): `StudioRoute.test.tsx` and
`StudioRoute.lazyBuilder-11798` keep this branch's removal of the
home-frame cases; `StudioRoute.metadataArea-28561` keeps this branch's
comment line and objectstack-ai#37204's `app-bar-product-home` test-id absence,
without the old-name check.

- objectstack-ai#37241 (landed as `fc216747`): `SidebarAppMenu.tsx` takes its
`AppMenuList` and keeps this branch's `offerAddApp` separator; its new
`SidebarDocsPortalMenu` gets the same rule (the 「Add app」 list read
there, nothing drawn for an empty list, `AddAppSubmenu entries={…}`),
pinned in its `SidebarAppMenu-36112` block (「New blank app」 and no
「Build with AI」 with the build agent served; a Studio-only author to
`~all`; the empty-list guard).
- objectstack-ai#37168 (landed as `1b91538b`): `PackageFormDialog.newAppStep-36748`
keeps this branch's host and adds objectstack-ai#37168's
`/studio/:packageId/metadata/*` route; `notFound-26708` keeps this
branch's provider and Setup / All metadata routes and adds objectstack-ai#37168's
metadata-area route (the removed home's `/studio` route stays out). Its
edits to the two `BuilderLanding.*` files this branch deletes were the
switched-off action's new address; that pin now lives at
`PackageCustomizationsPanel.test.tsx:188`, updated here to
`/studio/APP/metadata/object/opportunity?action=clone_opportunity`.

- objectstack-ai#37169 (landed as `4fb03ebb`; this PR is the second lander):
`BuilderLanding.orgScope-11553` stays deleted. objectstack-ai#37169 only moved the
removed home's ~org card to `/studio/~org/metadata/flow?source=runtime`,
and the org-scope entry is pinned by
`StudioDesignSurface.packageLessFlows-11553`, which objectstack-ai#37169 updated.
`notFound-26708` keeps this branch's `StudioEntryPermissionsProvider`
and Setup / All metadata routes, with objectstack-ai#37169's comment naming
`/automations` too. Nothing else conflicted. `AREA_DESIGNER_PAGE_TYPES`
and the removed `AreaHistoryRedirect` exemption came in untouched. The
18.6.0 studio key comparison was re-run against `4fb03ebb`: the branch
removes only the four never-released keys, adds 38 per language and
changes 0 values; all 71 released landing keys are present.

Still open; whichever lands second merges main and resolves:
- objectstack-ai#37249 (objectstack-ai#37227) conflicts in `HomePage.desktopNoApps-36732` and
`HomePage.noAgentsBuildChip-26614` (this branch's Studio-only chip
case). Beyond the text: its first case expects the no-apps doors
`[template, marketplace]` with the build agent served, and 「New blank
app」 now shows there too (ruling 7153400210), so the second lander keeps
`new-in-studio` first. Its HomePage filter of `build-with-ai` becomes a
no-op. It touches neither `home.build.inStudio`'s values nor the chip's
lines (measured by `git merge-tree` against its branch).
- objectstack-ai#37226, objectstack-ai#37215, objectstack-ai#37210, objectstack-ai#37165, objectstack-ai#37282 and objectstack-ai#37284 merge cleanly.

### Read first

1.
`ui/packages/app-shell/src/views/studio-design/StudioEntryRedirect.tsx`:
the whole `/studio` decision, and the two capability helpers. Risk:
where a non-administrator lands (the `studioEntryFallbackPath` pair),
now for the bookmark too.
2.
`ui/packages/app-shell/src/views/studio-design/PackageCustomizationsPanel.tsx`
and the mount in `PackagesPage.tsx` (`PackageDetailSheet`). Risk: the
gate `!authoring && !writable && !isKernel &&
!isCustomizationPackage(id)`.
3. `ui/apps/console/src/components/StudioRoute.tsx` with
`studioEntryPermissions.ts`: the index route and the capability set the
entry gate provides to Studio (`StudioEntryPermissionsProvider`), which
the not-found exit reads.

### Two-minute verification

As the seeded admin with nothing remembered, open `/_console/studio`.
Expected: you land on Setup → Packages
(`…/developer/packages?face=admin`). Open the ObjectStack Showcase row:
its detail shows "Customizations in this environment" with a Customize
in Studio link.

## Tests

New pins:
- `StudioEntryRedirect.test.tsx` (12 cases): the newest remembered
package the list still names opens; a package the list no longer names
is skipped; nothing remembered leads to Setup → Packages, read without a
list request; a Studio-only principal lands on `~all`; a failed list
read opens the newest remembered package; the old new-package bookmark
is forwarded for an administrator (CONTROL) and sends a Studio-only
principal to `~all`, never to Setup; both helpers read the same
capability pair.
- `StudioDesignSurface.notFound-26708`: the not-found button opens Setup
→ Packages for an administrator (CONTROL), and for a Studio-only
principal it reads 「Open All metadata」 and opens `~all`, never Setup.
The harness provides the entry gate's set through
`StudioEntryPermissionsProvider`.
- `PermissionMatrixEditor.readOnlyHintCopy-12171.test.ts`: the half of
the deleted `BuilderLanding.environmentOverlayCopy-12171` that covered
`perm.readOnly.artifact.hint`, which `PermissionMatrixEditor` still
draws. No table names the organization axis; lit control that it names
the environment overlay in every table; lit control that `t()` serves
the value the extractor read, for every declared locale.
- `PackageFormDialog.newAppStep-36748.test.tsx`: the three
`BuilderLanding.newAppDoor-36748` cases, moved onto `PackageFormDialog`
with `newApp={newAppStep(client, locale)}`, mounted as the home mounted
it (create mode, Studio on the new package after save): the dialog
worded for an app in zh; package POST, app draft, app publish, then the
Studio header names the app and 「‹ Back to app」 opens it; a taken app
name refuses the confirm and writes nothing.
- `PackageCustomizationsPanel.test.tsx`: the rows and counts, including
the **objectstack-ai#36833 arrangement-only case**; the empty and failed states (never
"0"); row and switched-off-action links; tabs, search and Show all; zh
words; and the moved rows and labels io.
- In the `PackagesPage` administration-face harness, two describes: "the
new-package deep link" (3 cases) and "a read-only base's customizations
in its detail" (6 cases: a code package draws the section with
arrangements counted; an authored package does not; the development face
does not; a read-only `.custom` pair draws none and sends no
customizations request; a kernel package's detail, opened directly
because the admin face lists none, draws none and sends no request;
CONTROL, the same direct render of a code package draws it and reads
once).
- Unreported capability set on the doors:
`HomePage.noAgentsBuildChip-26614` renders Home inside the real
`MePermissionsProvider` with an authenticated answer that carries no
`systemPermissions`; the chip opens Setup's New Package (the fail-open).
CONTROL, the same provider with a reported set holding `manage_metadata`
alone: the chip opens `/studio/~all/metadata`.
- Studio-only author on the doors outside Studio: `SidebarAppMenu-36112`
(「New blank app」 links to `/studio/~all/metadata`) and
`HomePage.noAgentsBuildChip-26614` (the chip navigates there, never to
Setup); `StudioEntryRedirect.test` holds `newPackageDoorPath` to the
same two answers.
- `SidebarAppMenu-36112` (the shared harness, new top-level describe):
with build and ask, the legacy build id, ask only, other agents only, or
no agent served, 「Add app」 offers `new-in-studio` ("New blank app", to
New Package), the template and the marketplace, and never 「Build with
AI」; never empty for an admitted viewer with authoring but no
marketplace, or a marketplace but no authoring; CONTROL, with neither
the viewer is not admitted; guard, an admitted viewer handed no entries
gets no 「Add app」 and no separator. `HomePage.desktopNoApps-36732`: the
no-apps doors are `[new-in-studio, template, marketplace]` with the
build agent served.
- Converted, not deleted: the StudioRoute gate, lazy-module,
recent-visit and access-notice pins; `studio:builder` registration (now
a forward); `setupMetadataRedirect`; `studioAddress` and its guard (the
guard no longer names the deleted `STUDIO_LANDING_PATH`); the Home,
sidebar 「Add app」 and `/ai` deep-link hrefs; the vocabulary census;
`consoleTopBar.height-12639`; `AppContent.setupMetadataStudio-28578`.

<details><summary>Local runs at this round's heads</summary>

**Rework 2, objectstack-ai#37169's merge, head `54e4586e`** (after merging
`origin/main` `4fb03ebb`, K 9, and `pnpm --filter
'@object-ui/console^...' build`, lock VERDICT command-exit 0):
- vitest over app-shell `views/studio-design`, `console/home`,
`console/ai`, `console/__tests__`, `layout/`, `hooks/`, `PackagesPage*`
and `PackageFormDialog*`, plus console `components/`: Test Files 826
passed (826); Tests 6948 passed; lock VERDICT command-exit 0.
- type-check `@object-ui/app-shell` (src + `tsconfig.test.json`) and
`@object-ui/console`: exit 0. eslint on the two touched test files: exit
0.
- Exit 0: check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, `check-platform-checklist
--changed-from origin/main` (11 anchors, 0 lost), and under `ui/`
check:i18n-keys, check:i18n-drift, check:unreferenced-sources and the
three vi-mock gates.
- The full `check:platform-checklist` exits 1 on one finding, and
`origin/main` `4fb03ebb` fails the same way: `automation.json` anchors
`FlowItemMoreMenu.tsx#FlowItemMoreMenu`, which objectstack-ai#37169 removed. That is
main's to fix, not this PR's.

**Rework 2 (delta L1 S1, N4, N5), head `cf77ecb9`** (after merging
`origin/main` `4ed453dc`, K 12, clean, and `pnpm --filter
'@object-ui/app-shell^...' build`, lock VERDICT command-exit 0):
- vitest over `console/home`, `console/ai`, `RequireAiSurface`,
`AppContent.setupMetadataStudio-28578`, `setupMetadataRedirect.test`,
`PackageCustomizationsPanel.test`, `StudioEntryRedirect.test`,
`SidebarAppMenu-36112` and `hooks/`: Test Files 210 passed (210); Tests
1827 passed; lock VERDICT command-exit 0.
- Mutation through `scripts/ablation-replace.mjs`:
`useNewPackageDoorPath` made to fail closed
(`Array.isArray(systemPermissions) && hasCapabilities(…)`) →
`HomePage.noAgentsBuildChip-26614` 4 failed / 12: the new unreported
case, plus the three no-agent cases whose stub leaves
`systemPermissions` undefined; the reported-set control stayed green.
Restored to the HEAD blob, `git diff HEAD` empty.
- type-check `@object-ui/app-shell` (src + `tsconfig.test.json`): lock
VERDICT command-exit 0. eslint `--no-inline-config` on the 4 touched ui
files: exit 0.
- Exit 0: check:platform-checklist, `check-platform-checklist
--changed-from origin/main` (4 anchored files, 11 anchors, 0 lost),
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:issue-citations, and under `ui/`
check:i18n-keys, check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape. `git grep -n "Studio landing"
docs/qa/platform-checklist/areas`: history entries only, plus
`studio-authoring.json:35` and `:2290`, already stale on main (the
studio-home button).
- overlap-check: exit 1, only for objectstack-ai#37249 and objectstack-ai#37169 (objectstack-ai#37169 has since
landed; see Overlaps).

**Third part (seat answers to N1 and N3, then objectstack-ai#37241's and objectstack-ai#37168's
merges), final head `1c7f29cc`:**
- After merging main with objectstack-ai#37241 and objectstack-ai#37168 (`2ae0823f`) and rebuilding
(VERDICT command-exit 0): `views/studio-design`, `layout/`,
`console/docs`, `console/home`, `console/ai`, `console/__tests__`,
`hooks/`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, console `components/` and `pages/`,
`packages/i18n/src/__tests__`: Test Files 1162 passed (1162); Tests
10870 passed, 13 skipped; VERDICT command-exit 0. type-check
`@object-ui/i18n`, `@object-ui/app-shell`, `@object-ui/console`: VERDICT
command-exit 0. Exit 0 at this head: check:test-source-alias,
check:nul-bytes, check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
check:issue-citations, check-changeset-no-major, check-empty-changeset,
check-adr-0087-registration, `check-platform-checklist --changed-from
origin/main`, and under `ui/` check:i18n-keys, check:i18n-drift,
check:unreferenced-sources, check:phantom-deps,
check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape.
- After a fresh closure build (VERDICT command-exit 0): `layout/`,
`console/home`, `console/ai`, `RequireAiSurface`, `hooks/`,
`StudioEntryRedirect*`, `notFound-26708`, console `StudioRoute*`: Test
Files 376 passed (376); Tests 3153 passed; VERDICT command-exit 0.
- Mutation through `scripts/ablation-replace.mjs`:
`useNewPackageDoorPath` forced to the Setup path (`true ||
hasCapabilities(…)`) → 2 failed / 43, exactly the two Studio-only door
cases; restored to the HEAD blob, `git diff HEAD` empty.
- type-check `@object-ui/app-shell` and `@object-ui/console`: VERDICT
command-exit 0. eslint on the 7 touched files: 0 errors. Exit 0:
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, and under `ui/` check:i18n-keys,
check:i18n-drift, check:unreferenced-sources, check:phantom-deps,
check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape.

**Second part of the round (the 「Add app」 rulings, then three main
merges), head `64e7071b`:**
- At `048a5a84` (rulings + first merge): `layout/`, `console/home`,
`console/ai`, `RequireAiSurface`, `hooks/`, `packages/i18n/src`,
`PackageCustomizationsPanel`, console `StudioRoute*`: Test Files 486
passed (486); Tests 5161 passed, 13 skipped; lock VERDICT command-exit
0.
- At `fe78cd2b` (after objectstack-ai#37185's merge), the overlap:
`views/studio-design`, `layout/`, `console/home`, `console/ai`,
`console/__tests__`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, `sameServerFetch*` (objectstack-ai#37185's ratchet),
`apps/console/src/components`, `packages/i18n/src`: Test Files 1 failed,
888 passed (889); Tests 2 failed, 8291 passed. The failures were two
cases of `layout/__tests__/designModeMenuSave-36363`, a file this branch
does not touch; run alone it read 47 passed (47), and it passed again in
the run below, so it was load in the big run.
- At `45e4a5eb` (after objectstack-ai#37204's merge and a rebuild):
`apps/console/src/components`, `layout/`, `console/home`, `console/ai`,
`RequireAiSurface`, `packages/i18n/src/__tests__`: Test Files 436 passed
(436); Tests 4837 passed, 13 skipped; lock VERDICT command-exit 0. (A
first attempt at this run hit a 590 s cap before its verdict and is not
counted.)
- Mutation checks through `scripts/ablation-replace.mjs` (blob moved,
restored to the HEAD blob, `git diff HEAD` empty): the hook's entry key
back to `build-with-ai` → `SidebarAppMenu-36112` 7 failed / 32; the
empty-list guard removed (`offerAddApp = mayAddApp`) → 1 failed / 32,
the guard case.
- CI on `45e4a5eb` failed `Type Check UI` at `check:i18n-keys`: Home's
chip kept `defaultValue: 'New in Studio'` against the new en value.
Fixed at `64e7071b` with the chip's default and the eight packs
(`check:i18n-drift`); locally at `64e7071b`, exit 0: `check:i18n-keys`,
`check:i18n-drift`, and the job's other static steps
(`check:phantom-deps`, `check:self-import`,
`check:unreferenced-sources`, `check:doc-example-readers`,
`check:side-effects-array`, `check:spec-symbols`,
`check:icon-record-names`, `check:designer-field-key-parity`,
`check:action-forward-parity`, `check:esm-specifiers`,
`check:handler-key-reads`, `check:metadata-write-doors`,
`check:control-bytes`, `check:shell-escape-residue`,
`check:vi-mock-specifiers`, `check:vi-mock-inherit`,
`check:vi-mock-override-shape`, `check:test-path-roots`,
`check:prompt-keys`), plus `check:keyed-text-bounds` and
`check:i18n-stale-fill`. Vitest over `packages/i18n/src`,
`console/home`, `console/ai`, `RequireAiSurface`,
`SidebarAppMenu-36112`: Test Files 213 passed (213), Tests 2745 passed,
13 skipped, lock VERDICT command-exit 0.
- type-check at `45e4a5eb` after `pnpm --filter '@object-ui/console^...'
build` (VERDICT command-exit 0): `@object-ui/i18n`,
`@object-ui/app-shell` (src + `tsconfig.test.json`),
`@object-ui/console` passed, VERDICT command-exit 0. eslint
`--no-inline-config` on this part's 6 ui files: 0 errors.
- Gates at `45e4a5eb`, all 0: check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
check:issue-citations, check-changeset-no-major, check-empty-changeset,
check-adr-0087-registration, `check-platform-checklist --changed-from
origin/main` (11 anchors, 0 lost). `pnpm --filter @object-ui/i18n
gen:zh-hant` after the merges: every target already current.
- 18.6.0 studio-namespace comparison at `fe78cd2b`, unchanged: 71/71
published landing keys present in `en` and `zh`; 35 missing, all already
missing on main; 0 values changed vs main, 4 never-released keys
removed, 38 added.

**First part of the round (L1 and contract-review fixes):**

- Targeted vitest at `4121473e` (after the first main merge, K 26), one
locked run over `apps/console/src`, `packages/i18n/src`,
`views/studio-design`, `metadata-admin/PackagesPage*`,
`PackageFormDialog*`, `PermissionMatrixEditor*`,
`console/__tests__/AppContent*`, `console/home/__tests__/HomePage*` and
`layout/`: Test Files 1 failed, 1050 passed (1051); Tests 1 failed,
10456 passed, 13 skipped. The failure was the moved new-app pin's own
harness (it navigated to the bare package path, which only the console
route table expands); fixed at `4121473e` by landing on the package's
Studio home as the removed home did, then 3 passed (3).
- After the second main merge (`df4a65cb`) and the guard fix
(`329ddefc`), the overlap re-run under the lock: `views/studio-design`,
`apps/console/src/components`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, `packages/i18n/src`, `consoleTopBar*`,
`AppContent*`: Test Files 594 passed (594); Tests 6016 passed, 13
skipped; lock VERDICT command-exit 0.
- Mutation checks, each through `scripts/ablation-replace.mjs` (anchor 1
→ 0, blob verified moved, restored to the HEAD blob with `git diff HEAD`
empty), at `4121473e`:
- 「组织」 written into the zh `perm.readOnly.artifact.hint`:
`PermissionMatrixEditor.readOnlyHintCopy-12171` 1 failed / 3 ("no table
names the organization axis").
- `!isKernel` removed from the detail gate (`PackagesPage.tsx:1271`): 1
failed / 6, the kernel case only.
- `!isCustomizationPackage(id)` removed: 1 failed / 6, the `.custom`
pair case only.
- The bookmark forward reverted to `SETUP_NEW_PACKAGE_PATH`:
`StudioEntryRedirect.test` 1 failed / 11, the Studio-only bookmark case.
- The not-found exit reverted to `SETUP_PACKAGES_PATH`: `notFound-26708`
1 failed / 14, the Studio-only case.
No dist leg was needed: these tests import app-shell by relative path,
and the ui vitest config aliases `@object-ui/i18n` to its `src`.
- type-check at `329ddefc` after `pnpm --filter '@object-ui/console^...'
build` (lock VERDICT command-exit 0): `@object-ui/i18n`,
`@object-ui/app-shell` (src and `tsconfig.test.json`, which lists all
six new or changed test files) and `@object-ui/console` passed, lock
VERDICT command-exit 0.
- eslint `--no-inline-config` on this round's 11 changed ui files: 0
errors, 15 warnings.
- Gates at `329ddefc`, exit captured before any pipe, all 0:
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
`check-platform-checklist --changed-from origin/main` (11 anchors, 0
lost). At `4121473e`, also 0: check:issue-citations,
check:doc-authoring, check:gitlink-declared, check-changeset-no-major,
check-empty-changeset, check-adr-0087-registration (2 non-breaking
changesets), check-closing-keyword-parity,
check:changeset-gate-self-tests, and the edited
`ui/scripts/check-eager-closure-budget.mjs`'s tests (6 files, 305
passed). `check:i18n`: PREREQUISITE NOT MET locally (the CLI build
closure is not built); it reads the platform translation bundles, which
this round does not touch; its evidence is CI. `dispatch-gates --ran`:
57 of 74 derived families not run locally, declared; their evidence is
this head's check-runs.
- **i18n against the published `@object-ui/i18n@18.6.0`** (`npm pack`,
read by AST, nothing evaluated), on the merged tree: all 71 published
`engine.studio.landing*` keys are present in `en` and `zh`; 35 published
keys are missing at this head and all 35 are already missing on
`origin/main`; against `origin/main` this PR changes 0 values, removes
exactly the four never-released keys, and adds 38 per language
(`engine.packages.customizations.*`,
`engine.studio.notFound.packageList`,
`engine.studio.notFound.allMetadata`).
</details>

## Acceptance notes

- The environment-wide list the home drew across all installed apps (one
list, a total, grouped by app) is now shown per app only, in each
read-only base's detail in Setup → Packages.
- "Customized" now has two meanings. The Setup detail counts tab,
field-group and action-layout arrangements with overrides and
extensions; the All metadata header still draws `customizationTotal`
(overrides + extensions, `customizationMarks.ts:96-97`, drawn at
`DirectoryPage.tsx:246-249`), and the same total gates the list filters
in `ResourceListPage` and `useListOrderedNames`. Not aligned here:
adding arrangements to that total would stop the header equalling the
sum of its per-type tiles and change which lists offer the customized
filter. Not aligned here (seat answer A): follow-up card filed: objectstack-ai#37236.
objectstack-ai#37236 has since been ruled B (7158100447): 「已定制」 stays overrides +
extensions, and the Setup detail's count changes there to match. Until
it lands, the Setup detail counts arrangements as described here.
- The new-package doors outside Studio (Home's no-agent chip, the `/ai`
screen's door, 「Add app」's 「New blank app」 and with it the no-apps
screen) make the same choice as Studio's entry, through
`useNewPackageDoorPath` (seat answer to N1): Setup's New Package for a
holder of `setup.access` + `manage_platform_settings`, the All metadata
area for an author who may enter Studio but not open that page. They sit
outside the entry gate's provider, where `useStudioEntryPermissions`
holds nothing, so they read the session's own
`usePermissions().hasCapabilities`, which fails open on an unreported
set as the doors' own authoring gate does (the Setup app still refuses a
non-holder). That is the doors' doctrine, judged A in contract review
7162083002 ④: the door is only a link, and the server still refuses a
package create without `manage_metadata` (`package-routes.ts:102-106`).
Pinned by the unreported-set case in `HomePage.noAgentsBuildChip-26614`
(the real `MePermissionsProvider`, no `systemPermissions`, the chip
opens Setup's New Package; control: a reported set without the pair
opens `/studio/~all/metadata`).
- A Studio-only author (`studio.access` + `manage_metadata`, without the
Setup pair) has no screen that creates a package at this head: 「New
blank app」 opens All metadata, which has no New Package, where on main
the same door opened the dialog inside Studio. The server still admits
the create. This follows ruling N1 (a), and waits for objectstack-ai#37134 / objectstack-ai#37139.
- Two console test files pinned only the home's frame and are deleted:
`StudioRoute.landingI18n.test.tsx` (its header crumb) and
`StudioRoute.searchPalette-11863.test.tsx` (⌘K on the home; ⌘K inside
Studio is objectstack-ai#36900). The other StudioRoute pins now stub the entry.
- Duplicate pins named for deleted tests (AGENTS.md, ruling 6120820653):
the new-package deep link is pinned in the `PackagesPage` admin harness;
the customization counts, rows and labels in
`PackageCustomizationsPanel.test.tsx`; the org-scope entry by
`StudioDesignSurface.packageLessFlows-11553` and the menu pins from
objectstack-ai#36899; the permission hint copy and the new-app step moved, above. The
home's own layout, ordering, Duplicate form, recent cards and Manage
pins have no remaining surface to pin.
- Possibly orphaned now that the frame is gone, not removed here:
`AppHeader` `variant="studio"` and `CommandPalette` `scope="studio"`
(objectstack-ai#36900 may reuse the scope).
- 「Build with AI」 is gone from the 「Add app」 menu and the no-apps screen
(ruling 7153161067). Home's 「Build an app」 chip still targets bare
`/studio`, and Home's own 「Build with AI」 drawer button is untouched;
objectstack-ai#37227 / objectstack-ai#37249 removes both from Home.
- The kept-unread released studio keys stay as they are this round (the
seat made dropping them optional under the 19.0.0 ruling);
`home.buildWithAI` is still read by Home and is untouched.
- Recents are read local-first, and the server copy arrives after first
render (`RecentItemsProvider`). On a device with no local copy,
`/studio` falls back before that copy arrives; "opens the package you
were last in" holds on a device that already has it.
- The 68 published landing keys are kept and unread.
`check-i18n-dead-keys` (report-only, not in CI) will list them as
candidates, and a later change can decide to retire them.
- `docs/qa/platform-checklist/FOLLOW-UPS.md` still names
`BuilderLanding` in a dated follow-up entry; it is a log and was left as
written.

## Verification

Walked on a live stack at `a21c7b6f` (the previous head). Server: `pnpm
-C examples/app-showcase exec objectstack dev --seed-admin -p 4710` (CLI
and showcase closure built in a worktree). Console: this branch's
`ui/apps/console` under Vite on 4711, proxied to it. Signed in as the
seeded admin and driven with Playwright; key screens confirmed by
screenshot.

| Entry | Observed |
|:---|:---|
| `/studio`, nothing remembered | →
`/apps/com.objectstack.setup/component/developer/packages?face=admin` |
| `/studio?new=package` (old bookmark) | → same page, `new=package`
dropped, New Package dialog open |
| `/apps/setup/component/automation/packaged-actions` (no package) | →
Setup → Packages (admin face) |
| `/studio/no_such_pkg_36908` | 「Package not found…」 with 「Open the
package list」 → Setup → Packages |
| ObjectStack Showcase (code) row → detail | "Customizations in this
environment", "No changes in this environment yet", Customize in Studio
→ `/studio/com.example.showcase/data` |
| `/studio` after visiting that package | → back into
`/studio/com.example.showcase/data…` (remembered) |
| Sidebar app menu → 「Add app」 | New in Studio (the label at `a21c7b6f`;
「New blank app」 now) → `…packages?face=admin&new=package`; clicked, it
lands there with the dialog open |
| `/ai` (no assistant on this stack) | 「New in Studio」 (the label at
`a21c7b6f`; 「New blank app」 now) → `…packages?face=admin&new=package` |
| New Package dialog → Create package | →
`/studio/com.default.walk-pkg-36908/data` |
| That authored package's detail | no customizations section (count 0);
Open in Studio present |
| `/studio/~all/metadata` | renders the All Metadata Types area |

Not walked live, each pinned by unit tests:
- Home's 「New blank app」 chip (「New in Studio」 at `a21c7b6f`): its
condition does not hold on this seeded stack
(`HomePage.noAgentsBuildChip-26614`, `HomePage.desktopNoApps-36732`).
- A non-administrator's landings (bare `/studio`, the old bookmark and
the not-found button for a Studio-only principal): no such principal is
seeded (`StudioEntryRedirect.test.tsx`,
`StudioDesignSurface.notFound-26708`); their target `~all` renders
above.
- `studio:builder`: the `@objectstack/studio` app does not load on a
stock boot (`registerStudioComponents.builderLazy-11798`).

This round's changes were not walked live: the Studio-only exits, the
moved pins and the changesets change no administrator-visible entry
above; the 「Add app」 menu's new contents (no 「Build with AI」, 「New blank
app」 always) and the relabel are pinned in `SidebarAppMenu-36112` and
`HomePage.desktopNoApps-36732`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYkEULEjF814KSPBLVC)_
<!-- 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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants