Skip to content

Commit 0124851

Browse files
feat(app-shell)!: retire Studio's package-less scope (/studio/~org), and an item of a package you can write reads New in the Studio list (#38150 PR-B2) (#38598)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Jianguo** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbYYVoMKNg2bko9Bx8v783A8)_ Fixes #38150 This is PR-B2, the last PR of the card: the retirement of Studio's package-less scope (`/studio/~org`) with its redirects, the Studio list's Source classifier, and the ADR marks. PR-A1 (#38185), PR-A2 (#38389) and PR-B1 (#38545) are merged. It continues the branch `claude/project-thread-kf5k6i` of the seat whose account ran out (five commits, head `2a3c6e8f5b`, no PR was open on it): this branch starts at that head, every commit was read, and main is merged in. Two cards ride on this one and are named here without a closing keyword, because their threads carry no claim naming this branch: the Source-badge card #38061 (its ruling note names this PR as its carrier) and the old door's defect card #37468 (the card text gives it to PR-B). The seat finishes both at landing. Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none — no file under `skills/**`, `.claude/skills/**` or `content/docs/**` names the `~org` scope, "Organization flows" or any of the nine keys (`git grep` at this head) **Size: 2,937 lines** (1,697 added, 1,240 deleted, 82 files; `git diff --shortstat origin/main...HEAD` at `85939f9c`, merge base `301417669`). With PR-A1's 1,947, PR-A2's 1,380 and PR-B1's 3,387 the card stands at **9,651**. The card total is over 3,000 and the diff edits `docs/adr/**`, so this PR is Tier H. ## 维护者速读 - 用户能看到什么变化:Studio 左侧菜单里的「组织流程」入口没有了,旧网址仍能打开并转到跨软件包列表的「散落项」流程列表;在 App Studio 列表里,自己建的软件包里的项,来源从「系统自带」改成「新建」,筛选和上一条、下一条跟着一致。 - 为什么做:这是 App Studio 改版专题第 4 阶段的收尾,你已裁定散落项原地保留、改用「勾选后移入软件包」来移动,旧入口随新入口上线一起下线;来源标签按你对决策稿的回答改。 - 出错会怎样:只有打开旧网址或看这个列表的人会碰到,最坏是老书签落在列表上而不是原来的流程页,或某一行的来源标签显示不对;不动任何数据,可以整体撤回。 - 要你做什么:这次改动带架构决定记录的标注,整张卡累计也超过 3000 行,需要你本人批准,请审批。 ## What changes **The scope is retired, its addresses answer.** `studio-design/studioOrgScopeRetired.ts` is the one owner of the retired segment (`RETIRED_ORG_SCOPE_SEGMENT`) and of where its addresses land (`retiredOrgScopeTarget`): every `/studio/~org/…` address lands on `/studio/~all/metadata/flow?source=loose`, the list the Setup → Packages banner links to. The list's search (`q`) and sort (`sort`) are carried and every other query key is dropped, `source=runtime` included. Four places answer an old address with it: `StudioDesignSurface` (before anything of the surface mounts), `studioPillarRedirectModel.ts` (the scope's root and its old pillar deep links), `metadataArea.ts` (the scope's leg of the area, and a `?package=~org` link on another leg), and the console's `StudioRoute.tsx` (two route rows that answer the segment ahead of the package routes). **What leaves with it.** The menu's "Organization flows" row and its `orgFlows` entry kind; the area's `orgScope` mode; the top-left Changes row (`StudioScopePendingRow`) and the package-less batch publish behind it (`studioSurfacePublish.ts` publishes a package only now; the changes sheet is mounted on a package only); the `scope` prop of the package switcher; the scope helpers in `studioScope.ts` (`studioOrgScopePath`, `STUDIO_ORG_SCOPE_SEGMENT`, `STUDIO_ORG_SCOPE_TYPE`, `STUDIO_ORG_SCOPE_SOURCE`, `isStudioOrgScope`, `isOrgScopeDraft`), `orgScopeFlowOf` and `orgScopeAreaRedirect`. `AutomationsPillar` takes a package id, never `null`. `studioScope.ts` keeps what the Loose list reads: `isPackageLessItem`, `isPackageLessDraft`, and `packageLessItemPath` (an item of no package opens its page at `/studio/~all/metadata/TYPE/NAME`). **Who lands where now.** A person who may enter Studio but not Setup → Packages, with no recent package, lands on the Loose list of flows (`studioEntryFallbackPath`, `newPackageDoorPath`); the "package not found" page's way out reads "Open loose flows" (「打开散落的流程」) and opens the same list. A package-less flow the app's command palette finds opens its item page. A draft of no package is published by Home's "Publish all", or published or discarded on its own page. **The Studio list's Source (the classifier, card What 7).** `metadata-admin/studioListSource.ts`: `studioSourceKind` takes a third, required fact, whether the row's package is one the author can write, read from the package list's `writable` verdict (`useWritablePackageIds`, the request the other readers of that list share). Order: the customization mark, then the package verdict, then the provenance. `ResourceListPage.tsx` passes it to the badge, the source filter and its counts, and the badge's tooltip; `useListOrderedNames.ts` passes it to the detail page's previous / next order and waits for the package list only while the order is narrowed by source. Setup's list is untouched: it asks for no verdict and reads the provenance as served. **i18n (the narrowing).** Nine keys leave the `studio` namespace of `@object-ui/i18n`, in `en` and `zh`: `engine.studio.menu.orgFlows`, `engine.studio.pkg.orgScope`, `engine.studio.org.name`, `engine.studio.org.hint`, `engine.studio.org.description`, `engine.studio.org.none`, `engine.studio.publishedAllFlows`, `engine.studio.publishedAllFlowsOne`, `engine.studio.changes`. `engine.studio.notFound.allMetadata` keeps its key and changes its text. `@object-ui/app-shell` is private; its barrel exports `RETIRED_ORG_SCOPE_SEGMENT` and `retiredOrgScopeTarget` where it exported `STUDIO_ORG_SCOPE_SEGMENT` and `studioOrgScopePath`. **ADR marks (governed, card What 9).** ADR-0084: nine passages that name the scope are struck through and left legible (the "organization's own flows" row of "Entries that are not a type", the no-fold sentence, the first example of the sorting rule's third test, the second sentence of item 3 of the 2026-11-25 silent-points list, the fourth top-bar-homes row with its 2026-11-27 note, the sentence that kept the entry until the door shipped, and two items of the 2026-11-26 silent-points list), with notes dated 2026-11-29 that name the card and the ruling record (comment 7184753035, question 3); the note under "Organization-level content" says the move door shipped, where it opens from, what retired with the scope (the menu row, the scope's list, its flow page, its Changes row and the batch publish behind that row), where a flow of no package opens now, where `~org` addresses land, and that the bulk adopt retired in a change of its own (#38545). ADR-0070: the status line, a pointer at TL;DR item 5, and a dated note under D5 ("move into a base" is the move-in door; the bulk assignment to a default base is superseded; rows never moved stay legal). No heading anchor changes. **Changeset and checklist.** `.changeset/38150-studio-org-entry-retired.md`: `@object-ui/app-shell`, `@object-ui/console` and `@object-ui/i18n` patch, BREAKING with the nine keys, the two export renames as a FROM → TO table and the one-line fix, and the ADR-0087 `not-required` marker. `docs/qa/platform-checklist/FOLLOW-UPS.md` gains one section naming the five checklist items that still describe the retired scope. ## Each removed assertion, and what pins its rule now Renamed cases (same assertion, the target address or the words changed with the retirement) are not listed: `StudioRoute.test.tsx`, `StudioRoute.recentPackage-11863`, `CommandPalette.studioScope-11863`, `HomePage.noAgentsBuildChip-26614`, `SidebarAppMenu-36112`, `StudioDesignSurface.notFound-26708`, `StudioEntryRedirect.test.tsx`, `studioInterfacesRetired.test.ts`, `studioPillarRedirectModel.test.ts`, `studioMenuModel.test.ts` (its `~org` rows leave the `it.each` tables; the `~all` rows stay), `StudioMenu.test.tsx` and `StudioMenu.overview-37454` (the last two drop their `~org` row the same way). The others now expect `/studio/~all/metadata/flow?source=loose` where they expected the scope. | file | removed | what pins the rule now, or why it retired | |:--|:--|:--| | `studioScope.test.ts` | "the reserved segment cannot name a package" (the spec manifest-id rule, the sanitizer) and "is told apart from a package segment" | moved with the segment to `studioOrgScopeRetired.test.ts`: "the retired segment stays reserved: it can name no package", the same three cases on `RETIRED_ORG_SCOPE_SEGMENT` and `isRetiredOrgScope` | | `studioScope.test.ts` | `studioOrgScopePath`: "lands on the scope's flow list…", "opens a flow full-screen on its address…" | the builder is removed. The addresses it built are the inputs of `studioOrgScopeRetired.test.ts` "the old addresses, read by the redirects that answer them" (root and `/automations`; list, flow and flow history; a `?package=~org` link). Where a package-less item opens is `packageLessItemPath`, pinned in two new cases of the same file | | `studioScope.test.ts` | "the scope reviews package-less FLOW drafts only" (`isOrgScopeDraft`) | the predicate retired with the Changes row it fed; nothing reads it. `isPackageLessDraft` keeps its case | | `automationsPillarRedirect.test.ts` | "the package-less scope lands on its own leg, with no package and its source filter once" | the scope's `/automations` never reaches this mapping: `studioPillarRedirect` answers it first. Pinned in `studioPillarRedirectModel.test.ts` ("the table covers every retired pillar segment, on a package and on the retired package-less scope") and `studioOrgScopeRetired.test.ts` | | `metadataArea.test.ts` | "`orgScopeFlowOf` names the package-less scope's flow…" | the function is removed (the area draws no scope flow). The rewritten case beside it pins the replacement: "a flow of the retired scope lands on the list, not on the flow, and the list keeps no tab" | | `AutomationsPillar.newSimilar-28567` | "the package-less scope draws no menu" | the flow designer is a package's now (`packageId` is a string) and the scope draws no page; the redirect is pinned in `StudioDesignSurface.packageLessFlows-11553` | | `StudioTopLeft-37456` | "~org with drafts pending: a Changes row…" and its control "none passed: no Changes row" | replaced by "no scope draws a Changes row": `it.each` over a package and no package, expanded and as a rail | | `StudioDesignSurface.publishCount-11807` | the four package-less publish toasts (two drafts, one draft named by label, several named in the description, none pending) | the batch publish they read is removed. Replaced by "its old address, with package-less drafts pending, lands on the Loose list: no publish door, nothing sent, no toast". The package cases of the file are untouched | | `StudioDesignSurface.packageLessFlows-11553` | the scope's own page: lists its flows, offers no create, its empty-list guidance, its page chrome | replaced by "every address of the retired package-less scope lands on the Loose list of flows" (a redirect table, the kept search and sort, the list holding the clone and none of a package's flows, with a control without the filter, and an empty Loose list) and "the Loose list is the retired scope's page" (the row opens the item page; no menu row, no Changes row, no changes sheet, no page under `~org`) | | `StudioDesignSurface.packageLessFlows-11553` | "opens it editable, and an edit saves a draft bound to no package", and the "editable" half of two entries: "the measured link, through the showcase pillar: lands on the package-less scope, the clone open and editable" and "from that read-only package, a switch into the package-less scope opens it editable" | the scope's flow page is retired, and the door the ruling keeps open for that save (comment 7184753035, question 2) is the clone's item page on the cross-package leg. Pinned by the new "the item page opens writable, and an edit saved there writes a draft naming no package", run over two entries, the page's own address and a read-only package's address that names the clone: the designer's add controls are drawn and Save waits only for an edit; the save is `mode: 'draft'` with no `packageId`, and the item's own publish that follows names none either. It sits in the describe "a package-less flow is edited, and its draft published or discarded, from its item page" | | `StudioDesignSurface.packageLessFlows-11553` | "the package-less scope reviews and publishes exactly its own drafts": the Changes row count, the sheet and its filter, "publishes each package-less flow draft by reference, and nothing through the package batch door" | the row, the sheet and the batch are removed. A package-less draft's two publish paths are pinned by two new cases of "a package-less flow is edited, and its draft published or discarded, from its item page" (Publish and Discard on the item page name no package) and by the unchanged `usePublishAllDrafts.refusal-11922` ("records the batch's health and goes on to the package-less drafts") for Home's Publish all | | `StudioDesignSurface.packageLessFlows-11553` | deep links: "in the package-less scope: the named flow, though another is listed first", "the measured miss: the package-less page, a link naming a packaged flow", "an empty scope lands on its list" | the scope has no page to miss on. "the measured link, through the showcase pillar" now lands on the clone's item page on the cross-package leg, and "the package's own address naming the clone lands there too" is new; "a package page's miss" stays | ## Acceptance notes - **Takeover.** Kept as built: the five commits of `claude/project-thread-kf5k6i` (`db6e4a61`, `94ca83cb`, `51d85a2c`, `31121663`, `2a3c6e8f`), read hunk by hunk. Added here: the merge of main (`c03f1772`, clean, eight files auto-merged, PR-B1 among main's commits) and one comment-only commit (`5fcf89b5`): eleven files of the Studio surface still described the retired scope as a place a person can be (the palette surface's doc, four notes in `studio-design`, six test headers or titles). No behaviour changes in it. - **Rework round 1** (L2 record 7257159073, FAIL on `5fcf89b5`; L1 record 7257170665, REWORK). Three commits, no product code in them. **M1**, `c2ffeaa7`: `ui/e2e/studio-left-menu-36899.spec.ts` still waited for the fold's Automation group, whose one row on that package was the retired entry; the loop reads `system` and `security`, the Automation group is asserted absent, and the line names the card. **S1**, `90713851` and `85939f9c`: the item-page case of the table above. **N1 and N2**, `90713851`: ADR-0084's sorting rule (third test) and item 3 of the 2026-11-25 silent-points list are marked, and the note under "Organization-level content" lists the scope's flow page. **N4 is left as it is**: narrowing `sourceNarrowed` in `useListOrderedNames.ts` moves product code for one request and a short wait on the Loose list's previous / next, with no wrong order, and would owe the battery again; it fits the follow-up card the seat files for N3. **N3** is the seat's to file. The delta contract review of `85939f9c` is record 7257925349 (PASS: M1, S1, N1 and N2 closed), and the seat's record 7257936891 accepts the head. - **File surface.** All 82 changed files are inside the claimed surface. One, `ui/e2e/studio-left-menu-36899.spec.ts`, is admitted by claim amendment 7257086821 (one hunk). The other 81 are inside claim amendment 2 (comment 7253593955): 58 under `studio-design/`, 5 under `metadata-admin/`, the console's `StudioRoute.tsx` and four of its tests, `CommandPalette.tsx` and its `~org` test, `index.ts`, `README.md`, three tests pinning `~org` under `console/home`, `layout` and `views/setup`, the two studio catalogues, the two ADRs, the changeset, and `FOLLOW-UPS.md`. - **Clause-②, measured as the amendment asks.** The nine keys are in the published `@object-ui/i18n@19.0.0-next.2` (`dist/namespaces/studio/en.js` and `zh.js`, each key in both files; read from the registry tarball) and in no file of the `dist` built at this head, where two kept keys (`engine.studio.notFound.allMetadata`, `engine.list.source.new`) are in both files. Published keys leave, so the line stands. - **Card acceptance, PR-B under Q-f = E.** "On `/studio/~all/metadata/flow` the authored package's flow reads 新建 and a code-shipped flow still reads 系统自带": `ResourceListPage.authoredPackageSource-38150` "the authored package's flow reads New; the code-shipped flow still reads System-shipped" and "draws the Chinese words for the two". "The Studio filter and prev/next agree with the badge": the three cases under "the source filter and ‹ › agree with the badge". The ablation is below. "`/studio/~org/…` redirects": the redirect tables in `studioOrgScopeRetired.test.ts`, `StudioDesignSurface.packageLessFlows-11553` and the console's `StudioRoute.metadataArea-28561`. - **Premise check of What 7.** No non-test `source=runtime` address remains: `git grep` for it over `ui/packages`, `ui/apps` and `packages`, tests and changelogs excluded, has zero hits at this head. - **"Rechecked in PR-B".** From the Setup → Packages banner a person reaches the flow's Loose list: the banner's link and every `~org` address are one address, pinned by "is the Loose list of flows, the address the Setup → Packages banner links to". A package-less flow draft is published from its item page (two new cases) and from Home's Publish all (unchanged `usePublishAllDrafts.refusal-11922`), and an edit of a loose flow is saved in place from that page (the two-entry case). This recheck is at the test level. A console walkthrough in a browser was not run for this PR: NOT MEASURED, reason: the card asks the walkthrough of PR-A, and nothing here adds a screen. - **Left alone, outside the claimed surface.** Comments that still name the scope in `preview/DraftChangesPanel.tsx` (two) and three test titles beside it, in `ui/packages/i18n/src/__tests__/confirmNoteSeparate-11591.test.ts`, and in `metadata-admin/metadataAreaHost.ts`, whose `emptyListHint` option has no producer left while `ResourceListPage.tsx` still reads it. Named in the report for the seat. - **Same-version rule.** PR-B1 merged at 2026-11-29T11:44Z and is unreleased; the open Version Packages PR is #38192. This PR has to merge before that one does. Nothing on the dev side blocks it; it waits on the reviews below. ## Verification Files to read first, by risk: 1. `ui/packages/app-shell/src/views/metadata-admin/studioListSource.ts`, with its two readers in `ResourceListPage.tsx` (`studioKindOf`, the badge tooltip) and `useListOrderedNames.ts`: the one behaviour change that is not a removal. The risk hunk is the order in `studioSourceKind` (mark, then package verdict, then provenance) and the `loading` wait in the previous / next order. 2. `ui/packages/app-shell/src/views/studio-design/studioOrgScopeRetired.ts` and the four places that answer an old address with it (`StudioDesignSurface.tsx` line 130, `studioPillarRedirectModel.ts`, `metadataArea.ts`, the console's `StudioRoute.tsx`): what a retired address keeps and drops. 3. `docs/adr/0084-application-builder-information-architecture.md` and `docs/adr/0070-package-first-authoring.md`: the governed text. Struck lines and dated notes only. Two-minute check: `pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/studioOrgScopeRetired.test.ts packages/app-shell/src/views/metadata-admin/ResourceListPage.authoredPackageSource-38150.test.tsx`. Expect two files and 25 tests to pass; the second file's first describe is the classifier's truth table. <details><summary>Suites and type checks (local; heads named per row)</summary> | run | head | result | |:--|:--|:--| | workspace build, `turbo run build` without the docs app, under the verify lock | `c03f1772` | 123 tasks, 123 successful; lock VERDICT command-exit 0 | | 714 UI test files under the lock: all of `studio-design/`, `chrome/`, `views/setup/`, `console/home/`, `preview/` and `packages/i18n/`, every test that imports a changed module or names `ResourceListPage`, `StudioDesignSurface`, `StudioMetadataArea` or `DraftChangesPanel`, and the console's `StudioRoute*` tests | `c03f1772` | Test Files 714 passed (714); Tests 7,423 passed, 13 skipped (7,436); lock VERDICT command-exit 0 | | the ten files the comment commit or an ablation touched, again | `5fcf89b5` | Test Files 10 passed (10); Tests 181 passed (181); lock VERDICT command-exit 0 | | `type-check` of `@object-ui/app-shell`, `@object-ui/console`, `@object-ui/i18n` (each covers its test files) | `5fcf89b5` | all three executed, none from cache; lock VERDICT command-exit 0 | | `eslint` on the changed files of the three packages (69, 5 and 2 files) | `5fcf89b5` | 0 errors | The full `@object-ui/app-shell` suite (2,470 files) was not run: NOT MEASURED locally, reason: the dev contract keeps a card to the affected files; CI's Test UI shards run all of it. `5fcf89b5` changes comments and one test title, so the 714-file reading at `c03f1772` stands for it. The rework changes one of those 714 files, run whole again at `85939f9c` (the rework block below). </details> <details><summary>Ablations</summary> Both through `scripts/ablation-replace.mjs`, the implementation committed first, each restored and proven (blob equals HEAD, `git diff HEAD` empty). - **The classifier.** Deleted `if (inWritablePackage) return 'new';` from `studioListSource.ts` (anchor 1 → 0, blob `187ff2023a0e` → `cb5b1ba68bdc`), then ran `ResourceListPage.authoredPackageSource-38150`: 9 failed, 5 passed (14). Red: the truth-table case (`expected 'system' to be 'new'`), the badge in en and zh, the tooltip, the two filter cases, the previous / next case, the authored package's own leg, and the control "a package the list does not name, and no package at all, read as before" (it fails in the shared settle step, which waits for the authored row to read New; its own two assertions do not read the deleted line). Green: "only a package list that was read names a writable package", the two unreadable-package-list controls, and the two Setup controls. - **The surface's redirect guard.** Deleted the `isRetiredOrgScope` line of `StudioDesignSurface.tsx` (anchor 1 → 0, blob `77a97116460c` → `e3360209ed14`), then ran `StudioDesignSurface.packageLessFlows-11553`, `StudioPackageOverview-37454` and `StudioDesignSurface.publishCount-11807`: 3 failed, 93 passed (96). Red: the redirect-table row for the scope's area address with extra query keys, "draws no menu row for the retired scope, no Changes row, no changes sheet, and no page under `~org`", and "~org/overview redirects to the Loose list of flows (the surface alone: its own guard)". The other rows stay green because the pillar redirect answers them first, which is the two-door shape the tests name. </details> <details><summary>Derived gates and the lanes the derivation does not list</summary> `node scripts/pm/dispatch-gates.mjs --commands` (no paths; 81 paths against merge base `301417669`): 49 commands, the same 49 at `c03f1772` and at `5fcf89b5`. Run at `5fcf89b5`, each recorded with its exit code: all 49 exit 0. `--ran`: "49 derived, 49 run, 0 NOT-MEASURED, 0 UNRUN". With the Playwright spec added the derivation is the same 49 (read at `c2ffeaa7`); what was run again after the rework is in the rework block below. The body gates among them (`check-changeset-no-major`, `check-adr-0087-registration`, `check-closing-keyword-parity`) read this body through a local event file; `check-partof-closing-keyword` read it too: exit 0, and `--body` binds one closing declaration, the card's. Not in the derived list, run by hand at `5fcf89b5`: - 19 gates of CI's Type Check UI and Lint UI lanes, each `pnpm --dir ui run NAME`: `check:i18n-keys`, `check:i18n-drift`, `check:unreferenced-sources`, `check:self-import`, `check:phantom-deps`, `check:esm-specifiers`, `check:spec-symbols`, `check:vi-mock-specifiers`, `check:vi-mock-inherit`, `check:vi-mock-override-shape`, `check:test-path-roots`, `check:control-bytes`, `check:shell-escape-residue`, `docs:check-links`, `check:doc-fences`, `check:doc-types`, `check:handler-key-reads`, `check:metadata-write-doors`, `check:doc-example-readers`: all exit 0. - `pnpm check:changeset-fixed`, `pnpm check:i18n-stale-fill`, `pnpm check:published-readme-exports`, `pnpm check:pm-governed-prose`, `node scripts/docs-audit/check-affected-docs.mjs`: exit 0. `node scripts/check-platform-checklist.mjs --changed-from origin/main`: OK, 2 anchors judged, 0 lost. - NOT MEASURED locally: `check-single-claim-paths` and `check-closing-target-claim` (both need the pull request's number). CI's `PR-body guards (claim · duplicate · Part-of · single-writer path)` concluded success on `5fcf89b5`. </details> <details><summary>Rework round 1 (heads `c2ffeaa7`, `90713851`, `85939f9c`)</summary> | run | head | result | |:--|:--|:--| | CI's red, reproduced: `pnpm exec playwright test e2e/studio-left-menu-36899.spec.ts --project=chromium` from `ui/` | `5fcf89b5` | 1 failed, 3 passed: `studio-menu-advanced-group-automation` not found at line 225, as in CI's `Build & E2E UI` | | the same command with the fix | `c2ffeaa7` | 4 passed | | `StudioDesignSurface.packageLessFlows-11553.test.tsx`, whole file, under the verify lock | `85939f9c` | Test Files 1 passed (1); Tests 36 passed (36); lock VERDICT command-exit 0 | | `type-check` of `@object-ui/app-shell` (covers the test file) | `85939f9c` | executed, not from cache; lock VERDICT command-exit 0 | | `pnpm --dir ui exec vitest run scripts/` under the lock | `85939f9c` | Test Files 172 passed, 2 skipped (174); Tests 5,159 passed, 2 skipped (5,161); lock VERDICT command-exit 0 | | `eslint` on the spec and on the test file | `85939f9c` | 0 errors | Two ablations of the new case at `85939f9c`, through `scripts/ablation-replace.mjs`, each restored and proven (blob equals HEAD, `git diff HEAD` empty); the case's two entries go red in both: - **Writable.** In `ResourceEditPage.tsx`, `const hostReadOnly = !!areaHost?.readOnly;` replaced by `const hostReadOnly = !!areaHost;` (anchor 1 → 0, blob `fdd7af7db791` → `cc814ee1e002`): 2 failed, `Unable to find an element by: [data-testid="resource-save"]`. - **No package on the save.** In the same file the save's options were given `packageId: 'com.example.ablation'` (anchor 1 → 0, blob `fdd7af7db791` → `931a9d527629`): 2 failed, `expected { force: false, …(2) } to not have property "packageId"`. Gates run again, each recorded with its exit code. At `90713851`, the 29 that read the ADR text or test sources, all exit 0: `check-adr-0087-registration`, `check-adr-links`, `check:adr-anchors`, `check:adr-index`, `check:adr-symbol-anchors`, `check:closed-ceremony-text`, `check:doc-authoring`, `check:pm-prior-rulings`, `check:pm-governed-merges`, `check:platform-checklist`, `check:nul-bytes`, `check-comment-mask-corpus`, `check:test-source-alias`, `check:cross-package-test-inputs`, `check:undeclared-dep-imports`, `check:skill-identifier-liveness`, `check:pm-governed-prose`, `docs-audit/check-affected-docs`, `check-changeset-no-major`, `check-empty-changeset`, and from `ui`: `check:control-bytes`, `check:test-path-roots`, `check:shell-escape-residue`, `check:vi-mock-specifiers`, `check:vi-mock-inherit`, `check:vi-mock-override-shape`, `docs:check-links`, `check:doc-fences`, `check:doc-types`. At `85939f9c`, which changes the test file alone, the 12 of them that read test sources again: all exit 0. The other derived gates read nothing these commits change, so their run at `5fcf89b5` stands; they were not run again. </details> <details><summary>Dogfood battery</summary> Full battery at the landing head `85939f9c` (os-dev report 7258471243), `pnpm --filter @objectstack/dogfood test` under the verify lock (no shard, no path), after the workspace build at the same head (123 tasks successful, 121 of them restored from turbo's local cache): lock VERDICT command-exit 0 (held 1,888 s); Test Files 495 passed, 3 skipped (498); Tests 4,187 passed, 68 skipped (4,255); no failure. The same battery before the rework, at `5fcf89b5` (os-dev report 7256902761): lock VERDICT command-exit 0 (held 1,828 s), the same counts. The three rework commits change a Playwright spec, one vitest file and ADR text, and no product code. </details> ## Owed before landing - The maintainer's approval (Tier H: `docs/adr/**`, the narrowing, the card total). - The same version as PR-B1: this PR merges before the open Version Packages PR, #38192. - The two cards named at the top, finished by the seat at landing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jUba5JFq1ejCZ7Gxpk <!-- signed: repo:objectstack#1 · zhuangjianguo · session_01QsR2jUba5JFq1ejCZ7Gxpk --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7870900 commit 0124851

