Skip to content
Draft
29 changes: 29 additions & 0 deletions .changeset/37087-forms-in-studio-menu-developer-page-retired.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'@object-ui/app-shell': patch
'@object-ui/console': patch
'@object-ui/i18n': patch
'@objectstack/platform-objects': patch
---

feat(studio)!: forms are listed in Studio's menu, and the console's Developer → Public Forms page is retired (objectstack#37087, ADR-0159)

Clause-②: yes (narrowing) — released translation keys, a Studio navigation entry and a console page are removed (listed below); two `publicFormsSetup` keys are added in every locale
Metadata-protocol: none

<!-- adr-0087: not-required (no-migration-prescription) The removed operands are translation keys in the published i18n catalogues, one navigation entry of the platform's own Studio app and a console page: no packages/spec schema, registered metadata type or ADR-0087 conversion surface names them, and no stored item stops parsing: a translation item that names the removed navigation key still saves and loads, and translates nothing, so there is nothing for objectstack migrate meta to rewrite -->

**Forms in Studio's menu.** `form` is a metadata type of its own (ADR-0159), and Studio now lists it: under UI, in the common tier, after Reports. A package's menu always shows the row, whether the package holds a form or not, and the type directory lists it too. The row opens the package's list of forms, and a form opens in Studio's form editor. ADR-0084's type-to-group table gains the `form` row.

**Developer → Public Forms is retired.** The console page that listed public forms and edited each one in a dialog read and wrote forms as views. A public form is a `form` item now: it is designed in Studio's form editor, and its public link is switched on or off in Setup → Public forms. Studio's Developer group no longer shows the entry. Both addresses of the page, `/apps/<app>/developer/public-forms` and `/apps/<app>/component/developer/public-forms`, redirect to Studio's list of forms, so a bookmark still lands somewhere useful. Setup's Public Forms entry is unchanged.

**Setup names both forms when an address is taken.** Switching a public form on while another form holds its address is refused. The message now names the form that holds the address beside the form being switched on, so the administrator knows which two forms to tell apart. When the other form cannot be read, the message says another form holds the address.

**BREAKING**: released keys and one navigation entry are removed. No code in the platform reads them any more.

- `@object-ui/i18n`, `./namespaces/developer`, every locale: the 47 keys under `console.developer.publicForms` (shipped since 18.2.0). The retired page was their only reader.
- `@objectstack/platform-objects`: the Studio app's navigation entry `nav_public_forms` (component `developer:public-forms`) and its label key `apps.studio.navigation.nav_public_forms.label` in every locale. Setup's entry of the same id, `apps.setup.navigation.nav_public_forms`, stays.
- `@object-ui/console`: the `PublicFormsPage` module. The component key `developer:public-forms` stays registered, as the redirect above.

If a deployment overrides one of the removed keys (in its own i18next resources), that override no longer applies: nothing asks for the key. Remove the override. A project's translation bundle could never name `apps.studio.navigation.nav_public_forms`: the Studio app is the platform's, and `translation-target-unknown` already refused a key under an app the project does not define. A `translation` item saved in an environment, in Studio or through the metadata API, is not checked against navigation: one that names the removed key still saves and publishes, and translates nothing. Delete the key from such an item.

New keys, in every locale of `@object-ui/i18n`: `publicFormsSetup.refusalAddressTaken` and `publicFormsSetup.refusalAddressTakenUnknown`.
7 changes: 5 additions & 2 deletions docs/adr/0084-application-builder-information-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ Every type the spec registers, enumerated at `origin/main` `151e8123` from `pack
| **界面 UI** | `ui` | 2 | `page` 页面 | 常用 |
| **界面 UI** | `ui` | 3 | `dashboard` 仪表盘 | 常用 |
| **界面 UI** | `ui` | 4 | `report` 报表 | 常用 |
| **界面 UI** | `ui` | 5 | `view` 视图 | 高级 |
| **界面 UI** | `ui` | 6 | `action` 操作 | 高级 |
| **界面 UI** | `ui` | 5 | `form` 表单 | 常用 |
| **界面 UI** | `ui` | 6 | `view` 视图 | 高级 |
| **界面 UI** | `ui` | 7 | `action` 操作 | 高级 |
| **自动化 Automation** | `automation` | 1 | `flow` 流程 | 常用 |
| **自动化 Automation** | `automation` | 2 | `job` | 高级 |
| **平台 Platform** | `system` | 1 | `doc` 文档 | 高级 |
Expand Down Expand Up @@ -215,6 +216,8 @@ Every type the spec registers, enumerated at `origin/main` `151e8123` from `pack

*(Amended 2026-11-27, card [#37740](https://github.com/objectstack-ai/objectstack/issues/37740), which catches the notes up with a row the table already holds and decides nothing: `knowledge_source`, the table's last row. The row was written by the change that registered the type (card [#37304](https://github.com/objectstack-ai/objectstack/issues/37304); [ADR-0161](./0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md) K4), under [item 6](#amendment-2026-11-25-silent), and that change left the notes of 2026-11-25 and 2026-11-26 above at their own readings. Read again at `origin/main` `62dd9e1ef5`: 35 entries — the 33 of those readings, each in the domain the 2026-11-26 note leaves it in, and two registered on 2026-11-27: `form`, registered `ui` ([ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D2; card [#37086](https://github.com/objectstack-ai/objectstack/issues/37086)), and `knowledge_source`, registered `ai`. `form` still has no row: Studio's directory does not list the type yet, and its row is written by the change that lists it ([Amendment (2026-11-26)](#amendment-2026-11-26-moves)). So the table has 34 rows for the 35 entries, and they count 数据 Data 8 · 界面 UI 6 · 自动化 Automation 2 · 平台 Platform 7 · 访问 Access 6 · AI 5. No type changed group since the 2026-11-26 note, and one row has been rewritten since: `datasource`'s, by the note above this one.)*

*(Rewritten 2026-11-29, card [#37087](https://github.com/objectstack-ai/objectstack/issues/37087), which carries out [Amendment (2026-11-26)](#amendment-2026-11-26-moves) for one row and decides nothing: `form`. The same change takes the type off the directory's hidden types and brings its designer, so Studio lists it and its row is written: 界面 UI, fifth, directly after `report` ([item 11](#amendment-2026-11-26-silent)), and its tier is 常用; `view` and `action`, the two types behind it, are each one place later. Read again at `origin/main` `3014176695`: the registry holds the same 35 entries, and the table now has a row for each — 35 rows, counting 数据 Data 8 · 界面 UI 7 · 自动化 Automation 2 · 平台 Platform 7 · 访问 Access 6 · AI 5. The four rows that amendment left to their changes are now each rewritten or written: `dataset`'s, `position`'s, `datasource`'s and `form`'s.)*

The rows are in the menu's order: by group, then by **Order**, which counts inside a group. **Tier** is 常用 Common or 高级 Advanced. The Chinese word beside a registered name is the one the ruling or its proposal uses for that type; a type neither names in Chinese has none. `field` carries no order and no tier because it draws no row (the second reading below).

The table is the registry read at one commit. **The rule above is what binds**: a type added to the registry, or given another domain there, moves in the menu without this table being edited, and where the two disagree the registry is right. *(Amended 2026-11-25: that sentence is about the Group and `domain` columns. The Order and Tier columns are read from no registry — they are decided in this record, and a type the table has no row for is drawn in 高级 Advanced, at the end of its group: [Amendment (2026-11-25)](#amendment-2026-11-25).)*
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/test/connect-agent-both-halves-wire.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,20 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
expect(allowedIds).toContain('nav_packages');
expect(groupChildren(setupAllowed.body?.item, 'group_apps')).toEqual(['nav_packages']);
expect(allowedIds).toContain('nav_public_forms');
// #37087 — the id is Setup's alone now: Studio's entry of the same id
// is retired with the console page it opened (`developer:public-forms`).
// What Setup serves under it is its own page, once.
const publicForms: AnyRec[] = [];
const collect = (items: AnyRec[] | undefined) => {
for (const item of items ?? []) {
if (item?.id === 'nav_public_forms') publicForms.push(item);
if (Array.isArray(item?.children)) collect(item.children);
}
};
collect(setupAllowed.body?.item?.navigation);
expect(publicForms).toHaveLength(1);
expect(publicForms[0]).toMatchObject({ type: 'component', componentRef: 'forms:public-forms' });
expect(JSON.stringify(setupAllowed.body)).not.toContain('developer:public-forms');
expect(allowedIds).toContain('nav_work_calendars');
expect(allowedIds).toContain('nav_work_calendar_exceptions');
expect(allowedIds).not.toContain('nav_packaged_actions');
Expand Down
56 changes: 48 additions & 8 deletions packages/cli/test/console-page-nav-entries.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

import { describe, expect, it, vi } from 'vitest';
import { SchemaRegistry } from '@objectstack/objectql';
import { STUDIO_APP } from '@objectstack/platform-objects/apps';
import { SETUP_APP, SETUP_NAV_CONTRIBUTIONS, STUDIO_APP } from '@objectstack/platform-objects/apps';
import { RestServer } from '@objectstack/rest';

type AnyRec = Record<string, any>;
Expand All @@ -49,14 +49,19 @@ type AnyRec = Record<string, any>;
const MEASURED_CONSOLE_KEYS = ['audit:log', 'developer:integrations'];

/**
* The real registration of the Studio shell. `structuredClone` because
* `registerItem` writes the `_lock` envelope onto what it is handed
* (ADR-0010 §3.7).
* The real registration of the Studio shell, and of the Setup shell with the
* entries this package contributes to it (#37087, for the entry the two apps
* once both declared). `structuredClone` because `registerItem` writes the
* `_lock` envelope onto what it is handed (ADR-0010 §3.7).
*/
function composedRegistry(): SchemaRegistry {
const registry = new SchemaRegistry({ multiTenant: false, collisionPolicy: 'error' });
(registry as AnyRec).logLevel = 'silent';
registry.registerApp(structuredClone(STUDIO_APP), '@objectstack/platform-objects');
registry.registerApp(structuredClone(SETUP_APP), '@objectstack/platform-objects');
for (const contribution of SETUP_NAV_CONTRIBUTIONS) {
registry.registerAppNavContribution(contribution as any, '@objectstack/platform-objects');
}
return registry;
}

Expand All @@ -75,8 +80,8 @@ function makeRes() {
return res;
}

/** A `RestServer` serving the composed Studio app to a caller holding `studio.access`. */
function serve() {
/** A `RestServer` serving the composed apps to a caller holding `perms` (`studio.access` by default). */
function serve(perms: string[] = ['studio.access']) {
const registry = composedRegistry();
const protocol: AnyRec = {
getDiscovery: vi.fn().mockResolvedValue({
Expand All @@ -96,7 +101,7 @@ function serve() {
const rest: AnyRec = new RestServer(
createMockServer() as any, protocol as any, { api: { requireAuth: false } } as any,
);
rest.resolveExecCtx = async () => ({ userId: 'u1', systemPermissions: ['studio.access'] });
rest.resolveExecCtx = async () => ({ userId: 'u1', systemPermissions: perms });
rest.registerRoutes();
return rest;
}
Expand Down Expand Up @@ -127,8 +132,11 @@ describe('#20142 — the Integrations & APIs nav entry, served from the composed
const studio = await getApp(serve(), 'studio');
expect(studio.statusCode).toBe(200);
const developer = group(studio.body?.item, 'group_developer');
// #37087 — three entries: Studio's `nav_public_forms` is retired with
// the console page it opened. Setup's entry of the same id is pinned
// in the last block of this file.
expect(ids(developer)).toEqual([
'nav_api_console', 'nav_flow_runs', 'nav_public_forms', 'nav_integrations',
'nav_api_console', 'nav_flow_runs', 'nav_integrations',
]);
expect(developer?.at(-1)).toMatchObject({ type: 'component', componentRef: 'developer:integrations' });
});
Expand All @@ -142,3 +150,35 @@ describe('#20142 — the Integrations & APIs nav entry, served from the composed
expect(MEASURED_CONSOLE_KEYS).toContain(served[0].componentRef);
});
});

describe('#37087 — Public Forms is served by Setup alone', () => {
/** Every served nav entry of an app with the given id, groups walked. */
const entriesById = (app: AnyRec | undefined, id: string): AnyRec[] => {
const out: AnyRec[] = [];
const walk = (items: AnyRec[] | undefined) => {
for (const item of items ?? []) {
if (item?.id === id) out.push(item);
if (Array.isArray(item?.children)) walk(item.children);
}
};
walk(app?.navigation);
return out;
};

it('the served Studio app holds no `nav_public_forms` entry and names no `developer:public-forms` key', async () => {
const studio = await getApp(serve(), 'studio');
expect(studio.statusCode).toBe(200);
expect(entriesById(studio.body?.item, 'nav_public_forms')).toEqual([]);
expect(JSON.stringify(studio.body)).not.toContain('developer:public-forms');
// CONTROL: the walk finds an entry that is served.
expect(entriesById(studio.body?.item, 'nav_integrations')).toHaveLength(1);
});

it('the served Setup app holds it once, opening Setup\'s own page', async () => {
const setup = await getApp(serve(['setup.access', 'manage_platform_settings']), 'setup');
expect(setup.statusCode).toBe(200);
const served = entriesById(setup.body?.item, 'nav_public_forms');
expect(served).toHaveLength(1);
expect(served[0]).toMatchObject({ type: 'component', componentRef: 'forms:public-forms' });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@
// `registerDeveloperComponents.tsx` registers `developer:integrations`, both
// imported for their side effect by `apps/console/src/main.tsx`. A pin bump
// that renames one of them must change this list in the same PR.
//
// #37087 — Studio's Developer group held a fourth entry, `nav_public_forms`,
// which opened the console's Public Forms page under `developer:public-forms`.
// That page is retired: a form is a `form` item designed in Studio's form
// editor, and its public link is switched in Setup → Public forms (ADR-0159).
// The id is Setup's alone now, and the last block pins both sides of that.

import { describe, it, expect } from 'vitest';
import { AppSchema } from '@objectstack/spec/ui';

import { SETUP_NAV_CONTRIBUTIONS } from './setup-nav.contributions.js';
import { STUDIO_APP } from './studio.app.js';

/** The registry keys the pinned console registers for the pages this repo links. */
Expand Down Expand Up @@ -73,7 +80,6 @@ describe('the Integrations & APIs entry targets the console page (#20142)', () =
expect(studioGroup('group_developer').map((i) => i.id)).toEqual([
'nav_api_console',
'nav_flow_runs',
'nav_public_forms',
'nav_integrations',
]);
});
Expand Down Expand Up @@ -104,3 +110,34 @@ describe('each ref names a key the pinned console registers (#20142)', () => {
}
});
});

describe('Public Forms is Setup\'s entry alone (#37087)', () => {
/** Every entry of Studio's navigation, groups flattened. */
const studioEntries = (): NavItem[] =>
((STUDIO_APP.navigation ?? []) as NavItem[]).flatMap((g) => [g, ...(g.children ?? [])]);

it('Studio declares no `nav_public_forms` entry and names no `developer:public-forms` key', () => {
expect(studioEntries().map((i) => i.id)).not.toContain('nav_public_forms');
expect(studioEntries().map((i) => i.componentRef)).not.toContain('developer:public-forms');
});

it('Setup still contributes `nav_public_forms`, once, to its own page and behind its own gate', () => {
const found = SETUP_NAV_CONTRIBUTIONS.flatMap((c) =>
(c.items as NavItem[]).filter((i) => i.id === 'nav_public_forms').map((i) => ({ app: c.app, group: c.group, item: i })),
);
expect(found).toHaveLength(1);
expect(found[0].app).toBe('setup');
expect(found[0].item).toMatchObject({
type: 'component',
label: 'Public Forms',
componentRef: 'forms:public-forms',
requiredPermissions: ['manage_platform_settings'],
});
});

it('CONTROL: the two developer entries beside the retired one are still declared', () => {
const ids = studioGroup('group_developer').map((i) => i.id);
expect(ids).toContain('nav_api_console');
expect(ids).toContain('nav_flow_runs');
});
});
19 changes: 9 additions & 10 deletions packages/platform-objects/src/apps/studio.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,15 @@ export const STUDIO_APP: App = {
},
{
// Developer — first-party developer tooling surfaces hosted by the
// console (API console, flow run inspector, public forms registry,
// integrations & APIs). Registered as built-in components in the
// console's ComponentRegistry under the `developer:*` namespace.
// console (API console, flow run inspector, integrations & APIs).
// Registered as built-in components in the console's ComponentRegistry
// under the `developer:*` namespace.
//
// #37087 — no Public Forms entry: that console page is retired. A form
// is a `form` item, listed under 界面 UI in Studio's menu and designed
// in its form editor (ADR-0159); its public link is switched on or off
// in Setup → Public forms (`setup-nav.contributions.ts`, the entry of
// the same id `nav_public_forms`, which stays).
id: 'group_developer',
type: 'group',
label: 'Developer',
Expand All @@ -318,13 +324,6 @@ export const STUDIO_APP: App = {
componentRef: 'developer:flow-runs',
icon: 'activity',
},
{
id: 'nav_public_forms',
type: 'component',
label: 'Public Forms',
componentRef: 'developer:public-forms',
icon: 'file-text',
},
{
// #20142 — the console's Integrations & APIs page: the environment's
// REST base URL, per-object endpoints and an `x-api-key` cURL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export const arSourceHashes: Readonly<Record<string, string>> = {
'apps.studio.navigation.group_developer.label': '59668ec5af5afb55',
'apps.studio.navigation.nav_api_console.label': 'd90e508f1921e8d3',
'apps.studio.navigation.nav_flow_runs.label': '0bdee1504c505862',
'apps.studio.navigation.nav_public_forms.label': '4592e97959994e86',
'apps.studio.navigation.nav_integrations.label': 'edbd97d7f401a5b8',
'apps.studio.navigation.group_integration.label': 'a1f2ddfb5c00c83a',
'apps.studio.navigation.nav_email_templates.label': '3463bce831c833d5',
Expand Down
1 change: 0 additions & 1 deletion packages/platform-objects/src/apps/translations/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ export const ar: TranslationData = {
group_developer: { label: 'المطوّر' },
nav_api_console: { label: 'وحدة تحكم API' },
nav_flow_runs: { label: 'عمليات تشغيل التدفقات' },
nav_public_forms: { label: 'النماذج العامة' },
nav_integrations: { label: 'عمليات التكامل وواجهات API' },
group_integration: { label: 'التكامل' },
nav_email_templates: { label: 'قوالب البريد الإلكتروني' },
Expand Down
Loading
Loading