Repository navigation
feat(setup): Setup → Configuration → Public forms lists and switches every public form - #36697
Conversation
…every public form Clause-②: no Metadata-protocol: none A system administrator's page for the operations half of public forms: every public form of the environment with its object and address, a switch to turn it on or off, copy its address, open it in a new tab. An installed app's form is switched as this environment's customization (an override in the app's .custom package, ADR-0146), never in the app. Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 17e1d7cc75c28cc41621f270c5afa3b77a76058e && git checkout 17e1d7cc75c28cc41621f270c5afa3b77a76058e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 53257a55db953086db16e756f70b649b41debd4a 2a859fb0a4c5fb680932c8a16e8d7f47d3e23b07 && git checkout -B drift-repro 53257a55db953086db16e756f70b649b41debd4a && git merge --no-ff 2a859fb0a4c5fb680932c8a16e8d7f47d3e23b07
node scripts/docs-audit/affected-docs.mjs --json 53257a55db953086db16e756f70b649b41debd4a
|
…om the spec's, and classify its object-list read The Type Check UI job's spec-symbol guard refuses a local `Doc` because `@objectstack/spec/system` exports one; the page module's type is now `FormDoc`. The census of `useMetadata().objects` readers lists the new Setup page as `off` (not mounted on an app's object-list open). Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
… forms page The zh-Hant locale is generated from zh; the publicFormsSetup block added to zh had not been carried over, so zh-hant-generated.test.ts flagged the file as stale. Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
…e keys as a widening The page adds a Setup navigation id, a component id and new language-pack keys, which this lane counts as Clause-② yes (widening). Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: Face: declaration only. The PR body and the changeset both carry ① Derived judgmentsThe new public surface is the Setup nav entry The ruled points:
Findings:
② Semver level
③ Boundary flagsThe dev report has Tests: the stubs are realistic. The served item shape carries
There is no case for a base shipped off (M1) or an upgraded base (S1). Check-runs on Implemented-by: VERDICT: FAIL |
…r switched on; say when a form stays on an earlier app version An installed app's form shipped with its switch off is withdrawn by the app's own document, which the anonymous routes never let an override re-open. The page now lists it as switched off by its app, with its switch disabled even when an override already switches it on, and a switch-on writes nothing and says why. Switching back on an override taken from an earlier app version still restores the app's own form when nothing else differs; otherwise the override is kept, switched on, and the page says the form stays on that earlier version. The switches need manage_metadata, the capability the server checks on every write they make: without it they are disabled with a sentence saying why, and a refused switch is told in business words, not the server's message. Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: This is the round 2 delta review for round 1 (7110340811, FAIL at ① Derived judgmentsClosed items:
Findings:
② Semver levelUnchanged: ③ Boundary flagsThere are no new open questions in the delta. SQL push-down: still no record queries. The new reads are per-form metadata layer reads (N5), not a data join. Check-runs on S2 is open on this head and earns a delta review of its fix. It does not block the verdict. Implemented-by: VERDICT: PASS |
…wn withdrawal rule The page judged only an app's own switch, so an app that ships a form with allowAnonymous false and an override that opens it read On while the routes kept it closed. anonymousFormIntakeWithdrawnIn is a pure judgement of the bodies it is handed, so it moves into @objectstack/spec/ui beside the rest of the intake rule; metadata-core re-exports the same binding (pinned by its identity test) and the page calls it. A form whose app's document cannot be read is shown as status unknown, never as on, and a failed list read is told in business words. Claude-Session: https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: This is round 3. Round 2 (7112039531) was PASS at I read the one commit ① Derived judgments
Answers on the spec-face scope:
The rest of the delta, read in full:
New findings, all nits:
No must-fix, no should-fix. ② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读设置 › 配置 新增「对外表单」页:列出本环境所有对外表单,可以一键开关、复制地址、在新标签打开。关掉后表单地址立即打不开,表单仍留在列表里可以随时重开。已安装应用的表单,开关存为本环境的定制,不改应用本身。应用本身就关着的表单会标「已被应用关闭」,开关不可用。没有编辑元数据权限的管理员只能看,不能开关。表单设计(第二部分)在 Studio 里做,下一个 PR。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
…nly, and arranges an installed object into its .custom pair (objectstack-ai#36888) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_ Fixes objectstack-ai#36505 Clause-②: no Metadata-protocol: none ## 维护者速读 - 管理员在 Studio 对象页看到的「表单」页签改名为「字段布局」,并多一句说明:这里的分组和顺序用在记录页、右侧预览、新建和编辑弹窗上;已安装应用的对象(比如 HotCRM 的线索)从只读变为可以调整分组和顺序,每个字段标出来自原始包、其他包还是本环境。 - 属于「客户可在已安装应用上自定义」这条主线:之前没有任何界面能调整已安装对象的字段分组。 - 出错时管理员看到的是分组顺序不对或保存被拒;改动只写进本环境的定制包,原始包不动,把定制包里的分组设置删掉就恢复原样。 - 无。 ## What changes **The tab (items 1, 4).** Studio's object page tab 「表单」 / `Form` reads 「字段布局」 / `Field layout` (same key `engine.studio.data.tab.form`, value only). The 「字段分组」 source chip beside the Layout/Preview switch is replaced by one sentence (`engine.studio.data.form.usedOn`): the groups and order are used on the record page, the right-side preview, and the create and edit dialogs. No form view is read or written there, and there is no 新建/编辑 switch and no 「表单视图:…」 label. - **Form-view code already deleted on main** before this PR, by the internal-forms retirement (3b58921): `formViewSections.ts`, `useFormViewDraft.ts`, `formViewSections-30057.test.ts`, `DataPillar.formViewLayout-30057.test.tsx`, and the form-view branches of `ObjectFormDesigner.tsx` and `StudioDesignSurface.tsx`. Re-measured on this branch: no form-view read, write, label or switch is left in the tab. - **Deleted here:** the 「字段分组」 chip (`data-testid="form-layout-source"`) and its two strings `engine.studio.data.form.layoutSource.fieldGroups` / `fieldGroupsTitle` (en, zh). `DataPillar.internalFormRetired-36425.test.tsx` now asserts the sentence in place of the chip. - **Kept:** `ObjectFormDesigner` (now the Field layout canvas), the Layout/Preview switch, `ObjectGroupInspector`, `writeGroupLayout` / `readFieldGroupMembership`, and every canvas operation (item 5: add/rename/delete/move group, drag a field between groups, the keyboard drop, the pinned fields, group settings). **The list spelling (item 2).** The canvas saves group membership in each group's own `fields` list through `writeGroupLayout`. New `groupListLayout` (object-fields-io.ts) reads an object still written in the older per-field `group` spelling into lists, so the object's first save from the tab converts it: every group lists its members in display order, and each field's `group` that a list now holds is dropped. Nothing on the canvas moves. The header sentence of `ObjectFormDesigner.tsx` that still named `fields[].group` + `fieldGroups` is rewritten. **An installed object (item 3).** Where the base's customization door is open (`extendsBase && extWritable`, so `layoutWritable`), the tab is no longer read-only: - Every canvas operation and the group inspector edit the object extension of the base's paired `.custom` package, in the Data pillar's extension buffer, as the whole `fieldGroups` arrangement (every non-table group listing its members, the format of objectstack-ai#36498 / ADR-0146 D10). New `groupArrangement` builds it. - The top bar's Save saves and publishes it with the rest of that extension (the `__c` fields and field patches it already holds stay). The original package is not written. - A field-arrangement edit on a contributed field (a field another package brings) is allowed here, because the arrangement only places it. Its properties stay locked. - A field or group `place` entry of the extension, which a written `fieldGroups` replaces (the server refuses the pair), is taken off by the new `withoutReplacedPlacements`. A `{list}` placement stays. - `foldObjectExtension` now folds a buffered `fieldGroups` the way the registry does (`applyExtensionFieldGroups`), so the canvas shows the arrangement before it is saved. It also keeps a placed own field's served `group`. - Each field card of an installed object carries its source: 「原始包」 / Original package, 「本环境」 / This environment (a field the pair declares, or any `__c` field), or the existing contributed mark that names the other package (`fieldLayoutSources.ts`). - Where the door is walled, the tab stays read-only, as before. **Write path, a deviation from the claim's wording.** The claim says to reuse the writer objectstack-ai#36624 added (`saveObjectExtensionArrangement`). The tab uses that writer's composer `extensionWithArrangement` inside the pillar buffer instead of calling the save. The buffer already holds a draft of the very same `object_extension` document, so a second save would be a second writer of it: refused by the first-write pin while the buffer's draft is pending, and overwritten by the buffer's next save once it lands. The header of `objectExtensionArrangementSave.ts` now says so. No new write path: the bytes go out through the pillar's existing extension save and publish (`doSaveExt`). **Not in this PR.** - No public-forms UI is added or moved. - The Interfaces pillar is not touched. - `packages/spec` and the authorable surface are not touched (0 files under `packages/`). **Overlap with objectstack-ai#36784 (paused, public forms).** That PR's DataPillar hunks put a public-forms switch into this same tab. This PR keeps no switch, per the 2026-11-24 ruling (item 4: 字段布局 edits field groups only). `overlap-check` reports a textual conflict in `StudioDesignSurface.tsx`, plus shared lines in the studio string files and `access-security.json`. Whichever lands second rebases. Nothing here builds on it or copies it. ## Why No console path could arrange an installed object's field groups: the record page's 「配置页面」 arranges tabs only, and this tab was walled read-only on an installed package. The tab's name 「表单」 also no longer matched what it edits since the internal-form retirement. It edits the field groups that the record page, the preview and both dialogs read. ## Tests - New `object-fields-io.test.ts` cases: - `groupListLayout`: legacy to lists, mixed spelling, and unchanged when already listed (the same refs come back). - `groupArrangement`: the result safe-parses as an `ObjectExtensionSchema` body. - New `StudioCustomizeControls.objectExtension-28575.test.ts` cases: - the buffered arrangement fold, with a CONTROL; - `withoutReplacedPlacements`; - a placed own field keeps its group. - New `ObjectFormDesigner.test.tsx` cases: - a legacy object converts on a rename, with a CONTROL; - the field sources are marked on an installed object, with a CONTROL. - New `DataPillar.baseObjectExtension-28575.test.tsx` describe, "the Field layout tab arranges an installed object into its pair": - The tab name, the sentence and the marks. - Deleting group `basic` saves the extension body `fieldGroups: [{ key: 'more', fields: ['industry', 'region__c'] }]`, keeps `fields` and `fieldPatches`, and leaves only the `{list}` placement. The body safe-parses. No object save; the publish goes to the pair. - A walled CONTROL. - Updated tests: - `DataPillar.internalFormRetired-36425`: the sentence replaces the chip, and the save is in the list spelling. - `ObjectFormDesigner.keyboardDrop-11871` and `pinnedFields-27516`: the move pins read the first save's conversion. - `StudioDesignSurface.oneSurface-28572`: a base field is now an arrangeable card. - 25 files: the `{ name: 'Form' }` tab lookup now reads `{ name: 'Field layout' }`, and 8 of them get the module-top `@objectstack/lint` import that `check:test-source-alias` asks of edited files. - **Ablation**, once, on the conversion (`groupListLayout` forced to answer unchanged, written by `scripts/ablation-replace.mjs` with the anchor 1 → 0 and the blob 7d64679 → 8ad709d6432e): - Result: 4 failed / 72 passed across `object-fields-io`, `ObjectFormDesigner` and `DataPillar.internalFormRetired-36425`. - Restored: `git diff HEAD` is empty, and the file blob equals the HEAD blob 7d64679. ## Acceptance notes - **Group source marks are not drawn (a gap against item 3's "marks each source").** Field cards are marked. A group's source cannot be told on the client: - the served object carries no per-group source; - the layered `code` the canvas reads already has the pair folded in; - the customization contributions read lists fields only. Drawing group marks needs a read that serves who placed each group. That is a runtime read decoration (spec + runtime), raised in the report as a decision, not guessed here. - **Reordering the ungrouped bucket on an installed object is not persisted.** An extension can arrange groups but cannot reorder the base's field map. The canvas snaps back when a drag produces nothing to save. Order inside a group is persisted (it is the group's list). - **"Restore the original layout" has no button.** Removing `fieldGroups` from the pair's extension restores the base's groups. This was measured live through the API (below). A UI for it was not asked by the card's items. - **Field/group `place` entries are dropped when the arrangement is written.** The server refuses them beside a written `fieldGroups` (`refusePlacementsTheArrangementReplaces`), and the arrangement states every group's members anyway. - **The full `check:platform-checklist` is red on `main`, not from this diff.** `access-security.json` cites `packages/metadata-core/src/anonymous-form-intake.ts#anonymousFormExplicitWithdrawals`, a symbol that c45dd80 (objectstack-ai#36697) removed. Measured: the symbol has 0 hits in origin/main's file, and origin/main's checklist cites it twice. The scoped mode on this branch is OK: `check-platform-checklist --changed-from origin/main: OK — 2 anchored file(s) in the change set, 9 anchor(s) judged, 0 lost`. - The live check used the showcase app's installed objects. HotCRM's 线索 is not in the example, so `showcase_category` stood in as the installed object. - **Open questions decided (seat, 2026-11-24).** Group source marks are trimmed from this card: field cards are marked, groups are not (recorded on objectstack-ai#36505 as 7125461985). The single-writer route is accepted: the tab composes `extensionWithArrangement` inside the Data pillar's buffer and saves through the pillar's extension Save, instead of calling `saveObjectExtensionArrangement`. - **Fix round 1 (4b0d7ee).** Step 3 of the live customize journey spec now clicks the object header's Field layout tab (it clicked Form). Run live on a booted showcase: 1 passed (25.2s). The Add field draft body is still exactly `{extend, fields}`. - Open PR objectstack-ai#36884 (objectstack-ai#36502, Interfaces retirement) overlaps textually in `studio-authoring.json` and two StudioDesignSurface tests, plus shared files. Whichever lands second rebases. ## Screenshots (card 验收) Taken at head 4b0d7ee on a booted showcase (`objectstack dev --seed-admin` plus console vite from this branch), browser locale zh-CN, 1440×900 at deviceScaleFactor 2. The files are in the project files under `issue-36505/`: - `1-installed-field-layout.png`: the installed object `showcase_category` (com.example.showcase, badge 只读) on the 「字段布局」 tab. Groups are 分类 (名称, 上级) and 显示 (颜色, 排序). Every field card is marked 原始包, the sentence 「这里的分组和顺序用在记录页、右侧预览、新建和编辑弹窗上。」 is shown, and the group controls are enabled. - `2-self-built-field-layout.png`: the self-built `qa_layout_ticket` (writable package com.example.qa-layout, authored in the legacy per-field `group` spelling) on the same tab, with groups Main (Title, Status) and Extra (Notes). It shows no source marks, no 只读 badge, and the same sentence. The package's own labels have no zh translation, so they stay in English. - `3-installed-after-save.png`: `showcase_category` after 删除分组 on 显示 and the top-bar Save. The toast reads 「已保存并生效:分类」, and the groups are 分类 (名称, 上级) and 未分组 (颜色, 排序). The writes were `PUT /api/v1/meta/object_extension/showcase_category?mode=draft&package=com.example.showcase.custom` with body `{"extend":"showcase_category","fieldGroups":[{"key":"category","label":"Category","collapse":"none","fields":["name","parent"]}]}`, then publish at the pair (200). There was no write to `object/showcase_category`. Customizations reading (card 验收, L1 N1): `GET /api/v1/packages/com.example.showcase/customizations`. - Before the save: 200, `arrangements: []`, counts all 0. - After the save: 200, `arrangements: [{"object":"showcase_category","key":"fieldGroups"}]`, `counts.arrangements: 1`, `counts.extensions: 0`. The pair's extension holds only the arrangement key. ## Verification Two-minute check: boot the showcase with the console. Open Studio → Data → Category (installed, read-only package) → 字段布局 / Field layout, delete the group "Display", and press Save. The two fields fall to Ungrouped. `GET /api/v1/meta/object/showcase_category` serves one group `category` listing `name`, `parent`, and the base package is unchanged. <details><summary>Live check on a booted showcase (head a144b62), screenshots described</summary> `objectstack dev --seed-admin -p 4517` with its own db, plus the console Vite dev server on :4518 pointed at it; Playwright Chromium, en-US. - **Installed object** (`showcase_category`, package `com.example.showcase`, legacy per-field `group` spelling): - Screenshot 1: the tab strip reads Records · **Field layout** · Validations. The sentence sits beside Layout/Preview. Groups Category (Name, Parent) and Display (Color, Sort Order). Every card is marked 「Original package」. The group controls are enabled; the header badge still says Read-only (the package is). - Deleting Display and pressing Save sent exactly: - `POST /api/v1/packages/com.example.showcase/ensure-customization` → 201 - `PUT /api/v1/meta/object_extension/showcase_category?mode=draft&package=com.example.showcase.custom` with body `{"extend":"showcase_category","fieldGroups":[{"key":"category","label":"Category","collapse":"none","fields":["name","parent"]}]}` → 200 - `POST …/object_extension/showcase_category/publish?package=com.example.showcase.custom` → 200 - No write to `object/showcase_category`. - Screenshot 2: Category (Name, Parent) and Ungrouped (Color, Sort Order). - Served object afterwards: `fieldGroups: [category → name, parent]`; `color` and `sort_order` carry no group. - Revert by API: the extension saved without `fieldGroups` and published (200/200) serves the base's two groups again, with `color` / `sort_order` → `display`. - **Self-built object** (`qa_layout_ticket` in a scratch writable package `com.example.qa-layout`, authored in the legacy spelling: `title`/`status` → `main`, `notes` → `extra`): - Screenshot 3: groups Main and Extra, no source marks (not an installed object). - Deleting Extra and pressing Save sent one `PUT /api/v1/meta/object/qa_layout_ticket?mode=draft&package=com.example.qa-layout` whose body has `fieldGroups: [{"key":"main","label":"Main","fields":["title","status"]}]` and no `group` on any field (the first-save conversion), then the publish → 200. - Screenshot 4: Main (Title, Status) and Ungrouped (Notes). </details> <details><summary>Local tests and type-check (final head a144b62)</summary> - `cd ui && npx vitest run` over the 9 substantive test files (object-fields-io, StudioCustomizeControls 28575, ObjectFormDesigner, DataPillar 28575, DataPillar 36425, keyboardDrop 11871, pinnedFields 27516, oneSurface 28572, objectExtensionArrangementSave 36499): `Test Files 9 passed (9)`, `Tests 153 passed (153)`, `VERDICT command-exit 0`. - The 8 files given the lint import: `Test Files 8 passed (8)`, `Tests 27 passed (27)`. - `packages/i18n/`: `Test Files 109 passed (109)`, `Tests 2014 passed | 13 skipped`. - `pnpm --dir ui exec vitest run scripts/`: `Test Files 172 passed | 2 skipped (174)`, `Tests 5127 passed | 2 skipped`, `VERDICT command-exit 0`. - Whole `studio-design` + `metadata-admin/previews` sweep after the source was final: `Test Files 531 passed` of 534. The 3 red files were the three updated pins above, re-run green since. - `pnpm --filter @object-ui/app-shell type-check && pnpm --filter @object-ui/i18n type-check`: `VERDICT command-exit 0`, after building the `@object-ui/app-shell^...` closure. </details> <details><summary>Derived gate families (dispatch-gates --commands, 45 families)</summary> Run on head a144b62 (the ui scripts suite included), reconciled: `dispatch-gates --ran: 45 derived famil(ies) accounted for — 45 run, 0 NOT-MEASURED (a DERIVED zero — all 45 recorded an exit code and none of them is 3)`. - Red, 1: `pnpm check:platform-checklist :: exit 1`. This is main's ABSENT SYMBOL `anonymousFormExplicitWithdrawals` (see Acceptance notes). The scoped `--changed-from origin/main` run is OK. - `pnpm check:test-source-alias :: exit 0`. It was red on 2f815c5 (8 edited tests lacked the module-top lint import) and is fixed in a144b62. - Green, 43: - `node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0` - `node scripts/check-adr-0087-registration.mjs --self-test :: exit 0` - `node scripts/check-adr-links.mjs :: exit 0` - `node scripts/check-adr-links.mjs --self-test :: exit 0` - `node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0` - `node scripts/check-closing-keyword-parity.mjs :: exit 0` - `node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0` - `node scripts/check-comment-mask-corpus.mjs :: exit 0` - `node scripts/check-empty-changeset.mjs --base origin/main :: exit 0` - `node scripts/check-empty-changeset.mjs --self-test :: exit 0` - `node scripts/check-sdui-manifest.mjs :: exit 0` - `node scripts/check-sdui-manifest.mjs --self-test :: exit 0` - `node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0` - `node scripts/ci/snapshot-next.mjs --self-test :: exit 0` - `node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0` - `node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0` - `node scripts/release-pending-publish.mjs --self-test :: exit 0` - `pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0` - `pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0` - `pnpm check:adr-anchors :: exit 0` - `pnpm check:changeset-gate-self-tests :: exit 0` - `pnpm check:ci-filter-parity :: exit 0` - `pnpm check:closed-ceremony-text :: exit 0` - `pnpm check:cross-package-test-inputs :: exit 0` - `pnpm check:dispatcher-error-vocabulary :: exit 0` - `pnpm check:doc-authoring :: exit 0` - `pnpm check:driver-memory-census :: exit 0` - `pnpm check:engine-double-contract :: exit 0` - `pnpm check:gitlink-declared :: exit 0` - `pnpm check:nul-bytes :: exit 0` - `pnpm check:published-files :: exit 0` - `pnpm check:query-options-erasure :: exit 0` - `pnpm check:refd-timer-probe :: exit 0` - `pnpm check:registry-log-declared :: exit 0` - `pnpm check:rest-log-spy-declared :: exit 0` - `pnpm check:skill-identifier-liveness :: exit 0` - `pnpm check:tier-file-adoption :: exit 0` - `pnpm check:type-check-coverage :: exit 0` - `pnpm check:type-check-debt :: exit 0` - `pnpm check:undeclared-dep-imports :: exit 0` - `pnpm check:watch-hint-literal :: exit 0` - `pnpm check:where-matcher :: exit 0` - `pnpm --dir ui exec vitest run scripts/ :: exit 0` </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No spec change.) - [x] 2. Every name I added uses the casing for its kind. - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm lint` is CI's run, not re-run locally.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: n/a (not touched). - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [ ] 8. Title, body and comments are in English. (English, except the 维护者速读 block the fleet's PR rule asks for in Chinese.) - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU)_ <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Warren · project thread
Part of #36444. This PR is the card's Settings = operations half (ruling items 6–10 of #36444 (comment)). The Studio = design half (items 1–5: the designer under the object, create/delete, fields, sections, address, live preview) stays open on the card for a second PR on this branch.
Clause-②: yes (widening) — a new
@objectstack/spec/uiexportanonymousFormIntakeWithdrawnIn(moved verbatim from@objectstack/metadata-core, which re-exports it), a new Setup navigation idnav_public_forms, a new component idforms:public-forms, and new language-pack keys (thepublicFormsSetupblock and the nav label) in every shipped localeMetadata-protocol: none
维护者速读
What changes
forms:public-forms(Setup → Configuration → Public Forms,nav_public_forms,requiredPermissions: ['manage_platform_settings']; the page asks the same capability). One row per public form: name, the object a submission creates a record of, its address, an on/off switch, copy address, open in a new tab. No field editing, create or delete here (ruling item 7).ui/packages/app-shell/src/views/setup/publicForms.ts): read from the effective view list (GET /meta/view), judged by the server's own ruleanonymousFormIntakeCandidates(@objectstack/spec/ui), never a second reading ofsharing:allowAnonymous: true+ apublicLink), so a switched-off form stays listed (item 8);sharing.enabled, saved and published at once..custompackage (ADR-0146 D2/D3), via the same seams the in-page dashboard editor uses (resolveDashboardEditTarget,ensureDashboardSaveTarget,overrideDraftBody,saveAndPublishInPackage). The app's own package is never written, so upgrades still flow in.basedOn), which Studio's "Restore package original" undoes. The app's earlier document cannot be read, so a switch-only override at an old version cannot be told from a design one (review S1).enabled: falseorallowAnonymous: false, orenabledomitted, which the stack schema parses asfalse) is withdrawn by the app's own document, and the routes never let an override re-open it (pinned inpackages/rest/src/public-form-withdrawal-effective-read.test.ts). The page judges the app's document with the routes' own function,anonymousFormIntakeWithdrawnIn, against the served form switched on (slot or slug match), plus an omittedenabled(review M1, S2). The page reads each installed app's form's layers (markShippedOff, one package-list read per page load) and lists such a form as "Off (switched off by its app)" with its switch disabled, even when an override already switches it on; a switch-on writes nothing and refuses with that sentence. A form whose app's document cannot be read shows "Unknown", never On (N5).anonymousFormIntakeWithdrawnInmoves into@objectstack/spec/ui(anonymous-form-intake.ts, beside the candidates half), verbatim: it is a pure judgement of the bodies it is handed.@objectstack/metadata-corere-exports the same binding, so the routes' import is unchanged, and its identity test now pins this name with the others (one copy, not a twin). Specapi-surfaceandexport-originsregenerated (1 added).manage_platform_settings(its Setup entry's); the switches also askmanage_metadata, the capability the server checks on every write they make. Without it the forms are listed, the switches are disabled, and a sentence says why. A refused switch is told in business words (403 → no permission; anything else → the server refused, try again), and so is a failed list read; the server's own message goes to the console log only (review N1, N3, N6).404 FORM_NOT_FOUND. The routes already honour an override that withdraws a base's form (anonymousFormIntakeWithdrawnIn), so no route, spec key, error code or stored-key change was needed: Metadata-protocol staysnone. The new spec export (the moved withdrawal judgement), the new navigation id, component id and language keys are the widening the Clause-② line declares.publicFormsSetupblock in all 11 console locales; nav label in all 11 platform-object locales (zh-CN 「对外表单」).Tests
ui/packages/app-shell/src/views/setup/publicForms.test.ts(26 cases): the listing rule (on, off-but-listed, internal forms, non-form views, naming); writable-package save; installed app off → override in.customwith itsoverridesdeclaration and nothing in the app; reading the base when the listed pair does not hold the form; on with a switch-only override → restore (reset at the pair, no save); on with a design override → kept, switch on,basedOnunchanged; pending draft → nothing written (both the client-side check and the server's409 METADATA_CONFLICT); refusals (package not listed, unreadable form, no version to declare); a base shipped off, bothenabled: falseand absentenabled, refused with nothing written, with and without an override already on, and listed as not on (markShippedOff); an app that shipsallowAnonymous: falseunder an override that opens it, refused and listed as not on; an unreadable app document →unknown, not on; an override switch-only atbasedOn: 2.0.0against a changed 3.0.0 base →{ kind: 'earlier-version', basedOn: '2.0.0' }, kept; the same against an unchanged base → restored. Ablations: dropping the refusal, the listing mark, the earlier-version answer, the routes' withdrawal rule, or the unknown mark, or reading an absent switch as on, each turns cases red.PublicFormsSetupPage.test.tsx(8 cases, rendered): the Setup capability gate; withoutmanage_metadatathe switches are disabled with the sentence; a shipped-off form shows "switched off by its app" with a disabled switch (both spellings); the pending-draft toast leaves the row as it was; a 403 and a 500 are told by key, with no server text; a failed list read shows the business sentence without the server text; an unreadable app document shows "Unknown", not On. Ablations of the metadata gate, the shipped-off mark and the business-word refusal each turn a case red.PublicFormsSetupPage.navContribution.test.tsx(3 cases): the ref is registered by the production registration, addressescomponent/forms/public-forms, and mounts through the component route.packages/metadata-core/src/anonymous-form-intake.test.ts: the identity case now includesanonymousFormIntakeWithdrawnIn(metadata-core's export is the spec binding); the package's 1,057 tests pass, and so doespackages/rest/src/public-form-withdrawal-effective-read.test.ts.packages/cli/test/connect-agent-both-halves-wire.pin.test.ts: Setup nav count 34 → 35, plusnav_public_formsis served to amanage_platform_settingsholder. Red without the fix: against a platform-objects build without the nav entry it failsexpected [...] to have a length of 35 but got 34.ui/packages/i18n/src/__tests__/zh-hant-generated.test.ts: passes withsrc/locales/zh-Hant.tsregenerated from zh (pnpm --filter @object-ui/i18n gen:zh-hant).ui/packages/app-shell/src/console/__tests__/openPathObjectReaders-12811.test.ts: the new page'suseMetadata().objectsread is classifiedoff(Setup, not an app object-list open).Acceptance notes
Live run on
examples/app-crm(objectstack dev --seed-admin --fresh) + console dev server, as the seeded admin.com.example.crmlists as not writable, so this exercised the installed-app (customization) path:…/f/contact-us, OnGET /api/v1/forms/contact-us→404 FORM_NOT_FOUND;/f/contact-usshows "Page not found"GET /api/v1/forms/contact-us→ 200; the form renders and takes input againeffective._packageId = com.example.crm, no override left incom.example.crm.custom(restored to the app original)Screenshots (live run, 2× scale) are in the project's shared files under
issue-36444/; they cannot be uploaded to GitHub from the cloud seat:01-public-forms-on.png: the page with the Setup sidebar entry, form On.02-public-forms-off.png: after switching off (toast, Off).03-anon-form-off.png: the anonymous address while off.04-public-forms-back-on.png,05-anon-form-on.png: switched back on, the form takes input again.The Studio designer screenshot comes with the second PR.
Premise finding for the Studio half: the existing Developer → Public Forms entry (
nav_public_formsinstudio.app.ts,developer:public-forms) is served only where a host loads@objectstack/studio; no example and no CLI default loads it, so the console's own Studio has no public-forms entry today. The second PR places the designer under the object in the console's Studio, within the seven-tab Data pillar (objectui#12450).Overlap: merges cleanly with
main, #36629 and #36525. #34223 (draft since 11-19) also bumps the same Setup nav count line in the CLI pin test; whichever lands second takes the other's count.Verification
Head
2a859fb0a4(review round 2: S2, N5, N6; round 1 atd91c73bcad;mainmerged in earlier as33a41ea1b0, no rebase).dispatch-gates --commands, now 94 commands with the spec and metadata-core paths): 94/94 exit 0 on2a859fb0a4.2a859fb0a4: all workflows completed (Spec Liveness Check included), 59 checks success, 10 skipped (opt-in, queue and schedule gates), 0 failure.@object-ui/app-shelltype-check (src + tests): exit 0. eslint on the changed files: 0 errors.gen:zh-hant).a502b8c57had two reds, fixed ind3b3b09d3(check:spec-symbolsrefused a local typeDoc, renamedFormDoc; theopenPathObjectReaders-12811census, classified).d3b3b09d3had one red, Test UI (10/16), the stale zh-Hant locale, fixed in5c7d009426.8902d697eeandd91c73bcadwere all green.peopleAssignments.navContribution.test.tsx("Position holders" heading) fails onmainas well; CI runs it green. Not touched here.Generated by Claude Code