Skip to content

Commit 46c30d4

Browse files
committed
docs(skills): a primary related list is a body table in the Details tab, and the relatedLists refusal states its package boundary
objectstack-ui SKILL.md and objectstack-data rules/relationships.md still taught a relatedList: 'primary' child's "own tab" and an unbounded relatedLists refusal. Since the record page v3 and the rewritten spec describes, a primary list is a full-width body table in the details column after the first field section (inside the Details tab); every other list is a side card in the shared Related tab; field changes join the Timeline tab under its Changes filter. The refusal now says which unknown names are refused where. The removed app-level relatedLayout is no longer taught as a surviving override. Restated sentences in relationships.md pay for the added words; neither ceiling moves. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyuFKhHVaGYSSdTHG8
1 parent ca54eac commit 46c30d4

3 files changed

Lines changed: 38 additions & 27 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui and objectstack-data teach a primary related list as a body table in the Details tab, and the relatedLists refusal with its package boundary
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** Both skills said a `relatedList: 'primary'` child gets its own tab on the record page, `objectstack-ui` described one tab per primary list plus a shared Related tab and an app-level `relatedLayout` override, and `objectstack-data` said a `relatedLists` name matching no inbound FK is refused, with no boundary.
11+
- **Now.** A primary list is a full-width body table in the details column after the first field section (inside the Details tab, no tab of its own); every other list is a side card in the shared Related tab; field changes join the Timeline tab under its Changes filter. A `relatedLists` child in the stack with no inbound FK is refused everywhere; one that exists nowhere is refused by `os validate` / `os build` and by a metadata write naming no package, while a write into a package stores it and the page places nothing. No ceiling moves; no schema, key or behaviour changes.

