Repository navigation
feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) - #37169
Conversation
…on the area (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
…, the old address redirect (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
…create pins on the list dialog (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
…'s address (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
…-only cases (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H Co-authored-by: Claude <noreply@anthropic.com>
…ow-designer-fullscreen
…ge-less scope's flow leg on its own helper (#36903) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
… the list, another flow is another address, the area's read-only gate (#36903) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
…low's page (#36903) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
…dynamic imports at collection; the changeset names the review links (#36903) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
…orts and a dead assignment go (#36903) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYoua951EYpayDLjTom
|
repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H Finalized head for L1 · 2026-11-25T03:31Z ·
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: Full review of this head, made without the L1's conclusions. Inputs:
The recogniser decides no face from the paths and defers to the changeset. The changeset reads ① Derived judgmentsPublished
i18n, checked against the released tarball. I read
M1 (must-fix) — the PR removes 10 locale keys that
Redirects. Each is judged against what the retired pillar wrote to the address bar at the merge base.
S1 (should-fix) — no case pins the pair class of old flow bookmarks, and the old pin was repointed rather than kept as a redirect case.
Unsaved-edits guards. ×, ‹ ›, the menu and a reload are pinned with a no-edit CONTROL in api-surface baselines. The only baselines are Accept sets. No schema, spec or authorable key moves.
N1 (nit) — the last case of ② Semver levelThe changeset has
③ Boundary flags
Implemented-by: VERDICT: FAIL |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
…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>
…sharing overview or the area; no type opens a pillar; review links in user terms in the changeset (#36903) Claude-Session: https://claude.ai/code/session_01QSeKYnHH41MS5hWVGPia4F Co-authored-by: Claude <noreply@anthropic.com>
…36903) Lint UI on 7a7af7a refused fireEvent/screen in expectedMisses-11799 and parseSurfaceParam in metadataArea.test (object-ui/no-unused-imports). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnHH41MS5hWVGPia4F
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: Full review of this head. It replaces the FAIL record 7152171935 (head
① Derived judgmentsThe narrowing, measured against the release.
The declaration matches the removal.
Published exports and types: none moved. Every source change outside i18n is in The merge with #37168 (
Review links (the accepted Accept sets. No schema, spec or authorable key moves. api-surface baselines. Nothing under Ablations at this head. Baseline: 9 files, 130 tests, all green. Each mutation went red where the pin is, and the worktree was clean after each.
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing against the published package on
Nits:
Implemented-by: VERDICT: PASS No must-fix, no should-fix. |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 维护者速读
席位意见:通过。上轮的必改项和应改项都已修好;18 处关键改动逐一撤回,其中 16 处对应的测试都会变红;与主干的合并干净,与对象设计器那次合并逐个文件核对过;检查全绿。剩 6 处小瑕疵(两个测试验得不够实、发版说明的两处措辞、正文里的两个计数等),不影响合并。与 #37166 有 2 个文件冲突,后落地的那张合入主干。 Hand-off · 2026-11-25T13:03Z · @os-zhuang — PR #37169 (card #36903) is ready for your review. Tier H by size (5,809 changed lines). Seat ACCEPT 7163221069 and contract review PASS 7163210769 (CONTRACT_REVIEW_TIER), Head-sha |
…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>
…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>
…ddress, tabs in objectstack-ai#36513's order (objectstack-ai#37168) Fixes objectstack-ai#36904 Refs objectstack-ai#36513 (its section 一, the tab order, is delivered here; its section 二 was superseded by epic objectstack-ai#36890) Clause-②: no Metadata-protocol: none ## 维护者速读 - Studio 里点开一个对象,设计器在右侧整屏打开,有自己的地址;左上角 × 回对象列表,右上角 ‹ › 看上一个、下一个,设计器左边那一列对象列表没有了。 - 这是 Studio 改版专题里的对象设计器一张,也按之前定的把对象页签排成:记录、字段布局、验证、操作、设置、钩子、API。 - 出错时管理员会打不开或改不了对象(Studio 最常用的路径),旧链接也会落到对象列表;整张合并即可撤回。 - 这张约 4200 行(4,177 行),超过 3000 行:其中删掉的测试约 1700 行(六个整份删掉的测试文件约 1000 行,测的是左侧列表、页内新建、空包页面和实时请求,这些本卡都去掉了),改写和新增的测试约 1000 行,产品代码约 1400 行;需要您审核后合并。 ## What changes - **The object designer is full-screen on the object's address**, `/studio/PKG/metadata/object/NAME`, mounted by the "All metadata" area (`StudioMetadataArea`). The area decides it with the zone's shared designer-page helper from objectstack-ai#37089: `AREA_DESIGNER_PAGE_TYPES`, `areaItemOpensDesignerPage({ packageId, type })` and `areaDesignerItemOf(pathname, segment)`, which reads `new` as the create page, never an item. objectstack-ai#37089 landed first; this branch merged main, so the one list now holds both types, `['permission', 'object']`, and `AreaItemOpen` mounts the permission set's matrix or the object designer by type. For an object, the environment scope and `?review=1` keep the generic page, as the pillar did (`areaItemAsksGenericPage`, shared with `areaItemPillarPath`); the permission page keeps objectstack-ai#37089's behaviour and opens on any query. The header is the shared full-screen item header (`ResourceDetailHeader`): × back to the object list with the list's filter and sort, ‹ › through the list, Esc. No switcher, no "open in app" (epic decision 7). - **No left list, no in-page New.** `DataPillar` takes `objectName` and designs that one object: the object rail, its search and customization filter, the in-page 新建 dialog and the empty-package state are gone. Creating an object is the object list's 「新建」 (`MetadataListCreateDialog`, objectstack-ai#36897), which already has the OWD choice, the app-menu join and the read-only base's `.custom` landing; checked before deleting this copy. - **Tabs in objectstack-ai#36513's order**, verbatim: 记录、字段布局、验证、操作、设置、钩子、API (`objectDesignerTabs.ts`). Narrow columns fold Hooks and API into "Advanced" first (below 1200px), then the other three (below 1000px); each trigger's menu lists only what is folded at its width (`dataTabsFold.ts`). The five header icons became tabs through the shared `ItemToolTabs` (hand-off brief): References, History (audit log inside), Source (layers inside). The open tab is `?tab=` in the address, carried by ‹ ›. - **The address switch.** `object` leaves `STUDIO_ITEM_PILLAR`, so every `studioItemPath` producer opens the new address: the app's 「对象设置」 (`appStudioObjectPath`), the record page's 「配置页面」 (`recordTabsStudioPath`), ⌘K, the AI artifact link, and the switched-off action link (`?action=NAME` on the new address). `/studio/PKG/data` redirects (`dataPillarRedirect`): with `?surface=object:NAME` to that object's designer (`?action=` kept; `?view=`, `?nav=` dropped), otherwise to the object list (`?changes=review`, the server's draft-review link, kept). A `.custom` pair's old address lands on the pair's own area. An object request from the Changes sheet navigates to the object's address in the package that holds the draft (`draftScope`: on a read-only base, its `.custom` pair). - **`AreaHistoryRedirect`:** objects no longer take the designer-item exemption (`/metadata/object/NAME/history` opens the designer's History tab). The line itself stays for flows until objectstack-ai#36903; removing it now would send a flow's history to the flow pillar and lose it. - Kept as the card asks: the copilot's 「对象 · 页签」 chip and the AI-change line. The copilot read the open item only from `?surface=`, which the new address does not carry, so it now also reads it from the designer's address (`areaDesignerItemOf`, as objectstack-ai#37089 does). - Fixed on the way: a partly refused AI-drafts discard kept its message for one render only (the object re-read the discard triggers cleared `error`); it is now its own state. The retired-Interfaces notice is latched on the landing path, not the pillar, since the home is the area's object list now. ### 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 objectstack-ai#37089's helper (above); after objectstack-ai#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). <details><summary>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</summary> **Main merge after objectstack-ai#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 objectstack-ai#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 objectstack-ai#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) | </details> ## Acceptance notes - **S8, fixed (added by seat a4-S from the objectstack-ai#37169 L1, 7152310574):** the list dialog's taken-name notice tells the two cases apart. When the package the create writes to holds the object, it reads `engine.studio.data.createTaken` (read again) and offers 「打开」, which opens that object's designer (`studioItemPath`). When the holder is elsewhere, it keeps `createTakenElsewhere` and offers no Open. The `onOpenExisting` prop has the same shape as objectstack-ai#37169's flow side. - **i18n keys:** the released `@object-ui/i18n@18.6.0` keys this PR leaves unread are kept (the optional drop from ruling 7153326968 is not taken). `Clause-②` stays `no`. - **Header shows the machine name beside the label (N4):** the designer's header is the shared full-screen item header, which shows the API name beside the label, as every Studio item page does; objectstack-ai#34794 kept it in the tooltip on the old pillar header. Kept, for one header across Studio's item pages. - **N1, for objectstack-ai#36909:** `useRequestedSurface` has no product reader left after this card; objectstack-ai#36909 (route and remnant deletion) removes it with the pillar routes. - **N2, for objectstack-ai#36909:** the retired-Interfaces redirect goes `/interfaces` → `/data` → the object list, two hops; the hop through `/data` goes when objectstack-ai#36909 retires `STUDIO_HOME_PILLAR` and the pillar routes. Only the stale comments are fixed here. - **N8, fixed:** the browser walk showed that an address naming no object did not show a refusal strip but offered the name as an "Unpublished new object" to design. It now says "Object not found" (an existing `@object-ui/i18n` string, `engine.form.objectNotFound`) under the header, whose × goes back to the list. - **For objectstack-ai#36903:** `AreaHistoryRedirect`'s designer-item exemption line now serves flows only; objectstack-ai#36903 deletes it when the flow designer moves. - **Old base address of a pair's object:** `/studio/BASE/data?surface=object:PAIR_OBJECT` (what the retired rail mirrored for an object the `.custom` pair adds) now redirects to the base's area, where that name does not resolve; the pair's own address works, and the object list and the Changes sheet link pair objects to it. - **Paused objectstack-ai#36784** (public forms, now closed): it conflicted textually with this branch on `StudioDesignSurface.tsx`, the Data pillar mount removed here. - **Main merged after objectstack-ai#37089 (objectstack-ai#36905, the permission designer) landed:** 15 files conflicted, all resolved toward both designers (the shared list, the area's mount by type, the copilot comment, the menu model's named designer types, the sharing overview's route beside the object designer's reports, and the test files' collection-time imports and pillar lists). **Main merged again after objectstack-ai#37185 landed** (`64a5a2d7`): two conflicts, each resolved by hand. `StudioDesignSurface.entryReadsOnce-11797.test.tsx` and `StudioDesignSurface.itemDraftLine-12725.test.tsx` both kept the collection-time `@object-ui/plugin-detail` import; only main's explanatory comment beside it differed, and main's comment was taken. `StudioDesignSurface.readOnlyPosture-12453.test.tsx` auto-merged and keeps both sides: this PR's designer address in `PILLARS` and objectstack-ai#37185's header-carrying fetch doubles. Sibling drafts objectstack-ai#37169 (objectstack-ai#36903, flow designer) and objectstack-ai#37166 still conflict textually; whichever lands later merges main. - Size: over 3,000 changed lines, Tier H by size (maintainer ruling recorded on epic objectstack-ai#36890, comment 7145880574). ## 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 objectstack-ai#36910 (the end-to-end walk-through card) as NOT MEASURED, with this reason. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYoFqGdRM9Qmg7M2o2B)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…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>
…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>
…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>
…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>
…at useFlowItemMenu (objectstack-ai#37493) repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Fixes objectstack-ai#37417 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户无感:只改内部测试清单里一条流程项的代码出处,平台功能和界面都不变。 - 为什么做:修复每晚巡检报红的平台测试清单检查,属于 Studio 重构专题之后的清单维护。 - 出错会怎样:最坏是清单里某条出处指错,只影响测试人员查代码,不影响任何用户;可直接撤回。 - 要你做什么:无。 ## What changes `docs/qa/platform-checklist/areas/automation.json`, item `automation.package-flow-override` only: | Old reference | New file#symbol | Evidence at a46efa8 | |---|---|---| | `FlowItemMoreMenu.tsx#FlowItemMoreMenu` (New similar) | `FlowItemMoreMenu.tsx#useFlowItemMenu` | `FlowItemMoreMenu.tsx:161 export function useFlowItemMenu(...)`. objectstack-ai#37169 turned the component into this hook in the same file | | `FlowItemMoreMenu.tsx#FlowItemMoreMenu` (Restore package original) | `StudioCustomizeControls.tsx#StudioOverrideChip` | `FlowItemMoreMenu.tsx:29` reads "Restore package original is not here: it is on the flow's override mark", before and after objectstack-ai#37169. `StudioCustomizeControls.tsx:321 export function StudioOverrideChip` offers it, and `AutomationsPillar.tsx` wires it with `onRestore` | `revision` goes 6 to 7, with a history row. No clause, step, verify or fixture text changed. The prose references to `FlowItemMoreMenu.tsx` in packaged-flow-clone-contract source[5] and setup-packaged-automation-board (knownGaps[0], steps[5], acceptance[4]/[6].verify, source[1]) still resolve and are unchanged. `openNewSimilar` (:174), `copyValid` (:172), `auto-new-similar-refusal` role=alert (:291) and the "No lineage is drawn" docblock (:20) all live in that file. The line-765 history note stays as history. ## Acceptance notes - Step text in setup-packaged-automation-board steps[5] and package-flow-override steps[3] names testid `auto-item-more`, which nothing under `ui/` declares now. The ⋯ is `studio-detail-more`. This PR leaves it alone because step text is out of scope. It owes a correction and a re-test (carrier objectstack-ai#36910). - package-flow-override source[2] credits `StudioDesignSurface.tsx` with the pillar's Customize/save/Restore. Those live in `AutomationsPillar.tsx`, and did before objectstack-ai#37169 too. Noted, not changed. ## Verification <details><summary>check:platform-checklist before (a46efa8) and after (01686dc)</summary> Before: exit 1, `check-platform-checklist: 1 problem(s) ... ABSENT SYMBOL ... FlowItemMoreMenu.tsx#FlowItemMoreMenu`. After: exit 0, `check-platform-checklist: OK — 16 areas, 448 items (437 active, 5 planned)`. </details> <details><summary>retest-owed and derived gates</summary> `retest-owed` before and after: identical (Owed 16, Re-judged 201). None of the four items that cite the file is owed. `dispatch-gates --commands`: 17 families, all exit 0. `--ran`: 17 run, 0 NOT-MEASURED. </details> Two-minute check: `pnpm check:platform-checklist`. Expect `check-platform-checklist: OK`. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ)_ ## Provenance The dev agent committed `01686dcc1cd`, and its own `git push` was refused by its permission check; it did not retry. The seat pushed the branch on the maintainer's authorization in the seat session: 「objectstack-ai#37417 推送放行」. Claim: 7184955282. os-dev-report: 7185481823. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude <noreply@anthropic.com>
Fixes #36903
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under
skills/orcontent/docs/names the Automations rail's strings or teaches overriding a Studio console string维护者速读
What changes
/studio/PACKAGE/metadata/flow/NAMEmounts the designer (AutomationsPillar, now fixed on one flow named by the route). The area decides it through the shared designer-page helper inmetadataArea.ts(AREA_DESIGNER_PAGE_TYPES,areaItemOpensDesignerPage,areaDesignerItemOf), now on main from feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #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 fromitem-tools/ItemToolTabs(hand-off §2); the open tab is?tab=(flowDesignerTabs.ts).MetadataListCreateDialog, same presets).engine.studio.auto.*keys only the rail read (heading,none,emptyMain,group.noObject,kind.record,kind.scheduled,kind.screen,kind.autolaunched,legend) are removed fromenandzhof@object-ui/i18n's studio namespace. The changeset declaresClause-②: yes (narrowing), carries the BREAKING note, the ADR-0087not-required (no-migration-prescription)disposition and a 「Removed translation keys」 list, and keeps'@object-ui/i18n': patch(the onemajoris 大版本声明:18.6.0 已发布、主干已删除的界面文案统一写入发版说明(约 35 条) #37223's).engine.studio.org.noneis kept: S5 reads it.flowleavesSTUDIO_ITEM_PILLAR(with feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168'sobjectgone too, it is empty), sostudioItemPath, ⌘K, the AI artifact links and the Changes drawer open the new address. Old addresses redirect (automationsPillarRedirect.ts):/automations?surface=flow:NAMEto the flow, bare/automationsto the list;?view=/?nav=dropped, everything else kept (including?changes=review).~orgflows 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 optionalemptyListHinton the area host. An empty, unsearched list there reads as empty, not as "No matches for """.{ pillar: STUDIO_METADATA_AREA, artifact }, the same block as feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089 (on main) and feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168, plusorgScopeFlowOffor the~orgleg.?review=1and?scope=environmentkeep an item on the generic item page throughareaItemAsksGenericPage, with feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #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'sEditPage: 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.engine.studio.auto.createTaken) and offers Open, to the flow's address, when the flow holding the identifier is this package's;createTakenElsewhereotherwise.useMetadataRefreshNonce) and its current-item report (onSurfaceLabelChange). 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's pinned publish on Save and on the switch is unchanged; the list dialog's flow create publishes withpublishCreated.packages/specchange; the column question is a fork for the maintainer.Empty state and old deep links (card item 7)
~orginstead (objectui#11553)./studio/PACKAGE/automations,/studio/BASE.custom/automationsand/studio/~org/automationslinks redirect as above.…/metadata/flow/NAME/historyopens the History tab.Tests
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~orgChanges request landing on the scope's flow, and the empty~orglist's guidance.tabs-12454:?tab=runsand?tab=historyopen their panel on the real designer; CONTROL: no tab, Canvas.createTaken-26917: a published flow in this package readscreateTakenand Open lands on/studio/PKG/metadata/flow/escalate; another package's keepsElsewhereand no Open.aiChipLabel: repinned to{ pillar: 'metadata', artifact }.customizeFlow-28570: the Restore dialog's label is read off the header's title.AutomationsPillar.*suites and theStudioDesignSurface.*/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 inmetadataArea.test.ts, the designer and/historyroutes inStudioMetadataArea.routes-28561.Ablations (each: committed fix, anchored mutation through the ablation-replace script, restored to the HEAD blob)
dirty: autoDirty→dirty: falseatAutomationsPillar.tsx:803: the two new guard cases go red onexpected "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: blob068563e042de== HEAD,git diff HEADempty.here: own.some(…)→here: false: the in-package case goes red, the others stay green (1 failed | 9 passed (10)). Restored: blobc5263910bff6== HEAD.emptyListHintspread deleted: the empty~orglist case goes red (1 failed | 23 passed (24)). Restored: blob5386130ea404== HEAD.Local readings (final head first; earlier heads named)
9fcff540(the third merge oforigin/main, at1b91538bwith feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168, in7a7af7ad; then the lint fix). CI on7a7af7adwas red in Lint UI only: three imports that the retired-pillar cases left unused (fireEventandscreeninexpectedMisses-11799,parseSurfaceParaminmetadataArea.test).9fcff540removes 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.tsconfig.test.json): exit 0, 0error TS.studio-design,metadata-admin,CommandPalette.studioScope-11863,console,packages/i18n/,clickableNonControlCensus-13461and the console'sStudioRoute: 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 on7a7af7ad: all exit 0.overlap-check:origin/mainand feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list #37226 merge cleanly; feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166 conflicts.7a7af7ad(the lint fix changes no runtime file),pnpm --filter @objectstack/dogfood testunder the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT command-exit 0.const genericPage = areaItemAsksGenericPage(search) && !getMetadataResource(type)?.EditPage;→const genericPage = false;inStudioMetadataArea.tsx.routes-28561: Tests 2 failed, 32 passed (34). The object's?review=1CONTROL and the flow's?review=1case go red (expected 'flow-designer' to be 'item'); the permission set's matrix pin stays green. Restored: blobc3b2d2786f9f== HEAD.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.d3e30576(on top of3f65d38b, below): app-shell type-check exit 0.StudioMetadataArea.*,StudioPermissionSetPage.*,metadataArea.*,packageLessFlows-11553,heldFlowLeave-26705,oneSurface-28572andAppContent.setupMetadataStudio-28578: Test Files 8 passed (8), Tests 218 passed (218). Ablation as above. Full dogfood battery ond3e30576under 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 ond3e30576: 58 check-runs, 45 success, 13 skipped, 0 failed.3f65d38b(the second merge oforigin/main, at6211ddf4). app-shell type-check: exit 0.studio-design,metadata-admin,CommandPalette.studioScope-11863,console/ai,packages/i18n/andclickableNonControlCensus-13461: Test Files 1265 passed (1265), Tests 13230 passed, 14 skipped (VERDICT command-exit 0). Full dogfood battery,pnpm --filter @objectstack/dogfood testunder 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/mainmerges cleanly; feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 and feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166 conflict.origin/mainat3f65d38b: 94 files, +2,235 / −2,787.576f67d3.check-adr-0087-registration --base origin/main: exit 0, one declared-breaking changeset withnot-required (no-migration-prescription).check-changeset-no-major: exit 0.check-empty-changeset: exit 0.uicheck:i18n-keys,check:i18n-drift,check:i18n-dead-keys: exit 0 each.packages/i18n/plusplainLanguage-11659,studio-locale.i18nandpackageLessFlows-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 testunder 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 andtsconfig.test.json): exit 0 on49bf2233, after the@object-ui/*dependency closure was rebuilt from this tree (turbo, 68 tasks).1d6b2854(the merge plus its seam fixes), overpackages/app-shell/src/views/studio-design,packages/app-shell/src/views/metadata-admin,CommandPalette.studioScope-11863,console/aiandclickableNonControlCensus-13461: Test Files 2 failed, 1150 passed (1152); Tests 3 failed, 11175 passed, 1 skipped. The failures came from the merge:homeLoop-12513opened on/access, which feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089 turned into a redirect; andMetadataListCreateDialog.pairCreate-36897mounts the dialog without a router, where this round's Open useduseNavigate. Both are fixed at49bf2233, where the touched files re-ran: Test Files 24 passed (24), Tests 176 passed (176).dispatch-gates --commands: 38 families.--ranreconciliation: 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-debtre-measured under the lock: OK, 0 raw errors.check:test-source-alias: exit 0 before each push.overlap-check:origin/mainmerges cleanly; feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168, feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166 and fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 conflict (exit 1).--no-inline-config) over every changedui/file: 0 errors, 59 warnings.Acceptance notes
engine.studio.org.none, is read again by the~orglist (S5) and stays.studioAutomationCopy.plainLanguage-11659's heading case went with its row (N1, first option). The ~35 keys main had already removed are 大版本声明:18.6.0 已发布、主干已删除的界面文案统一写入发版说明(约 35 条) #37223's, not declared here.origin/mainatbc3ec37a, which holds feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089 (the permission designer). The merge unions the two designers:AREA_DESIGNER_PAGE_TYPES = ['permission', 'flow'],STUDIO_ITEM_PILLARkeepsobjectonly, andAreaItemOpenmountsAutomationsPillarfor a flow andStudioPermissionSetPagefor a set. Two consequences, both deliberate:?review=1keeps 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:MetadataResourceEditPagehands the item to the registeredPermissionMatrixEditPage, which has no draft review. Neither it nor main'sStudioPermissionSetPagereads?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. SoAreaItemOpenasks the generic page only for a type with no ownEditPage. That is the flow here and the object in feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 (feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 should check the object's registry before relying on it). Pinned inroutes-28561(?review=1keeps the matrix page), and ablated: dropping theEditPageguard reds it,1 failed | 31 passed (32), restored to the HEAD blob. The flow's?review=1still opens the generic page and its review (the case beside it).?review=1today: 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. 权限集的「审阅草稿」链接打开矩阵页,但那里没有审阅面板:软件包页和聊天里的「审阅 N 处改动」点进去看不到改了什么 #37269 makes the matrix page show the draft's changes; this PR does not change what those links open.AccessPillar.tsxandAutomationsPillar.tsxsetRailOpenboth go: both rails are gone.origin/mainagain at6211ddf4, after fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 (the authenticated fetch) and feat(studio): one table holds the menu's type order and its 常用 / 高级 tier #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-detailwarm-up; main's wording kept) andFlowItemMoreMenu.tsx(main'sauthFetchfor the clone door kept; theSTUDIO_HEADER_ICON_BUTTONimport this branch had dropped as unused stays dropped). feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 had still not merged, so the exemption below stands.origin/maina third time, at1b91538b(feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #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'], andSTUDIO_ITEM_PILLARis empty.AreaItemOpenmountsDataPillarfor an object,AutomationsPillarfor a flow andStudioPermissionSetPagefor a set. feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168'stype === 'object'review gate is replaced by the oneEditPagerule; it gives the object the same answer.onOpenExistingpaths are kept: the object's at its target package, the flow's in this package. The prop, which both PRs added, is passed once./data,/automations) are kept.StudioRail.noMatches-26733(all three rails are gone) andStudioDesignSurface.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, andheldFlowLeave-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 feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 and feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169 deletes it). WithSTUDIO_ITEM_PILLARempty it could no longer fire.routes-28561's CONTROL keeps its own-EditPageleg (the standalone history page), and its object leg is repointed at the object designer's History tab; the flow's/historyopens the flow designer's History tab (the case beside it)./studio/~org/automationscomments insrc/index.tsandstudioScope.tsnow name the scope's area addresses.title="API name: …"predates this PR: main's pillar header set the sametitleProps.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.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~orgcopilot case is possible: the package-less scope mounts no copilot (slotHostneeds a package, objectui#11553;packageLessFlows-11553pinschatDock.mounts === 0). The~orgleg's context is pinned on the pureorgScopeFlowOfinmetadataArea.test.ts.docs/qa/platform-checklist/areas/studio-authoring.jsonitems still describe the deleted rail and the~orgpillar:automations-rail-and-new-flow,org-scope-flows,flow-status-matches-runtime,flow-edge-type-authoring. They carry to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910, whose item 3 owns that rewrite.5d9bb8dawas 47 success and 15 skipped, and "Check PR Size" was skipped, not passed.auto-canvas-caption), so it still cross-checks the dialog.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.@objectstack/lintand@object-ui/plugin-detailat module top, so the dynamic imports their source reaches are paid at collection (check:test-source-alias).9fcff540): feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166 conflicts with this branch;origin/mainand feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list #37226 merge cleanly. Whichever lands later merges main.groupFlowsByObject,withContributedFlowGroups,ContributedRailRow,useOpenContributor, the console's/studio/~orgbare 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~orgleg),metadataArea.ts(the shared helper andareaItemAsksGenericPage),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.Live walk-through (showcase, earlier round, head 5d9bb8d)
Stack:
pnpm dev -- --fresh -p 38917afterpnpm build, and the Console dev server, driven with Playwright. It covered the list, the full-screen canvas, › and ×, a~orgflow, an old bookmark, bare/automationsand/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.Generated by Claude Code