Skip to content

Commit 337f435

Browse files
docs(skills): the record-page skills teach relatedLists as the tab list, a group's own fields and the pinned details column (#35902, #35942) (#36222)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVUBehQPXWLrrSjKtHkXE93)_ repo:objectstack#1 · os-sales · session_01L6bhgWCfqdb19A74hDYnKp Part of #35902 Fixes #35942 Part of #36188 Clause-②: no Metadata-protocol: none Skills-docs: updated here Security-touching: no Area: b1-RS. Claims: #35902 7072867188 (slice 2; it redoes slice 1, whose branch never reached GitHub), #35942 7072873584 (folded), #36188 7072882981 (this PR is its skills half; the seven platform-checklist JSON items are PR B, `Fixes #36188`, after this merges, because a checklist JSON beside skills paths takes a PR off the low-risk skills arm). ## 维护者速读 - AI 按技能搭建记录页时,现在知道页签由父对象的 `relatedLists` 决定:没写就照旧全部显示;写了就只显示列出的,按列的顺序;附件、审批、动态用对象名 `sys_attachment`、`sys_approval_request`、`sys_activity` 列进来;一项可写 `{ list, label, columns }` 给这张子表自己的标题和列。 - 以前技能教「把任务排第一」写 `relatedLists: ['task']`,按现在的规则这会把其他页签全藏掉。技能和评测改成「列出要保留的全部页签,任务排第一」。 - 主从子表默认是页签(#35921 之后),技能不再说「默认是正文表」;父对象分组指向子表才进字段区,而且只在使用者明确要求时才写。 - 第 1 片(分组用 `fields` 列成员、不再有阶段条和关键字段条、阶段在名字旁的状态标签里)当时没推上来,这次一起补上,关掉 #35942。 - 右栏、⊟ 开关的文字删掉,改成今天的布局:宽的整页把字段钉在左栏,其余页签在右边。 - 新增三条评测:「去掉附件页签」「税号排在行业后面」「报价单的明细放在金额上面」;指南文档记录页一节加了父单的完整报价单例子。 - 代价:只改技能文字、评测、指南和一个 changeset,不动运行时;四个技能文件都没超上限,上限一个没动(同文件删过期文字来付)。 ## What changes **`skills/objectstack-ui/rules/record-page.md`** (3954 → 3951 B, 988 / 991 tokens) - Step 1: the stage is the status tag beside the title, whose menu moves it; no stage bar or key-field strip (`highlightFields` feed hover cards, pickers, related-list columns) (#35938, #35942). `fieldGroups` are the Details sections, each listing its members in `fields`; absent, the fields whose `group` names it (#35925). Layout: a full page fitting 320 px of details beside 400 px of tabs pins the details left, the other tabs right; unless the details hold a child table or there is no other tab; otherwise one column, Details first (#36136, `recordPagePinsDetails`). The old 760 / 1120 px two- and three-column text, the right column and the Overview tab are gone. - Step 2 is now "The parent's `relatedLists` is the tab list" (#35923): without it nothing changes; declared, only the named lists show, in order (unlisted approvals and the stream still follow); the built-ins by object name; "tasks first" lists every tab to keep; leaving out `'sys_attachment'` drops attachments; `{ list, label, columns }`; a built-in is a bare name; a child list another package adds is hidden by a `relatedLists` that does not name it. Kept from the old step 2: `relatedList: false`, `relatedListFilter`, the default list view `sort`. A parent group `{ key, label, relatedList: 'quote_line' }` (no `fields`) places a child table among the fields, written only when asked (#35902's open question); its tab stays unless a declared `relatedLists` omits it (#35889's note, seat reading 7048340194, as shipped by #35923). The old "`'primary'` default for a master_detail" and "`relatedLists: ['task']`, no page file" are removed (#35921, #35923). - Step 6: the ⊟ right-column switch is removed (#36188); the details column's dragged width joins the reader's choices. - Paid for in the same file: step 1's retired layout text, step 3's "the synthesizer fills the rest", step 5's removal release ("removed in @objectstack/spec 18.3.0 (ADR-0087 D2)": the refusal carries its fix), step 6's "(drawer or full page, for a drawer-mode object)" and the deprecated `width` / `drawerWidth` aside, step 1's "the other tabs right", step 4's "a filtered split (Open vs Closed)" and step 5's "(`new_window`, `none` are the other members)" and "Field count never decides". - The `os:check` example is a quote (`sharingModel: 'private'`) with a group listing its `fields` and a `relatedLists` entry carrying its own label and columns. **`skills/objectstack-data/rules/relationships.md`** (16790 → 16812 B, 4203 / 4203), Detail-page related lists: every child is a tab by default, a `master_detail` child too; `false` hides; `'primary'` makes a body table with no tab; a parent group naming a `master_detail` child places its table there too (written only when asked), and its tab stays unless a declared `relatedLists` omits it; the parent's `relatedLists` is the tab list (pointing at objectstack-ui Record Page), with the built-ins and the entry form; an entry's `label` / `columns` win over `relatedListTitle` / `relatedListColumns`. Paid for by the old tri-state bullets, the "Suppress a noisy association" comment, and a shorter refusal aside ("bar a platform or sibling-artifact name", "one into a package is stored, placing nothing"). **`skills/objectstack-data/references/examples-objects.md`** (6894 → 6876 B), Field Groups: a group lists its members in `fields`; `Field.group` is the older spelling, still read; the two refusals named; the example lists members on the groups. **`skills/objectstack-ui/rules/navigation.md`** (10251 → 10219 B): "`fieldGroups` + `Field.group`" is "`fieldGroups`", twice. **Evals** (`skills/objectstack-ui/evals/record-page.json`, README; measured, not ratcheted): - Case 1 (tasks first) now expects the full tab list, `task` first, and refuses `relatedLists: ['task']` and a group naming the task list. Its old answer ("already a full-width body table") is wrong since #35921. - Case 4: remove the attachments tab: the full list without `'sys_attachment'`. - Case 5: a Tax ID field after Industry in the group's own `fields`, with no `group` on the field. - Case 6: a quote's line items above its Amount section instead of a tab: a group `{ key: 'lines', label, relatedList: 'quote_line' }` between the two, and a `relatedLists` naming the tabs kept without `quote_line` (an undeclared parent keeps a group-placed table's tab). - `must_not_contain` tokens are code shapes (`relatedLists: ['task'],`, `'sys_attachment',`, `group: 'basic' }` …), so an answer that names the wrong shape in prose is not failed. - No case's `must_not_contain` token appears in its own reference answer; every `must_contain` token does (checked by script). **Guide (`content/docs/ui/pages.mdx`, Record pages)**: the synthesized default says every related list is a tab by default, the header's status tag carries the stage with no stage bar or strip, and an unplaced `'primary'` table sits after the field sections drawn open (it said "after the first field section"; `bodyTablePlacement` since #35742). New subsection "Declaring the tabs and the field groups": `relatedLists` as the tab list with the built-ins and entries, a group's `fields`, a group placing a child table (its tab stays unless a declared `relatedLists` leaves it out), and epic #35896's full quote example (`os:check`, with `sharingModel: 'private'`; a comment says `quote_line` is in both places on purpose, so it is drawn in the details and keeps a tab with its own columns). The layout paragraph gets its own heading, "How the page is laid out". "A one-word change on the relationship field" now reads "a declaration on the parent (a field group naming the list)". **Changeset** `.changeset/35902-skills-related-lists-tabs.md`: `'@objectstack/skills': patch`, both declaration lines. ## Small calls made in this thread - No ratchet ceiling moves: a `scripts/check-skills-token-ratchet.mjs` edit is outside the low-risk skills arm. All four files fit under their current ceilings. - The skill says "no package places its own list yet" rather than naming the follow-up card: the published catalog refuses internal ids (`check-doc-authoring`). - The Inline Editing section of `relationships.md`, `skills/objectstack-ui/rules/list-views.md:370` and `skills/objectstack-ui/SKILL.md:48` still teach that `inlineEdit: true` alone puts the child rows on the parent's form; since #35921 a parent field group decides and `inlineEdit` only picks grid or form. Not in this PR (it is form entry, not the record page's tabs, and it spans three more files): follow-up for the seat to card. - `content/docs/ui/field-grouping-and-order.mdx` was not touched: the brief names the record-page section. ## Verification (readings against `main` 48c732c, head 7b3f52e) - Reviews on 4885e48: L1-c REWORK 7073387487 (two must-fixes, both in 7b3f52e); Fable rules L2 PASS 7073403529 (N1 narrowed in 7b3f52e, N2 closed by L1-c's fix 1, N3 = L1-c's fix 2, N4 left). - `node scripts/check-skills-token-ratchet.mjs`: 60 authored files within ceilings. - `pnpm check:skill-links` (270 links, 139 fragments), `check:skill-identifier-liveness` (549 citations), `check:doc-authoring` (75 published skill files with no internal ids; 516 doc files clean): green. - `pnpm --filter @objectstack/spec check:skill-examples`: 348 marked examples type-check across 3 surfaces (EXIT 0), the new record-page, examples-objects and pages.mdx blocks among them. - `pnpm --filter @objectstack/lint run check:doc-security-posture`: 41 `ObjectSchema.create` examples carry an `os validate`-clean posture (the first head missed `sharingModel` on both quote examples; CI caught it, fixed in 4885e48). - The examples through `defineStack` (cross-reference validation): the guide's quote with `quote_line`, `task` and `account` accepted; control: the same quote without `quote_line` is refused (`relatedLists[0] 'quote_line' matches no inbound relationship of 'quote'`); the rule's short quote with a `quote_line` child accepted; the data skill's account accepted. - `node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-emjngv`: skills/** ×6 (all `.md` or `evals/*.json`), plus a changeset and one `content/docs` `.mdx`, 296 changed lines; the arm's `--pr` reading follows on the PR. ## Follow-ups - PR B: the seven checklist items (`docs/qa/platform-checklist/areas/records-forms.json` ×6, `attachments-storage.json` ×1), `Fixes #36188`, in a new session after this merges. - #35902 stays open for the #35901 batch (extension placement), the repo example and HotCRM. - `inlineEdit` skills text (above). ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (skills and doc gates above) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: n/a. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (the 维护者速读 block is the maintainer's Chinese summary) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgWCfqdb19A74hDYnKp <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgWCfqdb19A74hDYnKp --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent efe4436 commit 337f435

