Skip to content

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

Backlog

Description

@objectstack-fleet

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Source: ADR-0159 (PR #36957), decision D9 and the Execution plan. Parent: #36868, card ③ of five. Carries the paused work of #36444 and draft PR #36784.

Blocked-by: #37086
Metadata-protocol: none
Clause-②: no
(Seat note: re-read at claim. New editor keys in an exported language pack are yes; the removed Studio navigation key apps.studio.navigation.nav_public_forms.label is a narrowing.)

Grading: area:build · Feature · the console reads and edits form items; public forms are designed through the form type · builders and administrators · evidence: ADR-0159 D9's table, read at main 62692b7f8b. p1.

What to build

  1. Setup, Configuration, Public forms (merged in feat(setup): Setup → Configuration → Public forms lists and switches every public form #36697): re-point from view to form. The list read in the page and the six type arguments in the Setup data module (the two layered reads, the two save paths, the reset, the override save) name form; the row reader takes the item itself, with no viewKind filter and no config hop. Behaviour is unchanged: every public form listed, on and off, copy address, preview, switched-off forms stay listed. A switch written before this card (a view override) is found and cleared by the re-pointed switch, through card ②'s write rule. The page's judgement of an app's own document reads the form per-package layer, not the stored container (ADR-0159 D6 rule 6). Switching on a form whose address another form holds is refused by the server (ruled question 3, judged at every form save that leaves the form open): the page shows the refusal with both names and leaves the form off. Setup stays without field editing, create and delete (ruling record 7100386248, items 6 to 10).
  2. The designer of PR feat(studio): design an object's public forms in Studio's Form tab #36784 becomes the form type's editor in Studio: its design module, its component and their tests are kept; its read and write move from a view item's config to the form item, whose body is at the top level (ADR-0159 ruled question 5). Its rules stay: fillable fields only, an object-required field cannot be removed, the address clash message (now the early message in front of card ②'s server refusal, ruled question 3; the designer shows the server's refusal when its own check missed), draft then publish, an installed app's form saved as a declared override in the app's .custom pair.
    • The designer has no switch. It reads the effective form item (the override when one stands, ⛔ not the base's body) and writes sharing.enabled and sharing.allowAnonymous back as it read them. Its save is a whole-document override at the (pair, name) Setup's switch-only override sits at (ADR-0159 D4), so a publish built from the base's body would replace a switch-off with an open form. ⛔ A publish from the designer never opens a form Setup switched off (Studio designs, Setup operates: ruling record 7100386248).
  3. Do not land the Form-tab switch PR feat(studio): design an object's public forms in Studio's Form tab #36784 adds to the Studio design surface. The object page's field-layout tab stays field groups only.
  4. Studio's metadata list for form: the columns row (name, label, object, public address, on or off; where label is absent the row shows title, then the name), create, delete, Source, layered view, history and rollback, draft and publish, the "customization" and "overrides" marks. This card adds the form resource's client listColumns in ui/packages/app-shell/src/views/metadata-admin/registry.ts. The served columns row is 元数据列表列改为在 spec 里声明,经 /meta/types 下发(像表单布局一样);第一批补上 hook、flow、job 等类型的关键列 #36860's: if it has landed, name the form row as a follow-up there; ⛔ this card adds no spec row.
  5. Retire Studio Developer, Public Forms: the page (ui/apps/console/src/pages/developer/PublicFormsPage.tsx), its tests, and the nav_public_forms entry of the Studio app (packages/platform-objects/src/apps/studio.app.ts) with its translations and source hashes; the old route redirects to the form list. ⛔ Setup's navigation entry carries the same id (packages/platform-objects/src/apps/setup-nav.contributions.ts) and stays. Three pins name the id and are updated with the removal, each still asserting Setup's entry: packages/cli/test/connect-agent-both-halves-wire.pin.test.ts, packages/cli/test/console-page-nav-entries.pin.test.ts, packages/platform-objects/src/apps/console-page-nav-entries.test.ts.
  6. FormPage: the internal route reads GET /api/v1/meta/form/NAME; the anonymous route is unchanged (it reads the server's resolution).
  7. Business wording on every surface, no internal names.

Done when

  • The acceptance list of ruling record 7100386248 on 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444 passes on examples/app-showcase, driven in a browser, with two public forms: the old-shape showcase_inquiry.contact (served through card ②'s projection, the state every first-party form is in until card ④) and the form item card ② added. Each step below is run on the old-shape form at least once:
    • an administrator sees Public forms in Setup and an ordinary member does not;
    • both public forms listed with title, object and address;
    • switch one off: its address shows not-found without signing in and takes no submission; on again: restored; it stays listed while off;
    • in Studio, edit a shipped form (make a field required, remove one, change the title), publish: the change shows anonymously and the required field is enforced;
    • create a public form with four fields at a new address, publish: it takes a submission and the record appears;
    • a taken address is refused with a clear message, in the designer and at Setup's switch-on; removing an object-required field is refused with its reason.
  • Switch a form off in Setup, then edit and publish it in Studio: its address still answers not-found without signing in and takes no submission, and Setup still shows it off (one test and one browser check; ablate: build the designer's save from the base's body).
  • An action of type form opens its form after the re-point (one live check and one test).
  • No console surface reads a form's definition from view: the form page, Setup's page and data module, and the editor read form. The PR lists the remaining hits of git grep -nE "formViews|viewKind: 'form'|viewKind === 'form'" -- ui ':!**/CHANGELOG.md' with the reason each stays. ⛔ Keep the branch in ui/packages/app-shell/src/providers/MetadataProvider.tsx that keeps viewKind: 'form' items out of the list switcher, and the view editor's form arm under ui/packages/app-shell/src/views/metadata-admin/: GET /api/v1/meta/view lists those items until major 19 (ADR-0159 D5), and the major-19 card removes both.
  • The removed page, navigation entry and tests are listed in the PR body; screenshots of Setup's list, the Studio list and the editor are attached.
  • The PR body says Fixes for 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444 only if the seat confirms it at claim.

Not in this card

  • No spec schema or server behaviour change. A gap found there goes back to card ② as a report. In scope outside ui/: item 5's entry, translations, source hashes and three pins under packages/platform-objects and packages/cli/test, with a patch changeset on each released package the diff moves.
  • No tombstone (card ⑤).

Dedupe words: public forms setup re-point, form editor Studio, PublicFormsPage retire, FormPage meta form.

Activity

  1. added
    priority:p1
    pm:blocked
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-24T19:31Z

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbWoxCrkYwcqxxENvmn

    The paused designer for this card is on branch claude/project-thread-d8t1hm (head 1f9f234303), from draft PR #36784, now closed unmerged. Take from it:

    • ui/packages/app-shell/src/views/studio-design/publicForm/publicFormDesign.ts and PublicFormsDesigner.tsx, with publicFormDesign.test.ts (25 cases) and PublicFormsDesigner.test.tsx (14 cases). Both contract-review rounds' fixes live in these files:
      • a new form's name is refused when any other view item has it;
      • writing back keeps every key and every text the person did not edit, including an unnamed section and translation maps;
      • save and publish carry the on/off switch as stored at that time;
      • publish writes back the stored draft and refuses when it cannot be read.
    • The engine.studio.publicForms.* keys in ui/packages/i18n/src/namespaces/studio/{en,zh}.ts.
    • Two fixes not yet on main:
      • Setup's Unknown row offers no switch (PublicFormsSetupPage.tsx and its test);
      • the anonymousFormIntakeWithdrawnIn docblock in packages/spec/src/ui/anonymous-form-intake.ts.

    Leave behind:


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:builddomain:uipm:blockedpriority:p1

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions