Skip to content

Commit 99614da

Browse files
committed
docs(spec): related-list describes say what is refused; primary list and trackHistory describe the v3 record page
relatedLists and fieldGroups[i].relatedList now state the enforced boundary: a stack child with no inbound FK is refused everywhere; a child that exists nowhere is refused by defineStack and by a metadata write that names no package; a write into a package stores it and the record page places nothing for it. relatedList: 'primary' is a body table in the details column (inside the Details tab when tabbed, with no tab of its own), and enable.trackHistory feeds the record's one timeline stream (its Changes filter) instead of a History tab. Claude-Session: https://claude.ai/code/session_01WGufzgaGBuahtvHVCAa4ny Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6d7634a commit 99614da

5 files changed

Lines changed: 179 additions & 31 deletions

File tree

‎content/docs/ui/pages.mdx‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,21 @@ replacement.
180180
### The synthesized default
181181

182182
A record page needs no authoring. With no page assigned, the Console synthesizes one from
183-
the object: a header, the highlights strip, a tab strip and the discussion panel. The strip
184-
is **Details**, then one tab per relationship whose child field declares
185-
`relatedList: 'primary'`, then a shared **Related** tab for the other related lists, then
186-
**History**; an object with `enable: { files: true }` also gets an **Attachments** tab with a
187-
count badge. Promoting a child table to its own tab is therefore a one-word change on the
188-
relationship field, not a page-authoring task, and `relatedList: false` leaves a child off
189-
the page.
183+
the object: a header, the highlights strip and a tab strip of **Details**, **Timeline** and
184+
**Related**, plus **Approvals** when the record has approval requests. A relationship whose
185+
child field declares `relatedList: 'primary'` is part of the record's body: its list is a
186+
full-width table inside **Details**, after the first field section, with no tab of its own.
187+
The other related lists are cards in the shared **Related** tab, which an object with
188+
`enable: { files: true }` closes with its attachments. **Timeline** is one stream: the
189+
discussion composer on top, then the discussion, the activity and, with
190+
`enable: { trackHistory: true }`, the record's field changes, filtered by All / Activity /
191+
Discussion / Changes; there is no separate History tab. Moving a child table into the
192+
record's body is therefore a one-word change on the relationship field, not a
193+
page-authoring task, and `relatedList: false` leaves a child off the page.
190194

191195
The Console lays the page out by the width of the surface it occupies (the drawer, the
192196
split pane or the full page), never by the viewport. From 1280 px the tabs become three
193-
columns: details, a timeline (the discussion composer, then Activity and History) and the
197+
columns: details, the timeline stream and the
194198
related lists as cards with Approvals, Attachments and the created/updated line. From
195199
1024 px the related column folds into a rail behind a **Related (N)** toggle. Below that, and
196200
always in a drawer or split pane, the tab strip is drawn. `?tab=` selects a tab in the strip.

