Skip to content

Commit fce6f78

Browse files
feat(console)!: forms are listed in Studio's menu, and the Developer Public Forms page is retired (#38619)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Jianguo** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb7NAv1vsLzLdMX44CnW7rhy)_ Fixes #37087 Fixes #36444 Clause-②: yes (narrowing) — released translation keys, one Studio navigation entry and a console page are removed (listed under What changes); two `publicFormsSetup` keys are added in every locale Metadata-protocol: none Skills-docs: none — no metadata an author writes changes; the Studio page retired is a console page. ## 维护者速读 - 用户能看到什么变化:搭建者在应用搭建左侧菜单的「界面」分组里,「报表」下面多了一行「表单」,点进去是这个应用的表单列表,再点一个表单进设计器;原来「开发者 → 公开表单」那一页没有了,旧网址自动跳到表单列表;管理员在设置里打开一个公开表单时,如果地址被别的表单占着,提示会同时说出两个表单的名字。 - 为什么做:属于「表单独立成一种元数据」专题里控制台这张卡的后一半;表单已经改在应用搭建里设计、在设置里开关,旧页面读写的还是旧存法,留着会让人改到不再生效的东西。 - 出错会怎样:最坏是搭建者在菜单里找不到「表单」,或旧网址跳不到表单列表;访客匿名打开和提交表单、管理员在设置里开关表单都不经过这次改动的代码;可以整体撤回。 - 要你做什么:这次改了一份架构决策记录里的表格、删掉了已发布的翻译条目,改动也超过三千行(大多是删掉的旧页面和它的测试),需要你本人批准,请在审核通过后审批。 ## What changes Card ③ of ADR-0159, PR 2 of 2 (PR 1 was #38484). The claim is 7255649193 with amendments 7255720152, 7255945859, 7256242334 and 7256905062. 1. **Forms in Studio's menu.** `form` leaves `HIDDEN_DIRECTORY_TYPES` (`metadata-admin/directoryScope.ts`), and `STUDIO_MENU_PLACEMENT` (`studio-design/studioMenuPlacement.ts`) gains `{ type: 'form', tier: 'common' }` directly after `report`: the UI group, the common tier, placed by name as the ADR-0084 amendment ruled. Being common, the row is always listed, also in a package that holds no form, and the type directory lists the type too. ADR-0084's type-to-group table gains the `form` row (`view` and `action` move to 6 and 7) and one dated note, nothing else; the table now has a row for each of the registry's 35 entries. 2. **Developer → Public Forms is retired.** The page module and its five test files are deleted. The Studio app's `nav_public_forms` entry is removed from `packages/platform-objects/src/apps/studio.app.ts`, with `apps.studio.navigation.nav_public_forms.label` in the 11 translation files and the 10 source-hash files. Both addresses of the page redirect, in one hop, to Studio's cross-package list of forms (`/studio/~all/metadata/form`): the standalone route `/apps/APP/developer/public-forms` (`AppContent.tsx`) and the component address `/apps/APP/component/developer/public-forms` (the key `developer:public-forms` stays registered in `registerDeveloperComponents.tsx`, as a redirect). The 47 keys under `console.developer.publicForms` leave `@object-ui/i18n`'s `./namespaces/developer` in every locale. Setup's navigation entry of the same id is untouched, and the three pins still assert it. 3. **Setup names both forms when an address is taken.** When the server refuses a switch-on with `409 FORM_ADDRESS_TAKEN`, the page reads the forms again, finds the form that holds the address (`publicAddressHolderOf`, which mirrors the server's `formHeldSlug` and leaves the row's own layers out) and says: "Couldn't switch Request a demo: the form “Talk to the team” already uses the same address. Give one of the two forms another address in App Studio." When two forms share a title, the holder's name follows in brackets. When the holder cannot be read, the sentence says another form holds the address. Two keys in all 11 locale files: `publicFormsSetup.refusalAddressTaken` and `publicFormsSetup.refusalAddressTakenUnknown`. Any other 409 keeps today's sentence. Removed, for the record: - Page: `ui/apps/console/src/pages/developer/PublicFormsPage.tsx`. - Tests: `PublicFormsPage.emptyPlaceholderAffordance-8504.test.tsx`, `PublicFormsPage.publicUrlBasename-11769.test.tsx`, `PublicFormsPage.redirect.test.tsx`, `PublicFormsPage.servedRule-11545.test.tsx`, `PublicFormsPage.sharedSelect-11865.test.tsx`; the `PublicFormsPage` cases in `consolePagesLocale-13460.test.tsx` and `developerMetadataEnvelope.contractEnvelope-6917.test.tsx`. - Navigation entry: `nav_public_forms` of the Studio app (component `developer:public-forms`), with its label key. - Keys: the 47 under `console.developer.publicForms` (shipped since 18.2.0). References the removal touched (claim: "only where they name the removed page"): `ui/.claude/skills/objectui-contributor/guides/console-development.md` (the pages tree, the developer routes line, one legacy-redirect line). `ui/scripts/markdown-test-inputs.mjs`, `scripts/check-ci-filter-parity.mjs` and the `ci.yml` path lists do not name the page and are not changed. Tests that enumerate the listed types, changed to add `form` only: `studioMenuPlacement.test.ts`, `studioMenuModel.test.ts`, `StudioMenu.test.tsx`. `StudioPaletteGroups.surfaceScope-36900.test.tsx` needed no change. Read first (by risk): 1. `ui/packages/app-shell/src/views/setup/publicForms.ts`, `publicAddressHolderOf`: which form is named as the holder, and which layers of the row itself are left out. 2. `ui/apps/console/src/registerDeveloperComponents.tsx` and `AppContent.tsx`, the two `<Navigate>` redirects: a bookmark of either address must land on a page. 3. `docs/adr/0084-application-builder-information-architecture.md`: the `form` row and the note. Two-minute check: `pnpm --dir ui exec vitest run apps/console/src/__tests__/publicFormsRetired-37087.test.tsx` prints 8 passed; or open `/apps/setup/developer/public-forms` in a running console and land on Studio's list of forms. ## Tests - `studioMenuPlacement.test.ts`: `form` is listed and common, directly after `report` and so directly before `view`; CONTROL `field` and `package` stay hidden; the ADR-0084 table pin now reads the `form` row. - `studioMenuModel.test.ts`: the directory rule lists `form` on a package and still drops `field` and `package`; the UI group's tiers. - `StudioMenu.test.tsx`: the row is drawn after Report above the fold with the package's list address; the count shows when the package holds forms; CONTROL no `form` served, no row. - `publicForms.test.ts`: `publicAddressHolderOf` (another form on the slug, switched on or off; the row's own base, override and package-less layers left out; nothing found) and `isAddressTakenRefusal` (status and code both required). - `PublicFormsSetupPage.test.tsx`: the refusal names the holder; equal titles add the name; holder unreadable; CONTROL another 409 keeps the old sentence. - `publicFormsRetired-37087.test.tsx` (new): each address lands on `/studio/~all/metadata/form` in one hop (a recorder logs every location), no query or fragment carried, the key stays registered by the console, the page module is gone, CONTROL the neighbouring developer route still renders. - Catalogue pins moved with the keys (claim amendment 7256905062; the pins and one comment line each, nothing else): `ui/packages/i18n/src/__tests__/developer-namespace.test.ts` (the en catalogue has 184 leaves where it had 231, so its floor of 200 becomes 150) and `de-quote-pairing-3876.test.ts` (the de pack holds 134 paired quote spans where it held 133, at both pins: the new refusal's „{{holder}}“). - Pins: `packages/platform-objects/src/apps/console-page-nav-entries.test.ts`, `packages/cli/test/console-page-nav-entries.pin.test.ts`, `packages/cli/test/connect-agent-both-halves-wire.pin.test.ts`: the Studio app serves no `nav_public_forms` and names no `developer:public-forms`; Setup serves exactly one, with `forms:public-forms`. ## Acceptance notes Driven in a browser on `examples/app-showcase` (`objectstack dev --ui --seed-admin` on its own port and data file, the console's dev server proxied to it), head `afcf5fb1` before the merge of main. Two shipped public forms: the old-shape `showcase_inquiry.contact` (served through the projection) and the `form` item `showcase_inquiry.feedback`. Every step ran on the old-shape form. | Step | Result | |---|---| | An administrator sees Public forms in Setup, an ordinary member does not | Admin: the sidebar entry and the list. A member minted through `admin/create-user` (role `member`): `/api/v1/meta/app` serves no `setup` app, and the page's address answers "Only system administrators can manage public forms." | | Both forms listed with title, object and address | Share feedback and Tell us about yourself, Inquiry, `/f/showcase-feedback` and `/f/contact-us`, both On | | Switch one off, then on | Off: `/f/contact-us` shows Page not found without signing in, `GET /api/v1/forms/contact-us` 404, submit `404 FORM_NOT_FOUND`; the row stays listed as Off. On again: the form renders and a submit answers 201 | | Edit a shipped form in Studio and publish | Title changed, Company made required, Source added: the anonymous page shows all three; a submit without Company answers `400 VALIDATION_FAILED` ("Company is required"), with it 201. Then Source removed and published: it is gone from the anonymous page | | Create a public form with four fields at a new address | Request a demo on Inquiry at `request-demo` (Name, Email, Message, Company), saved into the app's `.custom` pair, published; filled in and submitted without signing in (201, the thank-you page); the record reads back with the four values; Setup lists it | | A taken address is refused, in the designer | Editing: "The form “showcase_inquiry.feedback” already uses this address. Choose a different one." and Save draft is disabled. Creating: "Another form already uses this address. Choose a different one." and Create is disabled | | A taken address is refused, at Setup's switch-on | Request a demo, switched off, was given `/forms/contact-us` through the metadata API (a save that leaves a form closed is never refused; the designer's own check would have stopped it). Switching it on: `PUT … 409`, the switch stays off, and the message names both forms, in English and in Chinese. CONTROL: with its own address back, the same switch saves | | Removing an object-required field is refused with its reason | "“Name” cannot be removed: the object requires it, so a submission without it could not be saved." | | Off in Setup, then edited and published in Studio | The designer's save carries `sharing.enabled: false`; after the publish the address still answers 404 and takes no submission, and Setup still shows Off | | An action of type `form` opens its form | On a task, Log Time (`showcase_log_time`, target `showcase_task.form`): `GET /api/v1/meta/form/showcase_task.form` 200 twice, no `/meta/view` read, the form renders with the record | | `form` in Studio's menu | After Report in the UI group, with its count (Form 7), in English and Chinese (表单); a package with no form (Setup's) shows the row too | | The retired page's addresses | `/apps/setup/developer/public-forms`, `/apps/showcase_app/developer/public-forms` and the two `/component/developer/public-forms` addresses each land on `/studio/~all/metadata/form`, which lists the 8 forms | Screenshots (project files, `/mnt/project-files/card-37087/pr2/`): Setup's list `01-setup-public-forms-admin.png`, the member's view `02-…`, the Studio list `12-studio-form-list.png` and `24-studio-form-list-zh.png`, the editor `06-studio-form-editor-shipped.png` and `14-studio-new-form-editor.png`, the refusal `20-setup-switch-on-address-taken.png` and `21-…-zh.png`, and one per step above (24 files). The showcase does not mount the `studio` app, so the navigation entry's removal is shown by the three pins, not live. **Removed-key probe** (does a user's translation of a removed key get refused): - In a project's files: yes, and it already was. A stack that does not define `studio` and translates `apps.studio.navigation.nav_public_forms.label` gets `error translation-target-unknown`, before and after this change. A stack that owns the Studio app gets no finding while the entry is declared and the same error once it is removed, which is why the 11 translation files lose the key in this PR. - In an environment: no. A `translation` item naming the removed key, saved through the metadata API, saves and publishes with `_diagnostics.valid: true`, exactly like one naming a live Studio key or Setup's entry (three probes, then deleted). That door judges no targets today. The key then translates nothing. The changeset says so and tells the reader to delete it. - `console.developer.publicForms.*` are console catalogue keys with no metadata door: an override in a deployment's own i18next resources stops applying, as the changeset says. **Remaining hits** of `git grep -nE "formViews|viewKind: 'form'|viewKind === 'form'" -- ui ':!**/CHANGELOG.md'`: 81 lines in 34 files, none in a console surface that reads a form's definition. - `providers/MetadataProvider.tsx` and its merge test: the branch that keeps `viewKind: 'form'` items out of the list switcher, kept by the card until major 19. - The `view` editor's form arm under `metadata-admin/` (`anchors.ts`, `previews/ViewPreview.tsx`, `view-item-normalize.ts`) and its tests: it still edits a `view`, kept by the card. - Docblocks and comments only: `FormPage.tsx`, `recordFormNavigation.ts`, `SchemaForm.tsx`, `clientValidation.ts`, `registry.ts`, `freeze-schema.ts`, `imported-defaults.ts`. - Tests that pin the old shape as refused, retired or filtered (`formViewFeaturesRootRefused-6262`, the two `internalFormRetired-36425` files, `data-objectstack`'s `listViews` tests, `view-create-body`, `clientValidation.*`, the inspectors' tests), and one dated audit under `ui/docs/audits/`. - The retired page's hits are gone with the page. Not changed here, reported to the seat: - `carrier:` ADR-0159 D9's table still names the retired page and D10 still lists the menu row as owed; the weekly ADR revisions card carries both at landing (the claim keeps ADR-0159 out of this PR). - Admitted by claim amendment 7256242334 and still not changed: the `form` row of `StudioMenu.tsx`'s icon table (the menu row draws the UI group's icon), and two comments that name what this PR changes, in `services/builtinComponents.tsx` ("`form` stays out of Studio's menu") and `plugin-form/src/submitRedirect.ts` (`PublicFormsPage`). The session's permission check declined the icon-table edit twice; it was not retried, the three files are byte-equal to main, and the three items go to a follow-up. - Never admitted, and left as it is: the docblock of `ui/apps/console/src/components/submitRedirect.ts` says the Public Forms dialog calls `checkSubmitRedirectUrl` at save time; with the page gone, the only caller is `resolveSubmitRedirect` in the same file. - The designer's early clash message names the other form by its internal name, not its label (PR 1's surface). ## Verification Head `81426a31`: `origin/main` `696d02f5` merged in at `bf797ae1`, then the two catalogue pins. Changed lines 3731 (+785 / −2946, 72 files), over the 3000-line human-merge threshold; 2787 of the deleted lines are the retired page with its five test files (2248) and its 47 keys in 11 locales (539). - **Build**: `pnpm exec turbo run build --filter=!@objectstack/docs --concurrency=3` at `bf797ae1`, 123 of 123 tasks, exit 0. - **Unit tests**: the related UI suites, `@objectstack/platform-objects` `src/apps` and the two CLI pins are green at the head (readings below). - **Type checks**: `turbo run type-check` of `@object-ui/app-shell`, `@object-ui/console` and `@object-ui/i18n` (each covers its test files; 82 of 82 tasks, 53 from cache), then `typecheck` of `@objectstack/platform-objects` and `@objectstack/cli`, at the head under the verify lock: VERDICT command-exit 0. - **Gates**: `dispatch-gates --commands` derives 81 commands at the head; all 81 exit 0. `--ran`: 81 derived, 81 run, 0 NOT-MEASURED, 0 UNRUN. - **Changeset**: `check-changeset-no-major --base origin/main` and `check-adr-0087-registration --base origin/main` pass; the changeset's `adr-0087` marker is `not-required (no-migration-prescription)` (no spec schema or registered type changes, and no stored item stops parsing). - **Dogfood battery**: the full battery at the head, `pnpm --filter @objectstack/dogfood test` under the verify lock (no shard, no path), after its closure build (79 of 79 tasks): VERDICT command-exit 0 (held 1,948 s); Test Files 495 passed, 3 skipped (498); Tests 4187 passed, 68 skipped (4255); no failure, and nothing left in the tree. - **Browser**: the acceptance table above, on head `afcf5fb1` (the tree before the merge of main and the two pins; main brought no `ui/` or `examples/` change). - **Overlap**: `overlap-check` at the head, against `origin/main` `48da7161` and the open PRs that share a file: main merges cleanly; #38612 (the 11 locale files) merges cleanly; #38598 (the retirement of `/studio/~org`) conflicts in `studioMenuModel.test.ts`, on two neighbouring lines of one expectation (its `automation` row loses `orgFlows`, this PR's `ui` row gains `type:form`). Verdict exit 1: this PR queues behind #38598. <details><summary>Unit test readings</summary> - `pnpm --dir ui exec vitest run --maxWorkers=2 packages/i18n packages/app-shell/src/views/studio-design packages/app-shell/src/views/setup packages/app-shell/src/views/metadata-admin apps/console/src/__tests__ apps/console/src/pages/developer` at `bf797ae1`: Test Files 2 failed, 1324 passed (1326); Tests 3 failed, 14645 passed, 14 skipped (14662). The three reds were two catalogue pins this branch moves: `developer-namespace.test.ts` (the en catalogue's floor of 200 leaves; 231 became 184 with the 47 keys gone, floor now 150) and `de-quote-pairing-3876.test.ts` (the de pack's paired quote spans, 133 became 134 with the new refusal's „{{holder}}“, at both pins). Claim amendment 7256905062 admits the two files. - After the pins moved: those two files and `packages/app-shell/src/__tests__/product-neutral-renderer.ratchet.test.ts`, 3 files, 83 passed. - `pnpm --filter @objectstack/platform-objects exec vitest run src/apps`: 42 files, 885 passed. - `pnpm --filter @objectstack/cli exec vitest run test/console-page-nav-entries.pin.test.ts test/connect-agent-both-halves-wire.pin.test.ts`: 2 files, 6 passed. The CLI reads `@objectstack/platform-objects/apps` from `dist`: before that package was rebuilt, both new assertions were red on the old build (the Studio app still served `nav_public_forms`). - `pnpm --dir ui exec vitest run scripts/` (in the derived list): 172 files passed, 2 skipped; 5159 tests passed. </details> <details><summary>Gate notes</summary> - `node scripts/check-plugin-teardown-shape.mjs --self-test` exits 3 on a shallow clone until its pinned fixture commit is fetched (`git fetch --depth=1 origin 621a487`); then 48 cases pass. - An earlier loop at `bf797ae1` recorded `vitest run scripts/` and `check:type-check-debt` as NOT MEASURED (the verify lock was held by this thread's own unit run). The loop reported above is the second one, at the head, with nothing else holding the lock. - Beside the derived list, from `ui/`: `check:i18n-keys`, `check:i18n-drift`, `check:i18n-dead-keys`, `check:spec-symbols`, `check:new-line-citations` and `check:skill-examples`, exit 0 each. </details> <details><summary>Ablations (four, one behaviour each)</summary> Run at the head through `scripts/ablation-replace.mjs` under os-verify-lock; each anchor hit once, each mutation was verified on disk, and each restore ended with the file's blob equal to HEAD and `git diff HEAD` empty. Expected direction was red for each, and each went red. | Mutation | Run | Result | |---|---|---| | `directoryScope.ts`: `form` back in `HIDDEN_DIRECTORY_TYPES` | `studioMenuPlacement.test.ts`, `studioMenuModel.test.ts`, `StudioMenu.test.tsx` | 3 files failed; 10 failed, 97 passed of 107. Red: the directory rule, the rows-equal-listable-types check, the `form` placement, the ADR table pin, the always-listed row and the three `form` menu cases | | `PublicFormsSetupPage.tsx`: the `isAddressTakenRefusal` branch never taken | `PublicFormsSetupPage.test.tsx` | 3 failed, 9 passed of 12. Red: both forms named, equal titles, holder unreadable. The CONTROL (another 409) stayed green | | `AppContent.tsx`: the `developer/public-forms` route deleted | `publicFormsRetired-37087.test.tsx` | 4 failed, 4 passed of 8. Red: the three standalone-route cases and the no-query case. The component address, the registration, the page-gone check and the CONTROL stayed green | | `registerDeveloperComponents.tsx`: the registered component renders nothing | same file | 2 failed, 6 passed of 8. Red: the component address and the no-query case | Restored baseline: the five files, 127 passed. </details> ## Owed before landing - The contract review (L2), then the seat's L1. - The maintainer's approval (Tier H: `docs/adr/**`, `ui/.claude/**`, the narrowing, and 3731 changed lines). - The queue behind #38598: the two PRs conflict on one expectation of `studioMenuModel.test.ts`. Whichever lands second merges main and keeps both edits (the `automation` row without `orgFlows`, the `ui` row with `type:form`). - A dogfood battery from the landing head. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jV8fqvAbRv26gu8ZYB --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f5da514 commit fce6f78

72 files changed

Lines changed: 785 additions & 2946 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/i18n': patch
5+
'@objectstack/platform-objects': patch
6+
---
7+
8+
feat(studio)!: forms are listed in Studio's menu, and the console's Developer → Public Forms page is retired (objectstack#37087, ADR-0159)
9+
10+
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
11+
Metadata-protocol: none
12+
13+
<!-- 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 -->
14+
15+
**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.
16+
17+
**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.
18+
19+
**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.
20+
21+
**BREAKING**: released keys and one navigation entry are removed. No code in the platform reads them any more.
22+
23+
- `@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.
24+
- `@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.
25+
- `@object-ui/console`: the `PublicFormsPage` module. The component key `developer:public-forms` stays registered, as the redirect above.
26+
27+
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.
28+
29+
New keys, in every locale of `@object-ui/i18n`: `publicFormsSetup.refusalAddressTaken` and `publicFormsSetup.refusalAddressTakenUnknown`.

‎docs/adr/0084-application-builder-information-architecture.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ Every type the spec registers, enumerated at `origin/main` `151e8123` from `pack
184184
| **界面 UI** | `ui` | 2 | `page` 页面 | 常用 |
185185
| **界面 UI** | `ui` | 3 | `dashboard` 仪表盘 | 常用 |
186186
| **界面 UI** | `ui` | 4 | `report` 报表 | 常用 |
187-
| **界面 UI** | `ui` | 5 | `view` 视图 | 高级 |
188-
| **界面 UI** | `ui` | 6 | `action` 操作 | 高级 |
187+
| **界面 UI** | `ui` | 5 | `form` 表单 | 常用 |
188+
| **界面 UI** | `ui` | 6 | `view` 视图 | 高级 |
189+
| **界面 UI** | `ui` | 7 | `action` 操作 | 高级 |
189190
| **自动化 Automation** | `automation` | 1 | `flow` 流程 | 常用 |
190191
| **自动化 Automation** | `automation` | 2 | `job` | 高级 |
191192
| **平台 Platform** | `system` | 1 | `doc` 文档 | 高级 |
@@ -215,6 +216,8 @@ Every type the spec registers, enumerated at `origin/main` `151e8123` from `pack
215216

216217
*(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.)*
217218

219+
*(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.)*
220+
218221
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).
219222

220223
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).)*

