You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e792da
Browse filesBrowse the repository at this point in the historyBrowse files
fix(scenarios): credit master-detail inline edit by the master's field groups, not inlineEdit: true (#37135)
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes#37127
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户无感:只改场景卡评分器;主从子表「在主记录表单内联编辑」这一项,改为只看主对象的字段分组是否放置了子表。
- 为什么做:主从子表的内联由主对象字段分组决定(「一律只看分组」),评分器却仍按已退役的布尔开关给分,按正规方式内联的构建反被判不合格。
- 出错会怎样:只影响场景评测分数,不影响任何运行中的应用;可直接回退本次改动。
- 要你做什么:无。
## What changes
`records-forms.master-detail-inline-edit`
(`packages/qa/scenarios/src/score/scenario-tags.ts`) credits a
master-detail child as edited inline ONLY when a field group of its
MASTER (the FK's `reference`) names it in `fieldGroups[].relatedList`
(by child object name or `object.field`) and the FK is one a group may
place. This is the runtime's own test, with the same two spec
predicates: objectui `attachInlineSubforms`
(`ui/packages/app-shell/src/providers/MetadataProvider.tsx`, lines
773-774) inlines a child only when `isGroupPlaceableRelationship(fk) &&
fieldGroupsPlaceRelationship(groupsOf(fk.reference), child, fk)`
(`packages/spec/src/data/related-list-body-table.ts`, lines 80 and 110).
`inlineEdit` takes no part. The `asserts` sentence and
`packages/qa/scenarios/README.md` (the tag table) say the same.
## Deviation from the card
The card asks to credit a child also "when `inlineEdit` is `'grid'` /
`'form'`". This PR does not. It follows the maintainer's field-group
ruling on #35889 (record 7046311205, 「一律只看分组」), which outranks the
card's wording: the runtime inlines nothing without a placing field
group (MetadataProvider.tsx L773-775; `inlineEdit` only feeds
`resolveInlineMode`, the form factor). A scorer that credited it would
pass a build that inlines nothing. Decided by the PM (zone a4-A).
## Tests
`packages/qa/scenarios/test/score/scenario-tags.test.ts`:
- The rich fixture inlines the tasks the supported way: a `project`
field group naming `task`, no `inlineEdit` on the FK.
- The degradation table pins two failing shapes: no placing group, and a
lone retired `inlineEdit: true`.
- A `describe` pins: field-group placement credits, by child name and by
`object.field`; a group on the CHILD, or a group naming an FK with
`relatedList: true`, does not credit; `inlineEdit: true` alone does not
credit; `'grid'` and `'form'` with no placing group do not credit; a
placed child credits under either form factor.
## Acceptance notes
- **Serial: lands after #36802** (merged at 22:27Z; `main` merged into
this branch since). Its `corpus.ts` places the golden corpus control
cards' children (`invoice_with_line_items`, `project_with_tasks`) with
field groups; before it, those two `scenario-cards.test.ts` pins read
red under the corrected tag. Measured green with #36802's `corpus.ts` in
place at head `2c1f1e68fa`: 137/137 across `scenario-cards.test.ts` and
`scenario-tags.test.ts`. The CI run on the merged head is the verdict.
## Verification
Two-minute check: `pnpm --filter @objectstack/scenarios exec vitest run
--maxWorkers=2 test/score/` should pass, including the `master-detail
inline edit` describe and both control cards.
Files to read first:
1. `packages/qa/scenarios/src/score/scenario-tags.ts`, the tag's `run`.
The risk is the master lookup: `rawObject(f, field.reference)` is
matched by normalised name.
2. `packages/qa/scenarios/test/score/scenario-tags.test.ts`, the rich
fixture edit in `richArtifact`. Every other tag scores this fixture.
Readings: the dev reports on #37127 (round 1 and fix round 7146536492).
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
fix(scenarios): the `records-forms.master-detail-inline-edit` tag credits a child its master's field group places, and no longer credits `inlineEdit` alone
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The tag now asks the same placement test the runtime's entry form uses: a master-detail child is edited inline on its master when a field group of the master names it (`fieldGroups[].relatedList`, the child object or `object.field`) and the FK is one a group may place. A build that inlines its lines that way, with no `inlineEdit` key, now passes the tag. `inlineEdit` alone credits nothing, whatever its value (`true`, `'grid'`, `'form'`): it does not place a child in the master's form, it only picks the form factor of a child a group places.
Copy file name to clipboardExpand all lines: packages/qa/scenarios/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ discrimination test; ⛔ never match by area prefix.
196
196
| Tag | Passes when the built artifact… |
197
197
|:---|:---|
198
198
|`records-forms.lookup`| carries a lookup field, and every lookup field resolves to an object the build or the platform serves |
199
-
|`records-forms.master-detail-inline-edit`| has every master-detail field resolving, and one of them edited inline on its master (`inlineEdit`) |
199
+
|`records-forms.master-detail-inline-edit`| has every master-detail field resolving, and one of them edited inline on its master: a field group of the master places the child (`fieldGroups[].relatedList`) |
200
200
|`records-forms.roll-up-summary`| carries a roll-up summary, each reading a child object that relates back and, unless it counts, a child field that exists |
201
201
|`records-forms.select-options`| carries a single-choice option field (`select`, `radio`), each offering at least two options |
202
202
|`records-forms.formula-field`| carries a computed field (a `formula` field, or a stored field with an `expression`), each expression compiling at `record` scope against its object's columns |
asserts: 'every master-detail field resolves, and one of them is edited inline on its master (`inlineEdit`)',
496
+
asserts: 'every master-detail field resolves, and one of them is edited inline on its master: a field group of the master places the child (`fieldGroups[].relatedList`)',
0 commit comments