8 files changed

Lines changed: 227 additions & 91 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The record-page skills teach the parent-declared record page:
9+
10+
- `objectstack-ui` record-page rule: the parent's `relatedLists` is the tab list. Without it nothing changes; declared, only the named lists show, in order, with the attachments, approvals and activity tabs named by object (`sys_attachment`, `sys_approval_request`, `sys_activity`), and an entry `{ list, label, columns }` titles one list. "Put the tasks tab first" lists every tab to keep, tasks first, because a list naming only the task hides the rest. A child list another package adds is hidden by a `relatedLists` that does not name it.
11+
- The same rule's step 1 no longer teaches a stage bar or a key-field strip: the stage is the status tag beside the title, whose menu moves it, and `highlightFields` feed hover cards, pickers and related-list columns. A field group lists its own members in `fields`. The wide full page pins the details left beside the tabs, unless the details hold a child table or there is no other tab; the right summary rail and its switch are gone from the text, and the details column's dragged width joins the reader's own choices.
12+
- A `master_detail` child is a tab by default (`objectstack-data` relationships rule, the record-page rule and an eval); a parent field group naming the child list places its table among the fields, written only when asked, and the list keeps its tab too unless a declared `relatedLists` leaves it out.
13+
- `objectstack-data` field-groups example lists each group's members in `fields`; `objectstack-ui` navigation names `fieldGroups` alone.
14+
- Evals: the tasks-first case now writes the full tab list; new cases remove the attachments tab, place a Tax ID field after Industry in its group's list, and put a quote's line items above its amount section.