‎packages/cli/test/connect-agent-both-halves-wire.pin.test.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,20 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
295295
expect(allowedIds).toContain('nav_packages');
296296
expect(groupChildren(setupAllowed.body?.item, 'group_apps')).toEqual(['nav_packages']);
297297
expect(allowedIds).toContain('nav_public_forms');
298+
// #37087 — the id is Setup's alone now: Studio's entry of the same id
299+
// is retired with the console page it opened (`developer:public-forms`).
300+
// What Setup serves under it is its own page, once.
301+
const publicForms: AnyRec[] = [];
302+
const collect = (items: AnyRec[] | undefined) => {
303+
for (const item of items ?? []) {
304+
if (item?.id === 'nav_public_forms') publicForms.push(item);
305+
if (Array.isArray(item?.children)) collect(item.children);
306+
}
307+
};
308+
collect(setupAllowed.body?.item?.navigation);
309+
expect(publicForms).toHaveLength(1);
310+
expect(publicForms[0]).toMatchObject({ type: 'component', componentRef: 'forms:public-forms' });
311+
expect(JSON.stringify(setupAllowed.body)).not.toContain('developer:public-forms');
298312
expect(allowedIds).toContain('nav_work_calendars');
299313
expect(allowedIds).toContain('nav_work_calendar_exceptions');
300314
expect(allowedIds).not.toContain('nav_packaged_actions');