‎skills/objectstack-data/rules/relationships.md‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ Declare inline editing **on the relationship**, in the data model — not in a f
229229
view. Set `inlineEdit: true` on the child's `master_detail` (or `lookup`) field
230230
that points back to the parent. The parent's **standard** create/edit form then
231231
renders an editable grid for these children and saves parent + children in **one
232-
atomic transaction** — with no form-view config and no bespoke page. The UI is
233-
derived from metadata (relationship FK + child fields → grid columns).
232+
atomic transaction** — with no form-view config and no bespoke page.
234233
235234
```typescript
236235
// On the CHILD object's FK field:
@@ -271,10 +270,9 @@ inlineEdit: 'grid' // editable line-item grid (fast bulk entry; thin childre
271270
inlineEdit: 'form' // read-only list; "Add" / per-row edit opens the FULL form
272271
```
273272
274-
- **`'grid'`** — spreadsheet-like editable grid. Best for *thin* line items
273+
- **`'grid'`** — best for *thin* line items
275274
(invoice/order lines): few columns, high volume, keyboard-fast.
276-
- **`'form'`** — compact read-only list; Add / per-row edit opens the child's
277-
complete form. Best for *fat* children (long text, attachments, many fields)
275+
- **`'form'`** — best for *fat* children (long text, attachments, many fields)
278276
that don't fit a narrow grid cell.
279277
- **`true`** / omitted — **smart default**: picks `form` when the child has
280278
rich/form-only fields (textarea, file, image, json, location…) or more than ~8
@@ -320,11 +318,10 @@ InvoiceLine = {
320318
321319
### Detail-page related lists (the read-side mirror)
322320
323-
Where `inlineEdit` is the **write** side (child pulled into the parent's entry
324-
form), the **related list** on the parent's record detail page is the **read**
321+
Where `inlineEdit` is the **write** side, the **related list** on the parent's record detail page is the **read**
325322
side. You usually don't declare it: every child relationship
326-
(`master_detail` and `lookup`) is shown as a related list on the parent's detail
327-
page **by default** — owned (`master_detail`) children first. The relationship
323+
(`master_detail` and `lookup`) is shown **by default** — owned (`master_detail`)
324+
children first. The relationship
328325
flags exist to *refine* that:
329326
330327
```typescript
@@ -333,7 +330,7 @@ project: {
333330
type: 'master_detail',
334331
reference: 'project',
335332
inlineEdit: true, // write side: edit inline in the Project form
336-
relatedList: 'primary', // read side: a body table (default with inlineEdit)
333+
relatedList: 'primary', // read side: a body table
337334
relatedListTitle: 'Tasks', // title of the detail-page list
338335
relatedListColumns: ['title', 'status', 'priority', 'due_date'],
339336
},
@@ -344,16 +341,20 @@ audit_ref: { type: 'master_detail', reference: 'invoice', relatedList: false },
344341
345342
`relatedList` is tri-state — placement (ADR-0085):
346343
347-
- `'primary'` — main content: a full-width table in the record's body (its own
348-
tab on the tabbed page). Default for a `master_detail` FK with `inlineEdit`.
344+
- `'primary'` — main content: a full-width table in the details column after
345+
the first field section (in the Details tab, no tab of its own). Default for a
346+
`master_detail` FK with `inlineEdit`.
349347
- `false` — hidden from the parent's page.
350348
- `true`, or omitted (except inline-edited `master_detail`) — a side card
351349
(the shared **Related** tab).
352350
- Order is the parent's: `relatedLists: ['task', 'event.related_to']` (child, or
353-
`object.field`) lists those first; a name matching no inbound FK is refused.
351+
`object.field`) lists those first. A child in the stack with no inbound FK is
352+
refused everywhere; one that exists nowhere is refused by `os validate` /
353+
`os build` and by a metadata write naming no package — a write into a package
354+
stores it, and the page places nothing.
354355
355356
`relatedListTitle` / `relatedListColumns` override the derived title / columns;
356-
both are optional — when omitted, columns auto-derive from the child object's
357+
otherwise columns auto-derive from the child object's
357358
`highlightFields` (the same source the lookup picker uses). Audit FKs
358359
(`created_by`/`updated_by`/`owner_id`) never become related lists. A child that
359360
references the parent through several FKs (e.g. `primary_account` +

‎skills/objectstack-ui/SKILL.md‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,25 +106,24 @@ and the form's `taxRateField` overrides which parent field drives the totals.
106106
related list on the parent's record DETAIL page. You don't author it: every
107107
child relationship is shown as a related list by default (owned `master_detail`
108108
children first). Refine on the relationship:
109-
- `relatedList: 'primary'` — main content: a body table, its **own tab** on the
110-
tabbed page (see layout below); it places, the parent's `relatedLists` orders
111-
(ADR-0085).
109+
- `relatedList: 'primary'` — main content: a full-width body table (see layout
110+
below); it places, the parent's `relatedLists` orders (ADR-0085).
112111
- `relatedList: false` — suppress a noisy child from the detail page.
113112
- `relatedListTitle` / `relatedListColumns` — override the derived title /
114113
columns (both optional; columns otherwise auto-derive from the child object's
115114
`highlightFields`). See objectstack-data → Relationships → Detail-page related lists.
116115

117116
**Related-list layout.** On the synthesized record page, each
118-
`relatedList: 'primary'` child (default: inline-edited `master_detail`) gets its
119-
**own tab**; every other list stacks under one shared **Related** tab, both in
120-
the object's `relatedLists` order. Promoting a child table to a tab is a
121-
one-word change on the relationship. The object still declares no per-surface
122-
*layout* hints: the old
123-
`detail.relatedLayout` toggle and object-level `detail: {...}` block stay
124-
**removed** (ADR-0085); `relatedLayout: 'tabs' | 'stack'` survives only as an
125-
app-level default override, not an object key. For arrangements the
126-
relationship layer can't express — filtered splits (e.g. Open vs Closed tabs), a
127-
chart/report tab — assign the object a **custom record Page** and lay it out
117+
`relatedList: 'primary'` child (default: inline-edited `master_detail`) is a
118+
body table in the details column after the first field section (in the
119+
Details tab, no tab of its own); every other list is a side card in one shared
120+
**Related** tab, both in the object's `relatedLists` order. Field changes
121+
(`trackHistory`) join the Timeline tab under its Changes filter; there is no
122+
History tab. The object declares no per-surface *layout* hints: the
123+
`detail.relatedLayout` toggle, object-level `detail: {...}` block and app-level
124+
`relatedLayout` are **removed** (ADR-0085). For arrangements the relationship
125+
layer can't express — filtered splits (e.g. Open vs Closed tabs), a chart/report
126+
tab — assign the object a **custom record Page** and lay it out
128127
explicitly with `record:related_list` (or inline-editable `line_items`) blocks.
129128

130129
### Field Conditional Rules in Forms

0 commit comments

Comments
 (0)