‎packages/spec/src/data/field.zod.ts‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,17 +1734,20 @@ export const FieldSchema = lazySchema(() => {
17341734
* Tri-state (ADR-0085 semantic-role style — a statement about the
17351735
* relationship, not a layout switch):
17361736
* - `false` → suppress this child from the parent's detail page.
1737-
* - `true` / absent → shown as a supporting list: a side card beside the
1738-
* record (under the tabbed page, the shared "Related"
1739-
* tab). There is no count-based auto-split.
1737+
* - `true` / absent → shown as a supporting list: a side card in the
1738+
* record's related column (under the tabbed page, the
1739+
* shared "Related" tab). There is no count-based
1740+
* auto-split.
17401741
* - `'primary'` → part of the record's MAIN CONTENT (#27069): drawn in
1741-
* the record's body — the details column, after the
1742-
* field sections — as a full-width table, not as a side
1743-
* card (under the tabbed page, its own tab). A field
1744-
* group's `relatedList` can place it among the field
1745-
* sections instead. `'primary'` no longer ORDERS lists:
1746-
* the parent's `ObjectSchema.relatedLists` does, among
1747-
* the body tables and among the side cards alike.
1742+
* the record's body — the details column, after its
1743+
* first field section — as a full-width table, not as
1744+
* a side card (under the tabbed page, inside the
1745+
* Details tab: a primary list gets no tab of its
1746+
* own). A field group's `relatedList` can place it
1747+
* among the field sections instead. `'primary'` no
1748+
* longer ORDERS lists: the parent's
1749+
* `ObjectSchema.relatedLists` does, among the body
1750+
* tables and among the side cards alike.
17481751
*
17491752
* Absent on a `master_detail` field that sets `inlineEdit`, the list is
17501753
* `'primary'` by default: line items edited inside the parent's form are part
@@ -1762,7 +1765,7 @@ export const FieldSchema = lazySchema(() => {
17621765
* A child object with no list-view sort emits no ordering parameter at all,
17631766
* and rows fall back to record-id order.
17641767
*/
1765-
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 as a supporting list, a side card beside the record (the shared "Related" tab on the tabbed page); \'primary\' = part of the record\'s main content, drawn in the record\'s body (the details column, after the field sections) as a full-width table (its own tab on the tabbed page). Absent on a master_detail field that sets inlineEdit, the list is \'primary\' by default; write true to keep it a side card. \'primary\' places a list and does not order it: the parent object\'s relatedLists orders the body tables and the side cards (ADR-0085). A derived related list (relatedList: \'primary\') inherits its row order from the child object\'s DEFAULT list view sort — the isDefault view, or the first declared list item when none is marked default; wire spelling is sort=<field> / sort=-<field>, never $orderby. A child object with no list-view sort emits no ordering parameter, and rows fall back to record-id order.'),
1768+
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 as a supporting list, a side card in the record\'s related column (the shared "Related" tab on the tabbed page); \'primary\' = part of the record\'s main content, drawn in the record\'s body (the details column, after its first field section) as a full-width table (inside the Details tab on the tabbed page, with no tab of its own). Absent on a master_detail field that sets inlineEdit, the list is \'primary\' by default; write true to keep it a side card. \'primary\' places a list and does not order it: the parent object\'s relatedLists orders the body tables and the side cards (ADR-0085). A derived related list (relatedList: \'primary\') inherits its row order from the child object\'s DEFAULT list view sort — the isDefault view, or the first declared list item when none is marked default; wire spelling is sort=<field> / sort=-<field>, never $orderby. A child object with no list-view sort emits no ordering parameter, and rows fall back to record-id order.'),
17661769
/** Optional section title for the detail-page related list (defaults to the child object label). */
17671770
relatedListTitle: z.string().optional().describe('Title for the detail-page related list'),
17681771
/**

‎packages/spec/src/data/object.zod.ts‎

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,19 @@ export const ObjectCapabilities = strictObject({
262262
/**
263263
* History tracking (Audit Trail) master switch — opt-in.
264264
*
265-
* Contract: `true` surfaces the record History tab (audit-trail UI) in the
266-
* console. Pair with per-field `trackHistory: true` to select which field
265+
* Contract: `true` surfaces the record's field changes (audit-trail UI) in
266+
* the console. On the synthesized record page they join the record's one
267+
* timeline stream, beside its discussion and activity, under the stream's
268+
* Changes filter; that page has no separate History tab. A page an author
269+
* assigns is drawn as authored: it shows changes where it places a
270+
* `record:history` block, which reads the record's own activity, not this
271+
* flag. Pair with per-field `trackHistory: true` to select which field
267272
* diffs render as human-readable timeline summaries (ADR-0052 §5b). Audit
268273
* *capture* into `sys_audit_log` is a compliance ledger and stays on
269274
* regardless of this flag; retention is governed by data lifecycle
270275
* (ADR-0057), not by hiding the UI.
271276
*/
272-
trackHistory: z.boolean().default(false).describe('Show the record History tab (audit-trail UI). Pair with per-field trackHistory to pick which field diffs are summarized; audit capture itself is always on for compliance'),
277+
trackHistory: z.boolean().default(false).describe('Show the record\'s field changes (audit-trail UI): on the default record page they join the record\'s one timeline stream, under its Changes filter. An authored page shows changes only where it places a record:history block. Pair with per-field trackHistory to pick which field diffs are summarized; audit capture itself is always on for compliance'),
273278

274279
/** Enable global search indexing */
275280
searchable: z.boolean().default(true).describe('Index records for global search'),
@@ -1240,14 +1245,17 @@ export const ObjectFieldGroupSchema = lazySchema(() => strictObject({
12401245
* items can sit under its basic information with its terms after them.
12411246
*
12421247
* Such a group carries no fields: a field whose `group` names it is refused
1243-
* at parse. A name that matches no inbound relationship is refused at
1244-
* `defineStack`, as a `relatedLists` entry is. Body tables no group places
1248+
* at parse. Its name is judged exactly as a `relatedLists` entry's is (see
1249+
* there): a child in the stack with no inbound relationship is refused
1250+
* everywhere; a child that exists nowhere is refused at `defineStack` and by
1251+
* a metadata write that names no package, and a write into a package stores
1252+
* it, placing nothing. Body tables no group places
12451253
* keep the record page's default position. `relatedList: false` on the FK
12461254
* still hides the table.
12471255
*/
12481256
relatedList: z.string().regex(RELATED_LIST_ENTRY_PATTERN, {
12491257
message: 'A field group\'s relatedList is a child object name (e.g. "task") or object.field (e.g. "event.related_to"), in snake_case',
1250-
}).optional().describe('Places a related list\'s body table at this position in the record\'s details column instead of a section of fields: names one inbound relationship, as a relatedLists entry does (child object, or object.field when that child has more than one relationship to this object). A group with relatedList holds no fields: a field that names it as its group is refused, and so is a name that matches no inbound lookup / master_detail field. relatedList: false on the relationship still hides the table.').meta({ title: 'Related List' }),
1258+
}).optional().describe('Places a related list\'s body table at this position in the record\'s details column instead of a section of fields: names one inbound relationship, as a relatedLists entry does (child object, or object.field when that child has more than one relationship to this object). A group with relatedList holds no fields: a field that names it as its group is refused. The name is judged as a relatedLists entry is: refused when its child is in the stack with no inbound lookup / master_detail field, or exists nowhere (by os validate / os build, and by a metadata write that names no package); a write into a package stores it, and the record page places nothing for it. relatedList: false on the relationship still hides the table.').meta({ title: 'Related List' }),
12511259

12521260
/**
12531261
* [ADR-0085 §5] Section visibility predicate — CEL, the ADR-0089 canonical
@@ -3042,10 +3050,22 @@ const ObjectSchemaBase = strictObject(
30423050
* one follows in the derived order (owned `master_detail` children, then
30433051
* `lookup` children, each in declaration order).
30443052
*
3045-
* Strict names: an entry that matches no inbound `lookup` / `master_detail`
3046-
* field of this object is refused at `defineStack` (the cross-object check,
3047-
* where every child's fields are known), naming the entry and the inbound
3048-
* relationships that exist. The shape alone is judged at parse.
3053+
* Names are judged where the children are known (the shape alone is judged
3054+
* at parse), and each refusal names the entry and the inbound relationships
3055+
* that exist:
3056+
*
3057+
* - a child that IS in the stack but has no inbound `lookup` /
3058+
* `master_detail` field to this object is refused everywhere: at
3059+
* `defineStack` (`os validate`, `os build`) and at the runtime metadata
3060+
* write door;
3061+
* - a child that exists nowhere is refused at `defineStack` and by a
3062+
* metadata write that names no package (judged against the whole
3063+
* collection the host serves). A write into a package judges only that
3064+
* package's closure, and a child outside it may be a downstream
3065+
* package's object that points in, so the entry is stored, and the
3066+
* record page places nothing for it. The boundary is deliberate: the
3067+
* `validate-related-list-refs` rule's header in `@objectstack/lint`
3068+
* carries the reasoning.
30493069
*
30503070
* It orders; it does not show or hide. `relatedList: false` on the FK still
30513071
* hides a listed relationship, and a FK's `relatedList: 'primary'` still
@@ -3059,7 +3079,7 @@ const ObjectSchemaBase = strictObject(
30593079
z.string().regex(RELATED_LIST_ENTRY_PATTERN, {
30603080
message: 'A relatedLists entry is a child object name (e.g. "task") or object.field (e.g. "event.related_to"), in snake_case',
30613081
}),
3062-
).optional().describe('Business order of this object\'s related lists on its record page, most important first. Each entry is a child object name (e.g. "task"), or object.field when that child has more than one relationship to this object (e.g. "event.related_to"). Listed relationships come first in this order; unlisted ones follow in the derived order (owned master_detail children, then lookup children). An entry that matches no inbound lookup / master_detail field of this object is refused. It orders only: relatedList: false on the relationship still hides a list, and relatedList: \'primary\' still places a list in the record\'s body, so the order applies among the body tables and among the side cards.'),
3082+
).optional().describe('Business order of this object\'s related lists on its record page, most important first. Each entry is a child object name (e.g. "task"), or object.field when that child has more than one relationship to this object (e.g. "event.related_to"). Listed relationships come first in this order; unlisted ones follow in the derived order (owned master_detail children, then lookup children). An entry whose child is in the stack but has no inbound lookup / master_detail field to this object is refused everywhere. An entry whose child exists nowhere is refused by os validate / os build and by a metadata write that names no package; a write into a package stores it, since a child outside the package may be a downstream package\'s object that points here, and the record page places nothing for it. It orders only: relatedList: false on the relationship still hides a list, and relatedList: \'primary\' still places a list in the record\'s body, so the order applies among the body tables and among the side cards.'),
30633083
/**
30643084
* [ADR-0085] Semantic role: the field that represents the record's LINEAR
30653085
* lifecycle (an ordered pipeline / stage progression). A string names the

0 commit comments

Comments
 (0)