Skip to content

Commit 4fb03eb

Browse files
feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) (#37169)
Fixes #36903 Clause-②: yes (narrowing) Metadata-protocol: none Skills-docs: none — no page under `skills/` or `content/docs/` names the Automations rail's strings or teaches overriding a Studio console string ## 维护者速读 - 搭建者在 Studio 点开一个流程,会在右侧全屏打开它的设计器,左上角 × 回到流程列表,‹ › 按列表顺序看上一个、下一个;原来设计器左侧那一列流程列表没有了,组织级流程也在同样的新地址上打开。流程的“审阅草稿”链接打开通用详情页并显示审阅;权限集的审阅链接照旧打开它的权限矩阵页。 - 这是 Studio 重构专题(左侧菜单 → 列表 → 右侧全屏详情)里流程设计器的一张,和对象、权限集的设计器共用同一套“设计器页面”写法。 - 出错时最可能是旧书签没跳对、或某个流程打不开;不改数据和元数据协议。原流程列表专用的 9 条界面文字随 19.0.0 大版本退役,已在变更说明里逐条列出(若有人自定义过这几条翻译,自定义将不再显示),回退这个 PR 即可恢复。 - 这个 PR 超过 3000 行,按您的裁决在席位审核后请您审核;另有一个问题请您定:流程列表要不要加“触发对象”和“运行状态”两列(需要另开一张协议卡)。 ## What changes - **The flow designer is full-screen on its metadata address.** `/studio/PACKAGE/metadata/flow/NAME` mounts the designer (`AutomationsPillar`, now fixed on one flow named by the route). The area decides it through the shared designer-page helper in `metadataArea.ts` (`AREA_DESIGNER_PAGE_TYPES`, `areaItemOpensDesignerPage`, `areaDesignerItemOf`), now on main from #37089; after the merges the list is `['permission', 'object', 'flow']`. Header: the shared full-screen item header (`ResourceDetailHeader`): × back to the list with its filters, ‹ › in the list's order (decision 10), title, type, package, and the flow's ⋯ (New similar, Delete). Tabs: Canvas, Variables, Runs, Problems, Debug, then References, History, Source from `item-tools/ItemToolTabs` (hand-off §2); the open tab is `?tab=` (`flowDesignerTabs.ts`). - **No flow rail.** The rail, its search, object groups, legend, status dots, contributed-flow rows and the pillar's own New dialog are deleted. Create is the list's 「新建」 (`MetadataListCreateDialog`, same presets). - **Nine released console strings are retired, declared (M1, ruling 7153171432 「B」 with 7153326968 「下一版是大版本 19.0.0」).** The nine `engine.studio.auto.*` keys only the rail read (`heading`, `none`, `emptyMain`, `group.noObject`, `kind.record`, `kind.scheduled`, `kind.screen`, `kind.autolaunched`, `legend`) are removed from `en` and `zh` of `@object-ui/i18n`'s studio namespace. The changeset declares `Clause-②: yes (narrowing)`, carries the BREAKING note, the ADR-0087 `not-required (no-migration-prescription)` disposition and a 「Removed translation keys」 list, and keeps `'@object-ui/i18n': patch` (the one `major` is #37223's). `engine.studio.org.none` is kept: S5 reads it. - **Address switch.** `flow` leaves `STUDIO_ITEM_PILLAR` (with #37168's `object` gone too, it is empty), so `studioItemPath`, ⌘K, the AI artifact links and the Changes drawer open the new address. Old addresses redirect (`automationsPillarRedirect.ts`): `/automations?surface=flow:NAME` to the flow, bare `/automations` to the list; `?view=`/`?nav=` dropped, everything else kept (including `?changes=review`). - **`~org` flows** live on the package-less scope's own area leg: list `/studio/~org/metadata/flow?source=runtime`, flow `/studio/~org/metadata/flow/NAME?source=runtime`. Its list offers no 「新建」, and when it is empty it says how a packaged flow is changed instead (`engine.studio.org.none`, ADR-0146 D11), through a new optional `emptyListHint` on the area host. An empty, unsearched list there reads as empty, not as "No matches for """. - **Copilot context** has the sisters' shape: a designer on its metadata address sends `{ pillar: STUDIO_METADATA_AREA, artifact }`, the same block as #37089 (on main) and #37168, plus `orgScopeFlowOf` for the `~org` leg. - **Review links, in plain words:** a flow's review link opens the general item page with its review; a permission set's review link keeps its matrix page; an object's opens the general item page with its review, as #37168 shipped it. - **One predicate for the generic page.** `?review=1` and `?scope=environment` keep an item on the generic item page through `areaItemAsksGenericPage`, with #37168's text, for a designer type whose generic page serves that review (the flow). A type whose item page is its own editor (`registerMetadataResource`'s `EditPage`: the permission set's matrix) has no generic review, so it keeps its designer page, exactly as main does. Seat 4 recorded this as the measured form of its ruling A (7157282796). See Acceptance notes. - **Taken name in this package.** The list dialog's flow create says 「This package already has an automation…」 (`engine.studio.auto.createTaken`) and offers Open, to the flow's address, when the flow holding the identifier is this package's; `createTakenElsewhere` otherwise. - **Kept (card item 6):** the copilot's refresh after its edits (`useMetadataRefreshNonce`) and its current-item report (`onSurfaceLabelChange`). #36726's pinned publish on Save and on the switch is unchanged; the list dialog's flow create publishes with `publishCreated`. - **Run status (card item 2):** the list has no column for it or for the trigger object (the spec's flow columns are NAME, LABEL, type, DESCRIPTION). Both stay on the designer header's Trigger and Status pills. No `packages/spec` change; the column question is a fork for the maintainer. ## Empty state and old deep links (card item 7) - A package with no flow: the flow list's own empty state. The designer is never opened on nothing. - An address naming a flow the package does not hold: one block, 「The link names flow “NAME”, which is not here.」, nothing else opened. A package-less flow opens in `~org` instead (objectui#11553). - Old `/studio/PACKAGE/automations`, `/studio/BASE.custom/automations` and `/studio/~org/automations` links redirect as above. `…/metadata/flow/NAME/history` opens the History tab. - Delete returns to the flow list (its filters kept); no other flow is opened in the deleted one's place. ## Tests - This round: - `heldFlowLeave-26705`: an unsaved, NOT held edit. × asks, Cancel keeps the edit, OK lands on the list with nothing sent; › the same, onto the next flow; CONTROL: after Save neither asks. The Changes sheet's flow request: over a dirty or a held edit it asks, then lands; on the open flow it does nothing; CONTROL: no edit, no question. - `packageLessFlows-11553`, through the real surface: the old address of a package flow lands on its address with the designer open; a read-only base's old address naming a pair-added flow lands on the base's address, writable, with the pair chip; the pair's old address lands on the pair's own address; CONTROL: the base's own flow stays read-only. Also the `~org` Changes request landing on the scope's flow, and the empty `~org` list's guidance. - `tabs-12454`: `?tab=runs` and `?tab=history` open their panel on the real designer; CONTROL: no tab, Canvas. - `createTaken-26917`: a published flow in this package reads `createTaken` and Open lands on `/studio/PKG/metadata/flow/escalate`; another package's keeps `Elsewhere` and no Open. - `aiChipLabel`: repinned to `{ pillar: 'metadata', artifact }`. - `customizeFlow-28570`: the Restore dialog's label is read off the header's title. - Earlier rounds: the remaining `AutomationsPillar.*` suites and the `StudioDesignSurface.*` / `StudioMetadataArea.*` suites that open a flow, converted to the address. Deleted as rail-only, each with the pin that covers what is left: `AutomationsPillar.railSearch-11794`, `FlowStatusDot`, `FlowStatusDot.registration-12349`, `StudioDesignSurface.railUnboundReason-11281` (the unbound reason is on the header's Status pill, `flowStatusTruth-11779`), `.automationsRailOrder-12612`, `.draftObjectFlowGroup-29706`, and the rail cases in `.emptyStates-12514`, `.homeLoop-12513`, `.oneSurface-28572`, `.autosaveSwitch-11232`, `.heldFlowCreate-26845`, `StudioRail.noMatches-26733`. New pins: `automationsPillarRedirect.test.ts`, `flowDesignerTabs.test.ts`, the helper and predicate cases in `metadataArea.test.ts`, the designer and `/history` routes in `StudioMetadataArea.routes-28561`. <details><summary>Ablations (each: committed fix, anchored mutation through the ablation-replace script, restored to the HEAD blob)</summary> - M2, `dirty: autoDirty` → `dirty: false` at `AutomationsPillar.tsx:803`: the two new guard cases go red on `expected "vi.fn()" to be called 1 times, but got 0 times` (lines 315, 338), the CONTROL goes red on Save not offered, and the 5 held-step cases stay green (`Tests 3 failed | 5 passed (8)`). Restored: blob `068563e042de` == HEAD, `git diff HEAD` empty. - S4, `here: own.some(…)` → `here: false`: the in-package case goes red, the others stay green (`1 failed | 9 passed (10)`). Restored: blob `c5263910bff6` == HEAD. - S5, the area host's `emptyListHint` spread deleted: the empty `~org` list case goes red (`1 failed | 23 passed (24)`). Restored: blob `5386130ea404` == HEAD. - The first M2 run went red at the case's own precondition (Save not offered), not at the question; the precondition was moved out of the shared helper and the ablation re-run as above. Declared, not hidden. </details> <details><summary>Local readings (final head first; earlier heads named)</summary> - **Final head `9fcff540`** (the third merge of `origin/main`, at `1b91538b` with #37168, in `7a7af7ad`; then the lint fix). CI on `7a7af7ad` was red in Lint UI only: three imports that the retired-pillar cases left unused (`fireEvent` and `screen` in `expectedMisses-11799`, `parseSurfaceParam` in `metadataArea.test`). `9fcff540` removes them; no source changed. Readings on that tree, each under the lock: - `pnpm --dir ui --filter @object-ui/app-shell run lint`: exit 0, 0 errors. - app-shell type-check (src and `tsconfig.test.json`): exit 0, 0 `error TS`. - Full run over `studio-design`, `metadata-admin`, `CommandPalette.studioScope-11863`, `console`, `packages/i18n/`, `clickableNonControlCensus-13461` and the console's `StudioRoute`: Test Files 1508 passed (1508); Tests 15400 passed, 14 skipped; VERDICT command-exit 0. - `check:i18n-keys`: exit 0. `check:test-source-alias`: exit 0 before the push. The 36 light derived families re-ran on `7a7af7ad`: all exit 0. `overlap-check`: `origin/main` and #37226 merge cleanly; #37166 conflicts. - Full dogfood battery on `7a7af7ad` (the lint fix changes no runtime file), `pnpm --filter @objectstack/dogfood test` under the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT command-exit 0. - Ablation of the review rule after the merge: `const genericPage = areaItemAsksGenericPage(search) && !getMetadataResource(type)?.EditPage;` → `const genericPage = false;` in `StudioMetadataArea.tsx`. `routes-28561`: Tests 2 failed, 32 passed (34). The object's `?review=1` CONTROL and the flow's `?review=1` case go red (`expected 'flow-designer' to be 'item'`); the permission set's matrix pin stays green. Restored: blob `c3b2d2786f9f` == HEAD. - CI on `9fcff540`: 58 check-runs, all completed: 45 success, 13 skipped (path filters, opt-in and queue jobs), 0 failed. Lint UI, Type Check UI, Test UI (shards 1–16), Build & E2E UI, Live E2E UI, Lint & Repo Gates, TypeScript Type Check, Test Core, Dogfood Regression Gate, Governed Surface Queue Guard, Check Changeset and PR-body guards: success. - **Review-link round, head `d3e30576`** (on top of `3f65d38b`, below): app-shell type-check exit 0. `StudioMetadataArea.*`, `StudioPermissionSetPage.*`, `metadataArea.*`, `packageLessFlows-11553`, `heldFlowLeave-26705`, `oneSurface-28572` and `AppContent.setupMetadataStudio-28578`: Test Files 8 passed (8), Tests 218 passed (218). Ablation as above. Full dogfood battery on `d3e30576` under the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT command-exit 0. `check:test-source-alias`: exit 0 before the push. CI on `d3e30576`: 58 check-runs, 45 success, 13 skipped, 0 failed. - **Final head `3f65d38b`** (the second merge of `origin/main`, at `6211ddf4`). app-shell type-check: exit 0. `studio-design`, `metadata-admin`, `CommandPalette.studioScope-11863`, `console/ai`, `packages/i18n/` and `clickableNonControlCensus-13461`: Test Files 1265 passed (1265), Tests 13230 passed, 14 skipped (VERDICT command-exit 0). Full dogfood battery, `pnpm --filter @objectstack/dogfood test` under the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT command-exit 0. The derived gate list is unchanged (38); its 36 light families re-ran, all exit 0. `check:test-source-alias`: exit 0 before the push. `overlap-check`: `origin/main` merges cleanly; #37168 and #37166 conflict. - Diff against the merge base with `origin/main` at `3f65d38b`: 94 files, +2,235 / −2,787. - **M1 round, head `576f67d3`.** `check-adr-0087-registration --base origin/main`: exit 0, one declared-breaking changeset with `not-required (no-migration-prescription)`. `check-changeset-no-major`: exit 0. `check-empty-changeset`: exit 0. `ui` `check:i18n-keys`, `check:i18n-drift`, `check:i18n-dead-keys`: exit 0 each. `packages/i18n/` plus `plainLanguage-11659`, `studio-locale.i18n` and `packageLessFlows-11553`: Test Files 114 passed (114), Tests 2060 passed, 13 skipped (VERDICT command-exit 0). app-shell type-check: exit 0. The 36 light derived families re-run: all exit 0. Full dogfood battery (owed by the `(narrowing)` arm), `pnpm --filter @objectstack/dogfood test` under the lock: Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); VERDICT command-exit 0. `check:test-source-alias`: exit 0 before the push. - `pnpm --filter @object-ui/app-shell type-check` (src and `tsconfig.test.json`): exit 0 on `49bf2233`, after the `@object-ui/*` dependency closure was rebuilt from this tree (turbo, 68 tasks). - Full run on `1d6b2854` (the merge plus its seam fixes), over `packages/app-shell/src/views/studio-design`, `packages/app-shell/src/views/metadata-admin`, `CommandPalette.studioScope-11863`, `console/ai` and `clickableNonControlCensus-13461`: Test Files 2 failed, 1150 passed (1152); Tests 3 failed, 11175 passed, 1 skipped. The failures came from the merge: `homeLoop-12513` opened on `/access`, which #37089 turned into a redirect; and `MetadataListCreateDialog.pairCreate-36897` mounts the dialog without a router, where this round's Open used `useNavigate`. Both are fixed at `49bf2233`, where the touched files re-ran: Test Files 24 passed (24), Tests 176 passed (176). - `dispatch-gates --commands`: 38 families. `--ran` reconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, all with exit codes, all 0. `pnpm --dir ui exec vitest run scripts/` was OOM-killed on its first run beside the full suite; re-run alone under the lock it exited 0 (Test Files 172 passed, 2 skipped). `check:type-check-debt` re-measured under the lock: OK, 0 raw errors. - `check:test-source-alias`: exit 0 before each push. `overlap-check`: `origin/main` merges cleanly; #37168, #37166 and #37185 conflict (exit 1). - ESLint (`--no-inline-config`) over every changed `ui/` file: 0 errors, 59 warnings. </details> ## Acceptance notes - **M1, how it ended.** Round 2 first restored the ten released keys (the L1's preferred fix). The maintainer then ruled retire-and-declare (7153171432 「B」; next release is the major, 7153326968), so this round removes the nine keys no code reads and declares them; the tenth, `engine.studio.org.none`, is read again by the `~org` list (S5) and stays. `studioAutomationCopy.plainLanguage-11659`'s heading case went with its row (N1, first option). The ~35 keys main had already removed are #37223's, not declared here. - **Merged `origin/main` at `bc3ec37a`, which holds #37089 (the permission designer).** The merge unions the two designers: `AREA_DESIGNER_PAGE_TYPES = ['permission', 'flow']`, `STUDIO_ITEM_PILLAR` keeps `object` only, and `AreaItemOpen` mounts `AutomationsPillar` for a flow and `StudioPermissionSetPage` for a set. Two consequences, both deliberate: - **Declared deviation, accepted (seat 4, 7157282796): a permission set's `?review=1` keeps main's behaviour and opens the matrix page.** The ruling said uniform (A), on this branch's recommendation. Checking it showed the premise was false. For a type whose item page is its own editor, the generic page never draws: `MetadataResourceEditPage` hands the item to the registered `PermissionMatrixEditPage`, which has no draft review. Neither it nor main's `StudioPermissionSetPage` reads `?review=1`. Uniform would therefore have sent a set's review link to Setup's matrix editor, with no review sheet and outside the Studio page: a regression. So `AreaItemOpen` asks the generic page only for a type with no own `EditPage`. That is the flow here and the object in #37168 (#37168 should check the object's registry before relying on it). Pinned in `routes-28561` (`?review=1` keeps the matrix page), and ablated: dropping the `EditPage` guard reds it, `1 failed | 31 passed (32)`, restored to the HEAD blob. The flow's `?review=1` still opens the generic page and its review (the case beside it). - **Carrier for the permission set's review, #37269.** Two live links write a permission set's `?review=1` today: the Packages page's per-draft review link (`PackagesPage.tsx:1317`) and the chat's 「Review N changes」 (`AppContent.tsx:286`). Both open the matrix page with no review, as on main. #37269 makes the matrix page show the draft's changes; this PR does not change what those links open. - The census rows for `AccessPillar.tsx` and `AutomationsPillar.tsx` `setRailOpen` both go: both rails are gone. - **Merged `origin/main` again at `6211ddf4`**, after #37185 (the authenticated fetch) and #37232 (the menu's type table) landed and the PR showed a conflict. Two files conflicted, each resolved so both sides survive: `CommandPalette.studioScope-11863.test.tsx` (one comment above the shared `@object-ui/plugin-detail` warm-up; main's wording kept) and `FlowItemMoreMenu.tsx` (main's `authFetch` for the clone door kept; the `STUDIO_HEADER_ICON_BUTTON` import this branch had dropped as unused stays dropped). #37168 had still not merged, so the exemption below stands. - **Merged `origin/main` a third time, at `1b91538b` (#37168, the object designer).** This PR now lands second of the pair, so it carries the routing ruling. The 47 conflict hunks in 22 files were resolved so both designers survive: - `AREA_DESIGNER_PAGE_TYPES = ['permission', 'object', 'flow']`, and `STUDIO_ITEM_PILLAR` is empty. - `AreaItemOpen` mounts `DataPillar` for an object, `AutomationsPillar` for a flow and `StudioPermissionSetPage` for a set. #37168's `type === 'object'` review gate is replaced by the one `EditPage` rule; it gives the object the same answer. - Both creates' `onOpenExisting` paths are kept: the object's at its target package, the flow's in this package. The prop, which both PRs added, is passed once. - Both old-pillar redirects (`/data`, `/automations`) are kept. - Two suites lost their last case, every one a retired pillar's in-place behaviour: `StudioRail.noMatches-26733` (all three rails are gone) and `StudioDesignSurface.autosaveSwitch-11232` (main kept only the Automations cases and this branch only the Data cases, and both pillars are gone). Each is deleted. What they pinned for items is pinned per item: the area keys each designer by item, and `heldFlowLeave-26705`'s › case pins that the next flow opens clean, with nothing sent. - **`AreaHistoryRedirect`'s designer-item exemption (`pillarItem`) is deleted** (seat 4's routing: the second lander of #37168 and #37169 deletes it). With `STUDIO_ITEM_PILLAR` empty it could no longer fire. `routes-28561`'s CONTROL keeps its own-`EditPage` leg (the standalone history page), and its object leg is repointed at the object designer's History tab; the flow's `/history` opens the flow designer's History tab (the case beside it). - The closing line on line 1 is kept this round (N4): the maintainer is still to answer card item 2. - N2: the stale `/studio/~org/automations` comments in `src/index.ts` and `studioScope.ts` now name the scope's area addresses. - N3: not changed. The caption's `title="API name: …"` predates this PR: main's pillar header set the same `titleProps.title`, and 20 test lookups across 15 suites key on it. A cut label's hover still shows the API name; the changeset now names the api-name chip instead of a tooltip. - N5 / `orgScopeFlowOf` (seat 4: keep it): a one-line comment at the leg says it is dormant because the package-less scope mounts no copilot (objectui#11553). No surface-level `~org` copilot case is possible: the package-less scope mounts no copilot (`slotHost` needs a package, objectui#11553; `packageLessFlows-11553` pins `chatDock.mounts === 0`). The `~org` leg's context is pinned on the pure `orgScopeFlowOf` in `metadataArea.test.ts`. - N6: four `docs/qa/platform-checklist/areas/studio-authoring.json` items still describe the deleted rail and the `~org` pillar: `automations-rail-and-new-flow`, `org-scope-flows`, `flow-status-matches-runtime`, `flow-edge-type-authoring`. They carry to #36910, whose item 3 owns that rewrite. - N7: corrected. CI on `5d9bb8da` was 47 success and 15 skipped, and "Check PR Size" was skipped, not passed. - N8: the Restore case reads its label off the header's title (`auto-canvas-caption`), so it still cross-checks the dialog. - S6: `ui/packages/app-shell/README.md`'s package-less section describes the scope's area leg; the changeset is in user terms, with no route templates and no query parameters. - The suites this PR edits import `@objectstack/lint` and `@object-ui/plugin-detail` at module top, so the dynamic imports their source reaches are paid at collection (`check:test-source-alias`). - Overlaps at this head (`9fcff540`): #37166 conflicts with this branch; `origin/main` and #37226 merge cleanly. Whichever lands later merges main. - Left for #36909 (pillar leftovers): `groupFlowsByObject`, `withContributedFlowGroups`, `ContributedRailRow`, `useOpenContributor`, the console's `/studio/~org` bare route, and producers still writing the old `/automations` (all redirect). ## Verification First read, by risk: `StudioMetadataArea.tsx` (`AreaItemOpen`: the designer decision for both types, the `~org` leg), `metadataArea.ts` (the shared helper and `areaItemAsksGenericPage`), `MetadataListCreateDialog.tsx` (the taken-name branch). Two-minute check: open `/studio/com.example.showcase/automations?surface=flow:showcase_urgent_task_alert`; expect the flow full-screen at `/studio/com.example.showcase/metadata/flow/showcase_urgent_task_alert?package=com.example.showcase`, with × to the list and ‹ › enabled. <details><summary>Live walk-through (showcase, earlier round, head 5d9bb8d)</summary> Stack: `pnpm dev -- --fresh -p 38917` after `pnpm build`, and the Console dev server, driven with Playwright. It covered the list, the full-screen canvas, › and ×, a `~org` flow, an old bookmark, bare `/automations` and `/history`. No page errors. HotCRM was not walked: this container holds only this repository. This round adds no new screen path that the cases above do not drive through the real surface; it was not re-walked. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYnHH41MS5hWVGPia4F)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 875ae40 commit 4fb03eb

96 files changed

Lines changed: 2216 additions & 3593 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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): a flow opens full-screen in its own page; the Automations pillar's flow list is gone
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: none
10+
Skills-docs: none — no page under `skills/` or `content/docs/` names the Automations rail's strings or teaches overriding a Studio console string
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) the narrowing is nine console strings retired from the studio locale namespace of @object-ui/i18n; no packages/spec schema, registered node type, stored row or metadata key names them, nothing a metadata author writes changes, and a host that overrode one has nothing to rewrite: its override is simply no longer shown -->
13+
14+
**BREAKING** for a host that overrides one of the nine studio console strings listed under "Removed translation keys" below: they are retired with the Automations pillar's flow list in 19.0.0, and an override of one of them no longer applies.
15+
16+
In Studio, a flow now opens on its own page, full-screen beside the left menu, from the flow list in "All metadata", instead of in the Automations pillar's flow list and canvas. Its header is the one every full-screen item page has: × goes back to the flow list with its filters and sort kept, ‹ › step through the list in its order, and the flow's label, type and package are shown, with its machine name in a chip beside the label. A ⋯ menu holds New similar and Delete flow. The header still shows the flow's Trigger, Status (the engine's run status), Run as and version, and the Enabled switch (or, on a read-only package, the activation switch). The tab row holds the designer's Canvas, Variables, Runs, Problems and Debug, then References, History and Source, which replace the item-tools menu and its side sheets; a refreshed or shared link reopens the same tab. Save stays in the Studio top bar and still publishes that one flow, pinned to the version it was loaded at. Leaving with unsaved edits (×, ‹ ›, the menu, the Changes sheet, a reload, closing the tab) asks first.
17+
18+
A flow is created from the flow list's 「新建」, with the same starting points, and that create refuses to overwrite a flow published under the same name, as the pillar's did. When the name is taken by a flow in this package, the dialog says so and offers to open it. New similar opens the copy on its own page, with a strip saying where it landed. Deleting a flow returns to the flow list. The copilot still knows which flow is open, and still refreshes it after its edits.
19+
20+
The organization's own flows, which belong to no package, have their own flow list and open on their own pages; that list offers no 「新建」, as before, and when it is empty it says how a packaged flow is changed instead (open its package and use New similar).
21+
22+
Old bookmarks keep working. A link to a flow in the Automations pillar opens that flow's page, and a link to the pillar itself opens the flow list, for a package, a read-only package's customizations and the organization's own flows alike. A flow's History link opens its History tab. A link naming a flow the package does not hold says so and opens no other flow; one naming a flow that belongs to no package opens it among the organization's flows. A flow's draft-review link (and the environment view) opens the general item page with its review, as it did when flows had a pillar. A permission set's review link keeps opening its matrix page, as before.
23+
24+
The flow list has no column yet for a flow's trigger object or its run status; until it has one, both are shown in the flow's header.
25+
26+
Removed translation keys (studio namespace of `@object-ui/i18n`, released in 18.6.0; no code reads them since the flow list left the designer). Each is removed from both packs it shipped in, `en` and `zh`:
27+
28+
- `engine.studio.auto.heading` (en, zh)
29+
- `engine.studio.auto.none` (en, zh)
30+
- `engine.studio.auto.emptyMain` (en, zh)
31+
- `engine.studio.auto.group.noObject` (en, zh)
32+
- `engine.studio.auto.kind.record` (en, zh)
33+
- `engine.studio.auto.kind.scheduled` (en, zh)
34+
- `engine.studio.auto.kind.screen` (en, zh)
35+
- `engine.studio.auto.kind.autolaunched` (en, zh)
36+
- `engine.studio.auto.legend` (en, zh)
37+
38+
An override of one of these keys no longer applies; delete it. `engine.studio.org.none` is kept: the organization's empty flow list shows it.

‎ui/packages/app-shell/README.md‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -793,21 +793,26 @@ On the declared page:
793793
rule already switched off has no served projection, so its clone continues
794794
in the pre-filled New form, which asks for the criteria.
795795

796-
### Package-less flows (`/studio/~org/automations`)
796+
### Package-less flows (`/studio/~org/metadata/flow`)
797797

798798
A flow that belongs to no package — a clone of a packaged flow is one, by
799799
ADR-0126 §7.1 — matches no package scope, so Studio gives it one scope of its
800-
own: `/studio/~org/automations` (`studioOrgScopePath()`, segment
801-
`STUDIO_ORG_SCOPE_SEGMENT`). It is the same `StudioDesignSurface` with no
802-
package under it, reached from the Studio home and from the package switcher.
803-
Its Automations rail lists every flow whose served `_packageId` names no
804-
package, opens each one editable, and saves package-less drafts; its Publish
805-
promotes those drafts one by one through the single-item publish door, because
806-
the package batch publish cannot reach a draft bound to no package. It offers
807-
no other pillar and no "New" flow. `~` is outside every package-id alphabet,
808-
so the segment can never name a package. A `?surface=flow:` deep link that
809-
names a flow the open rail does not hold opens no other flow in its place;
810-
from a package's pillar, a package-less flow is opened in this scope instead.
800+
own, segment `STUDIO_ORG_SCOPE_SEGMENT` (`~org`): its own leg of the "All
801+
metadata" area. The list is `/studio/~org/metadata/flow?source=runtime` and a
802+
flow opens full-screen in the flow designer at
803+
`/studio/~org/metadata/flow/<name>?source=runtime` (`studioOrgScopePath()`,
804+
`orgScopeFlowOf()`). It is the same `StudioDesignSurface` with no package under
805+
it, reached from the Studio home and the left menu. The list holds every flow
806+
whose served `_packageId` names no package and offers no create; each flow opens
807+
editable and saves package-less drafts. An empty list says how a packaged flow
808+
is changed instead (in its package, with New similar). Publish promotes the
809+
scope's drafts one by one through the single-item publish door, because the
810+
package batch publish cannot reach a draft bound to no package. `~` is outside
811+
every package-id alphabet, so the segment can never name a package. A package's
812+
address naming a package-less flow opens it in this scope; one naming a flow
813+
nowhere held says so and opens no other flow. The retired
814+
`/studio/~org/automations` addresses (with or without `?surface=flow:<name>`)
815+
redirect to the list or the flow (objectstack#36903).
811816

812817
### Access matrix (package-scoped)
813818

‎ui/packages/app-shell/src/chrome/CommandPalette.studioScope-11863.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ describe('the palette in the `studio` scope lists the Studio, not an app (object
214214
await studioListed();
215215
pick('studio-flow Onboard Account ');
216216
await waitFor(() =>
217-
expect(locationNow()).toBe('/studio/com.acme.crm/automations?surface=flow%3Acrm_onboard'),
217+
expect(locationNow()).toBe('/studio/com.acme.crm/metadata/flow/crm_onboard'),
218218
);
219219
});
220220

