diff --git a/.changeset/37042-skills-inline-edit-boolean.md b/.changeset/37042-skills-inline-edit-boolean.md new file mode 100644 index 00000000000..b2aa46f037e --- /dev/null +++ b/.changeset/37042-skills-inline-edit-boolean.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the data and UI skills no longer teach a boolean `inlineEdit` on a master-detail relationship + +Clause-②: no +Metadata-protocol: none + +objectstack-data's `rules/relationships.md`, "Inline-edit form factor": the `inlineEdit: true // auto (default)` line is gone, and the smart default is now described as what an omitted key gets, with a note that a boolean is refused. The spec parse refuses `true` and `false` on a relationship field's `inlineEdit` since 18.7.0; only `'grid'` and `'form'` are accepted, and leaving the key out picks the form factor from the child's shape. `evals/objects-fields-relationships.json` case 25 drops the same `true` from its expected answer. objectstack-ui's `rules/list-views.md`, Master-Detail Forms: the pointer to that section no longer lists `true` beside `'grid'` and `'form'`; it says `'grid'` / `'form'` or left out. diff --git a/skills/objectstack-data/evals/objects-fields-relationships.json b/skills/objectstack-data/evals/objects-fields-relationships.json index a883818441a..cca5a5f31a2 100644 --- a/skills/objectstack-data/evals/objects-fields-relationships.json +++ b/skills/objectstack-data/evals/objects-fields-relationships.json @@ -436,7 +436,7 @@ { "id": 25, "prompt": "`quote_line` 通过 `master_detail` 字段 `quote` 归属 `quote`。新建报价单时要在表单里直接录明细,和报价单一起保存。该怎么声明?", - "expected_output": "On the PARENT `quote` object, a field group that names the child: `fieldGroups: [..., { key: 'lines', label: '明细', relatedList: 'quote_line' }]` (such a group holds no fields). The standard create/edit form of `quote` then enters the lines at that group and saves quote + lines in one atomic transaction, and the record page draws the same table there. Without the group nothing changes: `quote_line` is a tab and the form has no lines, whatever `inlineEdit` on `quote_line.quote` says; `inlineEdit` only picks how the rows are edited (`'grid'` / `'form'`, `true` or absent picks by the child's shape). No custom page and no form view is needed. If either object declares `enable.apiMethods`, it must list `'bulk'`.", + "expected_output": "On the PARENT `quote` object, a field group that names the child: `fieldGroups: [..., { key: 'lines', label: '明细', relatedList: 'quote_line' }]` (such a group holds no fields). The standard create/edit form of `quote` then enters the lines at that group and saves quote + lines in one atomic transaction, and the record page draws the same table there. Without the group nothing changes: `quote_line` is a tab and the form has no lines, whatever `inlineEdit` on `quote_line.quote` says; `inlineEdit` only picks how the rows are edited (`'grid'` / `'form'`; absent picks by the child's shape). No custom page and no form view is needed. If either object declares `enable.apiMethods`, it must list `'bulk'`.", "files": [], "assertions": { "must_contain": [ diff --git a/skills/objectstack-data/rules/relationships.md b/skills/objectstack-data/rules/relationships.md index d88c3ad5156..d17b2055813 100644 --- a/skills/objectstack-data/rules/relationships.md +++ b/skills/objectstack-data/rules/relationships.md @@ -285,12 +285,11 @@ The rendering side: objectstack-ui → Master-Detail Forms. `inlineEdit` only picks how a placed child's rows are entered: ```typescript -inlineEdit: true // auto (default) inlineEdit: 'grid' // editable line-item grid (fast bulk entry; thin children) inlineEdit: 'form' // read-only list; "Add" / per-row edit opens the FULL form ``` -**`true`** / omitted — **smart default**: picks `form` when the child has +Omitted (a boolean is refused) — **smart default**: picks `form` when the child has rich/form-only fields (textarea, file, image, json, location…) or more than ~8 editable fields, else `grid`. diff --git a/skills/objectstack-ui/rules/list-views.md b/skills/objectstack-ui/rules/list-views.md index 11d68a57d57..f1a997ebddd 100644 --- a/skills/objectstack-ui/rules/list-views.md +++ b/skills/objectstack-ui/rules/list-views.md @@ -387,7 +387,7 @@ custom page. Prefer, in order: is a tab and the form has no lines. A parent or child declaring `enable.apiMethods` must list `'bulk'`, or that save is refused `405 OBJECT_API_METHOD_NOT_ALLOWED`. `inlineEdit` only picks how rows are - edited, the `true` / `'grid'` / `'form'` ladder: + edited, `'grid'` / `'form'` or left out: **objectstack-data → Relationships → Inline Editing**. 2. **`object-master-detail-form` page block (bespoke layout).** Use a page only