You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(spec,skills,adr): correct related-list docs for relatedList 'primary' (#2579 follow-up) (#2600)
- field.zod.ts: fix the `relatedList` JSDoc + describe — non-primary lists stack
under a single shared "Related" tab; only 'primary' earns its own tab. Drops
the stale "count-aware" wording that never shipped (we chose rule Z).
- skills/objectstack-ui: the single "Related" tab is no longer the ONLY layout —
document `relatedList: 'primary'` as the zero-page way to promote a child table
to its own tab; columns auto-derive from highlightFields.
- skills/objectstack-data: add the 'primary' tri-state; note columns are optional
(derive from highlightFields), ONE related list PER FK (not one per child), and
self-referential hierarchies.
- docs/adr/0035: update the read-side-mirror section for the tri-state, optional
columns, and one-per-FK derivation.
Docs/description only; no behavior change.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Docs: correct the `Field.relatedList` JSDoc + `.describe()` to match the shipped behavior (#2579 follow-up). Non-primary related lists stack under a single shared "Related" tab and only `'primary'` earns its own tab — there is no count-based auto-split (the "count-aware" wording was a stale draft). Comment/description only; no code or behavior change.
Copy file name to clipboardExpand all lines: docs/adr/0035-config-driven-master-detail.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,15 +83,19 @@ record detail page. Both intents live on the same relationship:
83
83
| Side | Flag (on the child's FK field) | Effect |
84
84
|---|---|---|
85
85
| Write |`inlineEdit: true`| child rendered as an editable grid inside the parent's create/edit form (atomic save) |
86
-
| Read |`relatedList` (+ `relatedListTitle` / `relatedListColumns`) | child rendered as a related list on the parent's detail page |
86
+
| Read |`relatedList: boolean \| 'primary'` (+ `relatedListTitle` / `relatedListColumns`) | child rendered as a related list on the parent's detail page; `'primary'` promotes it to its own tab|
87
87
88
88
Related lists are **shown by default** for every child relationship
89
89
(`master_detail` and `lookup`) — owned (`master_detail`) children are ordered
90
-
first. The flag is opt-*out*: set `relatedList: false` to suppress a noisy
91
-
association/audit link from the detail page. `relatedListTitle` /
92
-
`relatedListColumns` override the derived title / columns. Audit FKs
93
-
(`created_by` / `updated_by` / `owner_id`) are skipped and children deduped to
94
-
one related list each (first eligible FK wins).
90
+
first. `relatedList` is tri-state (a *prominence* hint, not a layout switch —
91
+
see ADR-0085): `false` suppresses a noisy association/audit link; `true` /
92
+
omitted shows the child under a single shared **Related** tab; `'primary'`
93
+
promotes the relationship to its **own tab** on the detail page. `relatedListTitle` /
94
+
`relatedListColumns` override the derived title / columns — both optional, with
95
+
columns auto-deriving from the child object's `highlightFields` when omitted.
96
+
Audit FKs (`created_by` / `updated_by` / `owner_id`) are skipped; a child that
97
+
references the parent through several FKs yields **one related list per FK**, and
98
+
a self-referential FK surfaces a "children" list.
95
99
96
100
The derivation is a pure function — `deriveRelatedLists(objectDef, objects)` in
97
101
`@object-ui/app-shell` (`utils/deriveRelatedLists.ts`) — the read-side analogue
* (not a `relatedLayout` switch) is what admits it to the
463
463
* object model under ADR-0085's admission test.
464
464
*/
465
-
relatedList: z.union([z.boolean(),z.literal('primary')]).optional().describe('Show this child collection as a related list on the parent\'s detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown in the count-aware derived default; \'primary\' = core relationship, always promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).'),
465
+
relatedList: z.union([z.boolean(),z.literal('primary')]).optional().describe('Show this child collection as a related list on the parent\'s detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown (stacked under the shared "Related" tab); \'primary\' = core relationship, promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).'),
466
466
/** Optional section title for the detail-page related list (defaults to the child object label). */
467
467
relatedListTitle: z.string().optional().describe('Title for the detail-page related list'),
468
468
/** Optional explicit columns for the detail-page related list (derived from the child object when omitted). */
0 commit comments