Repository navigation
fix(ui): the entry form draws a group-placed master-detail table at its field group - #36009
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
…try form Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
…edList text Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
…l table A slot row carries its field group's label, once per group, and the form renderer reports a labelled slot to the section navigation between the headings around it. Adds an edit-mode pin for the placed collection. Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 174 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 8d69c6f66ff15fa2f612c6c424462db8f0a01c0b && git checkout 8d69c6f66ff15fa2f612c6c424462db8f0a01c0b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 141a826f4c124187c2a3af253dc5a95f9d3818d7 97afed5aab44ab898b1c29ea8429ad056fcdb981 && git checkout -B drift-repro 141a826f4c124187c2a3af253dc5a95f9d3818d7 && git merge --no-ff 97afed5aab44ab898b1c29ea8429ad056fcdb981
node scripts/docs-audit/affected-docs.mjs --json 141a826f4c124187c2a3af253dc5a95f9d3818d7
|
… header form The slot sits inside the header's <form>, so the portaled collection is wrapped in a form of its own (noValidate, a disabled default button, submit prevented): the header's requestSubmit validates only its own fields, a line button without a type no longer submits the header, and Enter in a line cell submits nothing. The renderer's reveal of an errored field skips what a host drew into its slot rows. Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
…ection Claude-Session: https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读
席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T07:08Z. The brief handed to the isolated reviewer at Seat addition: |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T07:09Z. Replaces the seat's previous brief comment on this PR, which went out without its brief text. The brief handed to the isolated reviewer at Contract review brief — PR #36009 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: PR #36009 (slice S2 of card #35889, ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. Spec hits against the implementing code, sentence by sentence.
Attempts to break the design, and what held.
Nits (no effect on correctness of the contract as written; none needs a fix on this head).
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Tier H approval request · 2026-11-21T07:16Z · @os-zhuang, PR #36009 (#35889 S2, What it does: a master-detail child that a parent field group places now sits in that group's place in the create and edit forms. The three form layouts each handle it: simple (between the sections of the groups around it), tabbed (a tab of its own labelled with the group) and wizard. With no section naming a field group, it stays below the fields, as before.
After your approval, the seat readies this PR and lands it. |
…-3lahxp # Conflicts: # ui/packages/plugin-form/src/MasterDetailForm.tsx
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读
席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Delta round on PR #36009 (card #35889). The previous record covers head ① Derived judgments
② Semver levelUnchanged from the record on ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Carried from the previous record, unchanged and still nits only: N1 (a leading section naming no group pulls the table to the top, as on the record page), N2 (row editor form nested in the slot's wrapper form, unpinned), N3 (a line error does not mark the lines tab), N4 (one remount on first claim). Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat note · 2026-11-21T08:40Z · @os-zhuang, both reviews now stand on the head you enqueued, |
…save refused on placed lines marks their tab (objectstack-ai#36088) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVwX4pUdM1qvNLSqRZNSvv3)_ Fixes objectstack-ai#36019 Clause-②: no Metadata-protocol: none Skills-docs: none — no authorable key and no behaviour a skill teaches moves repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv ## 维护者速读 - 用户能看到什么变化:在“表头加明细”的录入表单里,明细表放在某个字段分组处时,展开一行明细编辑不再在开发控制台报“表单嵌套表单”的警告;分页签的表单里,保存被服务器以某一行明细为由拒绝时,明细所在的页签会像表头字段出错时一样标红点。 - 为什么做:这是“明细表放在字段分组处”那项工作(主从表单布局)评审时留下的两条收尾意见,补上明细出错时用户找不到原因的缺口。 - 出错会怎样:最坏情况是明细页签该标红没标、或多标了一个页签,保存本身照旧被拒、数据不会写错;整个改动可直接撤回。 - 要你做什么:无 ## What changes 1. **Row editor in a placed slot (N2 of the L2 record on objectstack-ai#36009).** `FormSlotPlacement` takes `ownsForm`: when its children already are a form of their own, it portals them into the slot with no wrapper form. The expanded row editor (an `ObjectForm`, its only other control a `type="button"`) is placed with `ownsForm`, so its form is no longer a React child of the slot's wrapper form, and React's DOM-nesting check stops logging "form cannot be a descendant of form". This is the measured S2 patch, re-applied on main (`git apply --check` clean, offsets +24/+78). 2. **Tab marker for a refused line (N3 of the L2 record, L1-c's nit).** A batch refusal is attributed to the placed collections it was refused on, using the same evidence the record page's `attributeRecordEditRefusal` reads: the operation the server names in `details.failedOperation.index` when it names one (a line's operation, never operation 0, the parent), else each field in `fields[]` that only line operations write. A field the parent operation carries stays the header form's to mark. `FormSlotStore` records those collection ids (`refuse(ids)`, cleared when the next save gets past validation, as the renderer clears its own markers). `TabbedForm` subscribes to the store and rebuilds its slot rows, each carrying `slotRefused` when its collection was refused. The form renderer's `erroredFieldTabs` marks the tab of a refused slot row with the treatment a refused header field gets (`data-error`, destructive text, the dot). No export, prop or i18n key is added. `FormSlotHost` and `FormSlotRow` live in `formSlots.ts`, which `@object-ui/plugin-form` does not export. The renderer reads `slotRefused` off a `form-slot` row the same way it reads `slotRef`: a key only a host can produce. ## Tests - `MasterDetailForm.groupPlacement-35889.test.tsx`, existing describe: an expanded row editor opens in the slot beside its collection, its inputs are owned by its own form, and no nesting warning is logged. - Same file, new top-level describe (a refused save marks the tab of the placed lines it was refused on): a field only a line writes marks the lines tab and not the header tab; a server-named failed line operation marks the lines tab; control: a refusal on the header's own field marks its tab and leaves the lines tab unmarked. - `formSlots.test.ts`: `refuse` marks the slot row until retired, de-duplicates, and an equal refusal emits nothing. All readings at head `9ac514e3`. <details><summary>Suites and type-check</summary> - `pnpm exec vitest run --maxWorkers=2 packages/plugin-form/ packages/components/src/renderers/form/` (from `ui/`, under the verify lock): `Test Files 332 passed (332)`, `Tests 3359 passed | 18 skipped (3377)`, `VERDICT command-exit 0`. - `pnpm --filter @object-ui/plugin-form --filter @object-ui/components run type-check` (both run `tsc --noEmit && tsc -p tsconfig.test.json`): `VERDICT command-exit 0`. - `eslint` over the six changed source and test files: 0 errors (106 warnings, all on lines this diff does not touch). </details> <details><summary>Ablations (one per fix, through `scripts/ablation-replace.mjs`, restore proven)</summary> - Fix 1: `ownsForm` removed from the row editor's placement (anchor 1 to 0, blob `632b58a14b7d` to `f73ce79e3a8b`). The nesting pin goes red with React's own message, "In HTML, a FORM cannot be a descendant of a FORM" (its DOM-nesting check); `Tests 1 failed | 10 passed (11)`. Restored: blob equals HEAD (`632b58a14b7d`), `git diff HEAD` empty. This mutation is the code on `main`, so the pin fails on `main` and passes with the fix. - Fix 2: the `slotStore.refuse(...)` call in `sendBatch`'s catch deleted (anchor 1 to 0, blob to `2e2969a6db0b`). Both tab pins go red, and the control (a header-field refusal) stays green; `Tests 2 failed | 9 passed (11)`. Restored: blob equals HEAD, `git diff HEAD` empty. </details> <details><summary>Derived gate families</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`: 38 commands. Every one exited 0. `--ran` reconciliation: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)". The type-check lanes, artifact rosters and wide-population families are CI's. </details> <details><summary>Overlap</summary> `node scripts/pm/overlap-check.mjs --branch=HEAD --pr=36039,36054`: origin/main, objectstack-ai#36039 and objectstack-ai#36054 each merge cleanly, `VERDICT clean exit 0`. </details> ## Acceptance notes - The marker is the whole of the header-field treatment that applies here. A refused header field also activates its tab and focuses the field; a refused line does not switch tabs, because the renderer's catch runs before the host's refusal reaches the tab rows, and the lines show no per-row reason today (the master-detail form shows the refusal as the form's banner, as before). The acceptance names the marker only. - A refusal that names neither a failed operation nor a field (a lock, a permission denial) is on no collection, and marks nothing, as before. - File surface beyond the claim's wording: the tab marker is drawn by the form renderer (`ui/packages/components/src/renderers/form/form.tsx`), not by `TabbedForm`, and the refusal travels through `formSlots.ts`. Both are named here. - The editor's form still sits inside the header's form in the DOM (the slot element is inside it), as the lines' wrapper form already did; ownership is answered by the innermost form, which the pin asserts. ## Verification Two-minute check: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-form/src/MasterDetailForm.groupPlacement-35889.test.tsx`: expect 11 tests passed. Read first: (1) `MasterDetailForm.tsx` `refusedChildObjects` and its call in `sendBatch` (which refusals count as a line's); (2) `form.tsx` `erroredFieldTabs` (the renderer's new read); (3) `TabbedForm.tsx` the `useSyncExternalStore` on the slot host. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv --------- Co-authored-by: Claude <noreply@anthropic.com>
… tabs by object name and per-entry title and columns (objectstack-ai#35923) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu8asiBATVNp4pogcic92dHU)_ repo:objectstack#1 · os-sales · session_01L6bhgTgsPwrw3VbvRRcqth Fixes objectstack-ai#35897 Fixes objectstack-ai#35899 Clause-②: yes (widening) Metadata-protocol: semantic Skills-docs: follow-up objectstack-ai#35902 (skills/objectstack-data/rules/relationships.md, skills/objectstack-ui/rules/record-page.md) ## 维护者速读 - 对象声明了 `relatedLists`,详情页的标签页就只显示列出的相关列表,按列出的顺序;没列的不再显示。没声明(或为空)时完全不变。 - 三个内置标签用对象名放置:`sys_attachment`(附件)、`sys_approval_request`(审批)、`sys_activity`(活动流);附件不列就不显示,审批和活动流不列时仍排在末尾。 - 每一项可写 `{ list, label, columns }` 给该列表自己的标题和列;列名不是子对象字段会被 `os validate`、`os build` 和元数据写入口拒绝。 - 字段分组放进概览的主从明细表(objectstack-ai#35889):没声明 `relatedLists` 时既在概览里、也保留页签;声明了但没列它,就只在概览里,不出页签(席位裁定 7048340194)。 - Studio 对象设置里可以排页签、加内置标签、给每一项改标题和列;保存时保留对象写法和内置名。对象没开文件时,附件不出现在可选项里,已列的附件会提示不会显示。 - 元数据管理里的通用对象表单也能正确显示和编辑这张页签表了(之前遇到带标题和列的一项会出错);条目的列可以写 `account.industry` 这种跨关系的写法,和外键上的写法一致。 - 其他包加进来的子表也一样:父对象声明了 `relatedLists` 却没列它,就不显示页签;让扩展包自己放置列表的做法在 objectstack-ai#35901。 - 风险:已经声明了部分 `relatedLists` 的应用,没列的标签会消失(仓库内无此类对象;已部署的元数据未测量)。 ## What changes An object's declared `relatedLists` becomes its record page's tab list (epic objectstack-ai#35896): ```ts relatedLists: [ { list: 'quote_line', label: 'Line items', columns: ['product', 'quantity', 'unit_price', 'amount'] }, 'task', 'sys_attachment', 'sys_approval_request', 'sys_activity', ], ``` - **spec** (`packages/spec/src/data/object.zod.ts`, new `related-list-entry.ts`): an entry is the bare name or `{ list, label?, columns? }` (strict, with aliases and guidance). The three built-in tabs are named by object: `sys_attachment`, `sys_approval_request`, `sys_activity`. A built-in is written only as its bare name; the object form naming one is refused at parse (a regex, so the published JSON schema keeps the refinement). `defineStack`'s name check skips built-ins. The shared helpers `RECORD_PAGE_BUILTIN_TABS`, `isRecordPageBuiltinTab`, `relatedListEntryName` and `RELATED_LIST_BUILTIN_PART_OF` are the one reading of an entry's name for every reader. - **lint** (`validate-related-list-refs`): new `related-list-column-unknown` (error: a column that is no field of the child, registry-injected columns included), `related-list-attachments-off` (warning: `sys_attachment` on an object without `enable.files`) and `related-list-stream-part` (warning: `sys_comment` / `sys_audit_log` are parts of the stream; prescribes `sys_activity`). The same rule runs at `os validate`, `os build` and the metadata write door. - **record page** (objectui): - `deriveRelatedLists`: on a declared non-empty `relatedLists`, an unlisted side list shows no tab. Body tables a field group places are kept, and `relatedList: false` on the FK still hides a list. An entry's `label` / `columns` win over the FK's `relatedListTitle` / `relatedListColumns`. - `buildDefaultPageSchema` (`arrangeDeclaredTabs`): tabs follow the declared order. An unlisted attachments tab is dropped. Unlisted approvals follow the listed tabs. An unlisted stream closes the strip. The overview stays first. - `recordPageColumns`: the related column keeps that one order. - With objectstack-ai#35921 merged: a `master_detail` table that a field group places in the overview keeps its tab only while `relatedLists` is undeclared or lists it. A declared `relatedLists` that leaves it out shows it in the overview with no tab (seat ruling 7048340194 on objectstack-ai#35897). objectstack-ai#35921's ADR-0035 note and `semantic/18` acceptance text are qualified to say so. objectstack-ai#35921's changeset stays as main has it; this PR's own changeset narrows it in one sentence (0215faf). - **Studio** (`RelatedListsEditor`, `relatedListVocabulary.acceptTabListEntries`): the object settings panel edits `relatedLists` as the tab list. Object entries and built-in names survive every move, removal and add. The add picker offers the built-ins by name (attachments only when `enable.files` is on), then the unlisted relationships. A relationship row edits its own title and columns; clearing both writes the bare name again. A listed attachments tab on an object without files shows a notice. The preview draws the tabs in order, built-ins included. New strings in `@object-ui/i18n` (en, zh). - **FLS mask** (`object-schema-fls-references.ts`): `relatedLists` entries stay unmasked like `lookupColumns`: the columns are the child's fields, the label is author text, and the built-ins are object names. A pin test covers an entry whose column shares a denied field's name. - **migration**: ADR-0087 semantic entry `related-lists-declared-is-tab-list`. No D2 conversion, because which unlisted lists an author still wants is recorded nowhere. - **ADR notes**: - ADR-0085 gets a dated note: §2's hide/re-arrange guard yields for `relatedLists` only, per the maintainer's ruling. - ADR-0035 gets a dated amendment. - Both were drafted at the opus tier under the quota exemption. - Generated references, the API surface, liveness children (`list`, `label`, `columns`) and the strictness ledger counts are regenerated. **Tier H**: this PR touches `docs/adr/**`. ## Why The maintainer ruled that the record page's tabs are declared on the parent object in one place: removing an entry removes its tab, `relatedLists` is that list, and the three built-in tabs are named by their objects. Before this change, a declared `relatedLists` only ordered the lists: every unlisted list still followed, and the built-ins always closed the strip in a fixed order. ## Tests - spec: `stack-related-lists-order.test.ts` (object entries, built-ins, the parse refusal, `defineStack`); new `related-list-entry.test.ts`. - lint: `validate-related-list-refs.test.ts` (built-ins, both warnings, unknown and injected columns); `rule-explanations` covers the three new ids. - metadata-core: `object-schema-fls-references.test.ts` (objectstack-ai#35899 entry pin). - Studio: new `ObjectSettingsPanel.relatedListsTabList-35897.test.tsx` (5 tests); `ObjectSettingsPanel.relatedListsOrder-27054.test.tsx` expects the built-in add options. - ui: `buildDefaultPageSchema.test.ts`, new describe `declared relatedLists arranges the tabs (objectstack#35897)`; `deriveRelatedLists.relatedListsOrder-27069.test.ts`. Three tests that pinned the old "unlisted lists follow" meaning now pin the new one: two in the 27069 file, the 27241 case in `RecordDetailView.harness.test.tsx` (with a new all-listed control), and the page-order expectations in `ObjectSettingsPanel.relatedListsOrder-27054.test.tsx`. The 27069 file also pins the ruling: a group-placed `master_detail` table keeps its tab when `relatedLists` is undeclared or lists it, and loses only the tab when unlisted. ## Acceptance notes On the record page of each object that declares `relatedLists`, the tabs after the overview are the listed related lists and built-in tabs, in the listed order. Then come approvals, if unlisted and the record has requests, and the activity stream last. An object that declares no `relatedLists` shows the same tabs as before. In-repo census: no example, platform object, dogfood fixture or HotCRM object declares `relatedLists` today. ## Verification On `462477f8` (the fixes above): `@objectstack/lint` 222 files / 9,369 tests passed; `@objectstack/platform-objects` 125 files / 2,126 tests passed; `@objectstack/spec` `src/data`, `src/migrations`, `src/stack` 230 files / 7,961 tests passed; `check:generated --fix` regenerated `content/docs/references/**` and is clean; `check-i18n-bundles --write` clean; ui vitest on all of `app-shell/src/views/metadata-admin` and `ObjectSettingsPanel*`: 772 files, two failures in the first run, both resolved (the 9931 registry table, now carrying the new key, 40 passed; `AddWidgetPicker.oneRegistry-26745` passes alone, 7 passed, and the diff does not touch it). On the merged head 3434287 (main 6c7c6db merged into 473c7ff; conflicts listed below; 0215faf then touches only `.changeset/`): `@objectstack/spec` test 961 files / 29,439 tests passed and `check:generated` clean after `--fix` (it regenerated `content/docs/references/**` and the liveness counts); `@objectstack/lint` 222 files / 9,363 tests passed; `@objectstack/metadata-core` 1,048 tests passed; ui vitest (from `ui/`) on `app-shell` deriveRelatedLists, `RecordDetailView.harness`, `ObjectSettingsPanel*`, `plugin-detail` synth and all of `@object-ui/i18n`: 133 files / 2,389 tests passed. The whole app-shell + plugin-detail suites ran past the local time limit and are left to CI. Main merge conflicts and how they were resolved: `docs/adr/0035` keeps both notes (this PR's 2026-11-20 amendment, then main's 2026-11-21 second-slice form note); `semantic/18` acceptance text carries both qualifiers (the declared-`relatedLists` tab rule from this PR, the same-place/tabbed-form wording from objectstack-ai#36009); Studio `en`/`zh` keep this PR's tab-list wording and drop `highlightPreview` as objectstack-ai#36020 did; `content/docs/references/{api/metadata,data/object,system/migration}.mdx` and `liveness/state-counts/object.md` were regenerated, not hand-merged. On 473c7ff, before this merge: `@objectstack/spec` test 2355 files passed, `check:test-typecheck` and `check:generated` clean; `@objectstack/lint` 868 files passed; `@objectstack/metadata-core` 222 files passed; `@object-ui/plugin-detail` 105 files passed; `@object-ui/app-shell` 394 files passed; `@object-ui/i18n` 27 files passed. Earlier runs: - `pnpm --filter @objectstack/spec test` on the touched files; `check:generated`; `check:liveness`. - `pnpm --filter @objectstack/lint test` (validate-related-list-refs, runtime-gate, rule-explanations). - ui vitest (from `ui/`) on the touched plugin-detail / app-shell files: 7 files, 227 passed. A wide app-shell + plugin-detail run had no other failures. - Typecheck: spec, lint, plugin-detail and app-shell `type-check`. - `dispatch-gates.mjs --commands` derived list (128 commands) run locally: 126 green (two of them after building their inputs). Two are prerequisite refusals that measure nothing here, left to CI: `check-plugin-teardown-shape --self-test` (needs a full clone), `check:dual-build-cjs-loads` (needs a whole-repo build). An ADR-0122 alias finding was fixed in da074fd. ## Fable L2 fixes (record 7071342837, at `0215fafa`) - **M1** (`f5b256d4`): the object form's `relatedLists` row (`packages/spec/src/data/object.form.ts`) now names a new `related-list-entries` widget (`ui/packages/app-shell/src/views/metadata-admin/widgets.tsx`, labelling `control`). It renders a bare name and an object entry alike (the entry's title and columns beside its name), keeps every entry's stored form on add and remove, refuses a second entry for a name an object entry already places, and removes the key with the last entry. The help text states the tab-list meaning, hand-written in all ten translated locales (`platform-objects` metadata-forms bundles), and the zh label is 记录页页签 in both the bundle and `metadata-form-zh-cn.ts`. Pinned by `RelatedListEntriesWidget-35923.test.tsx` (the published row names the widget; an object entry renders; remove/add keep it); the three widget-registry tests (`widgetLabelling`, `controlWidgetGridNaming-9889`, `controlWidgetFailureArmNaming-9931`) carry the new key. - **S1** (`f5b256d4`): `validate-related-list-refs` walks a dotted entry column through `resolveFieldPath` from the child, as `validate-object-field-refs` walks `relatedListColumns`; an unjudgeable path stays unjudged. Test: `lead_id.name` passes, `lead_id.nope` and `nope_id.name` are `related-list-column-unknown`. The spec `describe` and the rule header say so. - **S2** (`f5b256d4`): the `relatedLists` `describe` and jsdoc, the ADR-0035 and ADR-0085 notes and the `related-lists-declared-is-tab-list` migration entry state that a child list another package adds is hidden too until the parent names it (accepted at build only when that package is in the parent's stack), and that an extension package placing its own list is objectstack-ai#35901. No lint hint added: the case has no stack-side signal to warn on. - `db548f41`: the four widget tests load `@objectstack/formula` and `@objectstack/lint` at module top (`check-test-source-alias`: `widgets.tsx` reaches both through dynamic imports). - Changeset (`462477f8`): adds `@objectstack/platform-objects` (patch, translations) and the three points above. - Nits, under the small-things rule: **N1** left (one shape published as a hand-written type beside the inferred one; deriving one from the other needs the import cycle broken, a follow-up). **N2** left for the approver as the accepted deviation the record names (names only, `lookupColumns` precedent). **N3** left (first entry naming a list wins; a lint advisory is a follow-up). **N4** left (no authorable parent has an inbound FK from `sys_comment`). ## Human Minimum Each item is one rule from [CONTRIBUTING.md › Human Minimum](https://github.com/objectstack-ai/objectstack/blob/main/CONTRIBUTING.md#human-minimum), which links the AGENTS.md text that states it. - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (The new `related-list-entry.ts` holds only the name constants and two pure name readers, like `related-list-body-table.ts`.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (ESLint on every changed file: 0 errors.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. (Two cards folded by the dispatch order, one `Fixes` line each.) - [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: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (Except the maintainer's 维护者速读 block.) - [x] The *Before Submitting* list in CONTRIBUTING.md is done. Tier H (`docs/adr/**`): the ADR-0085 and ADR-0035 notes need the approver's review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTgsPwrw3VbvRRcqth <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgTgsPwrw3VbvRRcqth --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgXUMw7b8gUmNsyoXHR
Fixes #35889
Slice S2 of #35889 (S1 = #35921, merged as f3c9d42). Claim 7057842463. Area b1-R2.
维护者速读
Fixes)。What changes
A master-detail collection that a field group of the parent places (
fieldGroups[].relatedList) is now drawn at that group in the parent's create and edit forms, where the record page draws it, instead of below every field of the record.ui/packages/plugin-form/src/formSlots.ts, new).MasterDetailFormhands its headerObjectForma runtime-only list of its collections (package-local hand-off type, not on theObjectFormSchemaauthoring face).placeFormSlotslays them out among the form's sections by the record page's rule (bodyTablePlacement): after the sections of the groups declared before the placing group, before those declared after it; a section that names no declared group (the ungrouped bucket) counts as after every group. A layout none of whose sections names a declared group places nothing.ObjectForm.tsx): each placed collection becomes aform-slotrow in the one field list, between the sections. The form renderer (ui/packages/components/src/renderers/form/form.tsx) draws that row as an empty full-width element; no new export.<form>, soFormSlotPlacementwraps the portaled collection in a form of its own (noValidate, a disabled hidden default button, submit prevented). The header'srequestSubmit()then validates only its own fields (a line cell's bad input never blocks Save with a browser bubble), a line button without atype(the sharedButtonsets none) never submits the header, and Enter in a line cell submits nothing: the lines behave as they did below the form, owned by no header form. The renderer's reveal of an errored field (fieldWrapper) skips what a host drew into this form's slot rows, while an editor inside a slot still finds its own fields.FormSectionNavContext, 分组表单:加分组导航,点一下滚到对应分组,并标出还有必填未填的分组 #34605) between the headings around it, with the slot element as its anchor. An unlabelled slot is no stop.TabbedForm.tsx): a placed collection is a tab of its own at its group's position, labelled with the group's (translated) label. A master-detail wizard is already drawn as the simple form (ObjectForm's master-detail route), so it places the same way.MasterDetailForminto the slot through a portal (FormSlotPlacement, aFormSlotStoreper form in a ref), so the lines stay out of the header's React tree: a header keystroke still never re-renders them and they never re-render the header. The header reports which collections its drawn layout claims (never while it is loading), so a collection no layout claims stays in its old place below the fields, and a remounting header (after a create) does not make the lines jump below and back. An expanded row's editor opens in the same slot, beside its collection. The header scrape for the lines'parent.*rules skips the slot's inputs. The document totals stay at the foot of the form.ObjectFieldGroupSchema.relatedListdescribe and jsdoc,FieldSchema.relatedListjsdoc, therelated-list-body-table.tsheader and its describe pin, the regeneratedcontent/docs/references/data/object.mdx, the acceptance line of migration entrysemantic/18.master-detail-related-list-tab-by-default, and S1's changeset line. ADR-0035: one add-only note after the third note; S1's sentences are left as written (the note says which one it supersedes).object.form.ts's group help ("The parent's create and edit forms inline the table too …") makes no position claim, so it is unchanged and its bundles are not regenerated.Why
Card #35889, acceptance line 2: 「同一个对象,加一个指向这张子表的分组并排在第二位:记录页字段区的第二个分组位置出现这张表;新建、编辑表单同一位置出现;页签里仍有它。」 S1 delivered the record page half; this delivers the form half, as agreed in the split.
Verification
Head 97afed5: main merged in after #35984 landed (three keep-both hunks in
MasterDetailForm.tsx, nothing else). The reviews below were read at 84dc199. On the merged tree,tscin plugin-form is clean and the plugin-form + form-renderer suites pass (332 files, 3354 passed / 18 skipped).submit(red without the wrapper);form-invalid-scroll.test.tsxpins that the reveal of an errored field lands on the form's own field, not a same-named field drawn into a slot (red without the filter). Real browser (owner-check.cjs): 12 slot controls, 0 owned by the header; Enter in a cell and Add line make no header submit and no write; with letters in a line's Amount cell (validity.badInput), Create reaches the app's own check ("Amount is required", bad cells marked) with no browser bubble. Suites after the fix: 331 files, 3343 passed / 18 skipped;tscclean in plugin-form and components.formSlots.test.ts(placement order, a group declared last, entry reading, nothing placed, slot store),MasterDetailForm.groupPlacement-35889.test.tsx(simple form between the groups around its group, an unplaced collection below the form, placed last, edit mode with loaded lines at the group and drawn once, save batch, tabbed form tab order with the collection in its tab), and one case inform-section-nav-34605.test.tsx(a labelled slot is a section-bar stop between the headings, an unlabelled one is not).vitest run packages/plugin-form packages/components/src/renderers/form331 files, 3335 passed / 18 skipped; after merging main,FormSectionNav(fix(plugin-form): the grouped dialog section bar is a jump bar, hidden when the sections fit #35988) +ModalForm+ the new pins 8 files / 63 passed.packages/spectests green;check:generatedclean after the object.mdx regeneration.tsc --noEmitclean in plugin-form and components; eslint on the changed files 0 errors.All temporary edits were reverted before commit.
Clause-②: no
Metadata-protocol: none
DELIBERATE CORRECTION (pending release note)
Check Changesetis red by design: this PR rewrites one line of a pending release note it did not add, because the behaviour that line describes is the behaviour this PR changes. Restoring it would republish a false sentence..changeset/35889-master-detail-tab-by-default.md(S1, feat(spec, ui): a master_detail child is a tab by default; a field group puts it in the overview and the form #35921, unreleased).inlineEdittables sit today. Moving it to its group's place in the form is a follow-up."No other line of that note changes. The seat confirms this through its same-head contract-review record (landing-operations.md).
Follow-ups (not in this PR)
bodyTablePlacement(plugin-detail) andplaceFormSlots(plugin-form) now spell the same ordering rule twice; a shared pure helper would need a new export (spec or a shared ui package), so it is left as a candidate card rather than widening this PR.sections: [{ group: 'lines' }]) still resolves to nothing (the group holds no fields); unchanged here.data-section-jumped, fix(plugin-form): the grouped dialog section bar is a jump bar, hidden when the sections fit #35988) styles heading rows only, so a jump to the table scrolls to it without the flash.MasterDetailForm.tsx(textual conflict, whichever lands second merges); feat(spec): relatedLists is the record page's tab list, with built-in tabs by object name and per-entry title and columns #35923 editsdocs/adr/0035.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgXUMw7b8gUmNsyoXHR