Skip to content

Commit a46efa8

Browse files
fix(studio): every retired pillar address lands on its new page in one redirect; the pillar-era code with no reader goes (#37383)
Fixes #36909 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:Studio 的旧地址(以前的「数据 / 自动化 / 权限 / 界面」分区链接、收藏夹、AI 给过的链接、服务器发的草稿审阅链接)都还能打开原来要看的页面,而且一次就跳到位;清理本身用户无感。 - 为什么做:Studio 重构专题的收尾——分区已经被左侧菜单和全屏设计器取代,这一单删掉分区留下的、已经没人读的代码。 - 出错会怎样:如果哪条旧地址漏了,打开它会落到「页面不存在」或错误的列表页;这是纯前端改动,撤回这个 PR 即可恢复。 - 要你做什么:无。 ## What changes No Studio pillar draws a page any more. This PR makes the route, not the builder, answer every retired pillar address, and deletes what the redesign left with no reader. **1. One redirect table, mounted on the route** (`studioPillarRedirectModel.ts`, `StudioPillarRedirect.tsx`, `StudioRoute.tsx`). `/studio/PACKAGE` and `/studio/PACKAGE/:tab` now render `StudioPillarRedirect`. A retired pillar address redirects once; any other segment renders the builder (the sharing overview `owd`, or the not-found state). | old address | lands on | |---|---| | `/studio/PACKAGE`, `/studio/PACKAGE/data` | `/studio/PACKAGE/metadata/object?package=PACKAGE` | | `/data?surface=object:NAME` (all three spellings, `?action=` kept) | `/studio/PACKAGE/metadata/object/NAME?package=PACKAGE` | | `/data?changes=review` (the server's `studioChangesReviewLink`) | `/studio/PACKAGE/metadata/object?changes=review&package=PACKAGE` | | `/automations[?surface=flow:NAME]` | the flow list, or `/metadata/flow/NAME?package=PACKAGE` | | `/access[?surface=permission:NAME / owd:overview]` | the permission set list, the set's matrix (its holder read, as before), or `/owd` | | `/interfaces[?…]` | the object list, with the "interface editing moved" notice | | `/studio/~org` and every `/studio/~org/…` | `/studio/~org/metadata/flow[/NAME]?source=runtime` | A base's `.custom` pair keeps each pillar's old rule (Data and Automations in the pair's area; Access and Interfaces on the base). **2. One hop (carry item from 7157423170).** Every target in the area is put where the area would put it (`settledAreaAddress`, built on a new `studioAddressParts` parser in `studioAddress.ts`), so the area never redirects a second time. Before: `/data` took two redirects, bare `/studio/PACKAGE` three, `/studio/~org` two. The publish toast's "Open Access" now opens the package's permission sets, and the Changes sheet's link to a permission set opens that set's page, directly instead of through the old Access address. **3. Removed, with every reader gone** (all in `@object-ui/app-shell`, `private: true`, last published 18.2.0 — nothing published narrows): - `AREA_PILLAR_FOR_TYPE`, `areaItemPillarPath`, `studioPillarItemPath` (`metadataArea.ts`); `StudioMetadataArea`'s pillar redirect branch. - `STUDIO_ITEM_PILLAR` (empty since #36903), `studioItemPillar`, `studioPillarItemAddress`, `studioSurfaceQuery`, `StudioItemOptions.spelling` (`studioAddress.ts`). `studioItemPath` now always returns the metadata address. - `STUDIO_ORG_SCOPE_PILLAR` (`studioAddress.ts`, its `studioScope.ts` re-export and the package entry). Kept only as data where a redirect needs it: the literal `'automations'` inside the redirect table. - `STUDIO_HOME_PILLAR` from the package entry (the console no longer reads it). It stays inside app-shell: `studioHomePath` / `studioChangesReviewPath` mirror the server's `/data?changes=review` link, which this card may not change. - The `?surface=` mirror half and the capture half with it (`useSurfaceDeepLink`, `useSurfaceDeepLinkCapture`, `useSurfaceDeepLinkMirror`, `parseSurfaceTarget`, `resolveSurfaceDeepLink`) and their test file. `useSurfaceActionDeepLink` and the qualifier keys stay (the object designer and the redirects read them). - The channel's subscriber half: `useRequestedSurface`, `SurfaceRequest` and the `requested` state (carry item: no reader since #37168). `useSurfaceNavigator` + `SurfaceDeepLinkProvider` stay: the Changes sheet's security block uses them. - In `StudioDesignSurface`: the in-surface Data / Automations / Interfaces redirects, `PILLARS`, the Access landing branch, `PILLAR_FOR_SURFACE_TYPE`, and the pillar re-entry counter whose value nothing read. - `studioMenuModel.ts` needed only the sharing overview's section, not a pillar map: `PILLAR_TYPE` went; the menu marks nothing current on a retired address (it never draws one). **4. `studio.app.ts`: no change needed.** All 15 `metadata:resource` / `metadata:directory` entries were walked through the console's real path (`/apps/studio/metadata/TYPE?package=PACKAGE` → `setupMetadataStudioPath`): each lands on `/studio/PACKAGE/metadata/TYPE?package=PACKAGE` (or `~all` with no package), a settled area address, none on a pillar. Reading in Verification. **5. Card item 3** (`engine.studio.pillar.*`) was already gone on main (the claim's Premise). This diff removes no translation call site; `ui/scripts/check-i18n-dead-keys.mjs` exits 0. ## Tests Pins (each ablated, below): - **Table** — `studioPillarRedirectModel.test.ts` walks 22 old addresses (every package pillar, bare package, a `.custom` pair, every `~org` address, the three `?surface=` spellings) to their literal targets, plus the Access mapping; `studioAddress.test.ts` holds every `STUDIO_ITEM_TYPES` row's `redirectsTo` equal to what the table returns for each spelling. Route-level: `StudioRoute.metadataArea-28561.test.tsx` walks 14 old addresses through the real `studioRoutes` and the real redirect. - **`/data` single hop** — `the old /data address reaches the object list in one redirect` (the area's `areaLocationRedirect` answers null for the target); route-level, the location probe records exactly `[old, new]`. - **CONTROL** — `/owd`, `/owd?object=…`, area addresses and an unknown segment are not redirected (pure and route-level: the probe records `[url]` only). - **Changes sheet → permission set** — `StudioDesignSurface.heldDataCreate-26845.test.tsx` (last describe): the sheet's request for a permission set lands on `/studio/PACKAGE/metadata/permission/NAME` on a writable base, and on the `.custom` pair's address on a read-only base with a pair. Narrowing `requestSurface` back to objects alone turns both red (`Tests 2 failed | 3 passed`). Updated: 38 app-shell surface tests now mount the console's route shape (`StudioPillarRedirect` around the builder on `:tab`); the console route tests expect the new landings; the publish toast test expects the permission set list. ## Acceptance notes Not filed (dead code / drift, no defect class); carrier: none. - Client producers still write old addresses that now cost one redirect: `studioHomePath` callers (command palette, app no-access state, AI chat page, `appRoute`, `PackagesPage`, `PackageCustomizationsPanel`) and `setupMetadataRedirect`'s `packagedAutomationStudioPath` / `packagedActionsStudioPath` (two hops for those legacy Setup bookmarks). Left alone: two of those files belong to an in-flight branch, and the address they write still works. - The copilot's surface context (`StudioAiCopilot`) still reads `:tab` and `?surface=` as its pillar context (cloud#1610 contract); on current pages it reads the area path instead. - The surface keeps its `~org` non-area fallback and its pair→base redirect for owd/unknown segments; the route no longer reaches the first. Finding for the seat (class a, user-visible misleading text), not fixed here: the not-found state at `/studio/PACKAGE/bogus_pillar` says "pick Data, Automations, Interfaces, Access or All metadata above" (`engine.studio.notFound.pillar`, en and zh) — none of those exist any more. ## First read (by risk) 1. `ui/packages/app-shell/src/views/studio-design/studioPillarRedirectModel.ts` — the table; the `.custom` pair rules and the `~org` catch-all. 2. `ui/apps/console/src/components/StudioRoute.tsx` — the two routes that now render the redirect, and the lazy boundary it rides. 3. `ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx` — the removed in-surface redirects and the `requestSurface` permission branch. ## Verification Two-minute check: open `/studio/com.example.showcase/data?changes=review` in the Console (`OS_PORT=3000 pnpm dev`, Console on :5180). Expected: the address bar shows `/studio/com.example.showcase/metadata/object?changes=review&package=com.example.showcase`, the Objects list is open, and the Changes drawer is open over it. All readings below are on tree `26ec30e1` (the rebased head), byte-identical to the pushed head `2322b402` (`git diff --quiet` between them exits 0; see Process notes). <details><summary>Type-check</summary> - `pnpm --filter @object-ui/app-shell type-check` (both programs, `tsconfig.json` and `tsconfig.test.json`): `VERDICT command-exit 0`, 0 `error TS`. - `pnpm --filter @object-ui/console type-check`: `VERDICT command-exit 0`, 0 `error TS` (run on the pre-rebase head `3a7bc226`; the rebase brought no console change). </details> <details><summary>Tests</summary> - Full app-shell suite, pre-rebase head `3a7bc226` + the guard fix: `Test Files 1 failed | 2429 passed | 1 skipped (2431)`, `Tests 1 failed | 23308 passed`. The one failure was `studioAddress.guard.test.ts` (my parse prefix spelled the Studio root outside `studioAddress.ts`); fixed by `studioAddressParts`, then that guard passes. - Rebased head `26ec30e1`: `vitest run packages/app-shell/src/views/studio-design packages/app-shell/src/views/metadata-admin packages/app-shell/src/console apps/console/src/components` → `Test Files 1442 passed (1442)`, `Tests 14059 passed | 1 skipped`. - Pins: `studioPillarRedirectModel.test.ts` + `StudioRoute.metadataArea-28561.test.tsx` → 64 tests pass. </details> <details><summary>Ablations (one per pin; each via `scripts/ablation-replace.mjs`, anchor hit x1, mutation landed on disk, restored to HEAD blob `85ed9932ab4b`, `git diff HEAD` empty after)</summary> - **Table** — the Automations case maps through `dataPillarRedirect` instead: red, exactly the Automations rows — 4 in `studioPillarRedirectModel.test.ts` and 2 route-level ones. - **`/data` single hop** — `settledAreaAddress(...)` dropped from the Data case: `Tests 14 failed | 50 passed (64)`, the one-hop pin `the old /data address reaches the object list in one redirect` among them, and every route-level `/data` and bare-package row (the probe saw a second hop). - **CONTROL** — the `default:` arm redirects to the object list instead of `null`: `Tests 8 failed | 56 passed (64)`: all pure and route-level CONTROL cases, plus the `/access?surface=owd:overview` row (its `/owd` target then redirects again). - Restored leg: both files plus a scratch walk of `studio.app.ts` → `Test Files 3 passed`, `Tests 66 passed`. </details> <details><summary>`studio.app.ts` walk (scratch test, not committed)</summary> Each `metadata:resource` / `metadata:directory` entry through `/apps/studio/metadata/TYPE?package=PACKAGE` → `setupMetadataStudioPath`, then `areaLocationRedirect` on the result: 15 of 15 land on `/studio/PACKAGE/metadata/TYPE?package=PACKAGE` (directory: `/studio/PACKAGE/metadata?package=PACKAGE`), section `metadata`, settled (no second redirect). With no package: 15 of 15 on `/studio/~all/metadata/TYPE`, settled. Types: object, app, view, page, dashboard, report, dataset, action, hook, flow, agent, tool, skill, email_template. </details> <details><summary>Gates</summary> - Before the pushes: `pnpm check:test-source-alias` exit 0; `ui` `pnpm check:i18n-keys` exit 0; `node scripts/pm/overlap-check.mjs` `VERDICT clean exit 0` against origin/main and open PRs #37380, #37368, #37362 (and earlier #37351, #37347, #37348). - `node ui/scripts/check-i18n-dead-keys.mjs` exit 0; the diff removes no translation call site. - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: OK, 2 anchors judged, 0 lost. - `dispatch-gates --commands`: 38 derived families. 37 exit 0 locally (list in the report). `pnpm check:type-check-debt` is NOT MEASURED locally: the first run hit my 500 s timeout while waiting on the verify lock my own test run held (exit 124, not a red); CI's run is the reading. - `pnpm check:nul-bytes` exit 0. </details> ## Process notes - One push (`3a7bc226`) went out before I re-ran the three pre-push gates; I ran them on that head right after (all exit 0). - The final rebase could not be pushed: the permission classifier refused the `--force-with-lease`. I did not retry it. Instead the branch keeps its pushed history, merges `origin/main` (`1691563a`) and replays the two later commits; the resulting tree is byte-identical to the rebased, tested tree. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8e1e15b commit a46efa8

69 files changed

Lines changed: 1007 additions & 1056 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(studio): every old Studio address still opens what it named, now in one redirect
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Studio no longer has pillars (Data, Automations, Access, Interfaces): objects, flows and permission sets open their designers full-screen on their own addresses. The old pillar addresses are bookmarks, links an AI was handed and the server's draft review link, so each still lands on the page that replaced it:
12+
13+
- `/studio/<package>` and `/studio/<package>/data` open the package's object list; `/data?surface=object:<name>` opens that object's designer, and `/data?changes=review` opens the object list with the Changes drawer.
14+
- `/studio/<package>/automations` opens the flow list; with `?surface=flow:<name>`, that flow's designer.
15+
- `/studio/<package>/access` opens the permission set list; with `?surface=permission:<name>`, that set's matrix; with `?surface=owd:overview`, the default sharing overview.
16+
- `/studio/<package>/interfaces` opens the object list and says where interface editing went.
17+
- `/studio/~org` and every `/studio/~org/...` address open the organization's own flows.
18+
19+
Each of these now arrives in one redirect. Before, `/data` passed through two (`/studio/<package>` through three) before the page settled. The "Open Access" button on a publish toast opens the package's permission sets, and the Changes sheet's link to a permission set opens that set's page, directly.
20+
21+
Removed internals of `@object-ui/app-shell` that nothing read any more: `STUDIO_ORG_SCOPE_PILLAR`, `STUDIO_HOME_PILLAR` (from the package entry), `AREA_PILLAR_FOR_TYPE`, `areaItemPillarPath`, `STUDIO_ITEM_PILLAR`, `studioItemPillar`, `studioPillarItemAddress`, `studioSurfaceQuery`, the `?surface=` capture and mirror hooks (`useSurfaceDeepLink` and its halves, `parseSurfaceTarget`, `resolveSurfaceDeepLink`) and `useRequestedSurface`. The package is private, so nothing published changes shape. A host that declares the `/studio` routes mounts the new `StudioPillarRedirect` on `:packageId` and `:packageId/:tab`.

‎ui/apps/console/src/components/StudioRoute.lazyBuilder-11798.test.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,20 @@ vi.mock('@object-ui/app-shell', async (importOriginal) => ({
8888
LoadingFallback: () => <div data-testid="loading" />,
8989
LoadingScreen: () => <div data-testid="error-screen" />,
9090
STUDIO_ORG_SCOPE_SEGMENT: '~org',
91-
STUDIO_ORG_SCOPE_PILLAR: 'automations',
9291
getProductName: () => 'ObjectOS',
9392
useHomePath: () => '/home',
9493
}));
9594

9695
const { builderModuleLoads } = vi.hoisted(() => ({ builderModuleLoads: { count: 0 } }));
9796

98-
vi.mock('./studioBuilder', () => {
97+
vi.mock('./studioBuilder', async () => {
9998
builderModuleLoads.count += 1;
10099
return {
101100
StudioEntryRedirect: () => <div data-testid="studio-entry">entry</div>,
102101
StudioDesignSurface: () => <div data-testid="studio-pillar-builder">pillars</div>,
102+
// objectstack#36909 — the retired pillar addresses' redirect rides in the same module.
103+
StudioPillarRedirect: (await vi.importActual<typeof import('@object-ui/app-shell')>('@object-ui/app-shell'))
104+
.StudioPillarRedirect,
103105
};
104106
});
105107

‎ui/apps/console/src/components/StudioRoute.metadataArea-28561.test.tsx‎

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import '@testing-library/jest-dom/vitest';
2525
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
26-
import { cleanup, render, screen } from '@testing-library/react';
26+
import { cleanup, render, screen, waitFor } from '@testing-library/react';
2727
import React from 'react';
2828
import { MemoryRouter, Routes, Route, useLocation, useParams } from 'react-router-dom';
2929

@@ -80,23 +80,34 @@ function SurfaceMarker({ area }: { area?: string }) {
8080
);
8181
}
8282

83-
vi.mock('./studioBuilder', () => ({
83+
vi.mock('./studioBuilder', async () => ({
8484
StudioEntryRedirect: () => <div data-testid="studio-entry" />,
8585
StudioDesignSurface: SurfaceMarker,
8686
StudioMetadataArea: ({ packageId }: { packageId: string | null }) => (
8787
<div data-testid="studio-metadata-area" data-package={String(packageId)} />
8888
),
89+
// objectstack#36909 — the retired pillar addresses' redirect, real: its table is what the last describe walks.
90+
StudioPillarRedirect: (await vi.importActual<typeof import('@object-ui/app-shell')>('@object-ui/app-shell'))
91+
.StudioPillarRedirect,
8992
}));
9093

9194
import { STUDIO_ENTRY_CAPABILITY } from './studioEntry';
9295
import { studioRoutes } from './StudioRoute';
9396

97+
/** Every location the router showed, in order: one redirect is two entries. */
98+
let seen: string[] = [];
99+
94100
function LocationProbe() {
95101
const { pathname, search } = useLocation();
96-
return <div data-testid="pathname">{`${pathname}${search}`}</div>;
102+
const here = `${pathname}${search}`;
103+
React.useEffect(() => {
104+
seen.push(here);
105+
}, [here]);
106+
return <div data-testid="pathname">{here}</div>;
97107
}
98108

99109
function renderStudio(url: string) {
110+
seen = [];
100111
return render(
101112
<MemoryRouter initialEntries={[url]}>
102113
<LocationProbe />
@@ -134,10 +145,10 @@ describe('/studio — the "All metadata" area\'s routes (objectstack#28561)', ()
134145
expect(screen.queryByTestId('barrel-builder')).toBeNull();
135146
});
136147

137-
it('CONTROL — a pillar is the pillar builder with no area', async () => {
138-
renderStudio('/studio/com.example.crm/data');
148+
it('CONTROL — the sharing overview\'s own route is the builder with no area', async () => {
149+
renderStudio('/studio/com.example.crm/owd');
139150
const surface = await screen.findByTestId('studio-pillar-builder');
140-
expect(surface).toHaveAttribute('data-tab', 'data');
151+
expect(surface).toHaveAttribute('data-tab', 'owd');
141152
expect(surface).toHaveAttribute('data-area', '');
142153
});
143154

@@ -188,3 +199,56 @@ describe('/studio — the "All metadata" area\'s routes (objectstack#28561)', ()
188199
},
189200
);
190201
});
202+
203+
/**
204+
* objectstack#36909 — the retired pillar addresses, on the REAL routes and the
205+
* real redirect: every old address reaches the page that replaced it in ONE
206+
* redirect (the probe sees the old address and the new one, nothing between),
207+
* and a current address is not redirected at all. The redirect's full table,
208+
* every query spelling included, is `studioPillarRedirectModel.test.ts`.
209+
*/
210+
describe('/studio — every retired pillar address redirects once, to its new address (objectstack#36909)', () => {
211+
const PKG = 'com.example.crm';
212+
const PAIR = 'com.example.crm.custom';
213+
214+
it.each([
215+
[`/studio/${PKG}`, `/studio/${PKG}/metadata/object?package=${PKG}`],
216+
[`/studio/${PKG}/data`, `/studio/${PKG}/metadata/object?package=${PKG}`],
217+
[`/studio/${PKG}/data?surface=object%3Aaccount`, `/studio/${PKG}/metadata/object/account?package=${PKG}`],
218+
// The server's draft review link (`studioChangesReviewLink`).
219+
[`/studio/${PKG}/data?changes=review`, `/studio/${PKG}/metadata/object?changes=review&package=${PKG}`],
220+
[`/studio/${PKG}/automations`, `/studio/${PKG}/metadata/flow?package=${PKG}`],
221+
[`/studio/${PKG}/automations?surface=flow%3Anotify`, `/studio/${PKG}/metadata/flow/notify?package=${PKG}`],
222+
// A package with no pair names its sets without a read.
223+
[`/studio/${PKG}/access`, `/studio/${PKG}/metadata/permission?package=${PKG}`],
224+
[`/studio/${PKG}/access?surface=owd%3Aoverview`, `/studio/${PKG}/owd`],
225+
// A pair's Access pillar is its base's (a set the pair holds is read for:
226+
// `StudioDesignSurface.accessPairCopy-29674.test.tsx`).
227+
[`/studio/${PAIR}/access`, `/studio/${PKG}/metadata/permission?package=${PKG}`],
228+
[`/studio/${PKG}/interfaces?surface=page%3Ahome`, `/studio/${PKG}/metadata/object?package=${PKG}`],
229+
[`/studio/${PAIR}/interfaces`, `/studio/${PKG}/metadata/object?package=${PKG}`],
230+
// The package-less scope: its bare leg and its one pillar.
231+
['/studio/~org', '/studio/~org/metadata/flow?source=runtime'],
232+
['/studio/~org/automations', '/studio/~org/metadata/flow?source=runtime'],
233+
['/studio/~org/automations?surface=flow%3Aclone_1', '/studio/~org/metadata/flow/clone_1?source=runtime'],
234+
])('%s → %s, in one redirect', async (from, to) => {
235+
renderStudio(from);
236+
await waitFor(() => expect(location()).toBe(to));
237+
await screen.findByTestId('studio-pillar-builder');
238+
expect(seen).toEqual([from, to]);
239+
});
240+
241+
it.each([
242+
`/studio/${PKG}/owd`,
243+
`/studio/${PKG}/owd?object=account`,
244+
`/studio/${PKG}/metadata/object?package=${PKG}`,
245+
`/studio/${PKG}/metadata/flow/notify?package=${PKG}`,
246+
// A segment no page has: the builder, which draws its not-found state.
247+
`/studio/${PKG}/bogus_pillar`,
248+
])('CONTROL — the current address %s is not redirected', async (url) => {
249+
renderStudio(url);
250+
await screen.findByTestId('studio-pillar-builder');
251+
expect(location()).toBe(url);
252+
expect(seen).toEqual([url]);
253+
});
254+
});

‎ui/apps/console/src/components/StudioRoute.recentPackage-11863.test.tsx‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,12 @@ vi.mock('@object-ui/app-shell', async (importOriginal) => ({
7474
useHomePath: () => '/home',
7575
}));
7676

77-
vi.mock('./studioBuilder', () => ({
77+
vi.mock('./studioBuilder', async () => ({
7878
StudioEntryRedirect: () => <div data-testid="studio-entry">entry</div>,
7979
StudioDesignSurface: () => <div data-testid="studio-pillar-builder">pillars</div>,
80+
// objectstack#36909 — the retired pillar addresses' redirect, real.
81+
StudioPillarRedirect: (await vi.importActual<typeof import('@object-ui/app-shell')>('@object-ui/app-shell'))
82+
.StudioPillarRedirect,
8083
}));
8184

8285
import { RecentItemsProvider, useRecentItems } from '@object-ui/app-shell';
@@ -166,13 +169,13 @@ describe('/studio/PKG/TAB records the package as a recent entry (objectui#11863)
166169
expect(JSON.parse(localStorage.getItem(STORAGE_KEY) ?? '[]')).toEqual([entry]);
167170
});
168171

169-
it('the bare package route records it too, once it lands on the Data pillar', async () => {
172+
it('the bare package route records it too, once it lands on the object list', async () => {
170173
renderStudio('/studio/com.acme.crm');
171-
await waitFor(() => expect(screen.getByTestId('pathname')).toHaveTextContent('/studio/com.acme.crm/data'));
174+
await waitFor(() => expect(screen.getByTestId('pathname')).toHaveTextContent('/studio/com.acme.crm/metadata/object'));
172175
await waitFor(() => expect(recent().map((r) => r.id)).toEqual(['package:com.acme.crm']));
173176
});
174177

175-
it('switching pillars inside the same package changes nothing, so it writes nothing', async () => {
178+
it('switching pages inside the same package changes nothing, so it writes nothing', async () => {
176179
renderStudio('/studio/com.acme.crm/data');
177180
await waitFor(() => expect(recent()).toHaveLength(1));
178181
const before = persisted();
@@ -181,7 +184,8 @@ describe('/studio/PKG/TAB records the package as a recent entry (objectui#11863)
181184
await new Promise((r) => setTimeout(r, 20));
182185

183186
act(() => screen.getByTestId('go:/studio/com.acme.crm/automations').click());
184-
await waitFor(() => expect(screen.getByTestId('pathname')).toHaveTextContent('/studio/com.acme.crm/automations'));
187+
// objectstack#36909 — the retired Automations address lands on the flow list.
188+
await waitFor(() => expect(screen.getByTestId('pathname')).toHaveTextContent('/studio/com.acme.crm/metadata/flow'));
185189
await screen.findByTestId('studio-pillar-builder');
186190

187191
expect(persisted()).toBe(before);

‎ui/apps/console/src/components/StudioRoute.test.tsx‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,24 +368,26 @@ describe('/studio/* — the entry decision, both ways', () => {
368368
expect(screen.queryByTestId('studio-access-required')).not.toBeInTheDocument();
369369
});
370370

371-
it('NEGATIVE CONTROL: a holder still gets the pillar builder, unchanged', async () => {
371+
it('NEGATIVE CONTROL: a holder still gets the builder, on the page the old pillar address names', async () => {
372372
answerWith(OPERATOR_CAPS);
373373
renderStudioDeepLink('/studio/hotcrm/data');
374374

375375
await waitFor(() => expect(screen.getByTestId('studio-pillar-builder')).toBeInTheDocument());
376376
expect(designSurface).toHaveBeenCalled();
377-
expect(pathname()).toBe('/studio/hotcrm/data');
377+
// objectstack#36909 — the retired Data pillar's address lands on the object list.
378+
expect(pathname()).toBe('/studio/hotcrm/metadata/object?package=hotcrm');
378379
expect(screen.queryByText(NOTICE)).not.toBeInTheDocument();
379380
});
380381

381-
it('the package-less scope\'s bare leg lands on its one pillar, the builder mounted (objectui#11553)', async () => {
382+
it('the package-less scope\'s bare leg lands on its flow list, the builder mounted (objectui#11553)', async () => {
382383
// `~org` is the reserved segment for the organization's own, package-less
383384
// flows. Without its own leg it falls to `:packageId`, whose redirect
384-
// targets a Data pillar that scope does not have.
385+
// targets an object list that scope does not have. objectstack#36909 — in
386+
// one hop, not through the retired Automations pillar's address.
385387
answerWith(OPERATOR_CAPS);
386388
renderStudioDeepLink('/studio/~org');
387389

388-
await waitFor(() => expect(pathname()).toBe('/studio/~org/automations'));
390+
await waitFor(() => expect(pathname()).toBe('/studio/~org/metadata/flow?source=runtime'));
389391
await waitFor(() => expect(screen.getByTestId('studio-pillar-builder')).toBeInTheDocument());
390392
expect(designSurface).toHaveBeenCalled();
391393
});

0 commit comments

Comments
 (0)