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
feat(spec): detail-page related-list tabs via relatedList: 'primary' (#2579) (#2594)
`Field.relatedList` becomes tri-state `boolean | 'primary'`. 'primary' marks a
core relationship the detail page promotes to its own tab (ADR-0085 prominence,
not a layout switch); non-primary children collapse into a shared "Related" tab.
`RecordRelatedListProps.columns` becomes optional — columns derive from the
child object's highlightFields when omitted. Both additive/back-compat → minor.
Dogfood acceptance: showcase_account drops its hand-authored detail page and
gets equivalent Projects/Invoices tabs purely from `relatedList: 'primary'` on
the child FKs (+ highlightFields migrated off the deleted page's highlights slot).
Renderer + derivation ship in objectui (companion PR).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* pulls a child INTO the parent's entry form (write side), `relatedList`
447
447
* controls its appearance on the parent's detail page (read side). The intent
448
448
* lives here in the data model; the detail page derives the UI.
449
+
*
450
+
* Tri-state (ADR-0085 semantic-role style — this is a PROMINENCE hint, NOT a
451
+
* layout switch):
452
+
* - `false` → suppress this child from the parent's detail page.
453
+
* - `true` / absent → shown; participates in the derived default layout
454
+
* (count-aware: few children → a tab each, many → the
455
+
* long tail collapses into a single "Related" tab).
456
+
* - `'primary'` → CORE relationship: always surfaced prominently. The
457
+
* detail renderer promotes it to its own tab regardless
458
+
* of child count. This states business intent (true
459
+
* across every surface — detail tab, mobile card, AI
460
+
* summary, search facet); "primary → own tab" is only
461
+
* the DETAIL renderer's interpretation. Being prominence
462
+
* (not a `relatedLayout` switch) is what admits it to the
463
+
* object model under ADR-0085's admission test.
449
464
*/
450
-
relatedList: z.boolean().optional().describe('Show this child collection as a related list on the parent\'s detail page (read-side mirror of inlineEdit). Defaults to shown for master_detail/lookup; set false to suppress.'),
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).'),
451
466
/** Optional section title for the detail-page related list (defaults to the child object label). */
452
467
relatedListTitle: z.string().optional().describe('Title for the detail-page related list'),
453
468
/** Optional explicit columns for the detail-page related list (derived from the child object when omitted). */
0 commit comments