‎content/docs/ui/pages.mdx‎

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,13 @@ replacement.
182182
A record page needs no authoring. With no page assigned, the Console synthesizes one from
183183
the object: a header, the record's **details** (the **Details** tab), and one tab per related
184184
list, then **Attachments** for an object with `enable: { files: true }`, **Approvals** when the
185-
record has approval requests, and **动态** (Activity) last, each with its count. A relationship
186-
whose child field declares `relatedList: 'primary'` is part of the record's body: its list is a
187-
full-width table in the details, after the first field section, with no tab of its own. **动态**
185+
record has approval requests, and **动态** (Activity) last, each with its count. Every related
186+
list is a tab by default, a `master_detail` child's too. The header carries the title
187+
(`nameField`) and, for an object with a `stageField`, a status tag whose menu moves the stage;
188+
the page draws no stage bar and no key-field strip (`highlightFields` feed hover cards, pickers
189+
and related-list columns). A relationship whose child field declares `relatedList: 'primary'`
190+
is part of the record's body: its list is a full-width table in the details, after the field
191+
sections drawn open, with no tab of its own. **动态**
188192
(`?related=timeline`) holds the record's system entries: its activity and, with
189193
`enable: { trackHistory: true }`, its field changes; there is no separate History tab. On the
190194
desktop the record's comments are not in it but in the comment panel, opened from the
@@ -194,9 +198,69 @@ whole table (`?related=<object>.<field>`). The tab row shows as many tabs as its
194198
rest into a **+N** menu; the open tab is always on the row. The related tabs are the reader's
195199
to arrange: move one before or after its neighbour, hide one, and bring hidden ones back. The
196200
arrangement is kept per user and object, never in the object's declaration.
197-
Moving a child table into the record's body is therefore a one-word change on the
198-
relationship field, not a page-authoring task, and `relatedList: false` leaves a child off the
199-
page.
201+
Moving a child table into the record's body is therefore a declaration on the parent (a field
202+
group naming the list, below), not a page-authoring task, and `relatedList: false` leaves a
203+
child off the page.
204+
205+
### Declaring the tabs and the field groups
206+
207+
The parent object declares its record page's tabs and sections in one place. Without these
208+
keys nothing changes.
209+
210+
- **`relatedLists` is the tab list.** Declared, only the related lists it names show, in its
211+
order; leaving one out hides its tab. The three built-in tabs are named by object:
212+
`sys_attachment` (attachments: shown only when listed, and only with files enabled),
213+
`sys_approval_request` (approvals: when unlisted, after the listed tabs) and `sys_activity`
214+
(the activity stream: when unlisted, last). An entry `{ list, label, columns }` gives one list
215+
its own title and child-field columns, winning over the child field's `relatedListTitle` /
216+
`relatedListColumns`; a built-in is written only as its bare name. To put one tab first, list
217+
every tab the page keeps with that one first. A child list another package adds is hidden by a
218+
`relatedLists` that does not name it (letting a package place its own list is a later change),
219+
and `relatedList: false` on the child's reference field still hides a list.
220+
- **A field group lists its fields.** `fieldGroups` are the Details sections, in array order.
221+
A group lists its members, in order, in `fields`; without `fields`, its members are the fields
222+
whose `group` names it, the older spelling, still read.
223+
- **A group can place a child table among the fields.** A group that names a child list
224+
(`relatedList: 'quote_line'`, with no `fields`) draws that list's table at its position in the
225+
details, and the record's create and edit forms enter the child rows with the record. The
226+
list keeps its tab as well unless a declared `relatedLists` leaves it out. Write such a group
227+
only where the table belongs among the fields; without one the list is only a tab.
228+
229+
{/* os:check */}
230+
```typescript
231+
import { ObjectSchema, Field } from '@objectstack/spec/data';
232+
233+
export const Quote = ObjectSchema.create({
234+
name: 'quote',
235+
label: 'Quote',
236+
sharingModel: 'private',
237+
fields: {
238+
name: Field.text({ label: 'Quote Name', required: true }),
239+
account: Field.lookup('account', { label: 'Account' }),
240+
valid_until: Field.date({ label: 'Valid Until' }),
241+
discount: Field.percent({ label: 'Discount' }),
242+
total: Field.currency({ label: 'Total' }),
243+
terms: Field.textarea({ label: 'Terms' }),
244+
},
245+
fieldGroups: [
246+
{ key: 'basic', label: 'Basic Information', fields: ['name', 'account', 'valid_until'] },
247+
// Only where the line items belong among the fields; without it they are a tab.
248+
{ key: 'lines', label: 'Line Items', relatedList: 'quote_line' },
249+
{ key: 'amount', label: 'Amount', fields: ['discount', 'total'] },
250+
{ key: 'terms', label: 'Terms', fields: ['terms'] },
251+
],
252+
relatedLists: [
253+
// Named here as well, so the line items also keep a tab, with these columns.
254+
{ list: 'quote_line', label: 'Line Items', columns: ['product', 'quantity', 'unit_price', 'amount'] },
255+
'task',
256+
'sys_attachment',
257+
'sys_approval_request',
258+
'sys_activity',
259+
],
260+
});
261+
```
262+
263+
### How the page is laid out
200264

