Skip to content

[Decision] Form view subforms has no reader since #36425: retire it (ADR-0035 layer removed), or build child-row tables into the named and public form page #38140

Backlog

Description

@objectstack-fleet

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Filing gate: ② a decision only the maintainer can make (retiring it amends Accepted ADR-0035). Split off #36544 by the seat's claim 7233564954. Source: fleet.

维护者速读

  • 问题:表单定义里可以写一个「在表单下方带子表明细」的配置,校验也通过,可自从新建和编辑改为按对象字段分组排版之后,没有任何页面再看它:具名表单和对外公开表单都不画子表,写了等于没写。目前示例应用和 HotCRM 都没人写它。
  • 选项:A 把这个配置退役,写了直接报错并告诉作者改用对象字段分组里的子表,约两个 PR(一个改规范,一个改设计文档);B 给具名表单页和公开表单页补上子表录入和一并提交,约三到四个 PR。
  • 推荐 A:记录的主从录入已经在对象字段分组上做齐,每个新建和编辑入口都会画;再在表单上留第二种写法,只会让人和 AI 写了以为生效。
  • 不定会怎样:作者或 AI 继续写这个配置,页面上没有子表,也没有任何提示。

Background

FormViewSchema.subforms (packages/spec/src/ui/view.zod.ts, the subforms: z.array(strictObject(...)) member) declares inline master-detail child collections on a form view. The liveness ledger still marks it live (packages/spec/liveness/view.json → form.subforms, verifiedAt 2026-08-10; liveness/form.json → subforms, inherited). The cited readers were the record create/edit dialog and ObjectForm/ModalForm/DrawerForm taking the key from the form view.

#36425 (PR #36543, merged 2026-11-22) stopped the console's record create and edit surfaces from loading any form view. They now take child collections from the object alone: ui/packages/app-shell/src/utils/recordFormNavigation.ts#recordFormSubforms reads objectDef.groupSubforms, which is derived from fieldGroups[].relatedList (ADR-0035 as amended 2026-10-28). That leaves two surfaces where a form view still decides its own form (ADR-0050, note of 2026-11-24): a named form a type: 'form' action opens, and a public form (sharing.enabled: true). Both render through ui/apps/console/src/components/FormPage.tsx, which reads 14 form-view keys and not subforms.

The object-form block's own subforms prop (ObjectForm.tsx → MasterDetailForm) is a block prop. Neither option touches it.

Folded onto #36544 by comment 7193096338 (from the #36798 dev report); split off here by the seat's ruling when #36544 was claimed (claim 7233564954), because retiring it amends an Accepted ADR.

Governing text

Protocol statement

Is the protocol changed? A: yes, narrowed (Metadata-protocol: narrowed, Clause-②: yes (narrowing)). The key becomes a retiredKey() tombstone in major 19, with a conversion that strips it. B: no change to the accept set. A declared key gains a reader (Metadata-protocol: none); the public form submit route widens to a batch write.

Premises (each with a re-check)

  1. No form-view reader on the named/public form page. grep -nE "\bsubforms\b" ui/apps/console/src/components/FormPage.tsx: 0 hits at 0e36120.
  2. No server reader. grep -rnE "\bsubforms\b" packages/rest/src packages/runtime/src packages/objectql/src | grep -v test: 0 hits.
  3. Record surfaces take child tables from the object, not a form view. grep -n "groupSubforms" ui/packages/app-shell/src/utils/recordFormNavigation.ts hits recordFormSubforms.
  4. Zero authoring, with a control. grep -rnE "\bsubforms\s*:" examples packages/apps --include=*.ts | grep -v "\.test\." gives 0; the control key submitBehavior (read by FormPage) gives 6 with the same command. hotcrm src/**: 0.
  5. The public submit route writes one record. packages/rest/src/form-routes.ts builds allowedFields from the form's sections and inserts one row (read at 0e36120; re-read before B).

Question

subforms on a form view is declared, documented in two Accepted ADRs, and read by nothing. Remove it (and amend ADR-0035's layer table), or give it a reader on the one surface that still renders form views?

Options

Option What is done What the customer sees Effort
A: retire retiredKey() tombstone in major 19, a conversion that strips it, D3 semantic entry, ledger rows to dead, pins. ADR-0035 §2 table drops the form-view row; ADR-0050 §3/§4 wording repointed to field-group relatedList Writing subforms on a form view is refused with a fix: put the child table on the object's field group (relatedList). Every New/Edit already draws it there. spec lane · 2 PRs (spec retirement + docs/adr amendment, Tier H) · precedent PR #29287 (FormView drawerSide/drawerWidth retirement, +709/−65, 21 files)
B: build the reader FormPage renders MasterDetailForm child grids for a named form; the public submit route accepts child rows and writes parent + children in one transaction (ADR-0034 batch) under the anonymous-intake rules A named or public form can carry an editable child table (an order form with line items) ui + server lanes · 3–4 PRs (renderer, public submit batch, security review of anonymous multi-object writes, docs) · nearest precedent PR #36009 (entry form draws a group-placed master-detail table, +801/−26, 18 files); no precedent for an anonymous batch write

Business meaning

  • A: a master-detail entry belongs to the record. As with a record page layout, you design it once on the object, and every place that creates or edits that record shows it.
  • B: a standalone form becomes a small app of its own, like a web order form with line items. It is a new product capability for public intake, not a fix.

Four-axis analysis

End state (axis ① first): in two years, master-detail entry should be modelled once, on the record's own layout, and every create/edit surface should render it. That is how mainstream platforms model it. Salesforce puts related lists on the page layout and Web-to-Lead takes no child rows. Dynamics 365 puts subgrids on the entity's main form. ServiceNow binds related lists to the table's form layout. Public intake forms (Airtable forms, Salesforce Web-to-Case) take a single record. A second, form-local master-detail spelling is a special case. Today it is only declared, and for public forms it would open anonymous multi-object writes.

  • Long-term soundness (①): A shrinks the contract to one master-detail mechanism (field-group relatedList). B keeps two spellings and adds an anonymous batch-write path that needs its own guard rules.
  • Real business pull (②): zero. No example app and no hotcrm source writes subforms. Nobody has asked for line items on a public form. With zero pull the default is remove.
  • Preventing AI mistakes (③): today an AI that writes subforms on a form view gets a green build and no table on the page, a silent no-op. A turns that into a loud refusal that names the working spelling. B also removes the no-op, but leaves two places to declare the same thing, and an AI will pick the wrong one.
  • Startup focus (④): A removes a declared key, ending an open-ended obligation to maintain it. B expands scope into public-form multi-record intake with no customer asking.
os-decision-facets
① Long-term soundness: A narrows the contract to one master-detail mechanism (field-group relatedList); B keeps a second form-local spelling and adds an anonymous batch-write path.
② Real business pull: none measured — 0 authored instances in examples/apps and hotcrm (control submitBehavior: 6); no request for line items on public forms.
③ Preventing AI mistakes: today a silent no-op; A makes it a loud parse/tsc refusal naming fieldGroups relatedList; B leaves two places to declare the same table.
④ Startup focus: A removes a declared key (no standing obligation); B expands public-form intake scope with zero pull.
Prior rulings read: modalsize,subforms,form-view → 4 hits; ADR-0035 Decision §2, ADR-0035 Decision §6, ADR-0050 Decision §3, ADR-0050 Decision §4; thread: none

Self-check: choosing on ① alone gives A. Do ②③④ flip it? No: all three point the same way.

Recommendation

A (retire). The record-level mechanism already exists and every New/Edit entry draws it. No author writes the form-view key. Keeping it means a capability is declared and never delivered. B is not taken because it builds a new public-intake capability with no pull and opens an anonymous multi-object write path that would need its own security review.

Confidence gaps: I have not measured whether any deployed tenant's stored sys_metadata form rows carry subforms; the conversion strips them either way. If a customer is found who needs line items on a public form, that is a new Feature card under B's shape, not a reason to keep the inert key now.

Execution after the ruling

Related

#36544 (form view modalSize, same audit, retired on its own PR) · #36425 / PR #36543 (record forms stop loading form views) · #36798 dev report 7192270649 (finding) · PR #29287 (drawer keys retirement precedent) · PR #36009 (group-placed master-detail on the entry form) · ADR-0034 (atomic multi-write).

Activity

  1. added
    priority:p2
    needs-user-decision
    domain:spec
    on Nov 28, 2026
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:specneeds-user-decisionpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions