Skip to content

feat(spec): a field group lists its own members and order (fieldGroups[].fields) - #35925

Merged
objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/project-thread-c46iru
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/project-thread-c46iru

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35900

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #35902

维护者速读

  • 分组现在可以自己列出成员和顺序(fieldGroups[].fields);写了它,分组里的字段按列表顺序显示,不再跟着对象的字段声明顺序走。
  • 不写 fields 的对象完全不变:字段自己的 group 仍然有效,是旧写法,继续读取,不删除。
  • 两种写法冲突时对象解析会拒绝(同一字段被两个分组列出、列表和字段自身 group 指向不同分组、同一列表重复、关联列表分组带 fields);列了对象没有的字段只跳过,os lint 给警告。
  • Studio 里在分组内拖动字段,只写这个分组的 fields,对象的字段顺序不动(列表视图的默认列顺序因此不受影响)。

What changes

Spec (@objectstack/spec)

  • ObjectFieldGroupSchema gains fields?: string[] (snake_case field names), the group's members in display order.
  • deriveFieldGroupLayout (ADR-0085 §5, the single derivation the record page and both forms already read) now resolves membership through a new readFieldGroupMembership(def) export: listed names first in list order, first listing wins, names the object does not declare are skipped; then a field whose own group names a group (listing or not) that has not placed it yet, in declaration order (so a field whose group names a listing group that leaves it out is appended after the list); everything else goes to the trailing ungrouped bucket. Hidden fields are filtered as before.
  • The object superRefine gains refuseFieldGroupMembershipConflicts: fields on a relatedList group; a name repeated in one list; a field listed by two groups (reported at the second listing); a listed field whose own group names a different group (reported at both places: fieldGroups[i].fields[j] and fields.<name>.group).
  • Field.group docs now call it the older spelling of membership, still read.
  • The object metadata form gains a Fields tags row in the field-group sub-form; translation bundles regenerated; the label and help text are translated in all ten locales (ffc02816; two derived count pins moved with history lines).
  • Liveness ledger: fieldGroups.children.fields row (live). References docs, api-surface, authorable-surface, export-origins and state counts regenerated.

Record page (@object-ui/plugin-detail)

  • The record:details sections[].group description and its renderer comment now say a referenced group's members come in list order first (they said declaration order); sdui.manifest.json, its record and content/docs/ui/components/record.mdx regenerated; the changeset adds '@object-ui/plugin-detail': minor (ebcbc493).

Docs

  • content/docs/ui/field-grouping-and-order.mdx gains a section on a group's own fields list: the agreement rules, the lint warning and an os:check example (ebcbc493).

Lint (@objectstack/lint)

  • New warning field-group-member-unknown for a listed name that is neither declared nor an injected platform column (an injected owner_id does not warn). Rules (b) and (d) count list members.

Studio (@object-ui/app-shell)

  • object-fields-io: groupMembership, currentGroupLayout and writeGroupLayout. A drag writes only the groups whose order changed (as their fields lists) and drops a moved field's own group when it would contradict the list; the object's fields are written only when the ungrouped bucket (which has no list) is reordered, and then only among the bucket's own declaration slots.
  • ObjectFormDesigner, ObjectFormCanvas (add, reorder, move by offset, move to group), ObjectFieldInspector (group select) and ObjectGroupInspector (member count; choosing a related list clears fields) read and write through those helpers. A drop that changes nothing writes nothing.
  • AI-added fields stay visible: a field no list names still shows, through its own group or the ungrouped bucket.

Not touched on purpose: buildDefaultPageSchema.ts and the form plugins (they already derive through deriveFieldGroupLayout and pass fieldGroups through), to stay clear of #35891 and #35889.

Why

Epic #35896: tabs and field groups are declared on the parent. A group's order lived in the object's field declaration order, so reordering inside a section in Studio rewrote the whole fields map (and moved list-view default columns with it). The list makes the section own its order.