82 files changed

Lines changed: 1697 additions & 1240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(app-shell)!: Studio's package-less scope (`/studio/~org`) is retired and its addresses land on the Loose list of flows; in the App Studio list an item of a package you can write reads "New"
8+
9+
Clause-②: no (narrowing)
10+
Metadata-protocol: none
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) The removed operands are translation keys in the published i18n catalogues and two exports of a private package: no packages/spec schema, registered node type, stored metadata row or ADR-0087 conversion surface names them, and nothing a metadata author writes changes, so there is nothing for objectstack migrate meta to rewrite -->
13+
14+
Two changes to App Studio, both carrying out ADR-0084's amendment of 2026-11-26.
15+
16+
**Studio's package-less scope is retired.** The scope listed the flows that belong to no package ("Organization flows", 「组织流程」) at `/studio/~org`. The amendment retires it once the door that moves a selection of loose items into a package has shipped. It has: the door is the "Loose" source value of Studio's cross-package list (`/studio/~all/metadata/TYPE?source=loose`), where a person selects loose items of any type and moves them into a package. The same amendment retired the all-at-once adoption of loose items; that went in a change of its own (objectstack#38545), with its own entry. With the scope gone too, an item that belongs to no package is listed, and moved into a package, on the Loose list.
17+
18+
- Every `/studio/~org/…` address still opens. It lands on the Loose list of flows, `/studio/~all/metadata/flow?source=loose`. That is one target for the scope's list, a flow's own address and its `/history`, the old `/studio/~org/automations` deep links, and a `?package=~org` link on another address. The list's search (`q`) and sort (`sort`) are kept and every other query key is dropped. A flow's old address lands on the list, not on the flow.
19+
- A flow that belongs to no package is found on that list, and its row opens the flow's page at `/studio/~all/metadata/flow/NAME`. It no longer opens in the flow designer; move it into a package to design it there. A package's address that names such a flow opens the same page.
20+
- Studio's left menu has no "Organization flows" row any more (it sat under Automation, inside the Advanced fold on a package), and Studio's command palette no longer lists it. A package-less flow that the app's command palette finds opens its page.
21+
- The scope's "Changes" row and the batch publish behind it are gone. A draft that belongs to no package is published by Home's "Publish all", or published or discarded on its own page.
22+
- A person who can enter Studio but cannot open Setup → Packages, and has no recent package, lands on the Loose list of flows. They landed on the package-less scope before. Home's "New blank app" leads the same person to the same list.
23+
- On the "package not found" page, the way out for a person who cannot open Setup → Packages reads "Open loose flows" (「打开散落的流程」) and opens that list. It read "Open organization flows" (「打开「组织流程」」).
24+
25+
**In the App Studio list, an item of a package you can write reads "New" (「新建」).** The list's Source column drew an item of a package authored in Studio as "System-shipped" (「系统自带」), because such an item is served under its package's id, as an item a code package ships is. The list now also reads the package list's `writable` verdict, which the server computes: an item of a writable package reads "New". The source filter and its counts, and the previous / next order of an item's page, read the same classification, so "Modified and new" holds those items and "System-shipped" does not. An item of a read-only package still reads "System-shipped", and a customized one still reads "Modified". Setup's metadata list is unchanged: it shows the source as served.
26+
27+
**BREAKING**: nine keys leave the `studio` namespace of `@object-ui/i18n`, in `en` and `zh`. The retired scope was their only reader.
28+
29+
- `engine.studio.menu.orgFlows`
30+
- `engine.studio.pkg.orgScope`
31+
- `engine.studio.org.name`
32+
- `engine.studio.org.hint`
33+
- `engine.studio.org.description`
34+
- `engine.studio.org.none`
35+
- `engine.studio.publishedAllFlows`
36+
- `engine.studio.publishedAllFlowsOne`
37+
- `engine.studio.changes`
38+
39+
If a deployment overrides one of these keys (in its own i18next resources, or a Studio catalogue it registers), the override no longer applies: nothing in the console or Studio asks for the key. Remove the override. `engine.studio.notFound.allMetadata` keeps its key and changes its text, as above; an override of it still applies, and now names the link to the Loose list.
40+
41+
For a host that declares the `/studio` routes itself, the two names `@object-ui/app-shell` exported for the scope are replaced:
42+
43+
| before | after |
44+
|:--|:--|
45+
| `STUDIO_ORG_SCOPE_SEGMENT` | `RETIRED_ORG_SCOPE_SEGMENT`. The segment `~org` stays reserved: it can name no package |
46+
| `studioOrgScopePath()` | `retiredOrgScopeTarget(search)`, the one address every `/studio/~org/…` address lands on |
47+
48+
The fix in one line: link to `/studio/~all/metadata/flow?source=loose` where a link opened `/studio/~org/…`. Old links keep working through the redirect.

‎docs/adr/0070-package-first-authoring.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-0070: Package-first authoring — every runtime-authored item lives in a writable package (base); no orphans
22

3-
**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `<base>.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `<base>.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.)
3+
**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `<base>.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `<base>.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.) · **Amended** (2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it: D5's "move into a base" is the move-in door, and D5's bulk assignment to a default base is superseded; see the amendment note under D5. D1 and D6 stand.)
44
**Deciders**: ObjectStack Protocol Architects
55
**Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (`allowOrgOverride` / runtime overlay model; one Zod source per type), [ADR-0048](./0048-cross-package-metadata-collision.md) (one app per package; package id is the addressing unit), [ADR-0033](./0033-ai-assisted-metadata-authoring.md) (AI authors metadata as drafts), [ADR-0067](./0067-commit-history-and-rollback-for-ai-authoring.md) (commit history & rollback for AI authoring)
66
**Consumers**: `@objectstack/objectql` (`protocol.saveMetaItem` write path), `@objectstack/spec` (metadata-type registry), `../objectui` (Studio create flow, package scope selector, `PackagesPage`), `../cloud` (`service-ai-studio` — `create_metadata` / `resolvePackageId` / `apply_blueprint`)
@@ -30,7 +30,7 @@ Built across the three surfaces and verified end-to-end in a real environment vi
3030
2. **[existing->ruled] Two package kinds.** *Code/installed* packages (manifest `source: 'filesystem'` / installed via marketplace) are **read-only** — you may org-overlay an item where `allowOrgOverride` (ADR-0005), but you may **not** author *new* items into them. *Writable* packages (DB-backed, user/AI-created "bases") are the only authoring targets.
3131
3. **[new] Create-flow contract — "pick or create a base first".** Before any create, all three surfaces (Studio UI, the AI authoring tools, the kernel write path) resolve to a writable package or **prompt to create one** — no silent default. This is enforced in code, not just prompt guidance.
3232
4. **[new] The package is the lifecycle unit.** Delete (cascade all its items + data), export, snapshot/version, and duplicate operate on a whole package. This is the answer to "how do I delete the mess."
33-
5. **[ruled] Retire the stopgaps.** #2252's null-coercion evolves into *redirect-to-a-writable-package*; #1946's "Local / Custom" scope becomes a **migration affordance** ("move these loose items into a base") and is then removed.
33+
5. **[ruled] Retire the stopgaps.** #2252's null-coercion evolves into *redirect-to-a-writable-package*; #1946's "Local / Custom" scope becomes a **migration affordance** ("move these loose items into a base") and is then removed. *(Amended 2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150): "move these loose items into a base" is the move-in door — the amendment note under D5.)*
3434