‎packages/cli/test/console-page-nav-entries.pin.test.ts‎

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

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

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

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

@@ -75,8 +80,8 @@ function makeRes() {
7580
return res;
7681
}
7782

78-
/** A `RestServer` serving the composed Studio app to a caller holding `studio.access`. */
79-
function serve() {
83+
/** A `RestServer` serving the composed apps to a caller holding `perms` (`studio.access` by default). */
84+
function serve(perms: string[] = ['studio.access']) {
8085
const registry = composedRegistry();
8186
const protocol: AnyRec = {
8287
getDiscovery: vi.fn().mockResolvedValue({
@@ -96,7 +101,7 @@ function serve() {
96101
const rest: AnyRec = new RestServer(
97102
createMockServer() as any, protocol as any, { api: { requireAuth: false } } as any,
98103
);
99-
rest.resolveExecCtx = async () => ({ userId: 'u1', systemPermissions: ['studio.access'] });
104+
rest.resolveExecCtx = async () => ({ userId: 'u1', systemPermissions: perms });
100105
rest.registerRoutes();
101106
return rest;
102107
}
@@ -127,8 +132,11 @@ describe('#20142 — the Integrations & APIs nav entry, served from the composed
127132
const studio = await getApp(serve(), 'studio');
128133
expect(studio.statusCode).toBe(200);
129134
const developer = group(studio.body?.item, 'group_developer');
135+
// #37087 — three entries: Studio's `nav_public_forms` is retired with
136+
// the console page it opened. Setup's entry of the same id is pinned
137+
// in the last block of this file.
130138
expect(ids(developer)).toEqual([
131-
'nav_api_console', 'nav_flow_runs', 'nav_public_forms', 'nav_integrations',
139+
'nav_api_console', 'nav_flow_runs', 'nav_integrations',
132140
]);
133141
expect(developer?.at(-1)).toMatchObject({ type: 'component', componentRef: 'developer:integrations' });
134142
});
@@ -142,3 +150,35 @@ describe('#20142 — the Integrations & APIs nav entry, served from the composed
142150
expect(MEASURED_CONSOLE_KEYS).toContain(served[0].componentRef);
143151
});
144152
});
153+
154+
describe('#37087 — Public Forms is served by Setup alone', () => {
155+
/** Every served nav entry of an app with the given id, groups walked. */
156+
const entriesById = (app: AnyRec | undefined, id: string): AnyRec[] => {
157+
const out: AnyRec[] = [];
158+
const walk = (items: AnyRec[] | undefined) => {
159+
for (const item of items ?? []) {
160+
if (item?.id === id) out.push(item);
161+
if (Array.isArray(item?.children)) walk(item.children);
162+
}
163+
};
164+
walk(app?.navigation);
165+
return out;
166+
};
167+
168+
it('the served Studio app holds no `nav_public_forms` entry and names no `developer:public-forms` key', async () => {
169+
const studio = await getApp(serve(), 'studio');
170+
expect(studio.statusCode).toBe(200);
171+
expect(entriesById(studio.body?.item, 'nav_public_forms')).toEqual([]);
172+
expect(JSON.stringify(studio.body)).not.toContain('developer:public-forms');
173+
// CONTROL: the walk finds an entry that is served.
174+
expect(entriesById(studio.body?.item, 'nav_integrations')).toHaveLength(1);
175+
});
176+
177+
it('the served Setup app holds it once, opening Setup\'s own page', async () => {
178+
const setup = await getApp(serve(['setup.access', 'manage_platform_settings']), 'setup');
179+
expect(setup.statusCode).toBe(200);
180+
const served = entriesById(setup.body?.item, 'nav_public_forms');
181+
expect(served).toHaveLength(1);
182+
expect(served[0]).toMatchObject({ type: 'component', componentRef: 'forms:public-forms' });
183+
});
184+
});

‎packages/platform-objects/src/apps/console-page-nav-entries.test.ts‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@
3131
// `registerDeveloperComponents.tsx` registers `developer:integrations`, both
3232
// imported for their side effect by `apps/console/src/main.tsx`. A pin bump
3333
// that renames one of them must change this list in the same PR.
34+
//
35+
// #37087 — Studio's Developer group held a fourth entry, `nav_public_forms`,
36+
// which opened the console's Public Forms page under `developer:public-forms`.
37+
// That page is retired: a form is a `form` item designed in Studio's form
38+
// editor, and its public link is switched in Setup → Public forms (ADR-0159).
39+
// The id is Setup's alone now, and the last block pins both sides of that.
3440

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

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

4047
/** The registry keys the pinned console registers for the pages this repo links. */
@@ -73,7 +80,6 @@ describe('the Integrations & APIs entry targets the console page (#20142)', () =
7380
expect(studioGroup('group_developer').map((i) => i.id)).toEqual([
7481
'nav_api_console',
7582
'nav_flow_runs',
76-
'nav_public_forms',
7783
'nav_integrations',
7884
]);
7985
});
@@ -104,3 +110,34 @@ describe('each ref names a key the pinned console registers (#20142)', () => {
104110
}
105111
});
106112
});
113+
114+
describe('Public Forms is Setup\'s entry alone (#37087)', () => {
115+
/** Every entry of Studio's navigation, groups flattened. */
116+
const studioEntries = (): NavItem[] =>
117+
((STUDIO_APP.navigation ?? []) as NavItem[]).flatMap((g) => [g, ...(g.children ?? [])]);
118+
119+
it('Studio declares no `nav_public_forms` entry and names no `developer:public-forms` key', () => {
120+
expect(studioEntries().map((i) => i.id)).not.toContain('nav_public_forms');
121+
expect(studioEntries().map((i) => i.componentRef)).not.toContain('developer:public-forms');
122+
});
123+
124+
it('Setup still contributes `nav_public_forms`, once, to its own page and behind its own gate', () => {
125+
const found = SETUP_NAV_CONTRIBUTIONS.flatMap((c) =>
126+
(c.items as NavItem[]).filter((i) => i.id === 'nav_public_forms').map((i) => ({ app: c.app, group: c.group, item: i })),
127+
);
128+
expect(found).toHaveLength(1);
129+
expect(found[0].app).toBe('setup');
130+
expect(found[0].item).toMatchObject({
131+
type: 'component',
132+
label: 'Public Forms',
133+
componentRef: 'forms:public-forms',
134+
requiredPermissions: ['manage_platform_settings'],
135+
});
136+
});
137+
138+
it('CONTROL: the two developer entries beside the retired one are still declared', () => {
139+
const ids = studioGroup('group_developer').map((i) => i.id);
140+
expect(ids).toContain('nav_api_console');
141+
expect(ids).toContain('nav_flow_runs');
142+
});
143+
});