201265
The Console lays the page out by the width of the surface it occupies, never by the viewport.
202266
On a full page wide enough for a 320 px details column beside 400 px of tabs, the details are

‎skills/objectstack-data/references/examples-objects.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Field Groups (MVP)
44

55
- Declare groups on `ObjectSchema.fieldGroups` — **array order is the display order**.
6-
- Assign each field to a group via `Field.group`, which references an
7-
`ObjectFieldGroup.key`. In-group display order equals the traversal order
8-
of `fields`.
6+
- A group lists its members, in display order, in its own `fields`. Absent,
7+
its members are the fields whose `group` names its `key` (older, still read).
8+
A field listed by two groups, or listed while its `group` names another, is refused.
99
- Group keys must be `snake_case`.
1010
- Optional per-group: `icon`, `description`, and `collapse`
1111
(`'none'` always open · `'expanded'` collapsible, starts open ·
@@ -31,19 +31,19 @@ export default ObjectSchema.create({
3131
sharingModel: 'private',
3232

3333
fieldGroups: [
34-
{ key: 'contact_info', label: 'Contact Information', icon: 'user' },
35-
{ key: 'billing', label: 'Billing', collapse: 'collapsed' },
36-
{ key: 'system', label: 'System' },
34+
{ key: 'contact_info', label: 'Contact Information', icon: 'user', fields: ['name', 'email', 'phone'] },
35+
{ key: 'billing', label: 'Billing', collapse: 'collapsed', fields: ['vat_id', 'billing_address'] },
36+
{ key: 'system', label: 'System', fields: ['created_at', 'created_by'] },
3737
],
3838

3939
fields: {
40-
name: { type: 'text', required: true, group: 'contact_info' },
41-
email: { type: 'email', group: 'contact_info' },
42-
phone: { type: 'phone', group: 'contact_info' },
43-
vat_id: { type: 'text', group: 'billing' },
44-
billing_address: { type: 'address', group: 'billing' },
45-
created_at: { type: 'datetime', readonly: true, group: 'system' },
46-
created_by: { type: 'user', readonly: true, group: 'system' },
40+
name: { type: 'text', required: true },
41+
email: { type: 'email' },
42+
phone: { type: 'phone' },
43+
vat_id: { type: 'text' },
44+
billing_address: { type: 'address' },
45+
created_at: { type: 'datetime', readonly: true },
46+
created_by: { type: 'user', readonly: true },
4747
},
4848
});
4949
```

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

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -345,37 +345,34 @@ InvoiceLine = {
345345
### Detail-page related lists (the read-side mirror)
346346

347347
You usually don't declare the **related list** on the parent's record detail page: every child relationship
348-
is shown **by default** — a `master_detail` child as a body table, a `lookup`
349-
child as a panel. `inlineEdit` plays no part: it governs entry in the parent's
350-
form only. The relationship flags *refine* that:
348+
is shown **by default** as a tab with its count, a `master_detail` child too. The
349+
relationship flags *refine* that:
351350

352351
```typescript
353352
project: {
354353
type: 'master_detail',
355-
reference: 'project', // no relatedList: a body table
354+
reference: 'project',
356355
relatedListTitle: 'Tasks',
357356
relatedListColumns: ['title', 'status', 'priority', 'due_date'],
358357
},
359-
360-
// Suppress a noisy association from the detail page entirely:
361358
audit_ref: { type: 'master_detail', reference: 'invoice', relatedList: false },
362359
```
363360

364-
`relatedList` is tri-state — placement:
365-
366-
- `'primary'` — a full-width table in the record's detail body. Default for a `master_detail` FK.
367-
- `false` — the child object is not shown on the parent record page.
368-
- `true` — an auxiliary panel on the record page. Default for a `lookup` FK.
369-
- Order is the parent's: `relatedLists: ['task', 'event.related_to']` (child, or
370-
`object.field`) lists those first. A child in the stack with no inbound FK is
371-
refused everywhere; one that exists nowhere is refused by `os validate` /
372-
`os build` (which leave a `sys_` / `cloud_` / `ai_` or sibling-artifact name
373-
to the runtime) and by a metadata write naming no package — a write into a
374-
package stores it, and the page places nothing.
375-
376-
`relatedListTitle` / `relatedListColumns` override the derived title / columns;
377-
otherwise columns auto-derive from the child object's
378-
`highlightFields`. Audit FKs
361+
- `relatedList: false` — the child object is not shown on the parent record page.
362+
- `'primary'` — a full-width table in the record's details, with no tab. A parent field
363+
group naming a `master_detail` child (`relatedList: 'quote_line'`, written only when asked)
364+
places its table there too; its tab stays unless a declared `relatedLists` omits it.
365+
- The parent's `relatedLists` is the tab list (objectstack-ui Record Page): absent,
366+
nothing changes; declared, only the named lists show, in order, built-ins by name
367+
(`sys_attachment`, `sys_approval_request`, `sys_activity`). An entry is the child,
368+
`object.field` or `{ list, label, columns }`. A child in the stack with no inbound FK
369+
is refused everywhere; one that exists nowhere is refused by `os validate` /
370+
`os build` (bar a platform or sibling-artifact name) and by a metadata
371+
write naming no package (one into a package is stored, placing nothing).
372+
373+
`relatedListTitle` / `relatedListColumns` override the derived title / columns
374+
(an entry's `label` / `columns` win); otherwise columns auto-derive from
375+
the child object's `highlightFields`. Audit FKs
379376
(`created_by`/`updated_by`/`owner_id`) never become related lists. A child that
380377
references the parent through several FKs (e.g. `primary_account` +
381378
`partner_account`) yields **one related list per FK**; a self-referential FK

‎skills/objectstack-ui/evals/README.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ view / page / dashboard / report metadata.
1111
in-page `<ObjectChart>` needs no dataset at all, and a dataset authored
1212
for a Chinese brief, whose members carry Chinese `synonyms` and a
1313
one-sentence `description`.
14-
- `record-page.json` — the record page as the object declares it: a child
15-
body table ordered first by `relatedLists` (no page file),
16-
`navigation: { mode: 'page' }` on the list view with the reader's own
17-
open choice left out of metadata, and `placedActions: true` on a full
18-
page's `page:header` so packaged header actions draw without an id list.
14+
- `record-page.json` — the record page as the object declares it: a tab
15+
put first, and the attachments tab removed, by the parent's `relatedLists`
16+
naming every tab it keeps (no page file); a field placed in its group's
17+
own `fields`; a child table placed between field sections by a group's
18+
`relatedList`; `navigation: { mode: 'page' }` on the list view with the
19+
reader's own open choice left out of metadata; and `placedActions: true`
20+
on a full page's `page:header` so packaged header actions draw without an
21+
id list.
1922
- `report-period-export.json` — a non-`joined` report's `dateRange` (one
2023
`type: 'date'` dataset dimension) and `exportOptions` (csv / xlsx under the
2124
base object's `allowExport` permission).

‎skills/objectstack-ui/evals/record-page.json‎

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@
33
"evals": [
44
{
55
"id": 1,
6-
"prompt": "On the lead record page, put the tasks first: our reps want the open tasks table before anything else when they open a lead. The `task` object already has a `lead` master_detail field.",
7-
"expected_output": "No page file and no placement flag: `task.lead` is a `master_detail` with no `relatedList`, so it is already a full-width body table, drawn after the lead's open field sections. `relatedListFilter: { status: { $ne: 'done' } }` on `task.lead` keeps it to open tasks, and the lead's `relatedLists: ['task', ...]` puts it first among the tables, directly under those field sections. Not `inlineEdit` (form entry, not the page), not a `definePage` with `kind: 'full'`, and never a `slots.tabs`.",
6+
"prompt": "On the lead record page, put the Tasks tab first: our reps want the open tasks before anything else when they open a lead. The `task` object already has a `lead` master_detail field, `event` has a `lead` lookup, and leads keep their attachments.",
7+
"expected_output": "No page file. The lead's `relatedLists` is its record page's tab list, so it names every tab the page keeps, Tasks first: `relatedLists: ['task', 'event', 'sys_attachment', 'sys_approval_request', 'sys_activity']`. Once declared, only the named lists show: listing the task alone would take the Events and Attachments tabs away. `relatedListFilter: { status: { $ne: 'done' } }` on `task.lead` keeps the tab to open tasks. Not a field group naming the task list (that moves the table into the Details, which was not asked), not `inlineEdit`, not a `kind: 'full'` page, and no tabs slot.",
88
"files": [],
99
"assertions": {
1010
"must_contain": [
11-
"relatedListFilter",
12-
"relatedLists"
11+
"relatedLists",
12+
"'sys_attachment'",
13+
"relatedListFilter"
1314
],
1415
"must_not_contain": [
16+
"relatedLists: ['task'],",
17+
"relatedLists: ['task'] }",
18+
"relatedList: 'task'",
1519
"inlineEdit:",
1620
"definePage(",
17-
"slots: { tabs",
18-
"kind: 'full',"
21+
"slots: { tabs"
1922
]
2023
}
2124
},
@@ -52,6 +55,63 @@
5255
"actions: ['"
5356
]
5457
}
58+
},
59+
{
60+
"id": 4,
61+
"prompt": "Nobody attaches files to opportunities. Remove the Attachments tab from the opportunity record page, and keep every other tab as it is. Today the page shows Quotes (`quote.opportunity`), Contact roles (`opportunity_contact_role.opportunity`), Attachments, Approvals and Activity.",
62+
"expected_output": "Declare the tab list on `opportunity` and leave the attachments built-in out: `relatedLists: ['quote', 'opportunity_contact_role', 'sys_approval_request', 'sys_activity']`. A declared list shows only the lists it names, and the attachments tab shows only when named, so it goes and the rest stay in their order. The files capability (`enable.files`) can stay. No page file, and not `relatedList: false` on a child's reference field (that hides a related list, not the attachments tab).",
63+
"files": [],
64+
"assertions": {
65+
"must_contain": [
66+
"relatedLists",
67+
"'quote'",
68+
"'sys_activity'"
69+
],
70+
"must_not_contain": [
71+
"'sys_attachment',",
72+
"'sys_attachment']",
73+
"definePage(",
74+
"kind: 'full'"
75+
]
76+
}
77+
},
78+
{
79+
"id": 5,
80+
"prompt": "Add a Tax ID field to the account, and show it right after Industry on the record page. The account declares `fieldGroups: [{ key: 'basic', label: 'Basic', fields: ['name', 'industry', 'website'] }]`.",
81+
"expected_output": "A `tax_id` text field on `account`, and the `basic` group's own list names it after Industry: `fields: ['name', 'industry', 'tax_id', 'website']`. The group's `fields` decides the order inside the section, so the field's position among the object's `fields` does not matter, and the field carries no `group` key of its own (one naming another group than the list that names it is refused). No page file and no form sections.",
82+
"files": [],
83+
"assertions": {
84+
"must_contain": [
85+
"tax_id",
86+
"'industry', 'tax_id'"
87+
],
88+
"must_not_contain": [
89+
"group: 'basic',",
90+
"group: 'basic' }",
91+
"definePage(",
92+
"sections:"
93+
]
94+
}
95+
},
96+
{
97+
"id": 6,
98+
"prompt": "On the quote record page, show the line items table above the Amount section instead of as a tab. The quote declares `fieldGroups: [{ key: 'basic', label: 'Basic', fields: ['name', 'account'] }, { key: 'amount', label: 'Amount', fields: ['subtotal', 'total'] }]` and no `relatedLists`; `quote_line` has a `quote` master_detail field, and the page's tabs today are Line items, Tasks (`task.quote`), Attachments, Approvals and Activity.",
99+
"expected_output": "Two declarations on `quote`. A field group that names the child list, placed between the two sections: `fieldGroups: [{ key: 'basic', ... }, { key: 'lines', label: 'Line items', relatedList: 'quote_line' }, { key: 'amount', ... }]`; such a group carries no `fields`, and the line table is then drawn at that position in the Details, with the quote's create and edit forms inlining the lines. And a tab list that leaves the lines out, because a group-placed table keeps its tab while the parent declares no `relatedLists`: `relatedLists: ['task', 'sys_attachment', 'sys_approval_request', 'sys_activity']`. The master_detail field needs no `relatedList` value. No page file and no full page.",
100+
"files": [],
101+
"assertions": {
102+
"must_contain": [
103+
"relatedList: 'quote_line'",
104+
"fieldGroups",
105+
"relatedLists: ['task'"
106+
],
107+
"must_not_contain": [
108+
"relatedList: 'primary',",
109+
"relatedList: 'primary' }",
110+
"definePage(",
111+
"kind: 'full'",
112+
"relatedLists: ['quote_line'"
113+
]
114+
}
55115
}
56116
]
57117
}

0 commit comments

Comments
 (0)