3535
---
3636

@@ -87,6 +87,8 @@ Operating on a *base* operates on all of its contents — this is the direct ans
8787
- The objectui #1946 *"Local / Custom"* scope is repurposed as a **one-time migration surface**: it lists the legacy package-less items and offers "move into a base" (assign them a writable `package_id`). Once an environment has no orphans, the scope is removed from the selector.
8888
- A small migration (or admin action) can bulk-assign legacy orphans to a default base named for the environment.
8989

90+
> **Amended 2026-11-29 ([#38150](https://github.com/objectstack-ai/objectstack/issues/38150), ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C; written into [ADR-0084's amendment of 2026-11-26](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org)) — "move into a base" is the move-in door, and the bulk assignment to a default base is superseded.** TL;DR item 5's "move these loose items into a base" and this decision's `offers "move into a base"` are one door, and it shipped: `POST /api/v1/packages/:id/move-in` moves a selection of loose items — one, several, or all — into a writable package, each through the judges a save runs. The third bullet above, "A small migration (or admin action) can bulk-assign legacy orphans to a default base named for the environment", is superseded by that ruling: nothing is renamed or migrated, and there is no catch-all package. A row that is never moved stays legal: it belongs to the implicit environment package ([ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) D1, the fourth bucket).
91+
9092
### D6 — Single-tenant framing; no "org" dumping ground [ruled]
9193

9294
A metadata-customizable deployment is **single-tenant** (an *environment*; `project -> environment`); there is no per-org overlay dimension here. The relevant axis is **code package vs writable base**, not "org". The earlier instinct to make a package-less "org/local" scope the *default* is explicitly rejected: it reproduces the orphan pile. (Multi-tenant hosting keeps `package_id = null` overlays as a *tenant-overlay* mechanism; that is orthogonal and out of scope for this ADR.)

0 commit comments

Comments
 (0)