From 366c86328e5a95e14104c950b3ffe5cbfd975948 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 08:35:09 +0000 Subject: [PATCH 1/6] wip(ui): Studio landing ordered by task (#34715) Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- ...lderLanding.accessibleNames-12510.test.tsx | 20 +- ...Landing.customizationCounts-28566.test.tsx | 23 +- ...uilderLanding.customizeCopy-29489.test.tsx | 27 +- ...nding.environmentOverlayCopy-12171.test.ts | 48 +-- .../BuilderLanding.orgScope-11553.test.tsx | 58 +++- ...ilderLanding.recentPackages-11863.test.tsx | 6 +- .../BuilderLanding.taskOrder-34715.test.tsx | 180 +++++++++++ .../views/studio-design/BuilderLanding.tsx | 299 +++++++++++------- ui/packages/i18n/src/namespaces/studio/en.ts | 16 + ui/packages/i18n/src/namespaces/studio/zh.ts | 15 + 10 files changed, 509 insertions(+), 183 deletions(-) create mode 100644 ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.accessibleNames-12510.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.accessibleNames-12510.test.tsx index cf8807a7daa..b2956be5dbb 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.accessibleNames-12510.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.accessibleNames-12510.test.tsx @@ -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. @@ -40,6 +40,11 @@ vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => vi.mock('./packageCustomizations-io', () => ({ fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), })); +// One flow belongs to no package, so the landing draws that entry (objectstack#34715). +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, loadPackageLessSurfaces: vi.fn(async () => [{ type: 'flow', name: 'org_flow', label: 'Org flow' }]) }; +}); import { BuilderLanding } from './BuilderLanding'; import { RecentItemsProvider } from '../../context/RecentItemsProvider'; @@ -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( diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx index 046171f047d..23b438e9bd7 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx @@ -138,14 +138,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( @@ -220,9 +233,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]; @@ -238,7 +251,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 () => { diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx index 717e4569a6d..13021aebf95 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx @@ -7,12 +7,13 @@ * 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'; @@ -96,30 +97,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)); }); } }); diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.environmentOverlayCopy-12171.test.ts b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.environmentOverlayCopy-12171.test.ts index 4f95d75ba2e..e68f2b79120 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.environmentOverlayCopy-12171.test.ts +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.environmentOverlayCopy-12171.test.ts @@ -16,8 +16,11 @@ * objectstack ADR-0146 D11 then closed the package-less write onto a packaged * item (403 NOT_OVERRIDABLE, naming the base's `.custom` pair). The landing's * two strings now teach the route that is open: Customize or New similar, - * saved in the package's `.custom` customization package. The permission hint - * still names the environment overlay, because it says that overlay is refused. + * saved in the package's `.custom` customization package. objectstack#34715 + * then replaced the two strings the landing renders with ones that say what + * the author can do and name no mechanism, the `.custom` package included. + * The permission hint still names the environment overlay, because it says + * that overlay is refused. * * ## The population * @@ -30,10 +33,8 @@ * * 1. No value of these keys, in any table that carries them, names the * organization axis. - * 2. No landing value names the environment overlay, and every landing value - * names the route that exists: the `.custom` package and the table's own - * Customize label, read from the same table, so the check speaks every - * language a table is written in. + * 2. No landing value names the environment overlay or the `.custom` + * package. * 3. Lit control on the matchers: the permission hint names the environment * overlay in every table. A table in a language neither pattern speaks * fails here, so pins 1 and 2 cannot pass on it by matching nothing. @@ -60,20 +61,18 @@ const readTables: (root: string) => Map> = readDesig const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../..'); /** - * The two strings `BuilderLanding` renders about a read-only package. The third - * landing string, the overlay link's tooltip, retired with the link: the - * landing no longer links into Setup (objectstack ADR-0146 D1, N-28). + * The two strings `BuilderLanding` renders about installed apps: the page's + * lead and the installed-apps hint (objectstack#34715). The overlay link's + * tooltip retired with the link: the landing no longer links into Setup + * (objectstack ADR-0146 D1, N-28). */ -const LANDING_KEYS = ['engine.studio.landing.description', 'engine.studio.landing.readonlyHint'] as const; +const LANDING_KEYS = ['engine.studio.landing.lead', 'engine.studio.landing.appsHint'] as const; /** The hint `PermissionMatrixEditor` shows on a set a code package ships: it names the overlay it refuses. */ const PERMISSION_HINT = 'perm.readOnly.artifact.hint'; const KEYS = [...LANDING_KEYS, PERMISSION_HINT] as const; -/** The Customize action's own label, read from each table beside the landing strings. */ -const CUSTOMIZE_ACTION = 'engine.studio.customize.action'; - /** The customization package a read-only package is paired with (objectstack ADR-0146 D3). */ const CUSTOM_PAIR = /\.custom\b/u; @@ -94,7 +93,7 @@ function tablesCarryingKeys(): Array<[string, Map]> { return [...readTables(REPO_ROOT)].filter(([, table]) => KEYS.some((key) => table.has(key))); } -describe('the read-only copy names no organization axis, and the landing offers no overlay (objectui#12171, objectstack#29489)', () => { +describe('the read-only copy names no organization axis, and the landing offers no overlay (objectui#12171, objectstack#29489, objectstack#34715)', () => { it('reads the tables t() serves', () => { const read = tablesCarryingKeys(); for (const locale of Object.keys(DECLARED_LOCALES)) { @@ -121,24 +120,25 @@ describe('the read-only copy names no organization axis, and the landing offers expect(offenders).toEqual([]); }); - it('no landing value offers the environment overlay; each names Customize and the .custom package', () => { + it('no landing value offers the environment overlay or names the .custom package', () => { const offenders: string[] = []; for (const [name, table] of tablesCarryingKeys()) { - const customize = table.get(CUSTOMIZE_ACTION); - if (!customize) { - offenders.push(`${name} ${CUSTOMIZE_ACTION}: missing`); - continue; - } for (const key of LANDING_KEYS) { - const value = table.get(key) ?? ''; - if (ENVIRONMENT_OVERLAY.test(value)) offenders.push(`${name} ${key} offers the overlay: ${value}`); - if (!CUSTOM_PAIR.test(value)) offenders.push(`${name} ${key} names no .custom package: ${value}`); - if (!value.includes(customize)) offenders.push(`${name} ${key} names no "${customize}": ${value}`); + const value = table.get(key); + if (value === undefined) offenders.push(`${name} ${key}: missing`); + else if (ENVIRONMENT_OVERLAY.test(value)) offenders.push(`${name} ${key} offers the overlay: ${value}`); + else if (CUSTOM_PAIR.test(value)) offenders.push(`${name} ${key} names the .custom package: ${value}`); } } expect(offenders).toEqual([]); }); + it('lit control: the mechanism pattern matches the retired landing copy it now keeps off the page', () => { + const retired = tablesCarryingKeys().map(([, table]) => table.get('engine.studio.landing.readonlyHint')); + expect(retired.filter((value) => value !== undefined).length).toBeGreaterThan(0); + for (const value of retired) if (value !== undefined) expect(value).toMatch(CUSTOM_PAIR); + }); + it('lit control: the permission hint names the environment overlay in every table', () => { const silent: string[] = []; for (const [name, table] of tablesCarryingKeys()) { diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.orgScope-11553.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.orgScope-11553.test.tsx index cdbaa43e13e..b2780273b68 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.orgScope-11553.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.orgScope-11553.test.tsx @@ -7,7 +7,9 @@ * its only entry was the read-only showcase package, whose Automations rail * lists packaged flows and not the clone. A package-less flow matches no * package card, so the home carries an entry of its own for them, and it is - * there whether or not a writable package exists. + * there whether or not a writable package exists. objectstack#34715: it is + * named "Flows in no app", carries how many there are, and is drawn only when + * there is at least one; a failed count still draws it, with no number. */ import '@testing-library/jest-dom/vitest'; @@ -19,6 +21,8 @@ import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/re import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; const packages = vi.hoisted(() => ({ list: [] as Array> })); +// The package-less flows the landing counts: an answer of N rows, or a failed read. +const packageLess = vi.hoisted(() => ({ answer: 1 as number | 'failed' })); vi.mock('./packages-io', async (importOriginal) => { const mod = await importOriginal(); @@ -39,11 +43,25 @@ vi.mock('./packageCustomizations-io', () => ({ fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), })); +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { + ...mod, + loadPackageLessSurfaces: vi.fn(async () => { + if (packageLess.answer === 'failed') throw new Error('HTTP 503'); + return Array.from({ length: packageLess.answer }, (_, i) => ({ type: 'flow', name: `org_flow_${i}`, label: `Org flow ${i}` })); + }), + }; +}); + import { BuilderLanding } from './BuilderLanding'; +import { loadPackageLessSurfaces } from './packageSurfaces'; afterEach(() => { cleanup(); packages.list = []; + packageLess.answer = 1; + vi.mocked(loadPackageLessSurfaces).mockClear(); }); function LocationProbe() { @@ -64,14 +82,17 @@ function renderLanding() { } describe('Studio home → the package-less scope (objectui#11553)', () => { - it('offers the entry on the measured shape: no writable package, one read-only package', async () => { + it('offers the entry, with its count, on the measured shape: no writable package, one read-only package', async () => { packages.list = [{ id: 'com.example.showcase', name: 'Showcase', writable: false, namespace: 'showcase' }]; + packageLess.answer = 2; renderLanding(); - await screen.findByText('No writable packages yet — create one to start.'); - const entry = screen.getByTestId('studio-landing-org-scope'); - expect(entry).toHaveTextContent('Organization flows'); - expect(screen.getByText('Not in a package')).toBeInTheDocument(); + const entry = await screen.findByTestId('studio-landing-org-scope'); + expect(entry).toHaveTextContent('Flows in no app'); + expect(screen.getByTestId('studio-landing-org-scope-count')).toHaveTextContent('2'); + expect(screen.getByText('Outside any app')).toBeInTheDocument(); + // The count is the scope's own union: one unscoped read of flows. + expect(vi.mocked(loadPackageLessSurfaces)).toHaveBeenCalledWith(expect.anything(), 'flow', expect.any(String)); fireEvent.click(entry); await waitFor(() => expect(screen.getByTestId('location')).toHaveTextContent('/studio/~org/automations')); @@ -83,9 +104,32 @@ describe('Studio home → the package-less scope (objectui#11553)', () => { renderLanding(); await screen.findByText('Acme'); - expect(screen.getByTestId('studio-landing-org-scope')).toBeInTheDocument(); + expect(await screen.findByTestId('studio-landing-org-scope')).toBeInTheDocument(); fireEvent.click(screen.getByText('Acme')); await waitFor(() => expect(screen.getByTestId('location')).toHaveTextContent('/studio/com.acme.app/data')); }); + + it('draws no entry when no flow belongs to no package (objectstack#34715)', async () => { + packages.list = [{ id: 'com.example.showcase', name: 'Showcase', writable: false, namespace: 'showcase' }]; + packageLess.answer = 0; + renderLanding(); + + await screen.findByText('Showcase'); + await waitFor(() => expect(vi.mocked(loadPackageLessSurfaces)).toHaveBeenCalled()); + // CONTROL: the section the entry sits in is drawn, with its other entry. + expect(screen.getByTestId('studio-landing-env-catalog')).toBeInTheDocument(); + expect(screen.queryByTestId('studio-landing-org-scope')).not.toBeInTheDocument(); + expect(screen.queryByText('Flows in no app')).not.toBeInTheDocument(); + }); + + it('a failed count still draws the entry, with no number: unknown is not zero', async () => { + packages.list = []; + packageLess.answer = 'failed'; + renderLanding(); + + const entry = await screen.findByTestId('studio-landing-org-scope'); + expect(entry).toHaveTextContent('Flows in no app'); + expect(screen.queryByTestId('studio-landing-org-scope-count')).not.toBeInTheDocument(); + }); }); diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx index fdb8e6044c5..2e58a7d02ad 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx @@ -189,8 +189,8 @@ describe('Studio landing → recent packages (objectui#11863)', () => { await screen.findByText('Acme CRM'); expect(screen.queryByTestId('studio-landing-recent')).not.toBeInTheDocument(); expect(screen.queryByText('Recently viewed')).not.toBeInTheDocument(); - expect(screen.getByText('My packages (writable)')).toBeInTheDocument(); - expect(screen.getByTestId('studio-landing-org-scope')).toBeInTheDocument(); + expect(screen.getByText('Your own apps')).toBeInTheDocument(); + expect(screen.getByTestId('studio-landing-env-catalog')).toBeInTheDocument(); }); it('the package cards stay beside the recent row', async () => { @@ -200,7 +200,7 @@ describe('Studio landing → recent packages (objectui#11863)', () => { await screen.findByText('Recently viewed'); // Once in the recent row, once as its writable card. expect(screen.getAllByText('Acme CRM')).toHaveLength(2); - expect(screen.getByText('My packages (writable)')).toBeInTheDocument(); + expect(screen.getByText('Your own apps')).toBeInTheDocument(); }); }); diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx new file mode 100644 index 00000000000..ce2bfd46c6b --- /dev/null +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx @@ -0,0 +1,180 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#34715 — the Studio landing is ordered by what the author came to + * do, and its copy names no package mechanism. + * + * The installed apps lead (changing one is the likeliest errand), the + * author's own apps and the create card follow, and the entries that belong + * to no app come last. An installed app's card carries a Customize button that + * opens it the way the card does, says "No changes yet" when nothing is + * changed, and shows no package id on its face. In Chinese the page body + * carries none of 「.custom」「基座」「只读」; in English none of ".custom", + * "read-only", "writable base". + * + * Read off the real `BuilderLanding` under a real router, in English and in + * Chinese; the package list, the customization read and the package-less flow + * count are answered by doubles, so no request leaves the file. + */ + +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'; +import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; +import { I18nProvider, createI18n } from '@object-ui/i18n'; +import { loadStudioCatalogue } from '@object-ui/i18n/namespaces/studio'; +await loadStudioCatalogue('zh'); + +const packages = vi.hoisted(() => ({ list: [] as Array> })); +const counts = vi.hoisted(() => ({ byId: {} as Record })); + +vi.mock('./packages-io', async (importOriginal) => { + const mod = await importOriginal(); + return { + ...mod, + fetchPackages: vi.fn(async () => packages.list), + fetchListedPackageIds: vi.fn(async () => new Set(packages.list.map((p) => String(p.id)))), + }; +}); +vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); +vi.mock('./packageCustomizations-io', () => ({ + fetchPackageCustomizationCounts: vi.fn(async (id: string) => counts.byId[id] ?? { customized: 0, switchedOff: 0 }), +})); +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { + ...mod, + loadPackageLessSurfaces: vi.fn(async () => [ + { type: 'flow', name: 'org_flow_a', label: 'Org flow A' }, + { type: 'flow', name: 'org_flow_b', label: 'Org flow B' }, + ]), + }; +}); + +import { BuilderLanding } from './BuilderLanding'; + +const HOTCRM = { id: 'app.objectstack.hotcrm', name: 'HotCRM', writable: false, namespace: 'crm' }; +const SERVICE = { id: 'app.objectstack.service', name: 'HotCRM Service', writable: false, namespace: 'svc' }; +const OWN = { id: 'com.acme.app', name: 'Acme', writable: true, namespace: 'acme' }; + +afterEach(() => { + cleanup(); + packages.list = []; + counts.byId = {}; +}); + +function LocationProbe() { + const { pathname } = useLocation(); + return
{pathname}
; +} + +function renderLanding(lang: 'en' | 'zh' = 'en') { + const landing = ( + + + + } /> + } /> + + + ); + if (lang === 'en') return render(landing); + const zh = createI18n({ defaultLanguage: 'zh', detectBrowserLanguage: false, resources: { zh: {} } }); + return render({landing}); +} + +/** The landing's body: every rendered word, the location probe left out. */ +function bodyText(): string { + const probe = screen.getByTestId('location'); + return (document.body.textContent ?? '').replace(probe.textContent ?? '', ''); +} + +/** Section headings in page order. */ +const headings = () => screen.getAllByRole('heading', { level: 2 }).map((h) => h.textContent); + +describe('Studio landing: ordered by what the author came to do (objectstack#34715)', () => { + it('installed apps come first, then the author’s own apps, then the entries outside any app', async () => { + packages.list = [OWN, HOTCRM, SERVICE]; + renderLanding(); + + await screen.findByText('HotCRM'); + expect(headings()).toEqual(['Installed apps', 'Your own apps', 'Outside any app']); + const installed = screen.getByTestId('studio-landing-installed'); + // DOM order: each installed card precedes the author's own card. + const own = screen.getByTestId('studio-landing-own'); + expect(installed.compareDocumentPosition(own) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy(); + expect(within(own).getByText('Acme')).toBeInTheDocument(); + expect(within(own).getByTestId('studio-landing-new-app')).toHaveTextContent('New app of your own'); + }); + + it('every installed card carries Customize, which opens the app the way the card does', async () => { + packages.list = [HOTCRM, SERVICE]; + renderLanding(); + + await screen.findByText('HotCRM'); + expect(screen.getAllByTestId('studio-landing-customize')).toHaveLength(2); + + fireEvent.click(screen.getByRole('button', { name: 'Customize HotCRM' })); + await waitFor(() => expect(screen.getByTestId('location')).toHaveTextContent('/studio/app.objectstack.hotcrm/data')); + expect(screen.getByTestId('pillar-builder')).toBeInTheDocument(); + }); + + it('an installed card shows no package id on its face, and says "No changes yet" when nothing is changed', async () => { + packages.list = [HOTCRM, SERVICE]; + counts.byId = { 'app.objectstack.hotcrm': { customized: 6, switchedOff: 1 } }; + renderLanding(); + + const installed = await screen.findByTestId('studio-landing-installed'); + await waitFor(() => + expect(within(installed).getAllByTestId('studio-landing-customizations').map((l) => l.textContent)).toEqual([ + '6 customized, 1 switched off', + 'No changes yet', + ]), + ); + expect(installed.textContent).not.toContain('app.objectstack'); + // The id is still there to read, in the card's title. + expect(installed.querySelector('[data-package-id="app.objectstack.hotcrm"]')).toHaveAttribute( + 'title', + 'app.objectstack.hotcrm', + ); + }); + + it('positions and permissions keep their Studio entry under the new name', async () => { + packages.list = [HOTCRM]; + renderLanding(); + + const entry = await screen.findByTestId('studio-landing-env-catalog'); + expect(entry).toHaveTextContent('Positions and permissions'); + fireEvent.click(entry); + await waitFor(() => expect(screen.getByTestId('location')).toHaveTextContent(/^\/studio\/[^/]+\/metadata$/)); + }); + + it('en-US: the body names no mechanism — no ".custom", "read-only" or "writable base"', async () => { + packages.list = [OWN, HOTCRM, SERVICE]; + renderLanding('en'); + + await screen.findByTestId('studio-landing-org-scope'); + const text = bodyText(); + // CONTROL: the body was read after the cards and both entries drew. + expect(text).toContain('HotCRM Service'); + expect(text).toContain('Flows in no app'); + expect(text).not.toMatch(/\.custom|read-only|writable base/iu); + }); + + it('zh-CN: the body carries none of 「.custom」「基座」「只读」, and installed apps lead', async () => { + packages.list = [OWN, HOTCRM, SERVICE]; + renderLanding('zh'); + + await screen.findByTestId('studio-landing-org-scope'); + expect(headings()[0]).toBe('已安装的应用'); + expect(screen.getAllByTestId('studio-landing-customize')[0]).toHaveTextContent('定制'); + expect(screen.getByTestId('studio-landing-org-scope')).toHaveTextContent('未归属的流程2'); + expect(screen.getByTestId('studio-landing-env-catalog')).toHaveTextContent('岗位与权限'); + const text = bodyText(); + expect(text).toContain('HotCRM Service'); + for (const word of ['.custom', '基座', '只读']) expect(text).not.toContain(word); + }); +}); diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx index f2d50fb5394..c25d2102090 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx @@ -4,25 +4,30 @@ * BuilderLanding — the application builder's front door. * * The journey from login: Home → Studio app → the App Builder landing (this page, embedded - * in the app chrome via the `studio:builder` component ref) → pick or create a - * writable base package → the full-screen pillar builder - * (`/studio/:packageId/:tab`). Also served standalone at bare `/studio` so the + * in the app chrome via the `studio:builder` component ref) → pick an installed app to + * customize, or create or open an app of the author's own → the full-screen pillar + * builder (`/studio/:packageId/:tab`). Also served standalone at bare `/studio` so the * builder is bookmarkable. * - * The packages the author was last in lead, when there are any (objectui#11863). - * Writable bases (where authoring happens) follow; the organization's own - * package-less flows have one entry of their own (objectui#11553); read-only - * code and installed packages are listed last: they open for browsing, and each - * card points at the routes that customize one (objectui#11808). Writability is - * the server's verdict read by packages-io (`PkgEntry.writable`, ADR-0070 D2), - * and the server's write gate stays the authority. Each read-only base's card - * says what this deployment changed on it, "n customized, m switched off" - * (ADR-0146 D3), from the server's per-package customization read. + * The page is ordered by what the author came to do (objectstack#34715). The + * packages the author was last in lead, when there are any (objectui#11863). + * Installed apps come first after them, because changing one is the likeliest + * errand: each card says what this deployment changed on it, "n customized, + * m switched off" (ADR-0146 D3), from the server's per-package customization + * read, and carries a Customize button that opens the app in Studio, where its + * items are customized (objectui#11808). The author's own writable bases, with + * the create card, follow. Last come the entries that belong to no app: the + * environment's positions and permissions (the "All metadata" area's + * cross-package leg, ADR-0146 D1 keeps it in Studio), and the organization's + * package-less flows (objectui#11553), shown only when there are any. + * Writability is the server's verdict read by packages-io (`PkgEntry.writable`, + * ADR-0070 D2), and the server's write gate stays the authority. The page's + * copy says what the author can do; it names no package mechanism. */ import * as React from 'react'; import { Link, useNavigate, useSearchParams } from 'react-router-dom'; -import { Boxes, Building2, Clock, Hammer, Library, Lock, Plus, Loader2, Copy, Store } from 'lucide-react'; +import { Boxes, Building2, Clock, Hammer, Library, Plus, Loader2, Copy, Store } from 'lucide-react'; import { toast } from 'sonner'; import { useRecentItems, type RecentNamedItem } from '../../context/RecentItemsProvider.js'; import { useRecentItemLabel } from '../../hooks/useRecentItemLabel.js'; @@ -37,6 +42,8 @@ import { studioOrgScopePath } from './studioScope.js'; import { STUDIO_ALL_PACKAGES_SEGMENT, studioMetadataAreaPath } from './metadataArea.js'; import { STUDIO_NEW_PARAM, STUDIO_NEW_PACKAGE_VALUE } from './studioNewPackage.js'; import { foldCustomizationPairs } from './StudioRailCustomizations.js'; +import { loadPackageLessSurfaces } from './packageSurfaces.js'; +import { useMetadataClient } from '../metadata-admin/useMetadata.js'; /** * objectui#11808 — where a read-only package's card sends the author beyond @@ -172,6 +179,30 @@ export function BuilderLanding(): React.ReactElement { cancelled = true; }; }, [customizationTargetKey]); + // objectui#11553 — how many flows belong to no package: the same published + // and draft union the package-less scope lists (`loadPackageLessSurfaces`). + // The entry is drawn once the read says there is at least one; a failed read + // draws it with no number, so the scope stays reachable when the count is + // unknown. `null` = not answered yet. + const metadataClient = useMetadataClient(); + const [packageLessFlows, setPackageLessFlows] = React.useState(null); + React.useEffect(() => { + let cancelled = false; + loadPackageLessSurfaces(metadataClient, 'flow', locale).then( + (flows) => { + if (!cancelled) setPackageLessFlows(flows.length); + }, + () => { + if (!cancelled) setPackageLessFlows('failed'); + }, + ); + return () => { + cancelled = true; + }; + // Read once per page visit: the count does not follow the display locale. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + // The pair is linked only when the package list holds it: a base with no // pair has nothing to open, and the read never creates one. const listedIds = new Set(pkgs?.map((p) => p.id) ?? []); @@ -204,6 +235,15 @@ export function BuilderLanding(): React.ReactElement {

); } + if (line.counts.customized === 0 && line.counts.switchedOff === 0) { + // objectstack#34715 — a base this deployment has not changed says so in + // words; the Customize button beside it is the way in. + return ( +

+ {t('engine.studio.landing.customizations.none', locale)} +

+ ); + } const pair = listedPairOf(baseId); const customized = tFormat('engine.studio.landing.customizations.customized', locale, { customized: line.counts.customized, @@ -278,6 +318,10 @@ export function BuilderLanding(): React.ReactElement { } }; + const headingClass = 'mb-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground'; + const entryCardClass = 'flex items-center gap-2.5 rounded-lg border bg-background px-3 py-2.5 text-left hover:bg-muted/40'; + const entryIconClass = 'flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary'; + return (
@@ -287,7 +331,7 @@ export function BuilderLanding(): React.ReactElement {

{t('engine.studio.landing.title', locale)}

- {t('engine.studio.landing.description', locale)} + {t('engine.studio.landing.lead', locale)}

{error && ( @@ -298,17 +342,11 @@ export function BuilderLanding(): React.ReactElement { {recentPackages.length > 0 && ( <> -

- {t('engine.home.recent', locale)} -

+

{t('engine.home.recent', locale)}

{recentPackages.map((item) => ( - - + + @@ -321,16 +359,81 @@ export function BuilderLanding(): React.ReactElement { )} -

- {t('engine.studio.landing.mineHeading', locale)} -

-
- {pkgs === null &&

{t('engine.studio.loading', locale)}

} - {pkgs !== null && writable.length === 0 && ( -

{t('engine.studio.landing.noneWritable', locale)}

- )} + {pkgs === null &&

{t('engine.studio.loading', locale)}

} + + {/* objectui#11808 — an installed (read-only) app is not a dead end, and + * it leads the page (objectstack#34715). ADR-0070 D2: code and + * installed packages take no new items, and D4's Duplicate clones a + * writable base, not them. The card's Customize button, like the card + * itself, opens the app in Studio, where its items are customized + * (ADR-0146 D2, D3: saved in its paired customization package); the + * card links into no Setup page (ADR-0146 D1). The app's id is not on + * the card's face, only in its title. The marketplace is offered only + * when this runtime serves one (`isMarketplaceEnabled`, objectui#5504): + * elsewhere that route does not exist. */} + {readonly.length > 0 && ( +
+
+

+ {t('engine.studio.landing.appsHeading', locale)} +

+ {isMarketplaceEnabled() && ( + + {t('engine.studio.landing.marketplaceInstall', locale)} + + )} +
+

+ {t('engine.studio.landing.appsHint', locale)} +

+
+ {readonly.map((p) => ( +
+ + + +
+ + {renderCustomizationLine(p.id)} +
+ +
+ ))} +
+
+ )} + +

{t('engine.studio.landing.ownHeading', locale)}

+
{writable.map((p) => ( -
+
@@ -425,107 +532,61 @@ export function BuilderLanding(): React.ReactElement { onSaved={(r) => open(r.id)} /> - {/* objectui#11553 — the organization's own flows, which belong to no - * package (a clone of a packaged flow is one, by ADR-0126 §7.1). They - * match no package card above, so they get their own entry, shown - * whether or not any writable package exists. */} -

- {t('engine.studio.landing.orgHeading', locale)} -

+

{t('engine.studio.landing.outsideHeading', locale)}

- {/* objectstack#28561 — the "All metadata" area's cross-package leg - * (ADR-0146 D1): the environment catalog, whose items have one name - * per deployment and may belong to no package (ADR-0131 D3). */} + * (ADR-0146 D1): the environment's positions, permission sets and + * sharing rules, which have one name per deployment and may belong to + * no package (ADR-0131 D3). Named for what it holds (objectstack#34715). */} -
- - {/* objectui#11808 — a read-only package is not a dead end. ADR-0070 D2: - * code and installed packages take no new items, and D4's Duplicate - * clones a writable base, not them. Each card opens the package in - * Studio, where it is customized (objectstack ADR-0146: Customize, and - * the "All metadata" area's per-type overlays); the card links into no - * Setup page. The marketplace, which Home's "Start with a template" - * opens, is offered only when this runtime serves one - * (`isMarketplaceEnabled`, objectui#5504): elsewhere that route does not - * exist. */} - {readonly.length > 0 && ( - <> -

- {t('engine.studio.landing.installedHeading', locale)} -

-

navigate(studioOrgScopePath())} + className={entryCardClass} > - {t('engine.studio.landing.readonlyHint', locale)} -

- {isMarketplaceEnabled() && ( - - {t('engine.studio.landing.marketplace', locale)} - - )} -
- {readonly.map((p) => ( -
- -
- {renderCustomizationLine(p.id)} -
-
- ))} -
- - )} + )} + + + {t('engine.studio.landing.unassignedFlows.description', locale)} + + + + )} +
); } diff --git a/ui/packages/i18n/src/namespaces/studio/en.ts b/ui/packages/i18n/src/namespaces/studio/en.ts index f43d7ad5d10..2387370b143 100644 --- a/ui/packages/i18n/src/namespaces/studio/en.ts +++ b/ui/packages/i18n/src/namespaces/studio/en.ts @@ -3438,6 +3438,22 @@ const STUDIO_EN: Record = { // environment catalog, entered from the landing. 'engine.studio.landing.envCatalog.name': 'Environment catalog', 'engine.studio.landing.envCatalog.description': 'Positions, capabilities, permission sets and sharing rules, across every package.', + // objectstack#34715 — the landing ordered by what the author came to do, in + // words that name no package mechanism. + 'engine.studio.landing.lead': 'Change an installed app, or build an app of your own. Changes save as drafts and take effect when you publish.', + 'engine.studio.landing.appsHeading': 'Installed apps', + 'engine.studio.landing.appsHint': 'Each app is upgraded by its vendor. Your changes are kept separately, so an upgrade does not overwrite them.', + 'engine.studio.landing.marketplaceInstall': 'Install from the marketplace', + 'engine.studio.landing.customizeTitle': 'Customize {name}', + 'engine.studio.landing.customizations.none': 'No changes yet', + 'engine.studio.landing.ownHeading': 'Your own apps', + 'engine.studio.landing.newApp': 'New app of your own', + 'engine.studio.landing.newAppDescription': 'Start from a blank app.', + 'engine.studio.landing.outsideHeading': 'Outside any app', + 'engine.studio.landing.rolesPermissions.name': 'Positions and permissions', + 'engine.studio.landing.rolesPermissions.description': 'Positions, permission sets and sharing rules, shared by every app.', + 'engine.studio.landing.unassignedFlows.name': 'Flows in no app', + 'engine.studio.landing.unassignedFlows.description': 'Flows that belong to no app, such as a copy of an app’s flow. They open editable.', // objectstack#28561 — assignments are Setup's (ADR-0146 D7): the area links // the Setup page in place of the section. 'engine.studio.area.assignments.position': 'The people who hold this position are assigned in Setup.', diff --git a/ui/packages/i18n/src/namespaces/studio/zh.ts b/ui/packages/i18n/src/namespaces/studio/zh.ts index 4aa83f20d02..ab5164daba9 100644 --- a/ui/packages/i18n/src/namespaces/studio/zh.ts +++ b/ui/packages/i18n/src/namespaces/studio/zh.ts @@ -3031,6 +3031,21 @@ const STUDIO_ZH: Record = { 'engine.studio.org.none': '没有不属于软件包的流程。要修改软件包中的流程,请打开它所在的软件包,使用“新建类似”。', 'engine.studio.landing.envCatalog.name': '环境目录', 'engine.studio.landing.envCatalog.description': '岗位、能力、权限集与共享规则,覆盖所有软件包。', + // objectstack#34715 — the landing ordered by what the author came to do. + 'engine.studio.landing.lead': '改已安装的应用,或者新建自己的应用。改动先存草稿,发布后生效。', + 'engine.studio.landing.appsHeading': '已安装的应用', + 'engine.studio.landing.appsHint': '应用本身由厂商升级;你的改动单独保存,升级不会冲掉。', + 'engine.studio.landing.marketplaceInstall': '从应用市场安装', + 'engine.studio.landing.customizeTitle': '定制 {name}', + 'engine.studio.landing.customizations.none': '还没有改动', + 'engine.studio.landing.ownHeading': '自己的应用', + 'engine.studio.landing.newApp': '新建自己的应用', + 'engine.studio.landing.newAppDescription': '从空白开始。', + 'engine.studio.landing.outsideHeading': '不属于某个应用', + 'engine.studio.landing.rolesPermissions.name': '岗位与权限', + 'engine.studio.landing.rolesPermissions.description': '岗位、权限集、共享规则,所有应用共用。', + 'engine.studio.landing.unassignedFlows.name': '未归属的流程', + 'engine.studio.landing.unassignedFlows.description': '不属于任何应用的流程,例如应用流程的副本。可直接编辑。', 'engine.studio.area.assignments.position': '此岗位的任职人员在设置中分配。', 'engine.studio.area.assignments.permission': '此权限集分配给哪些人,在设置中管理。', 'engine.studio.area.assignments.open': '在设置中打开', From 0f871048a953b2fe9a76e746cdff4d1f5b9a3813 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 08:39:12 +0000 Subject: [PATCH 2/6] feat(ui): Studio landing ordered by what the author came to do (#34715) Installed apps lead with a Customize button and no package id on the card face; the author's own apps and the create card follow; positions and permissions, and flows in no app (drawn only when there is at least one, with the count) come last. New studio-namespace keys in en and zh; the landing names no package mechanism. Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- .changeset/34715-studio-landing-task-order.md | 17 +++++++++++++++++ .../areas/studio-authoring.json | 7 ++++--- ...ckage-restart-acceptance.integration.test.ts | 5 ++--- ...derLanding.newPackageDeepLink-26614.test.tsx | 7 +++++++ ...BuilderLanding.recentPackages-11863.test.tsx | 7 +++++++ .../BuilderLanding.setupExit-12513.test.tsx | 7 +++++++ 6 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 .changeset/34715-studio-landing-task-order.md diff --git a/.changeset/34715-studio-landing-task-order.md b/.changeset/34715-studio-landing-task-order.md new file mode 100644 index 00000000000..afbd48b81df --- /dev/null +++ b/.changeset/34715-studio-landing-task-order.md @@ -0,0 +1,17 @@ +--- +'@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** (after "Recently viewed", when there are recent packages). 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". +- **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. diff --git a/docs/qa/platform-checklist/areas/studio-authoring.json b/docs/qa/platform-checklist/areas/studio-authoring.json index 044a95e27a7..19a496c8eb3 100644 --- a/docs/qa/platform-checklist/areas/studio-authoring.json +++ b/docs/qa/platform-checklist/areas/studio-authoring.json @@ -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": [ @@ -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", @@ -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 .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 .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" } ] }, { diff --git a/packages/cli/test/package-restart-acceptance.integration.test.ts b/packages/cli/test/package-restart-acceptance.integration.test.ts index 8d04154d46a..bf3233c273a 100644 --- a/packages/cli/test/package-restart-acceptance.integration.test.ts +++ b/packages/cli/test/package-restart-acceptance.integration.test.ts @@ -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 diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.newPackageDeepLink-26614.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.newPackageDeepLink-26614.test.tsx index 5dd55da7869..71833855f3d 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.newPackageDeepLink-26614.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.newPackageDeepLink-26614.test.tsx @@ -39,6 +39,13 @@ vi.mock('../metadata-admin/PackageFormDialog', () => ({ ), })); +// The package-less flow count the landing draws (objectstack#34715) is not under +// test here: no flow belongs to no package, and no request leaves the file. +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, loadPackageLessSurfaces: vi.fn(async () => []) }; +}); + import { BuilderLanding } from './BuilderLanding'; import { STUDIO_NEW_PACKAGE_PATH } from './studioNewPackage'; diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx index 2e58a7d02ad..aacb691f768 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx @@ -62,6 +62,13 @@ vi.mock('./packageCustomizations-io', () => ({ fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), })); +// The package-less flow count the landing draws (objectstack#34715) is not under +// test here: no flow belongs to no package, and no request leaves the file. +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, loadPackageLessSurfaces: vi.fn(async () => []) }; +}); + import { BuilderLanding } from './BuilderLanding'; import { RecentItemsProvider } from '../../context/RecentItemsProvider'; diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.setupExit-12513.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.setupExit-12513.test.tsx index a13f407bf42..efa7f33abe2 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.setupExit-12513.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.setupExit-12513.test.tsx @@ -39,6 +39,13 @@ vi.mock('./packageCustomizations-io', () => ({ fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), })); +// The package-less flow count the landing draws (objectstack#34715) is not under +// test here: no flow belongs to no package, and no request leaves the file. +vi.mock('./packageSurfaces', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, loadPackageLessSurfaces: vi.fn(async () => []) }; +}); + import * as landing from './BuilderLanding'; const { BuilderLanding } = landing; From 770728ea91b14308d4d0ad9d1d051b9fa0d048ec Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 08:49:16 +0000 Subject: [PATCH 3/6] fix(ui): the landing's Customize button keeps a 44px phone target (#34715) Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- .../app-shell/src/views/studio-design/BuilderLanding.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx index c25d2102090..79a650782f4 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx @@ -420,7 +420,7 @@ export function BuilderLanding(): React.ReactElement { onClick={() => open(p.id)} aria-label={tFormat('engine.studio.landing.customizeTitle', locale, { name: p.name })} title={tFormat('engine.studio.landing.customizeTitle', locale, { name: p.name })} - className="shrink-0 rounded-md border px-2.5 py-1 text-[11px] font-medium hover:bg-muted" + className="shrink-0 rounded-md border px-2.5 py-1 text-[11px] font-medium hover:bg-muted max-md:min-h-11 max-md:px-3" > {t('engine.studio.customize.action', locale)} From edcfe85c430b3b1ef360a6b1bd6ebd2155c83ff6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 09:11:46 +0000 Subject: [PATCH 4/6] test(ui): two edited landing tests pay the lint import at collection (#34715) Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- .../BuilderLanding.customizationCounts-28566.test.tsx | 2 ++ .../studio-design/BuilderLanding.customizeCopy-29489.test.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx index 23b438e9bd7..4009702538e 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizationCounts-28566.test.tsx @@ -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'; diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx index 13021aebf95..59737e014ab 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.customizeCopy-29489.test.tsx @@ -17,6 +17,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, render, screen } from '@testing-library/react'; From d247d947e95c9960459d3abfb92e7d388291c952 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 09:29:23 +0000 Subject: [PATCH 5/6] feat(console): installed apps lead the Studio landing even with recent visits (#34715) The card's acceptance reads the first block as the installed apps; Recently viewed now follows the author's own apps, among the other entries. Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- .changeset/34715-studio-landing-task-order.md | 2 +- ...ilderLanding.recentPackages-11863.test.tsx | 16 +++++++ .../views/studio-design/BuilderLanding.tsx | 46 ++++++++++--------- 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/.changeset/34715-studio-landing-task-order.md b/.changeset/34715-studio-landing-task-order.md index afbd48b81df..7f5be6862c5 100644 --- a/.changeset/34715-studio-landing-task-order.md +++ b/.changeset/34715-studio-landing-task-order.md @@ -9,7 +9,7 @@ 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** (after "Recently viewed", when there are recent packages). 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". +- **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". - **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」「基座」「只读」. diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx index aacb691f768..6388d3a8a22 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.recentPackages-11863.test.tsx @@ -117,6 +117,22 @@ const recentSection = () => screen.getByTestId('studio-landing-recent'); const recentLinks = () => within(recentSection()).getAllByRole('link'); describe('Studio landing → recent packages (objectui#11863)', () => { + it('with a recent visit, the installed apps still lead the page: the list follows the author’s own apps (objectstack#34715)', async () => { + packages.list = [ + { id: 'com.acme.crm', name: 'Acme CRM', writable: true, namespace: 'acme' }, + { id: 'com.example.showcase', name: 'Showcase', writable: false, namespace: 'showcase' }, + ]; + renderLanding([visit('com.example.showcase')]); + + await screen.findByText('Recently viewed'); + expect(screen.getAllByRole('heading', { level: 2 }).map((h) => h.textContent)).toEqual([ + 'Installed apps', + 'Your own apps', + 'Recently viewed', + 'Outside any app', + ]); + }); + it('lists the most recent packages first, each by its current name, each opening its /studio/PKG route', async () => { packages.list = [ { id: 'com.acme.crm', name: 'Acme CRM', writable: true, namespace: 'acme' }, diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx index 79a650782f4..e4586e764b3 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx @@ -9,9 +9,8 @@ * builder (`/studio/:packageId/:tab`). Also served standalone at bare `/studio` so the * builder is bookmarkable. * - * The page is ordered by what the author came to do (objectstack#34715). The - * packages the author was last in lead, when there are any (objectui#11863). - * Installed apps come first after them, because changing one is the likeliest + * The page is ordered by what the author came to do (objectstack#34715). + * Installed apps come first, because changing one is the likeliest * errand: each card says what this deployment changed on it, "n customized, * m switched off" (ADR-0146 D3), from the server's per-package customization * read, and carries a Customize button that opens the app in Studio, where its @@ -340,25 +339,6 @@ export function BuilderLanding(): React.ReactElement {
)} - {recentPackages.length > 0 && ( - <> -

{t('engine.home.recent', locale)}

-
- {recentPackages.map((item) => ( - - - - - - {recentLabel(item)} - {item.name} - - - ))} -
- - )} - {pkgs === null &&

{t('engine.studio.loading', locale)}

} {/* objectui#11808 — an installed (read-only) app is not a dead end, and @@ -532,6 +512,28 @@ export function BuilderLanding(): React.ReactElement { onSaved={(r) => open(r.id)} /> + {/* objectui#11863 — the packages last opened here. objectstack#34715 + * orders the page by the errand: installed apps first, the author's own + * apps next, then the other entries, this one among them. */} + {recentPackages.length > 0 && ( + <> +

{t('engine.home.recent', locale)}

+
+ {recentPackages.map((item) => ( + + + + + + {recentLabel(item)} + {item.name} + + + ))} +
+ + )} +

{t('engine.studio.landing.outsideHeading', locale)}

{/* objectstack#28561 — the "All metadata" area's cross-package leg From 19bfd599ab8d0503a65fe0921486aacc323ae5cc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 09:46:04 +0000 Subject: [PATCH 6/6] fix(console): a system package draws no installed-app card on the Studio landing (#34715) A kernel package served flat with a system or cloud scope stays in the package list, tagged kernel; the landing now drops it by that tag. Claude-Session: https://claude.ai/code/session_01WGufzivEnnozveqZfr4fDx Co-authored-by: Claude --- .changeset/34715-studio-landing-task-order.md | 1 + .../BuilderLanding.taskOrder-34715.test.tsx | 23 +++++++++++++++++++ .../views/studio-design/BuilderLanding.tsx | 8 ++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.changeset/34715-studio-landing-task-order.md b/.changeset/34715-studio-landing-task-order.md index 7f5be6862c5..c6d573a48b6 100644 --- a/.changeset/34715-studio-landing-task-order.md +++ b/.changeset/34715-studio-landing-task-order.md @@ -10,6 +10,7 @@ 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」「基座」「只读」. diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx index ce2bfd46c6b..c47b32a8266 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.taskOrder-34715.test.tsx @@ -55,6 +55,7 @@ vi.mock('./packageSurfaces', async (importOriginal) => { }); import { BuilderLanding } from './BuilderLanding'; +import { parsePackages } from './packages-io'; const HOTCRM = { id: 'app.objectstack.hotcrm', name: 'HotCRM', writable: false, namespace: 'crm' }; const SERVICE = { id: 'app.objectstack.service', name: 'HotCRM Service', writable: false, namespace: 'svc' }; @@ -142,6 +143,28 @@ describe('Studio landing: ordered by what the author came to do (objectstack#347 ); }); + it('a system package served flat with a kernel scope is no installed app: no card, no Customize (comment 6943119575)', async () => { + // The list as the registry half serves a hosted environment: a `sys.*` + // package whose kernel `scope` is flat, beside an installed app. + const parsed = parsePackages({ + data: [ + { id: 'sys.package-state', name: 'Package State', scope: 'system', writable: false }, + { id: 'sys.env-artifact-cache', name: 'Environment Artifact Cache', scope: 'cloud', writable: false }, + { manifest: { id: 'app.objectstack.hotcrm', name: 'HotCRM', namespace: 'crm' }, writable: false }, + ], + }); + // CONTROL: the parser keeps the flat kernel rows, tagged — the landing is what drops them. + expect(parsed.filter((p) => p.kernel).map((p) => p.id)).toEqual(['sys.package-state', 'sys.env-artifact-cache']); + packages.list = parsed.map((p) => ({ ...p })); + renderLanding(); + + const installed = await screen.findByTestId('studio-landing-installed'); + expect(within(installed).getByText('HotCRM')).toBeInTheDocument(); + expect(within(installed).getAllByTestId('studio-landing-customize')).toHaveLength(1); + expect(document.querySelector('[data-package-id^="sys."]')).toBeNull(); + expect(bodyText()).not.toMatch(/Package State|Environment Artifact Cache/u); + }); + it('positions and permissions keep their Studio entry under the new name', async () => { packages.list = [HOTCRM]; renderLanding(); diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx index e4586e764b3..bb5b807136b 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx @@ -146,7 +146,13 @@ export function BuilderLanding(): React.ReactElement { // customized line and link, and the pair's export and delete stay on the // Packages page, which lists every package. A pair whose base is not listed // keeps its card. - const cards = pkgs === null ? [] : foldCustomizationPairs(pkgs).rows; + // + // objectstack#34715 — a kernel package (ADR-0016 §3.8: no one authors into + // it) is not an app the author installed, so it draws no card. The list + // leaves out a manifest-scoped one already; a flat-scoped one stays in it, + // tagged `kernel` (`parsePackages`), and is dropped here by the same tag the + // package switcher reads (objectstack#34593). + const cards = pkgs === null ? [] : foldCustomizationPairs(pkgs.filter((p) => !p.kernel)).rows; const writable = cards.filter((p) => p.writable); const readonly = cards.filter((p) => !p.writable);