‎packages/platform-objects/src/apps/studio.app.ts‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,15 @@ export const STUDIO_APP: App = {
296296
},
297297
{
298298
// Developer — first-party developer tooling surfaces hosted by the
299-
// console (API console, flow run inspector, public forms registry,
300-
// integrations & APIs). Registered as built-in components in the
301-
// console's ComponentRegistry under the `developer:*` namespace.
299+
// console (API console, flow run inspector, integrations & APIs).
300+
// Registered as built-in components in the console's ComponentRegistry
301+
// under the `developer:*` namespace.
302+
//
303+
// #37087 — no Public Forms entry: that console page is retired. A form
304+
// is a `form` item, listed under 界面 UI in Studio's menu and designed
305+
// in its form editor (ADR-0159); its public link is switched on or off
306+
// in Setup → Public forms (`setup-nav.contributions.ts`, the entry of
307+
// the same id `nav_public_forms`, which stays).
302308
id: 'group_developer',
303309
type: 'group',
304310
label: 'Developer',
@@ -318,13 +324,6 @@ export const STUDIO_APP: App = {
318324
componentRef: 'developer:flow-runs',
319325
icon: 'activity',
320326
},
321-
{
322-
id: 'nav_public_forms',
323-
type: 'component',
324-
label: 'Public Forms',
325-
componentRef: 'developer:public-forms',
326-
icon: 'file-text',
327-
},
328327
{
329328
// #20142 — the console's Integrations & APIs page: the environment's
330329
// REST base URL, per-object endpoints and an `x-api-key` cURL

‎packages/platform-objects/src/apps/translations/ar.source-hashes.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export const arSourceHashes: Readonly<Record<string, string>> = {
159159
'apps.studio.navigation.group_developer.label': '59668ec5af5afb55',
160160
'apps.studio.navigation.nav_api_console.label': 'd90e508f1921e8d3',
161161
'apps.studio.navigation.nav_flow_runs.label': '0bdee1504c505862',
162-
'apps.studio.navigation.nav_public_forms.label': '4592e97959994e86',
163162
'apps.studio.navigation.nav_integrations.label': 'edbd97d7f401a5b8',
164163
'apps.studio.navigation.group_integration.label': 'a1f2ddfb5c00c83a',
165164
'apps.studio.navigation.nav_email_templates.label': '3463bce831c833d5',

‎packages/platform-objects/src/apps/translations/ar.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export const ar: TranslationData = {
166166
group_developer: { label: 'المطوّر' },
167167
nav_api_console: { label: 'وحدة تحكم API' },
168168
nav_flow_runs: { label: 'عمليات تشغيل التدفقات' },
169-
nav_public_forms: { label: 'النماذج العامة' },
170169
nav_integrations: { label: 'عمليات التكامل وواجهات API' },
171170
group_integration: { label: 'التكامل' },
172171
nav_email_templates: { label: 'قوالب البريد الإلكتروني' },

0 commit comments

Comments
 (0)