Skip to content

Commit 7469c1d

Browse files
committed
docs(spec): the related-list column keys diverge on purpose — say so in both comments
Widening `record:related_list.columns` to the saved-view `ListColumn` union falsified one clause in two in-repo comments, both of which claimed the page-block sibling was "the same strings-only shape" as `field.relatedListColumns`. Both now state what is true after the change AND that the divergence is deliberate: the block key takes the saved-view union because objectui composes a saved view's columns onto it verbatim, while `field.relatedListColumns` stays child field-name strings only by ruling and its `field-column-lists-canonicalized` conversion still folds object entries to the identity string. Comment text only — no schema, no refusal behaviour, no conversion and no assertion is touched, and the diff carries no non-comment line. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 007310f commit 7469c1d

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,8 +1454,19 @@ export const FieldSchema = lazySchema(() => {
14541454
* Deliberately narrower than `inlineColumns`: the related list is not an
14551455
* editable grid, and per-column display overrides are not part of its
14561456
* measured renderer contract (objectui RelatedList hydrates string entries
1457-
* fully; the page-block sibling `record:related_list.columns` is the same
1458-
* strings-only shape). Column OBJECTS are refused with a prescription.
1457+
* fully). Column OBJECTS are refused with a prescription.
1458+
*
1459+
* ⚠️ AND deliberately narrower than the PAGE-BLOCK sibling, which is no
1460+
* longer the same shape (#18639). `record:related_list.columns`
1461+
* (`ui/component.zod.ts`) now declares the SAME union as the saved-view key
1462+
* `listViews[].columns` — field-name strings OR `ListColumnSchema` entries —
1463+
* because objectui composes a saved view's `columns` onto that block
1464+
* VERBATIM, so a decorated list arrives there already in the `ListColumn`
1465+
* spelling. THIS key stays strings-only BY RULING: objectui#9593 ruling A
1466+
* widened that one and fenced this one in the same breath, and the
1467+
* `field-column-lists-canonicalized` conversion still folds an object entry
1468+
* here down to its identity string. The two keys diverge ON PURPOSE —
1469+
* ⛔ do not "align" them.
14591470
*/
14601471
relatedListColumns: z.array(z.string({
14611472
error: (issue) => issue.code === 'invalid_type'

‎packages/spec/src/data/inline-related-columns.test.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
* parse clean and render every computed cell '—'. The refusal is the
2626
* producer-side guard for that renderer fact.
2727
* 4. `relatedListColumns`: child field-name STRINGS only, matching every
28-
* in-repo usage and the strings-only page-block sibling
29-
* (`record:related_list.columns`, ui/component.zod.ts). A column OBJECT
30-
* is refused with the derivation prescription.
28+
* in-repo usage. A column OBJECT is refused with the derivation
29+
* prescription. ⚠️ Since #18639 this is NO LONGER the same shape as the
30+
* page-block sibling: `record:related_list.columns`
31+
* (ui/component.zod.ts) declares the saved-view `ListColumnSchema` union,
32+
* because a saved view's columns are composed onto that block verbatim.
33+
* THIS key stays strings-only by ruling — objectui#9593 ruling A widened
34+
* that one and fenced this one — so the divergence is DELIBERATE, and
35+
* every pin below is unchanged by it.
3136
* 5. The showcase invoice fixture form — identity-only `{ name }` entries —
3237
* parses, so the one authored in-repo usage stays green in the spelling
3338
* the renderer actually reads.

0 commit comments

Comments
 (0)