Seat claim readings (claim 7046434371, amended 7046460603): a listed name the object does not declare is skipped, not refused (deleting a field or an AI tool's edit never makes the object unparseable; lint warns); a field one list names while its own group names a different value is refused, and so is a repeat in one list; Studio drags write group fields lists while the ungrouped bucket still reorders declaration order.

Tests

  • packages/spec/src/data/field-group-layout.test.ts: derivation (list order, legacy beside list, append, skipped missing and hidden names, listed system field kept, empty list dropped, first listing wins, the membership helper) and parse (accepted forms and every refusal). 32 tests.
  • packages/spec/src/data/object-strictness-batch20.test.ts: the pin that expected fieldGroups[].fields to be refused now accepts both spellings.
  • packages/lint/src/validate-semantic-roles.test.ts: list members count as referenced / shadowed; unknown-name warning; injected owner_id raises none; a list naming only missing fields gets rules (b) and (e).
  • ui/.../object-fields-io.test.ts: writeGroupLayout and groupEntries.
  • Designer drag pins (keyboardDrop-11871, keyboardGrid-11898, dndAnnouncements-11802, pinnedFields-27516) now read the layout the draft resolves to. New: a reorder writes only fieldGroups and leaves fields the same object; a cross-group move lists the field and drops its group. Two expectations moved on purpose: a drop that changes nothing writes nothing, and Owner dropped onto Condition in a section lands after it and stays there after a reload.

Acceptance notes

  • No dedicated canvas test for ObjectFormCanvas.addField / moveToGroup; they share writeGroupLayout, which is covered directly.
  • Browser run of the card's first acceptance line, desktop and 375 wide, with a control run: /mnt/project-files/build-seat1/35900/browser-check.md (showcase_account's contact group; the card's literal account/name example has no object in showcase, so the same rule was run on this group).

Verification

  • pnpm --filter @objectstack/spec test on head 53409dc: 866 files, 27813 passed, 1 todo, exit 0. (An earlier run had 2 failures, the batch20 pin and the metadata-form reconciliation; both are fixed above.)
  • ESLint over the changed .ts/.tsx files: exit 0 (0 errors, 25 warnings).
  • pnpm --filter @objectstack/lint test: 9348 passed; pnpm --filter @objectstack/lint typecheck: exit 0.
  • pnpm --filter @object-ui/app-shell type-check: exit 0 (after a full build).
  • UI vitest for the five touched designer / io test files: all pass.
  • node scripts/pm/dispatch-gates.mjs --commands: 123 commands, all exit 0 (four first answered exit 3 for missing build output or a shallow fixture commit and were re-run after turbo run build and fetching the fixture).
  • pnpm check:i18n, check:i18n-coverage, check:i18n-walk-parity, check:i18n-stale-fill: exit 0.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; ESLint over the changed files passes (0 errors).
  • 4. One issue, one branch off an up-to-date main, one pull request. (Branch name claude/project-thread-c46iru is the harness's.)
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq

A field group may list its own members in display order. A group that lists
none keeps the older rule (Field.group plus field declaration order), so
existing objects render as before. The object parse refuses the two spellings
disagreeing.

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…; warn on a listed name no field declares

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…oups' fields lists, not the object's field order

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…o; a reorder writes only the group's fields list

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…iveness for fieldGroups[].fields; changeset

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
Adds the Fields row to the metadata form's field-group sub-form, flips the
batch20 pin that expected fieldGroups[].fields to be refused, and regenerates
the translation bundles (zh-CN translated).

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation protocol:data tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 4 package(s): @objectstack/lint, @objectstack/metadata-core, @objectstack/platform-objects, @objectstack/spec, touching 17 documentable anchor(s). ⚠️ 6 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/spec/api-surface/data.json, packages/spec/authorable-surface/data.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

22 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 17ed9e7bfd65532d83109273837e4a44624dee5c.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 6 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/spec/api-surface/data.json, packages/spec/authorable-surface/data.json, …) — pages documenting those are invisible to this run
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 17ed9e7bfd65532d83109273837e4a44624dee5c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 2e463bc314cda36cdd51b7aa039eb87a54052583 — the merge of head e010381489b0cd259652b6a121070254423536d0 into base 17ed9e7bfd65532d83109273837e4a44624dee5c, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2e463bc314cda36cdd51b7aa039eb87a54052583 && git checkout 2e463bc314cda36cdd51b7aa039eb87a54052583
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 17ed9e7bfd65532d83109273837e4a44624dee5c e010381489b0cd259652b6a121070254423536d0 && git checkout -B drift-repro 17ed9e7bfd65532d83109273837e4a44624dee5c && git merge --no-ff e010381489b0cd259652b6a121070254423536d0

node scripts/docs-audit/affected-docs.mjs --json 17ed9e7bfd65532d83109273837e4a44624dee5c

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 17ed9e7bfd65532d83109273837e4a44624dee5c → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP

维护者速读

席位核对 — REWORK (L1-c), one mechanical item · repo:objectstack#1 · head 53409dca9e · 2026-11-20T19:13Z

The face: published schema (object.zod.ts fieldGroups[].fields and the object superRefine, field.zod.ts group describe, field-group-layout.ts with the new export readFieldGroupMembership), and Clause-②: yes (widening) with Metadata-protocol: added. Not Tier H. The contract L2 at CONTRACT_REVIEW_TIER is the seat's, and this L1 does not replace it.

Must-fix

  1. Changeset misses @objectstack/platform-objects. The diff regenerates 11 metadata-forms translation bundles and their source hashes in packages/platform-objects (the new Fields row of the field-group sub-form). That package is published (files: ["dist", …]) and the bundles ship with it, but .changeset/35900-field-group-members.md lists only spec, lint and app-shell (l1-face changeset FLAG). added takes at least minor on every package the diff moves, so add '@objectstack/platform-objects': minor. feat(spec, ui): a master_detail child is a tab by default; a field group puts it in the overview and the form #35921 lists the same package for its two bundles.

Nits (no re-read needed)

  1. Overlaps to expect on merge: object.zod.ts ObjectFieldGroupSchema (feat(spec, ui): a master_detail child is a tab by default; a field group puts it in the overview and the form #35921 rewrites the relatedList describe next to the new fields key) and ObjectGroupInspector.tsx (feat(spec, ui): a master_detail child is a tab by default; a field group puts it in the overview and the form #35921 switches its picker to isPlaceable; this PR adds the member count and clears fields when a related list is chosen). Whichever lands second merges main and re-runs those files' tests.
  2. No browser run. The record page and both forms read the new order only through deriveFieldGroupLayout, which is pinned directly, so this is not blocking. One run of the card's first acceptance line (fields: ['account', 'name'] puts 客户 first on the record page and in the form, desktop and 375) would still be worth having before landing.

Checked and fine

  • Shape. Draft, base main, Fixes #35900 with no other closing keyword. Merging delivers every item on the card, so Fixes is right. Skills-docs: follow-up #35902 is true: 技能、文档、示例和 HotCRM 用上记录页的新写法:relatedLists 列页签、分组列字段、分组指向子表、扩展包声明位置 #35902 covers 「分组列字段」.
  • Card item 4, the four conflicts. Each has a parse or derivation test: a listed field whose own group names another group is refused at fieldGroups[i].fields[j] and at fields.<name>.group; a field two lists name is refused at the second listing; a group naming a listing group that leaves the field out is appended after the list; an unlisted field with no group goes to the untitled bucket. A repeat inside one list is refused too (claim reading 2). Item 5: fields on a relatedList group is refused.
  • No new key, same behaviour. A group without fields resolves as before: own group, declaration order. Every new refusal needs the new key, so nothing that parsed on main is refused. That is right for added, and the batch20 pin that refused fieldGroups[].fields as guidance now accepts it, on purpose.
  • One derivation for every reader (item 6). git grep deriveFieldGroupLayout at this head finds the record page (record-details.tsx, buildDefaultPageSchema.ts, recordDetailSections.ts), the forms (plugin-form/fieldGroups.ts, console FormPage.tsx), Studio, and the lint rules (object-field-groups.ts, validate-field-consumers.ts, i18n-walk.ts). Each picks the list up without its own edit. The remaining direct field.group readers are unrelated: the book resolver groups docs, and plugin-security reads its own platform object's group.
  • Studio (item 7). The new pin checks that a reorder inside a group writes only fieldGroups and leaves fields the same object. A cross-group move lists the field and drops its contradicting group. Only the untitled bucket, which has no list, still reorders declarations. A field no list names stays visible through its group or the bucket, which covers the card's AI-build line.
  • Lint. field-group-member-unknown warns on a listed name that is neither declared nor injected, and an injected owner_id is spared.
  • Prose read sentence by sentence: the changeset and the Field.group TSDoc and describe. Both match the diff. The generated content/docs/references/** is covered by check:generated.
  • Overlap. buildDefaultPageSchema.ts and the form plugins are untouched, as the claim said, so 记录页默认页不再画阶段条和顶部关键字段条;阶段改成记录名旁的状态标签,点开下拉切换(图 41) #35891's and 主从子表默认只是页签,不再自动放进概览和表单;只有字段分组指定时才放进去 #35889's regions are clear.
  • Gates. At 53409dca: 12 success, 9 expected skip, 0 failed, 26 pending, and the floor checks are not reported yet. Vitest was NOT MEASURED by L1. After finding 1, I read only the delta and give ACCEPT on a green head.

Generated by Claude Code

…ted form bundles

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…wo derived count pins

The new fieldGroups.fields sub-row of the object form carried the English
source in nine translated locales, which the echo ledgers refuse. Each locale
now has its own text, and the open-leaf and translated-leaf counts move by
the new row.

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
…e names the list order

Adds the fieldGroups[].fields section to the field grouping page, and corrects
the record:details sections[].group description (and its renderer comment),
which still said a referenced group's members come in declaration order.
Manifest and component reference regenerated.

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-20T20:22Z. The brief handed to the isolated contract reviewer at CONTRACT_REVIEW_TIER for PR #35925 (owed by the published-schema face: packages/spec/src/data/**, and the PR's Clause-②: yes (widening) line). The record follows as its own comment.

Contract review brief — PR #35925 @ ebcbc4932206f1d808a9017a4cce18360f035d64 (card #35900)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --paths packages/spec/src/data/field-group-layout.ts packages/spec/src/data/field.zod.ts packages/spec/src/data/object.form.ts packages/spec/src/data/object.zod.ts — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35900: its body and EVERY comment (rulings and earlier records included)
· PR #35925: its body, its file list, and the net diff against main at ebcbc4932206f1d808a9017a4cce18360f035d64
· the check-runs on ebcbc4932206f1d808a9017a4cce18360f035d64: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the paths reviewFace returns as hits on this PR's file list: packages/spec/src/data/field-group-layout.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/object.form.ts, packages/spec/src/data/object.zod.ts;
plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
Widen it freely, ⛔ never below hits; the record's Scope: line names the implementing files apart from hits.
The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
ACCEPT at TIER_DEFAULT, exactly as a standalone PR of those files.
④ judges the hits files and those implementing files ONLY:
lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
code outside the diff is READ to judge them, never reviewed.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35925/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — for EVERY hits file: does the change hold against the code it cites and the
scenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
on main; a schema file against the ruling or ADR it implements and its first consumer; an ADR
against its first consumer and its execution plan. For EVERY implementing file in the diff: does the
code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade, S1 (should-fix) — …, and a clean round as
No must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head and
refuses the record; the delta record names those it closes by id alone, S1: closed.
A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ebcbc4932206f1d808a9017a4cce18360f035d64
Local-runs: none
Scope: packages/spec/src/data/field-group-layout.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/object.form.ts, packages/spec/src/data/object.zod.ts + packages/lint/src/validate-semantic-roles.ts, packages/spec/liveness/object.json, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts, ui/packages/app-shell/src/views/metadata-admin/previews/ObjectFormCanvas.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/app-shell/src/views/studio-design/ObjectFormDesigner.tsx, ui/packages/app-shell/src/views/studio-design/ObjectGroupInspector.tsx, ui/packages/plugin-detail/src/index.tsx, ui/packages/plugin-detail/src/renderers/record-details.tsx

Inputs read: card #35900 (body and its 4 comments: claim 7046434371, amendment 7046460603, triage 7046618581, dev report 7048321732), PR #35925 (body, 48 files, net diff against merge-base f44758b2), and the check-runs on the head, read at 2026-11-20T20:28Z. Every completed check-run on the head concluded success or skipped; none failed. One Check Changeset run (started 20:22Z, after a PR-body edit) was still in progress when read; the earlier Check Changeset run on the same head concluded success.

① Derived judgments

  • ObjectFieldGroupSchema.fields (optional array of snake_case field names) is a new authorable key. Right as a widening: on main the strict group shape refused fields with a guidance message, so no document that parses today changes meaning. The object-strictness-batch20 pin moved with it.
  • The four new refusals in refuseFieldGroupMembershipConflicts (a list on a relatedList group, a repeat in one list, a field two groups list, a listed field whose own group differs) fire only when a group carries a fields array. Right: none narrows today's accept set.
  • deriveFieldGroupLayout for input with no list on any group: walked against the main loop, the result is the same (declared-group membership through Field.group, hidden filtered, an explicitly grouped system field kept, ungrouped system fields left out, empty groups dropped). Right.
  • New public exports readFieldGroupMembership and FieldGroupMembership from @objectstack/spec/data; api-surface and export-origins regenerated. Right.
  • Field.group: description only, accept set unchanged. Right.
  • @objectstack/lint: new warning field-group-member-unknown; rules (b) and (d) read membership through readFieldGroupMembership. Right: a warning, and the two older rules only stop misreporting list members.
  • object.form.ts: a tags row for the new key; generated translation bundles follow. Right.
  • The object document SERVED to a caller under field-level security: wrong, see M1. The served-document mask does not know the new key, so the list this PR publishes does not reach such a caller.

② Semver level

The changeset bumps @objectstack/spec, @objectstack/lint, @object-ui/app-shell, @objectstack/platform-objects and @object-ui/plugin-detail at minor. That matches what the diff publishes: one new optional key, one new export, one new lint warning, new Studio behaviour, regenerated form translations, and a changed manifest description. Nothing in the diff removes or narrows a published shape, so no major is owed.

Clause-②: yes (widening) — the same line is on the PR body and in the changeset, and it agrees with the diff. Metadata-protocol: added is on both and agrees with the claim amendment 7046460603.

③ Boundary flags

④ Design judgment

M1 (must-fix) — packages/spec/src/data/object.zod.ts, the fields contract ("decides which fields the group shows and in what order, on every surface that renders the group"), does not hold for a caller with any listed field denied by field-level security. packages/metadata-core/src/object-schema-fls-references.ts (not in the diff) scrubs the served object document; its fieldGroups block classifies key, label, icon, description, collapse, defaultExpanded, collapsible, collapsed, visibleWhen, relatedList and nothing else. scrubRecord sends an unlisted key to unclassified, which removes the whole key when its value mentions a denied name. So when one name in fieldGroups[i].fields is denied, the entire list is deleted from the document applyObjectSchemaMask serves (REST meta-item-read-gate.ts and rest-server.ts, and the MCP bridge). The client then derives with the older rule. Under the spelling this PR recommends, and the one Studio writes (it drops a moved field's own group), the readable members carry no group, so the section disappears and its fields fall into the untitled bucket in declaration order; for a group Studio converted from the older spelling, the order reverts and moved fields leave the group. Nothing leaks (the fail-safe over-masks), but the record page and both forms silently lose the layout for exactly the users FLS exists for. The fix is to classify the key as a name list (fields: names, which filters the denied entry and keeps the rest), pin it with a test beside the existing fieldGroups cases, and correct that module's note that readable fields join a group "through their own group". The module's closed-set pin covers top-level ObjectSchema keys only, which is why the head's checks are green; extending it to the nested group shape is a follow-up, not part of this fix.

S1 (should-fix) — object.zod.ts refuseFieldGroupMembershipConflicts refuses a listed field whose own group is ANY string other than the listing group's key (own === key is the only pass). Every contract sentence in the diff (ObjectFieldGroupSchema design rules, the fields jsdoc and describe, Field.group, the form help text, the docs page, the changeset) and the card's rule say "names another group". A group naming an undeclared key is not another group: on main it means ungrouped, and lint reports it as field-group-undeclared. The gap is reachable through Studio's own output: a first drag inside an older-spelling group writes the list while the members keep group: KEY; renaming that group's key in the metadata form then makes every listed member's group name an undeclared key, and the save is refused at two paths per member. object.form.ts still tells the author on the key row that renaming it "leaves them ungrouped", which is no longer true for listed members in either reading. No test pins the undeclared case. Decide one way: judge only a group that names another DECLARED group (the list already wins in the layout, and lint already warns about the stale key), or keep the wider refusal and say "any other value" in each sentence; either way add the test and correct the key help text.

Nits (no effect on correctness or the contract):

  • object.zod.ts, the guidance block of ObjectFieldGroupSchema: the comment "Membership is declared the OTHER WAY ROUND ..." introduced the fields guidance entry this PR deletes. It now sits above order and says the opposite of the new contract.
  • object.zod.ts tombstone guidance for detail and defaultDetailForm, and packages/lint/src/object-field-groups.ts hints (named in the claim's file surface, not in the diff), still teach only Field.group on member fields. Follow-up with 技能、文档、示例和 HotCRM 用上记录页的新写法:relatedLists 列页签、分组列字段、分组指向子表、扩展包声明位置 #35902.
  • packages/plugins/plugin-security/src/objects/default-permission-sets.ts identityAdminGroupFields reads SysUser fields by field.group === 'Admin' to build the withheld field set. It is a non-layout reader of the older spelling: moving sys_user to group lists would silently empty that set. Not touched here; worth a line on the follow-up card before any platform object is migrated.

Held, after trying to break it:

  • field-group-layout.ts: listed names resolve first-listing-wins with an own-property test against fields, so constructor or __proto__ in a list places nothing; hidden fields are filtered after membership, so readFieldGroupMembership and the layout agree on who belongs where; a list on a relatedList group is not read, matching the parse refusal. The module header's rule list matches the code sentence by sentence.
  • field.zod.ts: the group jsdoc and describe match the derivation (same group allowed, left-out field appended after the list).
  • object.form.ts: the fields row matches the schema; only the key help text is off (S1).
  • validate-semantic-roles.ts: membership comes from the spec helper over declared plus injected columns, so lint and the layout cannot disagree; rule (e) skips relatedList groups, which the parse already refuses.
  • liveness/object.json: the fields row names real readers (readGroup, resolveFieldGroupMembership) and both consumers pass fieldGroups through unchanged (plugin-form/src/fieldGroups.ts, buildDefaultPageSchema.ts).
  • object-fields-io.ts writeGroupLayout: a changed group gets a list, an unchanged group is returned as the same object, a moved field's contradicting group is dropped, fields the canvas does not show are kept at the end of the list, and fields is written only for the ungrouped bucket's own slots. Its output never trips the four refusals. ObjectFormDesigner, ObjectFormCanvas, ObjectFieldInspector and ObjectGroupInspector read and write through it; choosing a related list clears the list.
  • plugin-detail: description and comment text only, and they match the derivation.

Implemented-by: claude/project-thread-c46iru
Reviewed-by: L2 sub-agent of session_01L6bhgUkbQqRUUFSiu2HGob (isolated, CONTRACT_REVIEW_TIER)

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP

维护者速读

  • L1 通过:上次只差的那行 changeset 已补;另外补齐了 10 种语言的表单译文、一节使用文档,还做了浏览器验证(桌面和手机宽 375,带对照组),结果都和卡一致。
  • 还要做的:Fable 契约审核(座位负责)。
  • 要你做什么:现在不需要。

席位核对 — delta ACCEPT (L1-c) · repo:objectstack#1 · head ebcbc49322 · 2026-11-20T20:31Z

This record covers the delta from my REWORK 7048369880 at 53409dca to ebcbc493: three commits.

  • c982c37 — finding 1 fixed. The changeset adds '@objectstack/platform-objects': minor.
  • ffc02816 — i18n. The new fieldGroups[].fields form row is translated in the ten non-en locales. --write drops their source-hash rows. Two derived count pins in platform-objects move with history lines that name 字段分组自己列出成员和顺序(fieldGroups[].fields);字段上的 group 作为旧写法继续读 #35900: OPEN_LEAVES goes 124 → 126 (one row's label and help text), and the per-locale positive control goes 754 → 755 (one row label). Each move matches what the commit adds, so no pin is voided.
  • ebcbc493 — docs drift. This adds a section to content/docs/ui/field-grouping-and-order.mdx, read sentence by sentence against the diff:
    • "the list wins … whatever order the object declares them in" matches readFieldGroupMembership.
    • "a field the list leaves out but whose own group names the group is shown after the listed ones" matches card item 4c.
    • The four refusals named are the four the object superRefine raises.
    • "a listed name the object does not declare is skipped … field-group-member-unknown" matches the lint rule.
    • "dragging a field inside a group writes that group's fields list" matches writeGroupLayout.
    • The os:check sample parses under the new key.
    • plugin-detail's record:details sections[].group describe and the renderer comment now say "list first, then group", which is true of deriveFieldGroupLayout. sdui.manifest.json, scripts/sdui-manifest.record.json and content/docs/ui/components/record.mdx are regenerated from it, and the changeset adds '@object-ui/plugin-detail': minor for it.
  • Browser (/mnt/project-files/build-seat1/35900/browser-check.md, head c982c37, whose source is the same as this head's). showcase_account's contact group with fields: ['billing_email', 'website'] draws Billing Email, Website, then Headquarters (a member that is not listed). That order holds on the record page and the edit form, at desktop and at 375 width. With the edit reverted, the control run draws the old declaration order. This is the card's first acceptance line, with the item-4c append.
  • Gates. At ebcbc49322: 63 success, 11 expected skip, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check both success. l1-face is CLEAN. Vitest was NOT MEASURED locally by L1.
  • Landing terms. The face is published schema plus Clause-②: yes (widening), not Tier H. A same-shape CONTRACT_REVIEW_TIER L2 PASS on the current head is owed, and this L1 does not replace it. The seat adopts and lands. Fixes #35900 closes the card on merge.

Generated by Claude Code

…elds list; only a declared group disagrees with a list

The field-level-security mask of the served object document did not classify
fieldGroups[].fields, so one denied name dropped the whole list and the
caller's record page and forms fell back to the older rule. It is now a name
list: the denied name is filtered out and the readable ones keep their order.

The agreement refusal now judges a listed field's own group only when it
names another DECLARED group; a group naming no declared key means ungrouped,
so renaming a group's key no longer makes its listed members unparseable. The
key row's help text says what a rename does (retranslated in every locale),
and the orphaned guidance comment above order is gone.

Claude-Session: https://claude.ai/code/session_01L6bhgW2k3CdkgnLxXGxAfq
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-20T20:51Z. The DELTA brief handed to the same isolated contract reviewer at CONTRACT_REVIEW_TIER for PR #35925 (delta of its record 7049878953 on ebcbc493; the first brief is 7049763616). The record follows as its own comment.

Contract review brief — PR #35925 @ e010381489b0cd259652b6a121070254423536d0 (card #35900)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --paths packages/spec/src/data/field-group-layout.ts packages/spec/src/data/field.zod.ts packages/spec/src/data/object.form.ts packages/spec/src/data/object.zod.ts — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35900: its body and EVERY comment (rulings and earlier records included)
· PR #35925: its body, its file list, and the net diff against main at e010381489b0cd259652b6a121070254423536d0
· the check-runs on e010381489b0cd259652b6a121070254423536d0: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the paths reviewFace returns as hits on this PR's file list: packages/spec/src/data/field-group-layout.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/object.form.ts, packages/spec/src/data/object.zod.ts;
plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
Widen it freely, ⛔ never below hits; the record's Scope: line names the implementing files apart from hits.
The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
ACCEPT at TIER_DEFAULT, exactly as a standalone PR of those files.
④ judges the hits files and those implementing files ONLY:
lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
code outside the diff is READ to judge them, never reviewed.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35925/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — for EVERY hits file: does the change hold against the code it cites and the
scenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
on main; a schema file against the ruling or ADR it implements and its first consumer; an ADR
against its first consumer and its execution plan. For EVERY implementing file in the diff: does the
code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade, S1 (should-fix) — …, and a clean round as
No must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head and
refuses the record; the delta record names those it closes by id alone, S1: closed.
A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: e010381489b0cd259652b6a121070254423536d0
Local-runs: none
Scope: packages/spec/src/data/field-group-layout.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/object.form.ts, packages/spec/src/data/object.zod.ts + packages/metadata-core/src/object-schema-fls-references.ts, packages/lint/src/validate-semantic-roles.ts, packages/spec/liveness/object.json, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts, ui/packages/app-shell/src/views/metadata-admin/previews/ObjectFormCanvas.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/app-shell/src/views/studio-design/ObjectFormDesigner.tsx, ui/packages/app-shell/src/views/studio-design/ObjectGroupInspector.tsx, ui/packages/plugin-detail/src/index.tsx, ui/packages/plugin-detail/src/renderers/record-details.tsx

Delta review of the one commit e01038148 on ebcbc4932206f1d808a9017a4cce18360f035d64, against record 7049878953 (FAIL). Read: the diff between the two heads (17 files) and the check-runs on the new head, read at 2026-11-20T20:51Z. Of 37 check-runs on the new head, 8 concluded success, 9 skipped, none failed, and 20 were still in progress (the build, test-shard planning, type-check, lint families and Check Changeset). This record judges the code; the gate verdicts are those runs' conclusions once they land, and they are not yet in.

① Derived judgments

  • The served object document under field-level security now keeps fieldGroups[].fields with denied names filtered out. Right: this is the surface the first record named wrong.
  • The parse refusal for a listed field whose own group differs now fires only when that group names another declared group. Right: it is narrower than the previous head, sits wholly inside the new key, and matches the contract wording.
  • No other accept-set or public-surface change in the commit. The other judgments of record 7049878953 stand.

② Semver level

The changeset adds '@objectstack/metadata-core': minor and a paragraph on the served document. Right: the package's served output changes for the new key, and minor matches the rest of the set. The refusal sentence in the changeset now says "another declared group".

Clause-②: yes (widening) — unchanged on the changeset, and still what the diff publishes.

③ Boundary flags

No new dev flag and no open question in this round. The commit adds no query, id materialisation or in-app join, so the SQL push-down check finds nothing.

④ Design judgment

M1: closed. OBJECT_REFERENCE_POSITIONS.fieldGroups now classifies fields: names. Read against nameList: a denied string entry is filtered, the remaining entries keep their order, an untouched list is returned as the same reference, and a list emptied entirely is deleted, which leaves the older rule for a group whose every listed member is denied. The module note now says members join through the list or their own group, and that the list is a name list. Two tests pin it: one with a denied name first in a three-name list beside an untouched group, and a control where nothing is denied.

S1: closed. refuseFieldGroupMembershipConflicts builds the set of declared keys and returns when the field's own group is not in it, so only another declared group is a disagreement. The helper docblock says so and gives the rename case as the reason. A new test parses a listed field whose group names an undeclared key and checks the layout keeps it in the listing group in list order. The key help text in object.form.ts now states both cases correctly (listed members stay on a rename; a field joining by its own group is left ungrouped), and the eleven generated bundles carry the new text. The remaining contract sentences ("names another group") in the schema, Field.group, the docs page and the form's fields row are now true as written.

The orphaned guidance comment in ObjectFieldGroupSchema is removed. The two other nits of the first record (older-spelling hints in tombstone guidance and object-field-groups.ts; the sys_user Admin group reader in plugin-security) are left for #35902, as accepted deviations.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-c46iru
Reviewed-by: L2 sub-agent of session_01L6bhgUkbQqRUUFSiu2HGob (isolated, CONTRACT_REVIEW_TIER)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP

维护者速读

  • L1 通过:Fable 契约审核指出的两处已改好。一是字段权限遮蔽时,被隐藏的字段会从分组的字段列表里拿掉,其余字段顺序不变。二是只有两个都被声明的分组同时认领一个字段时才报错。CI 全绿,Fable 复审也已通过。
  • 还要做的:座位按 Tier S 合入。
  • 要你做什么:现在不需要。

席位核对 — delta ACCEPT (L1-c) · repo:objectstack#1 · head e010381489 · 2026-11-20T21:18Z

This record covers the delta from my ACCEPT 7049926873 at ebcbc493 to e0103814: one commit. It answers Fable L2 7049878953.

  • FLS mask. metadata-core object-schema-fls-references.ts now filters denied names out of fieldGroups[].fields and keeps the order of the rest. The new test pins that, with a CONTROL case for a grant that hides nothing.
  • Conflict refusal. The object.zod.ts superRefine now refuses a field only when another DECLARED group lists it. A field whose group names an undeclared key is placed by the list, and field-group-layout.test.ts pins that case.
  • Help text. The key's help text changes in object.form.ts and in the 11 generated bundles, one line each, and the two match.
  • Changeset. It adds '@objectstack/metadata-core': minor and an FLS paragraph. I read the paragraph sentence by sentence, and it matches the diff.
  • Gates and reviews.
  • Landing terms. As before: published schema plus Clause-②: yes (widening), not Tier H. The seat lands it. Fixes #35900 closes the card.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

L2 adoption and landing · 2026-11-20T21:20Z · The seat adopts the isolated contract-review delta record 7050332839 on head e0103814 (served at CONTRACT_REVIEW_TIER, owed by the published-schema face packages/spec/src/data/** and Clause-②: yes (widening)). It is PASS with no must-fix or should-fix, and it closes M1 and S1 of the earlier FAIL record 7049878953 on ebcbc493 by id. Delta brief 7050324981, first brief 7049763616. The review widened its scope to the FLS mask packages/metadata-core/src/object-schema-fls-references.ts.

L1-c: the L1 record 7049926873, then the delta ACCEPT 7050874807 on e0103814 (this head). check-governed-merges --pr 35925 reads NOT governed, with 1470 changed lines. landing-k reads K = 1. On this head, all 70 check-runs are success or skipped. The seat readies this PR and arms auto-merge in this same stroke. The PR carries Fixes #35900. Skills-docs: follow-up #35902. Next: PR #35938 shares rule (d) of packages/lint/src/validate-semantic-roles.ts with this PR, so it merges main after this lands and re-runs that test.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 21:21
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 170ca48 Nov 20, 2026
71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-c46iru branch November 20, 2026 21:53
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…st, a group's own fields and the pinned details column (objectstack-ai#35902, objectstack-ai#35942) (objectstack-ai#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 objectstack-ai#35902
Fixes objectstack-ai#35942
Part of objectstack-ai#36188

Clause-②: no
Metadata-protocol: none
Skills-docs: updated here
Security-touching: no

Area: b1-RS. Claims: objectstack-ai#35902 7072867188 (slice 2; it redoes slice 1,
whose branch never reached GitHub), objectstack-ai#35942 7072873584 (folded), objectstack-ai#36188
7072882981 (this PR is its skills half; the seven platform-checklist
JSON items are PR B, `Fixes objectstack-ai#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']`,按现在的规则这会把其他页签全藏掉。技能和评测改成「列出要保留的全部页签,任务排第一」。
- 主从子表默认是页签(objectstack-ai#35921 之后),技能不再说「默认是正文表」;父对象分组指向子表才进字段区,而且只在使用者明确要求时才写。
- 第 1 片(分组用 `fields` 列成员、不再有阶段条和关键字段条、阶段在名字旁的状态标签里)当时没推上来,这次一起补上,关掉
objectstack-ai#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) (objectstack-ai#35938, objectstack-ai#35942). `fieldGroups` are the
Details sections, each listing its members in `fields`; absent, the
fields whose `group` names it (objectstack-ai#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 (objectstack-ai#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" (objectstack-ai#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 (objectstack-ai#35902's
open question); its tab stays unless a declared `relatedLists` omits it
(objectstack-ai#35889's note, seat reading 7048340194, as shipped by objectstack-ai#35923). The old
"`'primary'` default for a master_detail" and "`relatedLists: ['task']`,
no page file" are removed (objectstack-ai#35921, objectstack-ai#35923).
- Step 6: the ⊟ right-column switch is removed (objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#36188`, in a new session after
this merges.
- objectstack-ai#35902 stays open for the objectstack-ai#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

字段分组自己列出成员和顺序(fieldGroups[].fields);字段上的 group 作为旧写法继续读

2 participants