221221
it('opens a package-less flow in the package-less scope (objectui#11553)', async () => {
222222
mountStudio();
223223
await studioListed();
224224
pick('studio-flow Nightly Cleanup ');
225-
await waitFor(() => expect(locationNow()).toBe('/studio/~org/automations?surface=flow%3Aorg_cleanup'));
225+
await waitFor(() => expect(locationNow()).toBe('/studio/~org/metadata/flow/org_cleanup?source=runtime'));
226226
});
227227

228228
it('matches an entry by its label or its machine name', async () => {

‎ui/packages/app-shell/src/console/ai/__tests__/artifactStudioPath.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ describe('artifactStudioPath', () => {
1616
);
1717
});
1818

19-
it('flow → Automations pillar (the reserved ?surface=flow: consumer gets its first producer)', () => {
19+
it('flow → the flow designer on its metadata address (objectstack#36903)', () => {
2020
expect(artifactStudioPath(pkg, { type: 'flow', name: 'customer_lost_follow_up' })).toBe(
21-
'/studio/app.rmpe/automations?surface=flow%3Acustomer_lost_follow_up',
21+
'/studio/app.rmpe/metadata/flow/customer_lost_follow_up',
2222
);
2323
});
2424

‎ui/packages/app-shell/src/console/ai/artifactStudioPath.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* (objectui#2623).
88
*
99
* object → Data pillar, the object's schema/records surface
10-
* flow → Automations pillar (the `?surface=flow:` consumer was reserved
11-
* for exactly this bridge — this is its first producer)
10+
* flow → the flow designer, full-screen on the flow's metadata address
11+
* (objectstack#36903: the Automations pillar retired)
1212
* dashboard, page, view, app
1313
* → the item's page in the "All metadata" area. objectstack#36502:
1414
* the Interfaces pillar that designed them is retired; they are

‎ui/packages/app-shell/src/index.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,10 @@ export {
617617
// Standalone at `/studio` and embedded via the `studio:builder` component ref.
618618
export { BuilderLanding } from './views/studio-design/BuilderLanding.js';
619619
// The one Studio scope that is not a package (objectui#11553): the
620-
// organization's own package-less flows, at `/studio/~org/automations`. A host
621-
// that declares the `/studio` routes reads the reserved segment from here.
620+
// organization's own package-less flows, listed at
621+
// `/studio/~org/metadata/flow?source=runtime` (objectstack#36903; the old
622+
// `/studio/~org/automations` redirects there). A host that declares the
623+
// `/studio` routes reads the reserved segment from here.
622624
export {
623625
STUDIO_ORG_SCOPE_SEGMENT,
624626
STUDIO_ORG_SCOPE_PILLAR,

‎ui/packages/app-shell/src/views/metadata-admin/MetadataListCreateDialog.tsx‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function ObjectCreate({ open, onOpenChange, packageId, inPair, locale, onCreated
232232
);
233233
}
234234

235-
function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated }: MetadataListCreateDialogProps) {
235+
function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated, onOpenExisting }: MetadataListCreateDialogProps) {
236236
const client = useMetadataClient();
237237
const startTrigger = React.useMemo(() => newFlowTriggerFields(locale), [locale]);
238238
const watchesObject = startTrigger.object?.showWhen?.equals ?? [];
@@ -242,7 +242,9 @@ function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated }
242242
const [needs, setNeeds] = React.useState<string | null>(null);
243243
const [busy, setBusy] = React.useState(false);
244244
const [error, setError] = React.useState<StudioRefusal | null>(null);
245-
const [taken, setTaken] = React.useState<Taken | null>(null);
245+
// `here`: the flow holding the identifier is this package's own (published or
246+
// a draft), so the notice offers to open it, as the Automations pillar's did.
247+
const [taken, setTaken] = React.useState<(Taken & { here: boolean }) | null>(null);
246248
const group = React.useId();
247249
React.useEffect(() => {
248250
if (!open) return;
@@ -261,7 +263,8 @@ function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated }
261263
try {
262264
const held = await findTakenIdentifier(client, 'flow', name, locale);
263265
if (held) {
264-
setTaken(held);
266+
const own = await loadPackageSurfaces(client, 'flow', packageId, locale).catch(() => []);
267+
setTaken({ ...held, here: own.some((flow) => flow.name === name) });
265268
return;
266269
}
267270
// Born switched off (`obsolete`, what the switch writes for Off):
@@ -275,9 +278,13 @@ function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated }
275278
);
276279
const target = await createTarget(packageId, inPair, null);
277280
await client.save('flow', name, skeleton, { mode: 'draft', packageId: target.packageId, ifNoneMatch: '*', surface: 'studio' });
278-
const live = await publishSavedItem(client, { type: 'flow', name, packageId: target.packageId }, false);
281+
// objectstack#36726 — pinned `If-None-Match: *`, as the Automations
282+
// pillar's create was (objectstack#36903 moved every flow create here):
283+
// a flow another writer published under the name since the check above
284+
// is refused, not replaced.
285+
const live = await publishSavedItem(client, { type: 'flow', name, packageId: target.packageId }, false, publishCreated);
279286
if (!live.ok) {
280-
setError(plainRefusal(live.error));
287+
if ('error' in live) setError(plainRefusal(live.error));
281288
return;
282289
}
283290
toast.success(tFormat('engine.studio.auto.createdOff', locale, { name: label }));
@@ -313,7 +320,13 @@ function FlowCreate({ open, onOpenChange, packageId, inPair, locale, onCreated }
313320
{taken && (
314321
<CreateTakenNotice
315322
scope="flow"
316-
sentence={tFormat('engine.studio.auto.createTakenElsewhere', locale, { label: taken.label, name: taken.name })}
323+
sentence={tFormat(
324+
taken.here ? 'engine.studio.auto.createTaken' : 'engine.studio.auto.createTakenElsewhere',
325+
locale,
326+
{ label: taken.label, name: taken.name },
327+
)}
328+
openLabel={tFormat('engine.studio.create.openExisting', locale, { label: taken.label })}
329+
onOpen={taken.here && onOpenExisting ? () => onOpenExisting(studioItemPath(packageId, 'flow', taken.name)) : undefined}
317330
/>
318331
)}
319332
<fieldset className="space-y-2">

‎ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,11 @@ function DefaultMetadataList({ type, appName }: { type: string; appName?: string
762762
: {}),
763763
};
764764
const filtered = applyListState(scopedItems, listState, rowReader, locale);
765+
// objectstack#36903 — a host that says what its empty list means (the
766+
// package-less scope, whose list is its source filter's narrowing of the
767+
// environment's rows) reads an unsearched, empty list as empty, not as a
768+
// search with no match.
769+
const hintedEmpty = !!host?.emptyListHint && !query.trim() && filtered.length === 0;
765770
// The list context every row link carries to its detail (decision 10).
766771
const listContext = listContextQuery(listState);
767772

@@ -1449,12 +1454,13 @@ function DefaultMetadataList({ type, appName }: { type: string; appName?: string
14491454
{!loading && !error && !packagesPending && (envScope || !!host || (projectPackages?.length ?? 0) > 0) && filtered.length === 0 && (
14501455
<Empty>
14511456
<EmptyTitle>
1452-
{scopedItems.length === 0
1457+
{scopedItems.length === 0 || hintedEmpty
14531458
? tFormat('engine.list.emptyType', locale, { type: typeLabel })
14541459
: tFormat('engine.list.emptyQuery', locale, { query })}
14551460
</EmptyTitle>
14561461
<EmptyDescription>
1457-
{config.emptyStateHint ??
1462+
{(scopedItems.length === 0 || hintedEmpty ? host?.emptyListHint : undefined) ??
1463+
config.emptyStateHint ??
14581464
(canCreate
14591465
? tFormat('engine.list.createHint', locale, { type: typeLabel })
14601466
: t('engine.list.readOnlyHint', locale))}

‎ui/packages/app-shell/src/views/metadata-admin/metadataAreaHost.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ export interface MetadataAreaHost {
5656
* customization to create with, or the ensure door refuses this caller.
5757
*/
5858
pairCreate?: boolean;
59+
/**
60+
* objectstack#36903 — what an empty list of the area says under its title in
61+
* place of the type's own hint: the package-less scope's flow list says how a
62+
* packaged flow is changed instead (ADR-0146 D11). Absent elsewhere.
63+
*/
64+
emptyListHint?: string;
5965
}
6066

6167
export const MetadataAreaHostContext = React.createContext<MetadataAreaHost | null>(null);

‎ui/packages/app-shell/src/views/metadata-admin/studio-locale.i18n.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const SAMPLE_KEYS = [
4343
'engine.studio.pkg.new',
4444
'engine.studio.data.newObject',
4545
'engine.studio.data.tab.records',
46-
'engine.studio.auto.heading',
46+
// objectstack#36903 — the flow designer's, now that the rail's heading is gone.
47+
'engine.studio.auto.defaultOff',
4748
'engine.studio.access.title',
4849
'engine.appNav.heading',
4950
'engine.appNav.addItem',

0 commit comments

Comments
 (0)