Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/34715-studio-landing-task-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@object-ui/i18n': patch
---

feat(console): the Studio landing is ordered by what the author came to do, and its copy says what they can do

Clause-②: yes (widening)
Metadata-protocol: none

The Studio landing (`/studio`, the App Builder) used to open with a paragraph about writable packages and `.custom` customization packages, list the author's writable packages, then two entries named for the architecture ("Organization flows", "Environment catalog"), and put the installed apps, the likeliest thing to change, last, each with a Read-only badge and its package id. Now:

- **Installed apps come first**, even when there are recent packages: "Recently viewed" now follows the author's own apps. The section says in one line that each app is upgraded by its vendor and the author's changes are kept separately. Each card carries a **Customize** button that opens the app in Studio, as clicking the card does; it no longer shows a Read-only badge or the package id (the id is the card's title). A card whose app has nothing changed says "No changes yet" instead of "0 customized, 0 switched off". The marketplace link sits beside the section heading as "Install from the marketplace".
- **A system package is not an installed app.** A kernel package the server lists flat with a `system` or `cloud` scope (a hosted environment's `sys.*` packages) no longer draws a card under Installed apps, by the same `kernel` tag the Studio package switcher reads.
- **The author's own apps follow**, with the create card renamed "New app of your own" (was "New package (writable base)").
- **Entries outside any app come last.** "Environment catalog" is now **"Positions and permissions"** ("Positions, permission sets and sharing rules, shared by every app."); it still opens the same Studio area (ADR-0146 D1 keeps these editors in Studio). "Organization flows" is now **"Flows in no app"**, shows how many there are, and is drawn only when there is at least one; when the count cannot be read the entry is drawn with no number.
- The page's lead is one sentence about what the author can do. In Chinese the landing body no longer carries 「.custom」「基座」「只读」.

No route, permission or storage changes. The widening is new keys in the `studio` namespace (`en`, `zh`): `engine.studio.landing.lead`, `.appsHeading`, `.appsHint`, `.marketplaceInstall`, `.customizeTitle`, `.customizations.none`, `.ownHeading`, `.newApp`, `.newAppDescription`, `.outsideHeading`, `.rolesPermissions.name`, `.rolesPermissions.description`, `.unassignedFlows.name`, `.unassignedFlows.description`; no key is removed or renamed. The landing no longer reads `engine.studio.landing.description`, `.mineHeading`, `.noneWritable`, `.installedHeading`, `.readonlyHint`, `.marketplace`, `.orgHeading`, `.envCatalog.name`, `.envCatalog.description` and `engine.studio.org.description`; they stay in the namespace. `engine.studio.org.name` and `engine.studio.pkg.new` are still read by the package switcher, unchanged.
7 changes: 4 additions & 3 deletions docs/qa/platform-checklist/areas/studio-authoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -2697,7 +2697,7 @@
"title": "Flows outside any package have their own Studio scope: /studio/~org offers only the Automations pillar, lists only package-less flows, opens them editable, saves drafts bound to no package and publishes each by reference",
"since": "v18",
"status": "active",
"revision": 3,
"revision": 4,
"priority": "P2",
"surface": "mixed",
"personas": [
Expand All @@ -2711,7 +2711,7 @@
]
},
"steps": [
"with no package-less flow yet, open the Studio landing's 'Organization flows' entry: it lands on /_console/studio/~org/automations, offers one pillar only, no Create app, and an empty state that names the way to change a packaged flow ('No flows outside a package. To change a packaged flow, open its package and use New similar.', engine.studio.org.none) with no action and no link out of Studio (StudioDesignSurface.tsx, the auto-empty state: since ADR-0146 D11 no Setup page copies into this scope)",
"with no package-less flow yet, open /_console/studio: the landing draws no 'Flows in no app' entry (it is drawn only when there is at least one such flow, with the count); open /_console/studio/~org/automations directly: it offers one pillar only, no Create app, and an empty state that names the way to change a packaged flow ('No flows outside a package. To change a packaged flow, open its package and use New similar.', engine.studio.org.none) with no action and no link out of Studio (StudioDesignSurface.tsx, the auto-empty state: since ADR-0146 D11 no Setup page copies into this scope)",
"write the package-less flow (fixtures.requires[1]); reload: the rail lists qa_org_raw and none of the showcase's packaged flows; GET /api/v1/meta/flow?package=com.example.showcase omits it, the unscoped list includes it",
"open it: the canvas and the Enabled switch are editable; change a node label; let the autosave land; read GET /api/v1/meta/_drafts?type=flow — the draft row carries no package",
"Publish → the review sheet lists only package-less flow drafts → Publish all; capture the network trace",
Expand Down Expand Up @@ -2768,7 +2768,8 @@
"change": "negative[1] moved to source[3]: it was a scope note naming the items that own the neighbouring surfaces, which no run can decide, so it could only score skipped. Its text is unchanged except the SCOPE: label, which now reads cross-ref:, the spelling the sibling source rows use. Ruling 6545938831 item ① on #28345 (scope notes leave negative[], which keeps only decidable entries; the #27651 precedent). No clause changed. Wave anchor #27377",
"ref": "#28345"
},
{ "revision": 3, "date": "2026-11-03", "change": "fixtures.requires[1] names a fixture that still makes a package-less flow, and steps[0], steps[1], steps[4], acceptance[0].verify and source[1] follow it. Since #28149 (ADR-0146 D4) the clone door lands its copy in the source's pair <base>.custom, so QA run #29672's clone of showcase_urgent_task_alert answered packageId com.example.showcase.custom and made no package-less flow; the run substituted PUT /api/v1/meta/flow/qa_org_raw naming no package (200) and passed every clause on it. Read at base 339f63da30: ADR-0146 D11 closes a package-less write only onto an item a code package ships (packagelessOverlayWriteRefusal), so a fresh name stays writable, and a PUT with no ?mode= is an active save (meta-save-request.ts). The same run found steps[0]'s empty state stale: it now reads engine.studio.org.none with no Open in Setup link (StudioDesignSurface.tsx). The clauses are unchanged. Card #29679, from QA run #29672", "ref": "#29679" }
{ "revision": 3, "date": "2026-11-03", "change": "fixtures.requires[1] names a fixture that still makes a package-less flow, and steps[0], steps[1], steps[4], acceptance[0].verify and source[1] follow it. Since #28149 (ADR-0146 D4) the clone door lands its copy in the source's pair <base>.custom, so QA run #29672's clone of showcase_urgent_task_alert answered packageId com.example.showcase.custom and made no package-less flow; the run substituted PUT /api/v1/meta/flow/qa_org_raw naming no package (200) and passed every clause on it. Read at base 339f63da30: ADR-0146 D11 closes a package-less write only onto an item a code package ships (packagelessOverlayWriteRefusal), so a fresh name stays writable, and a PUT with no ?mode= is an active save (meta-save-request.ts). The same run found steps[0]'s empty state stale: it now reads engine.studio.org.none with no Open in Setup link (StudioDesignSurface.tsx). The clauses are unchanged. Card #29679, from QA run #29672", "ref": "#29679" },
{ "revision": 4, "date": "2026-11-17", "change": "steps[0] no longer opens a landing entry when there is no package-less flow: since #34715 the Studio landing draws its 'Flows in no app' entry (formerly 'Organization flows') only when at least one such flow exists, with the count, so the step reads the entry's absence and opens the scope by its URL. The clauses are unchanged. Card #34715", "ref": "#34715" }
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
*
* 1. Studio writable list — Studio's builder landing (objectui
* `packages/app-shell/src/views/studio-design/BuilderLanding.tsx`, heading
* `engine.studio.landing.mineHeading` = "My packages (writable)", empty
* state "No writable packages yet") lists `fetchPackages()` filtered to
* `writable`. `fetchPackages()` (`studio-design/packages-io.ts`) is ONE
* `engine.studio.landing.ownHeading` = "Your own apps") lists
* `fetchPackages()` filtered to `writable`. `fetchPackages()` (`studio-design/packages-io.ts`) is ONE
* read: `GET /api/v1/packages`, no query parameters; `parsePackages` drops
* `scope: system | cloud` rows and takes the row's top-level `writable`
* boolean — the server's verdict (`withWritableVerdict` in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* author sees on it (objectui#11862: label first).
*
* The 2026-10-15 test pass read the recent-package links, the writable and
* installed package cards, and the "Organization flows" card as controls with
* no name. The browser's computed tree names each one from its visible text;
* installed package cards, and the package-less flows card (now "Flows in no
* app", objectstack#34715) as controls with no name. The browser's computed tree names each one from its visible text;
* these cases pin that by querying each card by role and name, so a later
* restyle that hides the text from the tree (an `aria-hidden` on the label, an
* icon-only card) turns them red.
Expand Down Expand Up @@ -40,6 +40,11 @@ vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () =>
vi.mock('./packageCustomizations-io', () => ({
fetchPackageCustomizationCounts: vi.fn(() => new Promise<never>(() => {})),
}));
// One flow belongs to no package, so the landing draws that entry (objectstack#34715).
vi.mock('./packageSurfaces', async (importOriginal) => {
const mod = await importOriginal<typeof import('./packageSurfaces')>();
return { ...mod, loadPackageLessSurfaces: vi.fn(async () => [{ type: 'flow', name: 'org_flow', label: 'Org flow' }]) };
});

import { BuilderLanding } from './BuilderLanding';
import { RecentItemsProvider } from '../../context/RecentItemsProvider';
Expand Down Expand Up @@ -90,11 +95,12 @@ describe('Studio home cards carry their visible label as their name (objectui#12

// The writable card: its label leads the name; the api name follows it.
expect(screen.getByRole('button', { name: /^Acme CRM\b/ })).toBeInTheDocument();
// The installed (read-only) card.
expect(screen.getByRole('button', { name: /^HotCRM\b.*Read-only/ })).toBeInTheDocument();
// The organization's flows.
expect(screen.getByTestId('studio-landing-org-scope')).toHaveAccessibleName(/^Organization flows/);
expect(screen.getByRole('button', { name: /^New package/ })).toBeInTheDocument();
// The installed (read-only) card: its label, and its Customize button named for it.
expect(screen.getByRole('button', { name: 'HotCRM' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Customize HotCRM' })).toBeInTheDocument();
// The flows that belong to no package.
expect(await screen.findByTestId('studio-landing-org-scope')).toHaveAccessibleName(/^Flows in no app/);
expect(screen.getByRole('button', { name: /^New app of your own/ })).toBeInTheDocument();

// No button or link on the page is left without a name.
const unnamed = [...screen.getAllByRole('button'), ...screen.getAllByRole('link')].filter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*/

import '@testing-library/jest-dom/vitest';
// The source under test reaches `import('@objectstack/lint')`: paid here, at collection, never inside a test's clock.
import '@objectstack/lint';
import * as React from 'react';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
Expand Down Expand Up @@ -138,14 +140,27 @@ describe('Studio landing: a read-only base says "n customized, m switched off" (
expect(customizationRequests(requested)).toEqual(['/api/v1/packages/hotcrm/customizations']);
});

it('reads a base with no pair as "0 customized, 0 switched off", with no pair link', async () => {
it('reads a base with nothing changed as "No changes yet", with no number and no link (objectstack#34715)', async () => {
packages.list = [SHOWCASE];
stubWire({ 'com.example.showcase': served('com.example.showcase', 0, 0, 0) });
renderLanding();

const line = await within(await waitFor(() => cardOf('Showcase'))).findByTestId('studio-landing-customizations');
await waitFor(() => expect(line).toHaveAttribute('data-state', 'read'));
expect(line).toHaveTextContent('0 customized, 0 switched off');
expect(line).toHaveAttribute('data-changes', 'none');
expect(line).toHaveTextContent(t('engine.studio.landing.customizations.none', 'en-US'));
expect(line.textContent).not.toMatch(/\d/);
expect(within(line).queryByRole('link')).not.toBeInTheDocument();
});

it('reads a base with no pair and one switched-off item as "0 customized, 1 switched off", with no pair link', async () => {
packages.list = [SHOWCASE];
stubWire({ 'com.example.showcase': served('com.example.showcase', 0, 0, 1) });
renderLanding();

const line = await within(await waitFor(() => cardOf('Showcase'))).findByTestId('studio-landing-customizations');
await waitFor(() => expect(line).toHaveAttribute('data-state', 'read'));
expect(line).toHaveTextContent('0 customized, 1 switched off');
expect(within(line).queryByTestId('studio-landing-customizations-pair')).not.toBeInTheDocument();
expect(within(line).getByText(customizedText(0))).not.toHaveAttribute('href');
expect(within(line).getByTestId('studio-landing-customizations-switched-off')).toHaveAttribute(
Expand Down Expand Up @@ -220,9 +235,9 @@ describe('Studio landing: a read-only base says "n customized, m switched off" (
* line and link. The pair's export and delete stay on the Packages page.
*/
describe('Studio landing: a base’s .custom pair has no card of its own (ADR-0146 D3)', () => {
/** Every package card the landing draws, by the id line each card shows. */
/** Every package card the landing draws, by the package id each card carries. */
const cardIds = () =>
Array.from(document.querySelectorAll('.rounded-lg.border .font-mono')).map((el) => el.textContent);
Array.from(document.querySelectorAll('[data-package-id]')).map((el) => el.getAttribute('data-package-id'));

it('draws one card for a base and its writable pair: the base’s, with its customized count and the pair link', async () => {
packages.list = [HOTCRM, HOTCRM_PAIR, WRITABLE];
Expand All @@ -238,7 +253,7 @@ describe('Studio landing: a base’s .custom pair has no card of its own (ADR-01
expect(screen.queryByText('HotCRM customizations')).not.toBeInTheDocument();
expect(cardIds()).not.toContain('hotcrm.custom');
// CONTROL: a writable package that is no pair keeps its card.
expect(cardIds()).toEqual(['com.acme.app', 'hotcrm']);
expect(cardIds()).toEqual(['hotcrm', 'com.acme.app']);
});

it('folds a read-only pair under its listed base too', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
* A package-less write onto an item a read-only package ships answers 403
* NOT_OVERRIDABLE and names the base's `.custom` pair. The landing's page
* description and its read-only section hint used to send the user there
* ("customize them with an environment overlay"). They now name Customize and
* New similar, saved in the package's `.custom` customization package.
* ("customize them with an environment overlay"). objectstack#34715 then
* reworded both to say what the author can do, naming no mechanism: the open
* route is the Customize button each installed app's card carries.
*
* Read off the real `BuilderLanding`, rendered in English and in Chinese with a
* read-only package listed, so both strings are on the page. The expected
* words are the tables' own: the Customize and New similar action labels.
* words are the tables' own: the Customize action label.
*/

import '@testing-library/jest-dom/vitest';
// The source under test reaches `import('@objectstack/lint')`: paid here, at collection, never inside a test's clock.
import '@objectstack/lint';
import * as React from 'react';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render, screen } from '@testing-library/react';
Expand Down Expand Up @@ -96,30 +99,20 @@ function descriptionElement(): HTMLElement {
return description;
}

describe('Studio landing: a read-only package is customized in its .custom package (objectstack#29489)', () => {
describe('Studio landing: a read-only package is customized through its Customize button, never an overlay (objectstack#29489)', () => {
for (const [locale, lang] of LOCALES) {
it(`${locale}: the description and the read-only hint name Customize, New similar and the .custom package, never an overlay`, async () => {
it(`${locale}: the description and the installed-apps hint offer no overlay, and the card carries Customize`, async () => {
await renderLanding(lang);
await screen.findByText('Showcase');

const customize = row('engine.studio.customize.action', locale);
const newSimilar = row('engine.studio.auto.newSimilar.action', locale);
const shown = [
descriptionElement().textContent ?? '',
screen.getByTestId('studio-landing-readonly-hint').textContent ?? '',
];
expect(shown).toEqual([row('engine.studio.landing.lead', locale), row('engine.studio.landing.appsHint', locale)]);
for (const text of shown) expect(text).not.toMatch(ENVIRONMENT_OVERLAY);

// The rendered text is the table's row, so the landing reads these keys.
expect(shown).toEqual([
row('engine.studio.landing.description', locale),
row('engine.studio.landing.readonlyHint', locale),
]);
for (const text of shown) {
expect(text).not.toMatch(ENVIRONMENT_OVERLAY);
expect(text).toContain('.custom');
expect(text).toContain(customize);
expect(text).toContain(newSimilar);
}
expect(screen.getByTestId('studio-landing-customize')).toHaveTextContent(row('engine.studio.customize.action', locale));
});
}
});
Loading
Loading