diff --git a/.changeset/34714-studio-landing-env-customizations.md b/.changeset/34714-studio-landing-env-customizations.md new file mode 100644 index 00000000000..a7cb753b9cc --- /dev/null +++ b/.changeset/34714-studio-landing-env-customizations.md @@ -0,0 +1,18 @@ +--- +'@object-ui/i18n': patch +--- + +feat(console): the Studio landing lists every change this environment made to its installed apps in one panel + +Clause-②: yes (widening) +Metadata-protocol: none + +The Studio landing gains a **Customizations in this environment** panel under the installed apps, so "what did we change here" no longer means opening each app. + +- One row per change, read from each installed app's customization read (`GET /api/v1/packages/:id/customizations`, the read its card already makes): items the app's customization package overrides read **Changed**, fields, validation rules and indexes it adds read **Added**, the app's items switched off in this environment read **Switched off**. What other packages contribute is not this environment's change and makes no row. +- Each row names the item (its label where the app's list gives one, else its name), its kind and its app, and opens it in Studio. +- Tabs narrow the list (All, New fields, Forms and views, Flows, Switched off), a search narrows it by text, and the rows can be grouped by app. The first six rows show; the rest are behind "Show all". +- The panel's total equals the cards' "customized" plus "switched off": one read per app now serves both the card and the panel. +- With no change anywhere the panel is one line. An app whose read fails (a 403 included) is named as unreadable, never counted as 0. + +New keys under `engine.studio.landing.envCustomizations.*` in the studio namespace (en, zh). No server change. 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 b2956be5dbb..caa05d6ffcc 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 @@ -37,8 +37,9 @@ vi.mock('./packages-io', async (importOriginal) => { vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); // A read-only base's customization read (ADR-0146 D3) is not under test here: // it stays pending, so no request leaves the file. -vi.mock('./packageCustomizations-io', () => ({ - fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), +vi.mock('./packageCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + fetchPackageCustomizations: vi.fn(() => new Promise(() => {})), })); // One flow belongs to no package, so the landing draws that entry (objectstack#34715). vi.mock('./packageSurfaces', async (importOriginal) => { diff --git a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.envCustomizations-34714.test.tsx b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.envCustomizations-34714.test.tsx new file mode 100644 index 00000000000..dbdede99dda --- /dev/null +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.envCustomizations-34714.test.tsx @@ -0,0 +1,362 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#34714 — the Studio landing lists every change this deployment + * made to its installed apps in one panel, "Customizations in this + * environment". + * + * The real `BuilderLanding`, the real panel and the real customization reader + * (`packageCustomizations-io`) run under a real router; the package list, the + * wire of the customization route and the panel's label read are stubbed. The + * stubbed answers are shaped by the route's declaration + * (`GetPackageCustomizationsResponseSchema`) inside the dispatcher envelope. + * + * Acceptance: two installed apps with one change each and one switched-off + * flow draw 3 rows with the right app and mode, each opening its item; the + * panel's total equals the cards' "customized" plus "switched off"; with no + * change the panel is one line; an app whose read answers 403 is named as + * unreadable and the other app's rows still list. + */ + +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 labels = vi.hoisted(() => ({ byApp: {} as Record> })); + +vi.mock('./packages-io', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, fetchPackages: vi.fn(async () => packages.list) }; +}); +vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); +// No flow belongs to no package; no request leaves the file for that count. +vi.mock('./packageSurfaces', async (importOriginal) => ({ + ...(await importOriginal()), + loadPackageLessSurfaces: vi.fn(async () => []), +})); +// The label read answers from `labels.byApp`; its own behaviour is pinned in the io case below. +vi.mock('./landingCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + loadCustomizationLabels: vi.fn(async (_client: unknown, appId: string) => labels.byApp[appId] ?? {}), +})); + +import { BuilderLanding } from './BuilderLanding'; +import { customizationRowsOf } from './landingCustomizations-io'; +import { LANDING_CUSTOMIZATION_ROWS_SHOWN } from './LandingCustomizationsPanel'; + +const HOTCRM = { id: 'app.objectstack.hotcrm', name: 'HotCRM', writable: false, namespace: 'crm' }; +const SERVICE = { id: 'app.objectstack.service', name: 'Service Desk', writable: false, namespace: 'svc' }; +const OWN = { id: 'com.acme.app', name: 'Acme', writable: true, namespace: 'acme' }; + +type Lists = { + overrides?: Array>; + extensions?: Array>; + switchedOff?: Array>; + contributions?: Array>; +}; +type Answer = { status: number; body: unknown }; + +/** A served answer for `id`, its counts derived from its lists as the route derives them. */ +function served(id: string, lists: Lists = {}): Answer { + const overrides = lists.overrides ?? []; + const extensions = lists.extensions ?? []; + const switchedOff = lists.switchedOff ?? []; + const contributions = lists.contributions ?? []; + return { + status: 200, + body: { + success: true, + data: { + packageId: id, + overrides, + extensions, + switchedOff, + contributions, + counts: { + overrides: overrides.length, + extensions: extensions.length, + switchedOff: switchedOff.length, + contributions: contributions.length, + }, + }, + }, + }; +} + +const CUSTOMIZATIONS_RE = /^\/api\/v1\/packages\/([^/]+)\/customizations$/; + +/** Answer each customization request from `answers` by base id; any other request is refused. */ +function stubWire(answers: Record) { + const requested: string[] = []; + vi.stubGlobal( + 'fetch', + vi.fn(async (input: RequestInfo | URL) => { + const url = String(input); + requested.push(url); + const m = CUSTOMIZATIONS_RE.exec(url); + const answer = m ? answers[decodeURIComponent(m[1])] : undefined; + if (!answer) throw new Error(`unexpected request ${url}`); + return { + ok: answer.status >= 200 && answer.status < 300, + status: answer.status, + json: async () => answer.body, + text: async () => JSON.stringify(answer.body), + } as Response; + }), + ); + return { requested }; +} + +afterEach(() => { + cleanup(); + vi.unstubAllGlobals(); + packages.list = []; + labels.byApp = {}; +}); + +function LocationProbe() { + const { pathname, search } = useLocation(); + return
{`${pathname}${search}`}
; +} + +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}); +} + +const panel = () => screen.getByTestId('studio-landing-env-customizations'); +const rows = () => within(panel()).queryAllByTestId('studio-landing-env-customization'); +const rowLine = (row: HTMLElement) => + `${row.querySelector('a')?.textContent} | ${within(row).getByTestId('studio-landing-env-customization-meta').textContent}`; + +/** The cards' "customized" + "switched off", summed over every read card. */ +function cardSum(): number { + return screen + .getAllByTestId('studio-landing-customizations') + .filter((l) => l.getAttribute('data-state') === 'read') + .reduce((sum, l) => sum + [...(l.textContent ?? '').matchAll(/(\d+)/gu)].reduce((s, m) => s + Number(m[1]), 0), 0); +} + +/** Two apps, one change each, and one switched-off flow on HotCRM. */ +const ACCEPTANCE = { + [HOTCRM.id]: served(HOTCRM.id, { + overrides: [{ type: 'view', name: 'account_list' }], + switchedOff: [{ type: 'flow', name: 'lead_nurture' }], + // Another package's field on a HotCRM object: not this deployment's change. + contributions: [{ kind: 'field', object: 'account', name: 'erp_code', packageId: 'com.acme.erp' }], + }), + [SERVICE.id]: served(SERVICE.id, { extensions: [{ object: 'ticket', kind: 'field', name: 'region' }] }), +}; + +describe('Studio landing → Customizations in this environment (objectstack#34714)', () => { + it('two apps with one change each and one switched-off flow list 3 rows, each with its app and how it changed it', async () => { + packages.list = [HOTCRM, SERVICE, OWN]; + stubWire(ACCEPTANCE); + labels.byApp = { [HOTCRM.id]: { 'view:account_list': 'All accounts' } }; + renderLanding(); + + // The label arrives after the rows: a row is drawn on its name first. + await waitFor(() => + expect(rows().map(rowLine)).toEqual([ + 'All accounts | Changed · View · HotCRM', + 'lead_nurture | Switched off · Flow · HotCRM', + 'ticket.region | Added · Field · Service Desk', + ]), + ); + expect(rows().map((r) => `${r.getAttribute('data-app-id')}:${r.getAttribute('data-mode')}`)).toEqual([ + `${HOTCRM.id}:changed`, + `${HOTCRM.id}:switchedOff`, + `${SERVICE.id}:added`, + ]); + // The contributed field makes no row. + expect(panel().textContent).not.toContain('erp_code'); + }); + + it('each row opens its item in Studio: the item on its app’s metadata area, an added field on its object', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire(ACCEPTANCE); + renderLanding(); + + await waitFor(() => expect(rows()).toHaveLength(3)); + expect(rows().map((r) => r.querySelector('a')?.getAttribute('href'))).toEqual([ + '/studio/app.objectstack.hotcrm/metadata/view/account_list', + '/studio/app.objectstack.hotcrm/metadata/flow/lead_nurture', + '/studio/app.objectstack.service/metadata/object/ticket', + ]); + fireEvent.click(within(rows()[1]).getByRole('link')); + await waitFor(() => + expect(screen.getByTestId('location')).toHaveTextContent('/studio/app.objectstack.hotcrm/metadata/flow/lead_nurture'), + ); + expect(screen.getByTestId('area-item')).toBeInTheDocument(); + }); + + it('the panel’s total equals the cards’ customized + switched off', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire(ACCEPTANCE); + renderLanding(); + + await waitFor(() => expect(rows()).toHaveLength(3)); + await waitFor(() => expect(cardSum()).toBe(3)); + expect(screen.getByTestId('studio-landing-env-customizations-total')).toHaveTextContent('3'); + // One read per app serves the card and the panel. + const requested = vi.mocked(globalThis.fetch).mock.calls.map((c) => String(c[0])); + expect(requested.filter((u) => CUSTOMIZATIONS_RE.test(u)).sort()).toEqual([ + '/api/v1/packages/app.objectstack.hotcrm/customizations', + '/api/v1/packages/app.objectstack.service/customizations', + ]); + }); + + it('with no change anywhere the panel is one line, and draws no list', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire({ [HOTCRM.id]: served(HOTCRM.id), [SERVICE.id]: served(SERVICE.id) }); + renderLanding(); + + expect(await screen.findByTestId('studio-landing-env-customizations-empty')).toHaveTextContent( + 'No installed app has been changed in this environment yet.', + ); + expect(rows()).toHaveLength(0); + expect(screen.queryByTestId('studio-landing-env-customizations-total')).not.toBeInTheDocument(); + expect(screen.queryByTestId('studio-landing-env-customizations-search')).not.toBeInTheDocument(); + }); + + it('an app whose read answers 403 is named as unreadable, never counted as 0; the other app still lists', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire({ + [HOTCRM.id]: { status: 403, body: { success: false, error: { code: 'PERMISSION_DENIED', message: 'Not allowed to read customizations.' } } }, + [SERVICE.id]: ACCEPTANCE[SERVICE.id], + }); + renderLanding(); + + const unreadable = await screen.findByTestId('studio-landing-env-customizations-unreadable'); + expect(unreadable).toHaveTextContent('HotCRM: this app’s customizations could not be read.'); + expect(unreadable).toHaveAttribute('data-app-id', HOTCRM.id); + await waitFor(() => expect(rows()).toHaveLength(1)); + expect(rowLine(rows()[0])).toBe('ticket.region | Added · Field · Service Desk'); + expect(screen.getByTestId('studio-landing-env-customizations-total')).toHaveTextContent('1'); + expect(screen.queryByTestId('studio-landing-env-customizations-empty')).not.toBeInTheDocument(); + // The card says the same: failed, not "No changes yet". + const hotcrmCard = document.querySelector(`[data-package-id="${HOTCRM.id}"]`) as HTMLElement; + expect(within(hotcrmCard).getByTestId('studio-landing-customizations')).toHaveAttribute('data-state', 'failed'); + }); + + it('tabs narrow by kind, the search by text, and the rows group by app', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire(ACCEPTANCE); + renderLanding(); + await waitFor(() => expect(rows()).toHaveLength(3)); + + const tab = (key: string) => screen.getByTestId(`studio-landing-env-customizations-tab-${key}`); + expect(['all', 'fields', 'views', 'flows', 'switchedOff'].map((k) => tab(k).textContent)).toEqual([ + 'All 3', + 'New fields 1', + 'Forms and views 1', + 'Flows 1', + 'Switched off 1', + ]); + fireEvent.click(tab('fields')); + expect(rows().map((r) => r.getAttribute('data-mode'))).toEqual(['added']); + fireEvent.click(tab('switchedOff')); + expect(rows().map((r) => r.querySelector('a')?.textContent)).toEqual(['lead_nurture']); + fireEvent.click(tab('all')); + + fireEvent.change(screen.getByTestId('studio-landing-env-customizations-search'), { target: { value: 'service' } }); + expect(rows().map((r) => r.querySelector('a')?.textContent)).toEqual(['ticket.region']); + fireEvent.change(screen.getByTestId('studio-landing-env-customizations-search'), { target: { value: '' } }); + + fireEvent.click(screen.getByTestId('studio-landing-env-customizations-group')); + const groups = within(panel()).getAllByTestId('studio-landing-env-customizations-app'); + expect(groups.map((g) => [g.getAttribute('data-app-id'), within(g).getAllByTestId('studio-landing-env-customization').length])).toEqual([ + [HOTCRM.id, 2], + [SERVICE.id, 1], + ]); + }); + + it(`shows the first ${LANDING_CUSTOMIZATION_ROWS_SHOWN} rows, the rest behind "Show all"`, async () => { + const many = Array.from({ length: LANDING_CUSTOMIZATION_ROWS_SHOWN + 3 }, (_, i) => ({ type: 'view', name: `view_${i}` })); + packages.list = [HOTCRM]; + stubWire({ [HOTCRM.id]: served(HOTCRM.id, { overrides: many }) }); + renderLanding(); + + await waitFor(() => expect(rows()).toHaveLength(LANDING_CUSTOMIZATION_ROWS_SHOWN)); + const showAll = screen.getByTestId('studio-landing-env-customizations-show-all'); + expect(showAll).toHaveTextContent(`Show all ${many.length}`); + fireEvent.click(showAll); + expect(rows()).toHaveLength(many.length); + }); + + it('zh-CN: the panel speaks the card’s words — 本环境的定制, 改了原有的 / 新增的 / 已停用', async () => { + packages.list = [HOTCRM, SERVICE]; + stubWire(ACCEPTANCE); + renderLanding('zh'); + + await waitFor(() => expect(rows()).toHaveLength(3)); + expect(within(panel()).getByRole('heading', { level: 2 })).toHaveTextContent('本环境的定制'); + expect(rows().map((r) => within(r).getByTestId('studio-landing-env-customization-meta').textContent)).toEqual([ + '改了原有的 · 视图 · HotCRM', + '已停用 · 流程 · HotCRM', + '新增的 · 字段 · Service Desk', + ]); + expect(screen.getByTestId('studio-landing-env-customizations-tab-fields')).toHaveTextContent('新增字段'); + expect(screen.getByTestId('studio-landing-env-customizations-tab-views')).toHaveTextContent('表单与视图'); + }); +}); + +describe('the panel’s rows and labels (objectstack#34714)', () => { + it('one row per served override, extension and switched-off item; contributions make none', () => { + const read = (ACCEPTANCE[HOTCRM.id].body as { data: Parameters[1] }).data; + expect(customizationRowsOf(HOTCRM, read).map((r) => `${r.mode}:${r.type}:${r.name}`)).toEqual([ + 'changed:view:account_list', + 'switchedOff:flow:lead_nurture', + ]); + }); + + it('labels come from the app’s own list of each type with rows, a field’s from its object; a failed list keeps the names', async () => { + const { loadCustomizationLabels: real } = await vi.importActual( + './landingCustomizations-io', + ); + const rowsOf = customizationRowsOf(SERVICE, { + overrides: [{ type: 'view', name: 'ticket_list' }], + extensions: [{ object: 'ticket', kind: 'field', name: 'region' }], + switchedOff: [{ type: 'flow', name: 'escalate' }], + }); + const asked: string[] = []; + const client = { + list: vi.fn(async (type: string, options?: { packageId?: string }) => { + asked.push(`${type}@${options?.packageId}`); + if (type === 'flow') throw new Error('HTTP 500'); + if (type === 'view') return [{ name: 'ticket_list', label: { en: 'All tickets', zh: '全部工单' } }]; + if (type === 'object') return [{ name: 'ticket', label: 'Ticket', fields: { region: { label: 'Region' } } }]; + return []; + }), + }; + expect(await real(client, SERVICE.id, rowsOf, 'zh')).toEqual({ + 'view:ticket_list': '全部工单', + 'object:ticket': 'Ticket', + 'field:ticket.region': 'Region', + }); + expect(asked.sort()).toEqual(['flow@app.objectstack.service', 'object@app.objectstack.service', 'view@app.objectstack.service']); + // No row, no request. + client.list.mockClear(); + expect(await real(client, HOTCRM.id, rowsOf, 'en')).toEqual({}); + expect(client.list).not.toHaveBeenCalled(); + }); +}); 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 b2780273b68..b9e7d0d6807 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 @@ -39,8 +39,9 @@ vi.mock('./packages-io', async (importOriginal) => { vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); // A read-only base's customization read (ADR-0146 D3) is not under test here: // it stays pending, so no request leaves the file. -vi.mock('./packageCustomizations-io', () => ({ - fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), +vi.mock('./packageCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + fetchPackageCustomizations: vi.fn(() => new Promise(() => {})), })); vi.mock('./packageSurfaces', async (importOriginal) => { 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 6388d3a8a22..8fba6a41911 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 @@ -58,8 +58,9 @@ vi.mock('./packages-io', async (importOriginal) => { vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); // A read-only base's customization read (ADR-0146 D3) is not under test here: // it stays pending, so no request leaves the file. -vi.mock('./packageCustomizations-io', () => ({ - fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), +vi.mock('./packageCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + fetchPackageCustomizations: vi.fn(() => new Promise(() => {})), })); // The package-less flow count the landing draws (objectstack#34715) is not under @@ -127,6 +128,7 @@ describe('Studio landing → recent packages (objectui#11863)', () => { await screen.findByText('Recently viewed'); expect(screen.getAllByRole('heading', { level: 2 }).map((h) => h.textContent)).toEqual([ 'Installed apps', + 'Customizations in this environment', 'Your own apps', 'Recently viewed', 'Outside any app', 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 efa7f33abe2..e34deac531d 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 @@ -35,8 +35,9 @@ vi.mock('./packages-io', async (importOriginal) => { vi.mock('../metadata-admin/PackageFormDialog', () => ({ PackageFormDialog: () => null })); // A read-only base's customization read (ADR-0146 D3) is not under test here: // it stays pending, so no request leaves the file. -vi.mock('./packageCustomizations-io', () => ({ - fetchPackageCustomizationCounts: vi.fn(() => new Promise(() => {})), +vi.mock('./packageCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + fetchPackageCustomizations: vi.fn(() => new Promise(() => {})), })); // The package-less flow count the landing draws (objectstack#34715) is not under 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 c47b32a8266..ffd32252c91 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 @@ -40,8 +40,25 @@ vi.mock('./packages-io', async (importOriginal) => { }; }); 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('./packageCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + // A served answer whose lists are as long as the counts asked for: `customized` view overrides, `switchedOff` flows. + fetchPackageCustomizations: vi.fn(async (id: string) => { + const { customized, switchedOff } = counts.byId[id] ?? { customized: 0, switchedOff: 0 }; + return { + packageId: id, + overrides: Array.from({ length: customized }, (_, i) => ({ type: 'view', name: `view_${i}` })), + extensions: [], + switchedOff: Array.from({ length: switchedOff }, (_, i) => ({ type: 'flow', name: `flow_${i}` })), + contributions: [], + counts: { overrides: customized, extensions: 0, switchedOff, contributions: 0 }, + }; + }), +})); +// The panel's label read (objectstack#34714) is not under test here: rows keep their names. +vi.mock('./landingCustomizations-io', async (importOriginal) => ({ + ...(await importOriginal()), + loadCustomizationLabels: vi.fn(async () => ({})), })); vi.mock('./packageSurfaces', async (importOriginal) => { const mod = await importOriginal(); @@ -102,7 +119,7 @@ describe('Studio landing: ordered by what the author came to do (objectstack#347 renderLanding(); await screen.findByText('HotCRM'); - expect(headings()).toEqual(['Installed apps', 'Your own apps', 'Outside any app']); + expect(headings()).toEqual(['Installed apps', 'Customizations in this environment', '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'); 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 bb5b807136b..658c835ff6b 100644 --- a/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx +++ b/ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx @@ -34,7 +34,13 @@ import { t, tFormat, useMetadataLocale } from '../metadata-admin/i18n.js'; import { PackageFormDialog } from '../metadata-admin/PackageFormDialog.js'; import { isMarketplaceEnabled } from '../../runtime-config.js'; import { fetchPackages, fetchListedPackageIds, duplicatePackage, isSpecPackageId, type PkgEntry } from './packages-io.js'; -import { fetchPackageCustomizationCounts, type PackageCustomizationCounts } from './packageCustomizations-io.js'; +import { + customizationCountsOf, + fetchPackageCustomizations, + type PackageCustomizationCounts, + type PackageCustomizations, +} from './packageCustomizations-io.js'; +import { LandingCustomizationsPanel, type AppCustomizationRead } from './LandingCustomizationsPanel.js'; import { customizationPackageId, isCustomizationPackage } from '@objectstack/spec/kernel'; import { PackageIdInput } from './PackageIdInput.js'; import { studioOrgScopePath } from './studioScope.js'; @@ -61,7 +67,7 @@ const RECENT_PACKAGES_SHOWN = 3; * read. No entry means the read has not answered: the line shows no number. */ type CustomizationLine = - | { kind: 'read'; counts: PackageCustomizationCounts } + | { kind: 'read'; counts: PackageCustomizationCounts; read: PackageCustomizations } | { kind: 'failed'; message: string }; /** A package's Studio address on one pillar, the way `open` below spells it. */ @@ -170,9 +176,14 @@ export function BuilderLanding(): React.ReactElement { if (!customizationTargetKey) return; let cancelled = false; for (const id of customizationTargetKey.split('\n')) { - fetchPackageCustomizationCounts(id).then( - (counts) => { - if (!cancelled) setCustomizationLines((prev) => ({ ...prev, [id]: { kind: 'read', counts } })); + // objectstack#34714 — the whole answer is kept: the card draws its two + // numbers off it and the "Customizations in this environment" panel its + // rows, so one read serves both and the panel's total is the cards' sum. + fetchPackageCustomizations(id).then( + (read) => { + if (!cancelled) { + setCustomizationLines((prev) => ({ ...prev, [id]: { kind: 'read', counts: customizationCountsOf(read), read } })); + } }, (e: unknown) => { const message = e instanceof Error ? e.message : String(e); @@ -184,6 +195,21 @@ export function BuilderLanding(): React.ReactElement { cancelled = true; }; }, [customizationTargetKey]); + // objectstack#34714 — the panel's apps are the cards' bases, in card order; + // its reads are the same answers the cards draw. + const customizationApps = React.useMemo( + () => readonly.filter((p) => !isCustomizationPackage(p.id)).map((p) => ({ id: p.id, name: p.name })), + // eslint-disable-next-line react-hooks/exhaustive-deps + [customizationTargetKey, pkgs], + ); + const customizationReads = React.useMemo(() => { + const out: Record = {}; + for (const [id, line] of Object.entries(customizationLines)) { + out[id] = line.kind === 'read' ? { kind: 'read', read: line.read } : line; + } + return out; + }, [customizationLines]); + // 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 @@ -416,6 +442,15 @@ export function BuilderLanding(): React.ReactElement { )} + {/* objectstack#34714 — every change this deployment made to its + * installed apps, in one list, under the apps themselves. */} + +

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

{writable.map((p) => ( diff --git a/ui/packages/app-shell/src/views/studio-design/LandingCustomizationsPanel.tsx b/ui/packages/app-shell/src/views/studio-design/LandingCustomizationsPanel.tsx new file mode 100644 index 00000000000..da7a639407f --- /dev/null +++ b/ui/packages/app-shell/src/views/studio-design/LandingCustomizationsPanel.tsx @@ -0,0 +1,275 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#34714 — "Customizations in this environment": the Studio + * landing's one list of every change this deployment made to its installed + * apps, so "what did we change here" is answered without opening each app. + * + * The rows are the per-app customization read the landing already makes for + * each installed app's card (ADR-0146 D3), handed in whole: one read per app + * serves both the card's numbers and these rows, so the panel's total is the + * sum of the cards' "customized" and "switched off" by construction + * (`customizationRowsOf`, `landingCustomizations-io.ts`). Other packages' + * contributions make no row. + * + * Each row names the item (its label where the app's list gives one), what + * kind of item it is, which app it belongs to and how it changed it, and opens + * the item in Studio. Tabs narrow by kind, a search narrows by text, and the + * rows can be grouped by app; the first rows show, the rest behind "Show all". + * With no change anywhere the panel is one line. An app whose read failed (a + * 403 included) is named as unreadable, never counted as 0. + */ + +import * as React from 'react'; +import { Link } from 'react-router-dom'; +import { Search } from 'lucide-react'; +import { t, tFormat } from '../metadata-admin/i18n.js'; +import { useMetadataClient } from '../metadata-admin/useMetadata.js'; +import type { PackageCustomizations } from './packageCustomizations-io.js'; +import { + customizationRowsOf, + loadCustomizationLabels, + type CustomizationRow, +} from './landingCustomizations-io.js'; + +/** One app's read, as the landing holds it. */ +export type AppCustomizationRead = + | { kind: 'read'; read: Pick } + | { kind: 'failed'; message: string }; + +/** How many rows the panel shows before "Show all". */ +export const LANDING_CUSTOMIZATION_ROWS_SHOWN = 6; + +type Tab = 'all' | 'fields' | 'views' | 'flows' | 'switchedOff'; +const TABS: readonly Tab[] = ['all', 'fields', 'views', 'flows', 'switchedOff']; + +const inTab = (row: CustomizationRow, tab: Tab): boolean => { + switch (tab) { + case 'all': + return true; + case 'fields': + return row.mode === 'added' && row.type === 'field'; + case 'views': + return row.type === 'view' || row.type === 'form'; + case 'flows': + return row.type === 'flow'; + case 'switchedOff': + return row.mode === 'switchedOff'; + } +}; + +/** The kinds the panel names in words; any other type shows as served. */ +const NAMED_TYPES = new Set(['object', 'field', 'validation', 'index', 'view', 'flow', 'page', 'dashboard', 'report', 'action']); +const K = 'engine.studio.landing.envCustomizations'; + +export function LandingCustomizationsPanel({ + apps, + reads, + locale, + headingClass, +}: { + /** The installed apps whose cards are drawn, in card order (pairs excluded). */ + apps: ReadonlyArray<{ id: string; name: string }>; + /** Each app's read, by id; an app not yet answered is absent. */ + reads: Readonly>; + locale: string; + headingClass: string; +}): React.ReactElement | null { + const rows = React.useMemo( + () => + apps.flatMap((app) => { + const r = reads[app.id]; + return r?.kind === 'read' ? customizationRowsOf(app, r.read) : []; + }), + [apps, reads], + ); + const unreadable = apps.filter((app) => reads[app.id]?.kind === 'failed'); + const pending = apps.some((app) => !reads[app.id]); + + // Labels: one read per app and type that has rows, keyed on the rows drawn + // (ui/AGENTS.md #10: the effect reads the joined keys, a primitive). + const client = useMetadataClient(); + const [labels, setLabels] = React.useState>>({}); + const labelTargetKey = [...new Set(rows.map((r) => r.appId))] + .map((id) => `${id}\u0001${rows.filter((r) => r.appId === id).map((r) => r.labelKey).join('\u0002')}`) + .join('\n'); + React.useEffect(() => { + if (!labelTargetKey) return; + let cancelled = false; + for (const id of new Set(rows.map((r) => r.appId))) { + loadCustomizationLabels(client, id, rows, locale).then( + (found) => { + if (!cancelled) setLabels((prev) => ({ ...prev, [id]: found })); + }, + () => {}, + ); + } + return () => { + cancelled = true; + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [labelTargetKey, locale]); + const labelOf = (row: CustomizationRow) => labels[row.appId]?.[row.labelKey] ?? row.name; + + const [tab, setTab] = React.useState('all'); + const [query, setQuery] = React.useState(''); + const [grouped, setGrouped] = React.useState(false); + const [expanded, setExpanded] = React.useState(false); + + if (apps.length === 0) return null; + + const typeText = (type: string) => (NAMED_TYPES.has(type) ? t(`${K}.type.${type}`, locale) : type); + const needle = query.trim().toLowerCase(); + const matches = (row: CustomizationRow) => + !needle || + [labelOf(row), row.name, row.type, typeText(row.type), row.appName, t(`${K}.mode.${row.mode}`, locale)].some((s) => + s.toLowerCase().includes(needle), + ); + const visible = rows.filter((r) => inTab(r, tab) && matches(r)); + const shown = grouped || expanded ? visible : visible.slice(0, LANDING_CUSTOMIZATION_ROWS_SHOWN); + + const renderRow = (row: CustomizationRow) => { + const label = labelOf(row); + return ( +
  • + + {label} + + + {`${t(`${K}.mode.${row.mode}`, locale)} · ${typeText(row.type)}${grouped ? '' : ` · ${row.appName}`}`} + +
  • + ); + }; + + const settled = !pending; + const nothing = settled && rows.length === 0 && unreadable.length === 0; + + return ( +
    +
    +

    {t(`${K}.heading`, locale)}

    + {rows.length > 0 && ( + + {rows.length} + + )} +
    + + {unreadable.map((app) => { + const r = reads[app.id]; + return ( +

    + {tFormat(`${K}.unreadable`, locale, { name: app.name })} +

    + ); + })} + + {pending && rows.length === 0 && ( +

    + {t(`${K}.loading`, locale)} +

    + )} + + {nothing && ( +

    + {t(`${K}.empty`, locale)} +

    + )} + + {rows.length > 0 && ( +
    +
    + {TABS.map((key) => { + const count = rows.filter((r) => inTab(r, key)).length; + return ( + + ); + })} + + +
    + + {visible.length === 0 ? ( +

    {t(`${K}.noMatch`, locale)}

    + ) : grouped ? ( + apps + .filter((app) => shown.some((r) => r.appId === app.id)) + .map((app) => ( +
    +

    {app.name}

    +
      {shown.filter((r) => r.appId === app.id).map(renderRow)}
    +
    + )) + ) : ( +
      {shown.map(renderRow)}
    + )} + + {!grouped && !expanded && visible.length > shown.length && ( + + )} +
    + )} +
    + ); +} diff --git a/ui/packages/app-shell/src/views/studio-design/landingCustomizations-io.ts b/ui/packages/app-shell/src/views/studio-design/landingCustomizations-io.ts new file mode 100644 index 00000000000..77e44c9006d --- /dev/null +++ b/ui/packages/app-shell/src/views/studio-design/landingCustomizations-io.ts @@ -0,0 +1,186 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#34714 — the rows of the Studio landing's "Customizations in this + * environment" panel: every change this deployment made to its installed apps, + * in one list. + * + * The rows are the server's per-app customization read + * (`GET /api/v1/packages/:id/customizations`, ADR-0146 D3, D8 item 4), the same + * answer each installed app's card counts, one row per served entry: + * + * - `overrides` → "changed" (an item of the app the pair overrides); + * - `extensions` → "added" (a field, validation or index the pair adds to one + * of the app's objects); + * - `switchedOff` → "switched off" (an item of the app this deployment turned + * off). + * + * `contributions` (what OTHER packages bring to the app) are not this + * deployment's changes and make no row. Nothing is folded or deduped, so the + * panel's total is the cards' "customized" plus "switched off" by + * construction: the served counts are each list's length. + * + * The answer carries names, not labels. A row's label is read from the app's + * own published list of that type (one list per app and type that has rows); + * a field's from its object. A label that cannot be read leaves the row on its + * name: a failed label read never hides a row. + * + * ⛔ No diff against the app, no "based on" version and no clone lineage + * (ADR-0146 D6): a row says what changed and where, nothing more. + */ + +import { resolveI18nLabel, type I18nLabel } from '@objectstack/spec/ui'; +import type { PackageCustomizations } from './packageCustomizations-io.js'; +import { studioMetadataAreaPath } from './metadataArea.js'; + +/** How a row changed the app. */ +export type CustomizationMode = 'changed' | 'added' | 'switchedOff'; + +/** One row of the panel. */ +export interface CustomizationRow { + /** Stable key: app, mode and the entry's identity. */ + key: string; + appId: string; + appName: string; + mode: CustomizationMode; + /** + * The row's metadata type: the served `type` for a changed or switched-off + * item; for an added member its kind (`field`, `validation`, `index`). + */ + type: string; + /** The entry's name; for an added member, `object.name`. */ + name: string; + /** For an added member: the object it is added to. */ + object?: string; + /** The key {@link loadCustomizationLabels} answers a label under. */ + labelKey: string; + /** Where the row opens in Studio. */ + href: string; +} + +/** The address of one item on an app's metadata area; a pillar type opens its pillar from there. */ +const itemHref = (appId: string, type: string, name: string) => + `${studioMetadataAreaPath(appId)}/${encodeURIComponent(type)}/${encodeURIComponent(name)}`; + +/** The rows one app's served answer makes, in the served order: changed, added, switched off. */ +export function customizationRowsOf( + app: { id: string; name: string }, + read: Pick, +): CustomizationRow[] { + const rows: CustomizationRow[] = []; + for (const o of read.overrides) { + const name = o.member ? `${o.name} (${o.member})` : o.name; + rows.push({ + key: `${app.id}\u0000changed\u0000${o.type}\u0000${o.name}\u0000${o.member ?? ''}`, + appId: app.id, + appName: app.name, + mode: 'changed', + type: o.type, + name, + labelKey: `${o.type}:${o.name}`, + href: itemHref(app.id, o.type, o.name), + }); + } + read.extensions.forEach((e, i) => { + const member = e.name ?? (e.fields?.join(', ') || String(i + 1)); + rows.push({ + key: `${app.id}\u0000added\u0000${e.object}\u0000${e.kind}\u0000${e.name ?? `#${i}`}`, + appId: app.id, + appName: app.name, + mode: 'added', + type: e.kind, + name: `${e.object}.${member}`, + object: e.object, + labelKey: e.kind === 'field' && e.name ? `field:${e.object}.${e.name}` : `${e.kind}:${e.object}.${member}`, + // A member opens on its object: the Data pillar designs the object's fields and rules. + href: itemHref(app.id, 'object', e.object), + }); + }); + for (const s of read.switchedOff) { + rows.push({ + key: `${app.id}\u0000switchedOff\u0000${s.type}\u0000${s.name}`, + appId: app.id, + appName: app.name, + mode: 'switchedOff', + type: s.type, + name: s.name, + labelKey: `${s.type}:${s.name}`, + href: itemHref(app.id, s.type, s.name), + }); + } + return rows; +} + +/** The slice of the metadata client the label read uses. */ +export interface LabelClient { + list(type: string, options?: { packageId?: string }): Promise; +} + +const labelOf = (label: unknown, locale: string | undefined): string | undefined => { + if (label === null || label === undefined) return undefined; + const resolved = resolveI18nLabel(label as I18nLabel, locale)?.trim(); + return resolved || undefined; +}; + +/** A served object's fields, as a map or as a list, by name. */ +function fieldsOf(object: Record): Array<[string, unknown]> { + const fields = object.fields; + if (Array.isArray(fields)) { + return fields + .filter((f): f is Record => !!f && typeof f === 'object' && typeof (f as { name?: unknown }).name === 'string') + .map((f) => [String(f.name), f.label]); + } + if (fields && typeof fields === 'object') { + return Object.entries(fields as Record).map(([name, f]) => [ + name, + f && typeof f === 'object' ? (f as { label?: unknown }).label : undefined, + ]); + } + return []; +} + +/** + * Read the labels of one app's rows: one `list(type, { packageId })` per type + * its changed and switched-off rows name, and one `list('object', …)` when it + * has added fields. Answers `labelKey → label` for the labels it could read; a + * failed list leaves its rows out of the answer, so they keep their names. No + * row, no request. + */ +export async function loadCustomizationLabels( + client: LabelClient, + appId: string, + rows: readonly CustomizationRow[], + locale?: string, +): Promise> { + const mine = rows.filter((r) => r.appId === appId); + const types = new Set(mine.filter((r) => r.mode !== 'added').map((r) => r.type)); + const wantsFields = mine.some((r) => r.mode === 'added' && r.type === 'field'); + if (wantsFields) types.add('object'); + const labels: Record = {}; + await Promise.all( + [...types].map(async (type) => { + let items: unknown; + try { + items = await client.list(type, { packageId: appId }); + } catch { + return; + } + if (!Array.isArray(items)) return; + for (const raw of items) { + if (!raw || typeof raw !== 'object') continue; + const item = raw as Record; + const name = typeof item.name === 'string' ? item.name : ''; + if (!name) continue; + const label = labelOf(item.label, locale); + if (label) labels[`${type}:${name}`] = label; + if (type === 'object' && wantsFields) { + for (const [field, fieldLabel] of fieldsOf(item)) { + const l = labelOf(fieldLabel, locale); + if (l) labels[`field:${name}.${field}`] = l; + } + } + } + }), + ); + return labels; +} diff --git a/ui/packages/app-shell/src/views/studio-design/packageCustomizations-io.ts b/ui/packages/app-shell/src/views/studio-design/packageCustomizations-io.ts index 35f1c596a11..e3f0c088f1c 100644 --- a/ui/packages/app-shell/src/views/studio-design/packageCustomizations-io.ts +++ b/ui/packages/app-shell/src/views/studio-design/packageCustomizations-io.ts @@ -84,6 +84,16 @@ export async function fetchPackageCustomizations(baseId: string): Promise { - const { counts } = await fetchPackageCustomizations(baseId); + return customizationCountsOf(await fetchPackageCustomizations(baseId)); +} + +/** + * The two numbers a card draws, off one served answer: "customized" is the + * served overrides plus the served extensions, "switched off" the served + * switched-off count. Pure, so a reader that holds the whole answer (the + * landing, which also lists its rows, objectstack#34714) draws the same + * numbers without a second request. + */ +export function customizationCountsOf({ counts }: Pick): PackageCustomizationCounts { return { customized: counts.overrides + counts.extensions, switchedOff: counts.switchedOff }; } diff --git a/ui/packages/i18n/src/namespaces/studio/en.ts b/ui/packages/i18n/src/namespaces/studio/en.ts index 2387370b143..f2408dcbfe5 100644 --- a/ui/packages/i18n/src/namespaces/studio/en.ts +++ b/ui/packages/i18n/src/namespaces/studio/en.ts @@ -3454,6 +3454,36 @@ const STUDIO_EN: Record = { '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#34714 — the landing's "Customizations in this environment" panel. + 'engine.studio.landing.envCustomizations.heading': 'Customizations in this environment', + 'engine.studio.landing.envCustomizations.totalTitle': '{count} changes across the installed apps', + 'engine.studio.landing.envCustomizations.loading': 'Reading what this environment changed…', + 'engine.studio.landing.envCustomizations.empty': 'No installed app has been changed in this environment yet.', + 'engine.studio.landing.envCustomizations.unreadable': '{name}: this app’s customizations could not be read.', + 'engine.studio.landing.envCustomizations.tab.all': 'All', + 'engine.studio.landing.envCustomizations.tab.fields': 'New fields', + 'engine.studio.landing.envCustomizations.tab.views': 'Forms and views', + 'engine.studio.landing.envCustomizations.tab.flows': 'Flows', + 'engine.studio.landing.envCustomizations.tab.switchedOff': 'Switched off', + 'engine.studio.landing.envCustomizations.search': 'Search customizations', + 'engine.studio.landing.envCustomizations.groupByApp': 'Group by app', + 'engine.studio.landing.envCustomizations.ungroup': 'One list', + 'engine.studio.landing.envCustomizations.showAll': 'Show all {count}', + 'engine.studio.landing.envCustomizations.noMatch': 'No customization matches.', + 'engine.studio.landing.envCustomizations.mode.changed': 'Changed', + 'engine.studio.landing.envCustomizations.mode.added': 'Added', + 'engine.studio.landing.envCustomizations.mode.switchedOff': 'Switched off', + 'engine.studio.landing.envCustomizations.type.object': 'Object', + 'engine.studio.landing.envCustomizations.type.field': 'Field', + 'engine.studio.landing.envCustomizations.type.validation': 'Validation rule', + 'engine.studio.landing.envCustomizations.type.index': 'Index', + 'engine.studio.landing.envCustomizations.type.view': 'View', + 'engine.studio.landing.envCustomizations.type.flow': 'Flow', + 'engine.studio.landing.envCustomizations.type.page': 'Page', + 'engine.studio.landing.envCustomizations.type.dashboard': 'Dashboard', + 'engine.studio.landing.envCustomizations.type.report': 'Report', + 'engine.studio.landing.envCustomizations.type.action': 'Action', + 'engine.studio.landing.envCustomizations.rowTitle': 'Open {name} in {app}', // 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 ab5164daba9..d416feb9b2e 100644 --- a/ui/packages/i18n/src/namespaces/studio/zh.ts +++ b/ui/packages/i18n/src/namespaces/studio/zh.ts @@ -3046,6 +3046,36 @@ const STUDIO_ZH: Record = { 'engine.studio.landing.rolesPermissions.description': '岗位、权限集、共享规则,所有应用共用。', 'engine.studio.landing.unassignedFlows.name': '未归属的流程', 'engine.studio.landing.unassignedFlows.description': '不属于任何应用的流程,例如应用流程的副本。可直接编辑。', + // objectstack#34714 — the landing's "Customizations in this environment" panel. + 'engine.studio.landing.envCustomizations.heading': '本环境的定制', + 'engine.studio.landing.envCustomizations.totalTitle': '已安装的应用上共 {count} 处改动', + 'engine.studio.landing.envCustomizations.loading': '正在读取本环境的改动…', + 'engine.studio.landing.envCustomizations.empty': '本环境还没有改过任何已安装的应用。', + 'engine.studio.landing.envCustomizations.unreadable': '{name}:这个应用的定制读不到。', + 'engine.studio.landing.envCustomizations.tab.all': '全部', + 'engine.studio.landing.envCustomizations.tab.fields': '新增字段', + 'engine.studio.landing.envCustomizations.tab.views': '表单与视图', + 'engine.studio.landing.envCustomizations.tab.flows': '流程', + 'engine.studio.landing.envCustomizations.tab.switchedOff': '已停用', + 'engine.studio.landing.envCustomizations.search': '搜索定制', + 'engine.studio.landing.envCustomizations.groupByApp': '按应用分组', + 'engine.studio.landing.envCustomizations.ungroup': '合成一张清单', + 'engine.studio.landing.envCustomizations.showAll': '显示全部 {count} 项', + 'engine.studio.landing.envCustomizations.noMatch': '没有匹配的定制。', + 'engine.studio.landing.envCustomizations.mode.changed': '改了原有的', + 'engine.studio.landing.envCustomizations.mode.added': '新增的', + 'engine.studio.landing.envCustomizations.mode.switchedOff': '已停用', + 'engine.studio.landing.envCustomizations.type.object': '对象', + 'engine.studio.landing.envCustomizations.type.field': '字段', + 'engine.studio.landing.envCustomizations.type.validation': '校验规则', + 'engine.studio.landing.envCustomizations.type.index': '索引', + 'engine.studio.landing.envCustomizations.type.view': '视图', + 'engine.studio.landing.envCustomizations.type.flow': '流程', + 'engine.studio.landing.envCustomizations.type.page': '页面', + 'engine.studio.landing.envCustomizations.type.dashboard': '仪表盘', + 'engine.studio.landing.envCustomizations.type.report': '报表', + 'engine.studio.landing.envCustomizations.type.action': '动作', + 'engine.studio.landing.envCustomizations.rowTitle': '在 {app} 里打开 {name}', 'engine.studio.area.assignments.position': '此岗位的任职人员在设置中分配。', 'engine.studio.area.assignments.permission': '此权限集分配给哪些人,在设置中管理。', 'engine.studio.area.assignments.open': '在设置中打开',