Skip to content

feat(console): the console reads and edits forms as form items - #38484

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-yri9ke
Nov 29, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-yri9ke

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of #37087

Clause-②: yes
Metadata-protocol: none
Skills-docs: none — no metadata an author writes changes; the console reads and writes the form type card ② added.

维护者速读

  • 用户能看到什么变化:Setup 的公开表单页看起来不变,只是改读改写表单类型;在 Studio 里打开一个表单(地址 …/metadata/form/表单名)就是表单设计器,能改字段、必填、分组、标题、地址和提交后的提示,存草稿再发布;控制台自己的表单页改读表单类型。表单类型暂不进 Studio 菜单(下一张 PR)。
  • 为什么做:ADR-0159 把表单独立成 form 元数据,控制台要改读改写它,后面才能退役开发者页的公开表单页。
  • 出错会怎样:最坏是某个表单在 Setup 里开关失败、或在 Studio 里存不上;设计器没有开关,保存和发布都按当时存着的开关写回,所以不会把 Setup 关掉的表单重新打开;匿名打开和提交不经这张 PR 的代码;可整体撤回。
  • 要你做什么:契约审核(L2)未完成,先不用批;审核通过后席位会附审核记录请你批。

What changes

ADR-0159 D9 for the console, card ③ PR 1 of 2 (the seat's claim 7248756424, amendment 7248849494). Every console surface here reads and writes the form type; the server's projection (ADR-0159 D5, completed by #38453) serves an old-shape form there too.

  1. Setup → Configuration → Public forms (ui/packages/app-shell/src/views/setup/): the list read is GET /meta/form; the row reader takes the form item itself (no viewKind filter, no config hop). The two layered reads, the save paths, the reset and the override save name form. A switch saves authorableForm(effective) with sharing.enabled set: the read's _ keys and the old shape's data are left out, since FormSchema refuses data. The shipped-off judgement reads the app's own document from the form layered read's code with the spec's formExplicitlyWithdraws (ADR-0159 D6 rule 6). A row whose app document cannot be read (code: null) is shown as status unknown and offers no switch.
  2. The feat(studio): design an object's public forms in Studio's Form tab #36784 designer becomes the form editor (studio-design/publicForm/): publicFormDesign.ts reads and writes the top-level body. PublicFormsDesigner.tsx now holds FormItemEditor, which edits one form, and FormItemPage, registered as the form type's EditPage and CreatePage. It has no switch: storedNow reads sharing.enabled and sharing.allowAnonymous again at every save and publish, and a draft whose sharing differs is saved again before it is published. A form an installed app ships is saved as a declared override in the app's .custom pair. A form with no public link (one an action opens) is edited without an address. The new-name and address checks read the effective form list plus form drafts. The designer's own list and the Form-tab switch from feat(studio): design an object's public forms in Studio's Form tab #36784 are not carried over.
  3. List columns and registration (formListColumns.tsx; the form resource is registered in services/builtinComponents.tsx beside the other lazy editor pages, so metadata-admin/registry.ts stays free of side effects): name (shows title when there is no label), label, object, public address and status. /meta/types serves no list layout for form, so these are the client's own listColumns. form stays out of Studio's menu.
  4. FormPage (ui/apps/console/src/components/FormPage.tsx): the internal route reads GET /api/v1/meta/form/NAME. The anonymous route is unchanged.
  5. Strings: new engine.studio.publicForms.* and engine.list.col.publicAddress / publicState keys in ./namespaces/studio (en, zh). This PR removes no key.

Outside the claimed file surface (reported to the seat):

  • ui/packages/app-shell/src/views/studio-design/StudioMetadataArea.tsx: one branch, so that a form item in a package's Studio area opens FormItemPage with the area's customization, publishNonce and onDraftSaved. Only the area's surface holds a read-only base's customization. Without it, an installed app's form could not be saved as its override.
  • ui/packages/app-shell/src/services/builtinComponents.tsx: the form resource's registration (listColumns, lazy EditPage / CreatePage). The claim named metadata-admin/registry.ts, but a registration there makes that module side-effectful and check-side-effects-array refuses it; every other editor page registers here.
  • ui/packages/app-shell/src/views/runtime-metadata-persistence.ts: RuntimeArtifactType gains 'form', and a form save invalidates the view caches the way a view save does, because Setup's switch goes through saveAndPublishInPackage('form', …).

Read first (by risk):

  1. studio-design/publicForm/PublicFormsDesigner.tsx, storedNow, save and publish: the no-switch rule.
  2. setup/publicForms.ts, switchPublicForm / authorableForm / markShippedOff: the body a switch writes over an old-shape form.
  3. studio-design/publicForm/publicFormDesign.ts, publicFormItemOf: what is kept, and what is dropped (data, viewKind, config, _ keys).

Tests

  • publicFormDesign.test.ts (29): the top-level body both ways; a new form passes FormSchema.safeParse; an old-shape projected item is written back without data or _formDefinedIn; sharing is written as read (off stays off, an unchanged address keeps the stored publicLink, a changed one becomes /forms/SLUG); a form with no public link; isPublicFormItem.
  • PublicFormsDesigner.test.tsx (14, the feat(studio): design an object's public forms in Studio's Form tab #36784 tests re-pointed to the form shape): create, taken address and name, delete, the no-switch rule at save and at publish, the publish re-save of a draft whose sharing differs, reads that fail, a form with no public link, an old-shape save without data. Every write is asserted as type form with a body FormSchema accepts.
  • setup/publicForms.test.ts, PublicFormsSetupPage.test.tsx: the list read and both layered reads are form; the shipped-off judgement from the form layered code; a row whose app document cannot be read is status unknown with no switch; a switch over an old-shape row writes no data.
  • FormPage.* (about 30 files): the internal route reads /meta/form/NAME; the fixtures moved to the top-level body.
  • PublicFormsDesigner.test.tsx (+2, head 48a01c7ff7, L2 S2): "shows the server's address refusal its own check missed (409 FORM_ADDRESS_TAKEN) as the address clash, at save and at publish" and "CONTROL: shows any other 409 as a pending draft". Ablation (the FORM_ADDRESS_TAKEN branch deleted): 1 failed, 15 passed, the failure is the address case (received the pending-draft sentence), the CONTROL stayed green; restored to the HEAD blob.
  • FormPage.recordObject.test.tsx (+1, L2 S3): "Log Time on a task: /meta/form/NAME is read, the form renders the record, and the submit writes it". The real ActionRunner runs {type:'form', target:'showcase_task.edit'} with record 42; FormPage reads exactly one /api/v1/meta/form/showcase_task.edit and no /meta/view, renders the record and PATCHes /data/showcase_task/42.

Acceptance notes

Remaining formViews / viewKind: 'form' hits under ui/

Docblocks only in FormPage.tsx, recordFormNavigation.ts, SchemaForm.tsx, clientValidation.ts, registry.ts, view-item-normalize.ts, freeze-schema.ts and imported-defaults.ts; the view editor's own form arm (anchors.ts, ViewPreview.tsx, view-item-normalize.ts), which still edits a view; MetadataProvider.tsx, kept on purpose for packages that still ship forms in views:; and the developer PublicFormsPage, which PR 2 retires.

Verification

  • Tests on head 83c51d8: app-shell ConditionWidget.conditionScope, studio-design/publicForm, StudioMetadataArea.*, views/setup and runtime-metadata-persistence.*: 35 files, 458 passed. An earlier run of all of views/metadata-admin, views/studio-design and views/setup was red only on the conditionScope exhaustiveness check, while form was registered in registry.ts; moving the registration fixed it (the targeted run above). Also packages/i18n plus the console's src/components and the two form-page tests in src/__tests__: 173 files, 2618 passed, 13 skipped.
  • Type checks: @object-ui/console type-check exit 0 (after building its dependencies).
  • Gates: dispatch-gates --commands derived 28 families, each run and recorded; --ran reconciles 28 derived, 28 run, 0 NOT-MEASURED. pnpm --dir ui exec vitest run scripts/ was killed by memory (SIGKILL, exit 1) while a build ran beside it; run again alone it exits 0, recorded as an extra line.
  • Dogfood (examples/app-showcase, objectstack dev, console dev server, signed in as the seeded admin):
    • Setup lists both showcase forms as form items, both on. Switching Contact off makes GET /forms/contact-us and its submit answer 404; switching it on again answers 200.
    • Studio opens the old-shape showcase_inquiry.contact at /studio/com.example.showcase/metadata/form/showcase_inquiry.contact. Removing message is refused (the object requires it). Adding source as required, removing company and retitling, then save and publish: the anonymous form serves the new title and fields, a submit without source answers 400 VALIDATION_FAILED, with it 201.
    • Off in Setup, then edited and published in Studio: the form stays off (404) and Setup still shows it off. Switched on again, it serves the newest title.
    • New form: the title Contact us is refused because its address is taken (confirm disabled); Demo signup is created in the app's .custom pair, published, and opens and accepts a submit (201).
    • Studio's form list shows the label/title, name, object, address and status columns.
    • Screenshots: /mnt/project-files/card-37087/pr1-dogfood/ (seat 3's project files).
  • Patch round, head 48a01c7ff7 (L2 S2 and S3; the designer's 409 mapping, two tests, one changeset sentence): PublicFormsDesigner.test.tsx, publicFormDesign.test.ts and FormPage.recordObject.test.tsx 3 files, 55 passed; @object-ui/app-shell and @object-ui/console type-check exit 0; pnpm --dir ui exec vitest run scripts/ 172 passed, 2 skipped. The server's refusal (formAddressClashRefusal, packages/metadata-protocol/src/protocol-form-writes.ts) carries status 409 and code FORM_ADDRESS_TAKEN and names the holder only in its prose, so the editor maps the code to the shipped addressTaken key (no structured holder for addressTakenBy; no key added).
  • Live check of a form an action opens (head 48a01c7ff7, examples/app-showcase): on task "Build homepage", the header action Log Time (showcase_log_time, type form, target showcase_task.form) navigates to /apps/com.example.showcase/forms/showcase_task.form?recordId=…&recordObject=showcase_task; GET /api/v1/meta/form/showcase_task.form answers 200 and no /meta/view/NAME is read; the form renders prefilled; Submit sends PATCH /api/v1/data/showcase_task/… 200 and the record reads the new title. Screenshots and the network log: /mnt/project-files/card-37087/pr1-dogfood/s3-*.png, s3-network.json; the live 409 envelope: s2-envelope-probe.txt (project files of the seat 5 project).
  • Dogfood battery (pnpm --filter @objectstack/dogfood test under os-verify-lock, closure built as CI does, no shard, no path): head d5581291b6 · VERDICT exit 0 · Test Files 495 passed, 3 skipped (498) · Tests 4183 passed, 68 skipped (4251) · failures: none. The head moved since by the patch round's four ui/ files and the changeset only; none is in the dogfood closure.

Ablation of the no-switch rule (L1-b R1, card Done-when "ablate: build the designer's save from the base's body")

Measured at head d5581291b6, in a throwaway detached worktree, through scripts/ablation-replace.mjs (HEAD-blob restore with hash check), from the ui/ root under os-verify-lock: pnpm exec vitest run --maxWorkers=2 --reporter=verbose packages/app-shell/src/views/studio-design/publicForm/PublicFormsDesigner.test.tsx packages/app-shell/src/views/studio-design/publicForm/publicFormDesign.test.ts.

  • Ablation (one line, PublicFormsDesigner.tsx, the single point where both save and publish read the sharing through storedNow): the sharing is taken from the body as it was opened, form.base.sharing, before the effective, draft and code layers.
  • Baseline: 2 files passed, 43/43 tests (14 + 29).
  • Ablated: 2 failed, 41 passed. Red:
    • "has no switch: saves and publishes the form's sharing as it is stored at that time, not as it was when the form was opened" (PublicFormsDesigner.test.tsx:376, expected true to be false on sharing.enabled; the save leg);
    • "publishes an installed app's form with the switch as stored at the app, after it was switched off" (PublicFormsDesigner.test.tsx:425, the publish-time re-save carrying the switched-off sharing never happened; the publish leg).
    • publicFormDesign.test.ts stayed 29/29, as expected (publicFormItemOf writes whatever sharing it is handed).
  • Restored: blob 0e7cb3887b equals HEAD, git diff HEAD empty, 43/43 green again.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibxQiu6MyZ2ngLJtA5Y

Setup's public forms page lists and switches form items, Studio's public
form designer becomes the form type's editor (no switch: every save and
publish writes the sharing stored at that moment), the form list gets its
columns, and the console's own form page reads /meta/form.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxQiu6MyZ2ngLJtA5Y
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nBh856nLqWBYMy29u
2026-11-29T06:08Z · Final green head declared for L1: d5581291b6506079564dec81175031d05b5d9bb3.

  • Checks at this head (pr-state.mjs via l1-face.mjs --pr 38484): 45 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; mergeable_state clean; Lint & Repo Gates and TypeScript Type Check success. overlap-check.mjs at this head: clean against origin/main b926d37 and every open PR head.
  • Card Console reads and edits form items: Setup public forms re-pointed, the PR #36784 designer becomes the form editor in Studio (ADR-0159, card ③) #37087 (PR 1 of 2, Part of #37087): claim 7251649959 (seat 5, resumes seat 3's claim 7248756424, amendment 7248849494, Release 7251253363 and addendum 7251555985); os-dev-report 7251244605 plus reading 7251326244 (the changeset move to the root .changeset/).
  • Contract faces read off this head: no packages/spec/src/** path, no governed path; the PR body and the changeset both declare a bare Clause-②: yes (new engine.studio.publicForms.* and engine.list.col.* keys in the exported ./namespaces/studio, nothing removed from a published package: the two removed exports sit in the private @object-ui/app-shell). reviewFace therefore reads the declaration face, so the L2 owed on PR 1 is a TIER_DEFAULT record. The card's narrowing arm (the removed Studio nav_public_forms label key) rides PR 2, which owes the CONTRACT_REVIEW_TIER review with item ④.
  • Lands as Tier H by size: 3,469 changed lines (check-governed-merges.mjs --pr 38484), so after L1 ACCEPT, the same-head L2 PASS and the dogfood battery from the landing head, it goes to the seat for the hand-off. L1 by thread L1-b.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB

席位核对 — REWORK · L1-b · area o5-ux · Head-sha d5581291b6506079564dec81175031d05b5d9bb3 · 2026-11-29T06:10Z

First L1 record on this PR, a full review of #37087 PR 1. There are three items. None of them asks for a product code change: R1 is a measurement, and R2 and R3 are body or claim lines.

R1 (evidence): the ablation the card asks for on the no-switch rule is missing. The card's Done-when reads: "Switch a form off in Setup, then edit and publish it in Studio … (one test and one browser check; ablate: build the designer's save from the base's body)." The test (PublicFormsDesigner.test.tsx "has no switch: saves and publishes the form's sharing as it is stored at that time …") and the browser check are both reported. The ablation is not, in the body or in report 7251244605. Run it on this head: make save and publish take sharing from the body as it was opened (open.base), not from storedNow. Record which tests go red (the no-switch test and its installed-app sibling are expected to), restore the HEAD blob, and write the reading into the body. If the head moves, a new green-head comment and a delta L1 follow.

R2 (body): the 409 address-clash residual has no carrier, and it is the card's own requirement. Acceptance notes say Setup's 409 FORM_ADDRESS_TAKEN refusal "does not name the form holding the address … Noted for the seat". The report says carrier: seat · noted, not filed. Card item 1 asks that the page "shows the refusal with both names", so this is unfinished card scope, not a stray observation. Since this PR says Part of, name where it goes: either PR 2 of #37087 (add it to the claim amendment that dispatches PR 2, and say so in the body) or a filed #N. Replace "Noted for the seat" with that carrier.

R3 (claim/body): the L2 tier the claim names does not match this PR's face. The body and the changeset declare Clause-②: yes with no (narrowing). The ./namespaces/studio diff only adds lines (en +56, zh +56, no - line). The two removed exports (RuntimeArtifactType widened, baseShipsFormOff signature) are in @object-ui/app-shell, which is private: true. No packages/spec/src/** or governed path is touched. Read by contract-review.md, this is the declaration face, so TIER_DEFAULT is owed, which is the area's reading and mine. Claim 7251649959 still reads Clause-②: yes (narrowing) and owes "an isolated L2 at CONTRACT_REVIEW_TIER with ④" on PR 1. That is inherited from seat 3's claim, where the narrowing is PR 2's removed nav_public_forms key. Post a claim amendment line that PR 1 owes TIER_DEFAULT and the narrowing and its CONTRACT_REVIEW_TIER review move to PR 2, so that the seat's Tier H hand-off cites a tier the record carries.

Checklist (l1-face --pr 38484 at d558129: CLEAN, 13 items)

  • Shape: open draft → main, 51 files +3,008/−461, Part of #37087. That is right: PR 2 carries Fixes #37087 / #36444 under seat 3's two-PR cut (7248756424), and pm:dispatched stays. No closing keyword binds another card.
  • Scope: the claimed surface plus the three files of the surface amendment in claim 7251649959. I judge all three as delivering the claimed change, so they need no further amendment:
    • StudioMetadataArea.tsx: one branch that hands FormItemPage the area's customization. Only the area holds a read-only base's customization.
    • runtime-metadata-persistence.ts: form joins RuntimeArtifactType, and a form save invalidates the object's view caches, because a form save over an old shape removes the view row.
    • builtinComponents.tsx: the registration beside every other lazy editor page. The card's registry.ts placement is refused by check-side-effects-array, a reason that holds.
  • Changeset: @object-ui/app-shell, @object-ui/console and @object-ui/i18n, all patch (app-shell is private, and there is precedent at the root). Metadata-protocol: none, and Skills-docs: none is true.
  • Gates at this head: 45 success, 13 expected skip, 0 failed, 0 pending, mergeable_state clean. Lint & Repo Gates and TypeScript Type Check are both success. The local test readings are on 83c51d8238. 83c51d82..d5581291 is a pure rename of the changeset (numstat 0/0), so they carry over, and the check-runs on this head are the gate reading.
  • ③ SQL push-down: no server or query code.

My readings, at this head

  • The no-switch rule, in the tree. storedNow reads the layered form at the save target, plus the shipping package when the customization serves nothing yet. It takes sharing from effective, then draft, then code, and throws rather than guess. save writes enabled and allowAnonymous from it. publish re-saves a draft whose sharing differs before it publishes. A form never stored keeps the editor's own values. This matches card item 2 ("reads the effective form item … writes sharing.* back as it read them").
  • Setup's switch saves withSwitch(authorableForm(effective), on). authorableForm drops the read's _ keys and the old shape's data, which FormSchema refuses by name. The installed-app branch keeps the shipped-off refusal, "Restore package original", and the pending-draft guard. The shipped-off judgement reads the form layered code (ADR-0159 D6 rule 6).
  • FormPage reads /meta/form/NAME on the internal route only. The remaining-hits section lists each kept formViews / viewKind: 'form' hit with its reason, and MetadataProvider.tsx and the view editor's form arm are kept as the card requires.
  • I read the changeset sentence by sentence: the Setup list and switch on form, without data; the unchanged page; the new "no switch on an unreadable app document"; the editor with no switch, writing the stored sharing at save and publish; a shipped form saved as a declared override; form kept out of the menu; FormPage on /meta/form; the new keys. Each sentence matches the diff.
  • The dogfood readings and screenshots are in card-37087/pr1-dogfood/. The card's live check of an action-opened form and the removed-key probe are carried to PR 2, which is named.
  • Nit, no action: StudioMetadataArea.tsx imports PublicFormsDesigner statically, so the editor rides the Studio area's chunk even though builtinComponents.tsx lazy-loads it.

L2: TIER_DEFAULT (declaration face, R3). The area is running the isolated review and posts its record on the PR. After R1–R3, a delta L1 ACCEPT plus that record, then the dogfood battery from the landing head, then the seat's Tier H hand-off (card total over 3,000 lines).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nBh856nLqWBYMy29u

Contract review

Served-tier: TIER_DEFAULT
Head-sha: d5581291b6506079564dec81175031d05b5d9bb3
Local-runs: none

Inputs read: card #37087 (body and all 12 comments: claim 7248756424, amendment 7248849494, dev report 7251244605, release 7251253363 and addendum 7251555985, seat-5 claim 7251649959), PR #38484 body, the net diff against main (51 files, +3008 / −461), and the 58 check-runs on this head: every completed run is success or skipped, none failed or pending (Check Changeset, Type Check UI, Test UI 16/16, Build & E2E UI, Live E2E UI, Lint & Repo Gates, Governed Surface Queue Guard and the PR-body guards included). The face is declaration: no packages/spec/** or governed path is in the tree, and no (narrowing) line is on the PR body or the changeset.

① Derived judgments

Published packages the diff reaches: @object-ui/i18n (public, exports ./namespaces/studio) and @object-ui/console (public; its code export . is only ConsolePlugin, and its published surface is the SPA in dist, which bundles the private @object-ui/app-shell; @object-ui/console is the only package that depends on it, as a devDependency). @object-ui/app-shell is private: true, so its module exports are not a published surface.

  1. @object-ui/i18n ./namespaces/studio: widened, right. It gains 55 keys in en.ts and the same 55 in zh.ts: 53 engine.studio.publicForms.* keys plus engine.list.col.publicAddress and engine.list.col.publicState. Both files show 0 removed lines, no other locale file is touched, and en and zh have the same key set. This is the only exported dictionary change, and it is a pure addition. addressTakenBy (which names the form holding an address) is among the new keys.
  2. @object-ui/console SPA, internal form route (FormPage.tsx): the read moves, right. It reads GET /api/v1/meta/form/NAME instead of /meta/view/NAME. The set of names it opens is unchanged: on this tree the server's form read projects every old shape (a container's form, a formViews entry, a viewKind: 'form' item) under the name it is served at today (projectViewForms → projectedItem in packages/spec/src/ui/view.zod.ts). A name that projects no form (a list) closes the address (protocol-form-reads.ts, step 3), so it gets a 404 and the not-found state. That replaces the client-side "is a … view, not a form view" throw, which is removed. The console now needs a server that has the form read. That server ships in the same 19.0.0-next train: card ②'s changesets are already consumed under .changeset/pre/, and metadata-protocol: the layered and per-package reads of type form do not serve a base's old-shape form, so Setup cannot judge an installed app's own form document #38437's layered-read fix is pending at the root, so it goes out in the same release as this change. Nothing published is narrowed by this.
  3. @object-ui/console SPA, Setup → Public forms: reads and writes move from view to form, right. The list read, both layered reads, the two save paths, the reset and the override save all name form. The body written is authorableForm(effective): the _ keys and data are dropped, because FormSchema refuses data. One behaviour change is fail-closed: a customization row whose app document reads as code: null is now shown as unknown with no switch, and a switch-on with no base is refused (load-failed). Before, such a row was switchable. The changeset declares this. It is a UI refusal, not an accept-set narrowing of any published contract.
  4. @object-ui/console SPA, Studio: a new form editor and list, widened, right. FormItemEditPage and FormItemCreatePage are registered as the form resource's EditPage and CreatePage, alongside the client listColumns (name or title, label, object, public address, status). form stays out of Studio's menu. This adds capability and removes nothing.
  5. @object-ui/app-shell module exports (private, bundled, not published): RuntimeArtifactType gains 'form', baseShipsFormOff drops two parameters, and authorableForm, FormItem*, FORM_LIST_COLUMNS and formListAddress / formListState are new. These are internal to the console bundle. Named for completeness; nothing is published.

No published export is removed or renamed, no translation key is removed, and no @objectstack/* package moves.

② Semver level

.changeset/37087-console-reads-form-items.md bumps @object-ui/app-shell, @object-ui/console and @object-ui/i18n, each at patch, with Clause-②: yes and Metadata-protocol: none. Right.

  • Level. AGENTS.md Post-Task Checklist step 3: "the level follows the kind alone … none takes patch". Nothing a metadata author can write changes here (the console reads and writes the form type card ② added), so none and patch are correct. The precedent for console strings over the form type, .changeset/pre/37086-form-type-console-strings.md, lists @object-ui/app-shell (private) and @object-ui/i18n at patch the same way. Each package the diff moves is listed, which matches the card's "a patch changeset on each released package the diff moves".
  • Clause-②: yes. New keys in an exported language pack make it yes, as the card's seat note says. The bare yes is well-formed (AGENTS.md allows at most one arm) and has 62 root precedents; yes (widening) would also be accurate.
  • No (narrowing) arm owed. Item ① found nothing published narrowed in PR 1: 0 keys removed, no export of a public package removed. The card-level Clause-②: yes (narrowing) in claim 7248756424 is driven by the removed Studio navigation label apps.studio.navigation.nav_public_forms.label and the Developer page strings. Both are PR 2's. So this tree owes the declaration face at TIER_DEFAULT, and PR 2 carries the narrowing face, its (narrowing) arm and its migration text. The seat claim's "L2 at CONTRACT_REVIEW_TIER with ④ on each PR" should be read in that light for PR 1.
  • Location. The note moved from ui/.changeset/ to the root, where Check Changeset counts it, and that check is green on this head. The body describes the change in business words and its Clause-②: / Metadata-protocol: lines match the PR body.

③ Boundary flags

Dev report 7251244605 has open_questions: [] and five out_of_scope_findings. Each is answered below.

  1. StudioMetadataArea.tsx (surface breach): accepted. It adds one branch: for a form item in a package area (type === 'form' && host?.packageId), it opens FormItemPage with the area's customization, publishNonce and onDraftSaved. Card item 2 needs this ("an installed app's form saved as a declared override in the app's .custom pair"), and only the area holds the read-only base's customization. Without a package host it falls through to the registered EditPage. The static import follows the file's own precedent (StudioPermissionSetPage). Seat amendment 7251649959 already adds the file.
  2. runtime-metadata-persistence.ts (surface breach): accepted. 'form' joins RuntimeArtifactType, and a form save invalidates the object's cached views as a view save does. Setup's switch saves through saveAndPublishInPackage('form', …), and card ②'s write rule removes the old-shape view row at that address, so the view caches would otherwise be stale.
  3. services/builtinComponents.tsx instead of metadata-admin/registry.ts (surface breach): accepted. A registration in registry.ts makes that module side-effectful, which check-side-effects-array refuses, and every other lazy editor page registers here. Card item 4 named registry.ts as the place; this does what the item asks in the place the repo's gate allows. No spec row is added, as the card requires.
  4. Setup's 409 FORM_ADDRESS_TAKEN does not name the holding form: escalated, see S1. It is worse than reported. serverRefusalText maps every non-403 refusal to publicFormsSetup.refusalServer, so the admin reads "Couldn't switch X: the server refused the change. Try again, or ask an administrator." That does not say the address is taken, and "try again" is wrong advice for a clash. Card item 1 ("the page shows the refusal with both names and leaves the form off") and its Done-when ("a taken address is refused with a clear message … at Setup's switch-on") are both in PR 1's cut (claim 7248756424). "Noted, not filed" leaves the item with no owner.
  5. Owed by PR 2:
    • Removed-key probe: accepted. PR 1 removes no key (0 removed lines in either studio file, no locale file touched), so there is nothing to probe until PR 2 removes nav_public_forms. The seat carries it into PR 2's claim amendment.
    • Live check of a form an action opens: not accepted as deferred, see S3. PR 1 is the change that re-points that route's read and drops its client-side non-form guard.

SQL push-down: no new id materialisation or in-app join over records. The designer's early address and name checks scan the effective form list plus form drafts, which is metadata, not records. Ruled question 3 gives the reason: it is the early message in front of the server's authoritative 409. Setup's per-row layered read for customization rows is the same shape as on main. No finding.

Findings:

  • S1 (should-fix): Setup → Public forms shows the generic refusalServer sentence for a 409 FORM_ADDRESS_TAKEN switch-on (PublicFormsSetupPage.tsx serverRefusalText). Card item 1 and the Done-when need a clear address-clash message that names both forms, and the server's refusal names both. Fix it here: match code === 'FORM_ADDRESS_TAKEN' to a publicFormsSetup key in the 11 locale files, under a surface amendment. Or the seat writes it into PR 2's claim amendment as an owed Done-when line. It must not stay "noted, not filed".
  • S2 (should-fix): The designer's refusalText (PublicFormsDesigner.tsx) maps every 409 to engine.studio.publicForms.draftConflict. A server FORM_ADDRESS_TAKEN that the designer's own check missed is therefore shown as "Someone else has a draft of this form pending. Reopen the form to see it." Card item 2 (ruled question 3) says "the designer shows the server's refusal when its own check missed". Fix: branch on the error code, mapping FORM_ADDRESS_TAKEN to the shipped addressTaken / addressTakenBy keys, and add one test. PublicFormsDesigner.test.tsx has no 409 case today.
  • S3 (should-fix): The live check of a form an action opens is deferred to PR 2, but PR 1 changes that route's read from /meta/view to /meta/form and replaces the client's non-form guard with the server's 404. Fix: add one step to the landing-head dogfood battery the seat already owes on PR 1, for example the showcase's Log Time opening showcase_task.form, a container's default form. The card's Done-when ("one live check and one test") is then observed on the PR that carries the risk.
  • N1 (nit): Until PR 2 retires it, Developer → Public forms (ui/apps/console/src/pages/developer/PublicFormsPage.tsx) still lists and saves view, while Setup and the designer write form. At an address a stored form row holds, that row wins, so the page can show a stale on/off state and its saves change nothing served. It is safe because it fails toward the form row, but it is confusing if a next release is cut between PR 1 and PR 2. Fix: land PR 2 in the same release, or add a changeset line naming the interim.

Implemented-by: claude/project-thread-yri9ke
Reviewed-by: session_01FEkQ5nBh856nLqWBYMy29u

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nBh856nLqWBYMy29u

The brief the card thread handed its isolated TIER_DEFAULT reviewer for record 7251744213 (filled from record-recognisers.mjs --brief-template --face declaration; the reviewer was an isolated sub-agent, read-only, posted nothing itself; the seat thread adopts the record after reading this brief).

Contract review brief — PR #38484 @ d5581291b6506079564dec81175031d05b5d9bb3 (card #37087)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face declaration — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #37087: its body and EVERY comment (rulings and earlier records included)
· PR #38484: its body, its file list, and the net diff against main at d5581291b6506079564dec81175031d05b5d9bb3
· the check-runs on d5581291b6506079564dec81175031d05b5d9bb3: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/545f8edc-802d-59aa-9490-4e7bbede023a/scratchpad/37087/pr-38484/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

…e address clash

A 409 FORM_ADDRESS_TAKEN the editor's own check missed was shown as a
pending draft. Branch on the refusal's code: FORM_ADDRESS_TAKEN shows the
address sentence, any other 409 still shows the pending-draft one.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nBh856nLqWBYMy29u
… read

The real ActionRunner produces the Log Time URL; FormPage at that route
reads GET /api/v1/meta/form/NAME, never /meta/view, renders the record
and submits it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nBh856nLqWBYMy29u
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nBh856nLqWBYMy29u
2026-11-29T07:23Z · Final green head declared for the delta L1 and the delta L2: 48a01c7ff71bbd997b18b498ae0e79f5b6e1a8e1 (was d5581291b6).

  • Checks at this head (pr-state.mjs): 47 success, 15 expected skip, 0 unexpected skip, 0 failed, 0 pending; mergeable_state clean. The patch round's overlap-check before the push: clean against origin/main a2205a8 and every open PR head.
  • d5581291..48a01c7f, fast-forward, 3 commits, 4 files: PublicFormsDesigner.tsx +12 (409 FORM_ADDRESS_TAKEN maps to the shipped addressTaken key, any other 409 stays draftConflict; L2 S2), PublicFormsDesigner.test.tsx +42/−1 (the address case and its CONTROL), FormPage.recordObject.test.tsx +39 (an action of type form opens its form through /meta/form; L2 S3), the changeset +1/−1 (one sentence for S2).
  • L1-b REWORK 7251700564: R1 ablation reading now in the PR body (two named tests red, restored to the HEAD blob); R2 carrier is claim amendment 7251711074 (PR 2), named in the body's Acceptance notes; R3 claim amendment 7251711074 moves the narrowing and its CONTRACT_REVIEW_TIER review to PR 2, PR 1 owes TIER_DEFAULT.
  • L2 7251744213: S1 carried to PR 2 (amendment 7251711074), S2 fixed with a test and an ablation, S3 live check plus a test, both readings in the body. Dogfood battery on d5581291b6: 4183 passed, 68 skipped, 0 failed; the four patch files are outside the dogfood closure (reading in the body).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB

席位核对 — ACCEPT · L1-b · area o5-ux · Head-sha 48a01c7ff71bbd997b18b498ae0e79f5b6e1a8e1 · 2026-11-29T07:25Z

Delta review after REWORK 7251700564, reading d5581291..48a01c7f (fast-forward, 3 commits, 4 files +94/−2) plus the body and the claim amendment.

  • R1: closed. The body's "Ablation of the no-switch rule" section gives the card's ablation at d5581291. The sharing is taken from form.base.sharing, the body as it was opened, at the one point where both save and publish read storedNow. That turns exactly the two tests I named red: "has no switch …" (:376, the save leg) and the installed-app publish (:425, the publish leg). publicFormDesign.test.ts stays 29/29, which is expected, and the restore is checked against the HEAD blob 0e7cb3887b. The ablated line is unchanged by this delta, so the reading carries to this head.
  • R2: closed. The Acceptance notes name the carrier: PR 2 of Console reads and edits form items: Setup public forms re-pointed, the PR #36784 designer becomes the form editor in Studio (ADR-0159, card ③) #37087 under claim amendment 7251711074 (card item 1, "shows the refusal with both names"). The amendment says the same.
  • R3: closed. Amendment 7251711074 records that PR 1 owes TIER_DEFAULT (a bare Clause-②: yes, keys only added to ./namespaces/studio, the changed exports in the private @object-ui/app-shell), and that the narrowing and its CONTRACT_REVIEW_TIER review move to PR 2.
  • The code delta (L2 S2). refusalText maps 409 + code === 'FORM_ADDRESS_TAKEN' to the shipped engine.studio.publicForms.addressTaken (en and zh present), and any other 409 stays draftConflict. The code is real: the metadata client's MetadataError carries status and code (metadata-client.get-envelope.test.ts A9, firstWritePin toMatchObject({ status: 409, code })), and the server names FORM_ADDRESS_TAKEN (protocol-authoring-gate.ts ~143). The address case and its CONTROL are pinned, and the body records the ablation (branch deleted → the address case red, the CONTROL green).
  • L2 S3. The new FormPage.recordObject.test.tsx arm drives the real ActionRunner for a type: 'form' action to /forms/showcase_task.edit?recordId=42&recordObject=showcase_task. It asserts one GET /meta/form/NAME and no /meta/view, then the PATCH on submit. That is test-only.
  • The changeset. The new sentence ("When the server refuses a save or publish because another form already uses the address, the editor says the address is taken, not that a draft is pending.") matches the code. The rest is unchanged.
  • Gates at this head (comment 7252456007): 47 success, 15 expected skip, 0 failed, 0 pending, mergeable_state clean.

Still owed: the delta L2 at TIER_DEFAULT must PASS on this same head (it is running from the card thread). Then the landing goes as the claim records it. Part of #37087: the card stays open with pm:dispatched for PR 2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nBh856nLqWBYMy29u

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 48a01c7ff71bbd997b18b498ae0e79f5b6e1a8e1
Local-runs: none

Delta round over round-1 record 7251744213 (head d5581291b6). Inputs read: the delta d5581291b6..48a01c7ff7 (three commits, 4 files, +94 / −2), the updated PR #38484 body, claim amendment 7251711074 on card #37087, and the 62 check-runs on this head. Every check-run is completed as success or skipped, none failed or pending; Check Changeset, Type Check UI, Test UI 16/16, Build & E2E UI, Live E2E UI, Lint & Repo Gates, Governed Surface Queue Guard and the PR-body guards are all included. The face is still declaration: the tree touches no packages/spec/** and no governed path, and carries no (narrowing) line.

① Derived judgments

Round 1's judgments stand. What the delta changes:

  • PublicFormsDesigner.tsx (private @object-ui/app-shell, bundled into the @object-ui/console SPA). refusalText now maps a 409 whose code is FORM_ADDRESS_TAKEN to the shipped engine.studio.publicForms.addressTaken key; any other 409 still maps to draftConflict. The SPA's behaviour gets more accurate and no published contract moves. The real client sets both fields on the error it throws (parseError in ui/packages/data-objectstack/src/metadata-client.ts sets err.status and err.code), so the branch is reachable in production and not only in the test double. No key is added: addressTaken was already in round 1's 55.
  • FormPage.recordObject.test.tsx and PublicFormsDesigner.test.tsx: tests only, no surface.
  • @object-ui/i18n ./namespaces/studio: unchanged from round 1. It gains 55 keys in each of en and zh, with no line removed. Amendment 7251711074 says "+56", which counts the 56 added lines including one comment line. That is the same widening.

No published export or key is removed. Nothing published is narrowed.

② Semver level

.changeset/37087-console-reads-form-items.md keeps @object-ui/app-shell, @object-ui/console and @object-ui/i18n at patch, with Clause-②: yes and Metadata-protocol: none. Still right. The only delta is one added sentence in the Studio form editor bullet: "When the server refuses a save or publish because another form already uses the address, the editor says the address is taken, not that a draft is pending." It is business wording and describes the delta accurately. The kind stays none, so the level stays patch. No (narrowing) arm is owed. Amendment 7251711074 (R3) now records the same tier split this record's ② gave: PR 1 is reviewed on the declaration face at TIER_DEFAULT, and PR 2 carries Clause-②: yes (narrowing) with its CONTRACT_REVIEW_TIER L2 and ④.

③ Boundary flags

  • S1: closed. Carried by claim amendment 7251711074 (R2). PR 2 owes Setup's address refusal naming the form that holds the address, beside the form being switched on, with the key in every locale file. PR 2's file surface adds the 11 locale files. The PR body's Acceptance notes name that amendment as the carrier.
  • S2: closed. codeOf and the FORM_ADDRESS_TAKEN branch come before the generic 409 arm. Two tests cover it:
    • "shows the server's address refusal its own check missed (409 FORM_ADDRESS_TAKEN) as the address clash, at save and at publish" asserts the address sentence and the absence of the pending-draft sentence on both legs.
    • "CONTROL: shows any other 409 as a pending draft" keeps the draft-conflict arm.
    • The body reports an ablation: with the branch deleted, the address case goes red and the control stays green.
  • S3: closed.
    • The new test runs the real ActionRunner on { type: 'form', target: 'showcase_task.edit' } with record 42. It asserts exactly one GET /api/v1/meta/form/showcase_task.edit, no /meta/view read, the record prefilled, and a PATCH to /data/showcase_task/42.
    • The body records a live check on this head in examples/app-showcase. Log Time (showcase_log_time, type form, target showcase_task.form, a container's default form) reads GET /api/v1/meta/form/showcase_task.form with a 200 and no /meta/view read, renders prefilled, and its submit PATCH answers 200.
    • Together these meet the card's Done-when ("one live check and one test") on the PR that carries the risk.
  • N1 (nit): open, accepted as a deviation. The delta does not touch it. Developer → Public forms still reads and saves view until PR 2 retires it. It fails toward the stored form row, so it is safe. It is recorded here as an accepted deviation carried by PR 2's retirement of the page. The seat keeps PR 2 inside the same next release.
  • Delta SQL push-down check: no new id materialisation or in-app join. The delta maps an error and adds tests. No finding.
  • New findings: none.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-yri9ke
Reviewed-by: session_01FEkQ5nBh856nLqWBYMy29u

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr

维护者速读

席位意见:同意合并。第 2 个 PR(收窄、契约档 L2)在本 PR 合并后开工,和本 PR 进同一个 next 版本。

席位核对 — ACCEPT · repo:objectstack#5 · Head-sha 48a01c7ff71bbd997b18b498ae0e79f5b6e1a8e1 · 2026-11-29T07:28Z

  1. 形态:open draft → main,51 files,+3100/−461,Part of #37087(PR 1/2),Clause-②: yes(新增 Studio 语言包键),Metadata-protocol: none,Skills-docs: none。PR 作者是 3 号座位(os-tesla),按交接由本座位审核落地(Release 7251253363)。
  2. 前提实测:Tier H(体量超 3,000 行,维护者落地)。L2 记录经 contractReviewRecordReading 本地读:7252479800 VERDICT PASS,Served-tier TIER_DEFAULT(本 PR 是 declaration 面,按 record-recognisers 恰等规则 L2 须为该档),Head-sha 即本 head,open 与 unreadable 均为空;第一轮 7251744213 的 S1–S3 已闭。
  3. 门禁 check-runs:本 head 47 success、15 skipped、0 失败,mergeable_state clean(卡线程绿灯评论 7252456007)。全量 dogfood 在上一 head d5581291 跑过:4183 过、0 失败;之后只动了 4 个 ui 文件,不在 dogfood 闭包里,读数写在 PR 正文。
  4. 接受的偏差:N1(第 2 个 PR 要进同一个 next 版本)记为接受偏差。
  5. 范围外去向:收窄(删 Studio 的 nav_public_forms 标签键)、Setup 409 报两个表单名 → 本卡第 2 个 PR(认领修订 7251711074),契约档 L2 带 ④。
  6. 落地条款:Tier H,维护者批准后才入队;L2(TIER_DEFAULT)PASS 7252479800 在本 head,无未闭须修/应修;L1-b delta ACCEPT 7252471427。批准后由席位落地(ready + auto-merge)。⛔ 未批不入队。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr

Approval requested (Tier H by size: 3,561 lines changed, over 3,000; Clause-②: yes) · 2026-11-29T07:29Z

  • Head-sha: 48a01c7ff71bbd997b18b498ae0e79f5b6e1a8e1
  • 维护者速读 and the seat's ACCEPT: the seat record above. L2 (TIER_DEFAULT) PASS on this head: 7252479800 (no open must-fix or should-fix; first round 7251744213). L1-b delta ACCEPT: 7252471427.
  • After your approval the seat lands it (ready + auto-merge); it stays draft until then.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 29, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 29, 2026 09:03
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit e68d23b Nov 29, 2026
68 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-yri9ke branch November 29, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants