Skip to content

主从子表默认只是页签,不再自动放进概览和表单;只有字段分组指定时才放进去 #35889

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #35590(专题:记录详情页重做,维护者直派)。⛔ 不是认领。

维护者 2026-11-20 原话:

  • 「主从子表我认为不应该自动申明放在概览中,除非我通过 fieldGroup 强制指定。」
  • 「我的意思是大部分场景不需要,但是我们已经开发好的功能也没必要作废。还是应该可以通过 fieldGroup 来定义子表。」
  • 2026-11-21:「记录页图 41 的方向定了,立卡」

现状(代码位置核对于主干 8c18a362a2)

要做的

  1. 默认不放:主从子表默认只是一个页签,和普通子表一样。不再因为是主从关系就自动进概览,也不再自动嵌进新建和编辑表单。
  2. 分组指定才放:对象的某个字段分组指向一张子表时,它出现在那个分组的位置;记录页的字段区、新建表单、编辑表单三处一致。
  3. 已有的功能都保留:放进去之后,主记录字段和子表的行一起编辑、一次保存(记录页编辑:主记录的字段和主从子表的行一起进入编辑状态,一次保存、同一个事务 #35599),审批时一起锁,都不变。只是从「自动」变成「指定了才有」。
  4. 被分组放进字段区的子表,在页签里照常也有一项(带条数)。维护者 2026-11-20:「是不是还是应该不从选项卡中隐藏,始终显示」。

没有定的两条(本卡不动,保持现状,等维护者定)

  • 关系字段上的 relatedList: 'primary':它现在的意思是「这张子表放进概览正文」,不需要分组。按维护者的话严格理解,只有分组能决定进不进概览。协调席的建议是让它不再单独起作用,但维护者没有表态。本卡不改它的行为:只把「主从关系自动算」这一条去掉,显式写了 primary 的继续照旧。
  • 新建一条有主从子表的记录,保存后去哪:协调席建议直接落到第一张主从子表的页签上,维护者没有表态。本卡不做。

完整性

不再靠「表单里必须有明细表」来保证单据完整。维护者的方向是「往下走时才拦」(例如状态离开草稿、提交审批时要求至少有一行明细),由对象自己的校验规则表达。平台要不要提供一个简单的声明来生成这条校验,另行讨论,不在本卡。

取代和影响

不做的

验收

  • 一个有主从子表、没有任何分组指向它的对象:记录页的字段区里没有这张表;页签里有它,带条数;新建和编辑表单里没有嵌它。
  • 同一个对象,加一个指向这张子表的分组并排在第二位:记录页字段区的第二个分组位置出现这张表;新建、编辑表单同一位置出现;页签里仍有它。
  • 上一条的对象上点编辑:主记录字段和子表的行一起进入编辑,一次保存;保存失败时两边都不落库。
  • 关系字段上显式写了 relatedList: 'primary' 的子表:行为和改之前一样。
  • 升级说明里写明这条默认行为的变化,以及怎样用分组恢复原来的样子。

Reader: domain:ui 车道,涉及 packages/spec(related-list-body-table.ts);表单一侧在 ui/packages/plugin-form。这是规范里一条判断的语义变化,请按规范变更的流程走(迁移登记、升级说明)。

Dedupe: 主从子表 默认 概览 分组(objectstack,open)→ 0。相关的已关闭卡:#35597、#35742、#35850(not planned)、#35852(not planned)。

Activity

  1. added
    enhancement
    priority:p2
    domain:ui
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    On hold · 2026-11-20T17:19Z · The maintainer asked to wait on this direction, verbatim (2026-11-20 17:18:55Z, seat repo:objectstack#1 project chat): 「主从子表放进概览,跟主记录一起保存,这个等等」. Not dispatched; no branch, no PR. It resumes only on the maintainer's next word. The sibling cards #35891 and #35849 go ahead (maintainer 17:16:59Z: 「把阶段条和关键字段条去掉,是的」).

  3. added
    pm:on-hold
    on Nov 20, 2026
  4. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Hold lifted · 2026-11-20T17:24Z · The maintainer released this card at 2026-11-20 17:21:45Z, superseding the 17:18:55Z hold (7045944031): epic #35590's title and body were updated to the current rule, and 「以 #35889 为准」. A card thread is being opened; the seat posts the claim once the thread reads the premise.

  5. added
    pm:queue
    and removed
    pm:on-hold
    on Nov 20, 2026
  6. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-20T17:26Z
    Area: b1-R2
    Session: session_01L6bhgTZaMP6gPV6DVStBSU (the card thread)
    Account: os-sales
    Branch: claude/project-thread-4gy3q0 (this card thread can push only this branch, a measured platform exception to the issue-numbered branch name)
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: packages/spec/src/data/related-list-body-table.ts (split into "drawn as a body table by default" = relatedList: 'primary' only, and "a field group may name it" = primary or a master_detail with no relatedList; the refusal sentence unchanged), the field.zod.ts / object.zod.ts descriptions, one new semantic migration entry, docs/adr/0035 (an Amended line withdrawing #35597's default); UI: app-shell deriveRelatedLists (isPrimary reads the parent's fieldGroups), ObjectGroupInspector / ObjectFieldInspector / RelatedListsEditor, MetadataProvider attachInlineSubforms (a group-named child also enters the create/edit form), plugin-form MasterDetailForm (the detail table at its group's place), plugin-detail buildDefaultPageSchema (the body-table consumption only; not #35891's header part).
    Container & model: L, mode:thread, model: opus — dispatch-gates --tier mandates claude-fable-5-2 (CONTRACT_REVIEW_TIER) for docs/adr/**; measured quota exemption (the mandated tier EXHAUSTED ⇒ TIER_DEFAULT): the account's Fable quota returned HTTP 429 on 2026-11-20 (b1-D 08:5xZ; #35582's isolated review 16:3xZ), so the build runs at opus. The contract review is ⛔ not downgraded: its CONTRACT_REVIEW_TIER L2 waits for the quota, effort: high
    Clause-②: no (narrowing: what is drawn by default narrows, the accept set does not; owes the contract-tier L2)
    Metadata-protocol: semantic
    Premise: re-read on main f44758b2 by the thread: holds.
    Basis: epic #35590 child; the maintainer took the epic into this seat on 2026-11-20 17:14Z, held this card at 17:18:55Z 「主从子表放进概览,跟主记录一起保存,这个等等」 and released it at 17:21:45Z: 「以 #35889 为准」 (epic title and body updated; hold lifted 7046058243).
    Governance: docs/adr/** is governed ⇒ Tier H, os-zhuang approves after the L2.
    Resume-from: none
    Fold-or-serial: serial, alone. Parallel neighbour #35891 + #35849 (claim 7046018142) edits the same builder's header part.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 20, 2026
  8. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Ruling record · 2026-11-20T17:35Z · The maintainer answered the seat's decision card on 2026-11-20 at 17:35:23Z, and said it in words at 17:34:55Z.

    Question, verbatim: 「主从子表默认改页签后,作者写了「表单里编辑」的明细表怎么办?」
    Options: 「记录页退到页签,表单照旧」 (record page: a tab; the create/edit form keeps the embedded detail table because of inlineEdit) · 「一律只看分组」 (no field group naming it ⇒ the create/edit form no longer carries the detail table either; the three objects need group config to get it back) · 「带它的仍默认进概览」 (inlineEdit master-detail stays in the overview by default).
    Answer, verbatim: 「一律只看分组」; in words: 「明细表应该改成指看分组的定义了。」

    So for #35889: inlineEdit on a relationship no longer places a detail table by itself. A master-detail child goes into the record page's field area and the create/edit forms only when a field group names it (fieldGroups[].relatedList); otherwise it is a tab. The repo examples that relied on inlineEdit (the expense lines and invoice lines examples) and HotCRM's project budget lines get field-group entries naming their detail tables, so their forms keep the tables. The PR lists each such object.

  9. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:dispatched (as set); rationale: area:ux · Feature · master-detail children are tabs by default and enter the overview or form only when a field group names them; child of topic #35590, maintainer: 「除非我通过 fieldGroup 强制指定」 → p2 as set by the coordinator · size M.

  10. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim amendment to comment 7046107172 · 2026-11-20T19:03Z
    Clause-②: yes (widening: @objectstack/spec data exports isGroupPlaceableRelationship, fieldGroupsPlaceRelationship and BodyTableContext, and isBodyTableRelationship takes an optional second argument; published schema face, so the contract review is at CONTRACT_REVIEW_TIER). Replaces the claim's no (narrowing), as read from slice S1's PR (#35921).
    Metadata-protocol: semantic (migration entry semantic/18: a master-detail table joins the record's edit only when a field group places it).
    Split: slice S1 is Part of #35889; S2 (form slots) follows in a new session with Fixes #35889. Every other line stands.

  11. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: card thread · 2026-11-21T05:19Z · S2, Fixes #35889. Supersedes the S1 claim 7046107172, whose PR #35921 merged (Part of #35889).
    Area: b1-R2
    Session: session_01L6bhgXUMw7b8gUmNsyoXHR (the S2 card thread, building itself under the dev-thread rule)
    Account: os-sales
    Branch: claude/project-thread-3lahxp
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: ui/packages/plugin-form (MasterDetailForm.tsx, ObjectForm.tsx, TabbedForm.tsx, fieldGroups.ts, new tests); ui/packages/components/src/renderers/form/form.tsx (a form-slot row, no new export). S1's interim texts rewritten: packages/spec/src/data/object.zod.ts, field.zod.ts, related-list-body-table.ts header comment and its pin, the generated content/docs/references/data/object.mdx, the acceptance sentence of migration entry semantic/18, S1's changeset line plus a new changeset, and an add-only note in docs/adr/0035.
    Container & model: M/L, mode:thread, model: opus, effort: high
    Clause-②: no (spec edits are describe and jsdoc text only; no schema change, no new export; the slot list is a package-internal type)
    Metadata-protocol: none (the semantic change was registered by S1's migration entry)
    Premise: re-read on main f3c9d426 by the card thread: holds.
    Basis: card #35889, epic #35590 child taken into this seat 2026-11-20 17:14Z; S2 of the split the seat agreed on 2026-11-20.
    Scope: a group-placed master-detail table is drawn at its group in the form. Simple form: a slot row at the group, ordered as the record page's bodyTablePlacement (after the groups declared before it, before later groups and ungrouped fields). Tabbed form: its own tab at the group, with the group's label. The master-detail wizard already draws as a simple form, so it gets the placement with it; no new step. Tables with no group placement stay below as today; the totals row stays at the foot. The ADR change is an added note only, so S1's sentences are untouched; the seat runs the docs/adr/** contract L2 at CONTRACT_REVIEW_TIER.
    Resume-from: none
    Fold-or-serial: serial; no fold. #35984 (b1-DB) also edits MasterDetailForm.tsx; whichever lands second merges the other. #35923, #35977 and #35983 do not touch plugin-form. Overlap probe runs after the first commit and before each push. The branch is the card thread's harness push branch, a measured platform exception to claude/issue-<n>-<slug>.

  12. added a commit that references this issue on Nov 21, 2026
    6b51822
  13. added a commit that references this issue on Nov 21, 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:uxdomain:uienhancementpm:dispatchedpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions