Skip to content

fix(plugin-detail): an authored record page folds its all-empty field groups into one closing line - #35161

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-35019-empty-groups-line
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-35019-empty-groups-line

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #35019
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:自建记录页(如 HotCRM 商机页)的「明细」里,字段全空的分组不再各占一张带边框的卡,而是折进明细末尾的一行「商机叙述 · 备注与下一步 · 2 个空分区 · 展开」,与默认记录页同一个设计;点「展开」后两组回到原位,各自是一张卡(标题加一行「显示 N 个空字段」),从那一行可显示并就地编辑字段。
  • 为什么改:新建商机时这两张空卡各占约 80px,看起来像有内容,其实什么都没有;默认记录页早已折成一行,自建页没有跟上。
  • 风险与回滚:只改 record:details 明细体的只读展示;有内容的分组(含其「显示 N 个空字段」)、编辑态、打印页、独立的 detail-view 都不变。回滚即 revert 本 PR,无数据或元数据迁移。
  • 先看:ui/packages/plugin-detail/src/DetailView.tsx(决定哪些明细体画这一行的判断)、ui/packages/plugin-detail/src/renderers/record-details.tsx(record:details 打开该判断的包裹)、packages/spec/src/ui/component.zod.ts(hideEmpty 的 describe 改写)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/EmptySectionsLine.authoredPage-35019.test.tsx,预期 10 个测试全部通过。
  • 需要你做的:无,席位落地。

What changes

On an authored record page, a record:details body drew every group the page keeps with hideEmpty: false as its own bordered card even when all its fields were empty: a card holding a heading and one "Show N empty fields" row. The synthesized default page already folds such groups into one closing line (EmptySectionsLine, objectstack#27055 Target 2), but DetailView drew that line only under DefaultRecordPageContext, so an authored page fell to the whole-body fold, which folds only when every group is empty. Scope as corrected on the card (comment 6970082809): draw the same line on authored record:details pages, no new design, no new metadata key.

  • The switch. RecordDetailsRenderer now wraps the DetailView it mounts in a new module-internal EmptySectionsLineContext (in defaultRecordPage.ts, beside the other record-page face contexts; not re-exported from the barrel, not a prop, not a schema key, the RecordPageProvenanceContext precedent). DetailView draws EmptySectionsLine when that context or useDefaultRecordPage() is on and the body has no sectionGroups. Every other body keeps EmptySectionsFold unchanged.
  • Paths an authored record:details reaches, and which this covers. record:details always hands DetailView a schema with sections (or the direct-fields fallback), never autoTabs, tabs or sectionGroups, so it always reaches the non-tab sections block, which is the branch this changes. The HotCRM opportunity page's { group } references are resolved to sections with fields by the renderer, so they arrive as sections. Not changed: the autoTabs body and sectionGroups bodies (reached only by a detail-view node), and the direct-fields fallback (one section, no fold either way). A bound record:details (per-element dataSource) draws the line too; measured producers of a bound record:details in HotCRM and the showcase/CRM examples: 0.
  • The whole-body fold. On a record:details body it is subsumed by the line: a body whose every kept group is empty now draws the line naming them all, where it drew one unnamed "Show N empty fields" row (pinned). Everywhere else it keeps working as before (CONTROL pin, and the objectui#13386 suite, unchanged and green).
  • Kept as is. A group with a value draws as before, its own "Show N empty fields" row included. Edit mode and a print page draw every group. hideEmpty keeps its default, and a group the default hides is never named in the line.
  • Contract prose the change would make false, restated (ruling 6970082809; ruling C on objectui#13386 is kept as the expanded face). The describe() of RecordDetailsProps.sections[].hideEmpty in @objectstack/spec said a kept all-empty section renders, read-only, as its heading plus one fold row. On record:details, its only renderer, it is now named in the closing line first. Restated there and in its mirrors: the @object-ui/types docs (RecordDetailsProps section, DetailViewSection.hideEmpty), the record:details sections input description in the component registry, the plugin README. Regenerated, not hand-edited: content/docs/references/ui/component.mdx (check:generated --fix), sdui.manifest.json with scripts/sdui-manifest.record.json (node scripts/gen-sdui-manifest-node.mjs), content/docs/ui/components/record.mdx (node scripts/gen-sdui-reference.mjs).
  • Two stale pins, updated. record-details.emptySectionDefault.test.tsx and record-details.hideEmptyRetired-7129.test.tsx each pinned a kept all-empty section drawing its heading first through record:details, the exact face this changes. Both now assert the line names it, expand the line, and then assert the same heading plus fold row as before.

Tests

  • New: ui/packages/plugin-detail/src/__tests__/EmptySectionsLine.authoredPage-35019.test.tsx, 10 tests, through the real RecordDetailsRenderer with no DefaultRecordPageContext (the HotCRM opportunity's groups as the fixture):
    • two all-empty kept groups beside two filled ones: one line, count 2, naming both, after every drawn group; only the two filled groups draw a card;
    • the partly-filled group keeps its own "Show 5 empty fields" row, before and after expanding;
    • expanding draws all four groups in their authored order, each empty one as its heading plus its own fold row; collapsing folds them back;
    • revealing a group's empty fields and double-clicking one enters inline edit, and edit mode draws every group with inputs (no line);
    • every group empty: the line names them all and no whole-body row is drawn;
    • a group hidden by the hideEmpty default is not named;
    • a print page draws every group, no line;
    • CONTROL, a standalone DetailView: a card per empty group with its fold row, and the whole-body fold when all are empty.
  • Ablation (one-off, on commit 61c05ae8): DetailView mutated back to the old gate (return onDefaultRecordPage && … in place of return emptySectionsAsLine && …) through scripts/ablation-replace.mjs with a trap restore: anchor x1 to x0, replacement x0 to x1, blob 03ed8fb5 to 2022a062; the new file went 7 failed, 3 passed (the 3 are the print-page case and the two CONTROL cases, which hold either way); restore proven by blob equal to HEAD 03ed8fb5 and an empty git diff HEAD. No dist/ is in the resolution path (the tests import the sources relatively), so no rebuild leg applies.
  • Red set before the pin updates (on a0d385a9, the switch alone): plugin-detail 2 failed files, 383 passed; the two failures are the two pins named above.
  • Final head 429ee81c, results under Verification.

Acceptance notes

  • The default page draws this line only for groups a page keeps. The synthesized default page writes { group } sections with no hideEmpty, so record:details resolves them to true and an all-empty group is hidden outright there; the line has nothing to fold on a synthesized page. It draws where a page keeps a group with hideEmpty: false, as the HotCRM opportunity page does. Unchanged by this PR; an observation.
  • After expanding, the fields are one more click away: each empty group draws its heading plus its own "Show N empty fields" row (ruling C on objectui#13386), which is the shipped default-page design ("no new design"). The card's acceptance item "展开后能看到全部空字段,并能就地编辑" holds through that row, and the reader's show-empty choice is per object where the host stores it.
  • Beyond the claim's file surface (DetailView.tsx, EmptySectionsFold.tsx, new tests, .changeset/): renderers/record-details.tsx (the context provider), defaultRecordPage.ts (the context, beside its siblings), the two stale pins, and the contract prose and generated mirrors listed above, which the change would otherwise have left false.
  • A code comment in app-shell's RecordDetailView still lists "the empty-sections line" among the faces only the synthesized page draws; not edited here (another package, comment only). recordPageV3Face-27055.test.tsx's CONTROL is named "outside the default page no line draws"; it renders a bare DetailView, which still draws none, so it stays green.
  • Not browser-verified; the pins drive the real record:details renderer.

Verification

All readings on head 429ee81c (after merging origin/main at aef42cba).

Tests and type-checks · one verify-lock run · VERDICT command-exit 0
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/
  Test Files  386 passed | 1 skipped (387)
       Tests  3470 passed | 18 skipped (3488)
pnpm --dir ui exec vitest run scripts/
  Test Files  171 passed | 2 skipped (173)
       Tests  5092 passed | 2 skipped (5094)
pnpm --filter @objectstack/spec exec vitest run src/ui/component.test.ts src/ui/section-group-reference.test.ts src/ui/component-reference-rail.test.ts src/type-alias-convention.pin.test.ts
  Test Files  4 passed (4)
       Tests  417 passed (417)
pnpm --filter @object-ui/plugin-detail run type-check   (tsconfig.test.json lists all 3 touched test files)
pnpm --filter @object-ui/types run type-check
os-verify-lock: VERDICT command-exit 0 (the five joined with &&)
Derived gate families · 123 derived, 123 run, 0 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --commands on this head, each run with its exit code captured before any pipe, then reconciled with --ran: "123 derived famil(ies) accounted for — 123 run, 0 NOT-MEASURED (a DERIVED zero — all 123 recorded an exit code and none of them is 3)".

exit 0 · node scripts/check-adr-0087-registration.mjs --base origin/main
exit 0 · node scripts/check-adr-0087-registration.mjs --self-test
exit 0 · node scripts/check-adr-links.mjs
exit 0 · node scripts/check-adr-links.mjs --self-test
exit 0 · node scripts/check-changeset-no-major.mjs --base origin/main
exit 0 · node scripts/check-closing-keyword-parity.mjs
exit 0 · node scripts/check-closing-keyword-parity.mjs --self-test
exit 0 · node scripts/check-comment-mask-adoption.mjs
exit 0 · node scripts/check-comment-mask-adoption.mjs --self-test
exit 0 · node scripts/check-comment-mask-corpus.mjs
exit 0 · node scripts/check-dev-prereqs.mjs --self-test
exit 0 · node scripts/check-doc-route-spelling.mjs --advisory
exit 0 · node scripts/check-doc-route-spelling.mjs --self-test
exit 0 · node scripts/check-docs-section-name.mjs
exit 0 · node scripts/check-docs-section-name.mjs --self-test
exit 0 · node scripts/check-dts-emitted.mjs --self-test
exit 0 · node scripts/check-empty-changeset.mjs --base origin/main
exit 0 · node scripts/check-empty-changeset.mjs --self-test
exit 0 · node scripts/check-issue-citations.mjs
exit 0 · node scripts/check-plugin-teardown-shape.mjs
exit 0 · node scripts/check-plugin-teardown-shape.mjs --self-test
exit 0 · node scripts/check-sdui-manifest.mjs
exit 0 · node scripts/check-sdui-manifest.mjs --self-test
exit 0 · node scripts/check-section-landing-index.mjs
exit 0 · node scripts/check-section-landing-index.mjs --self-test
exit 0 · node scripts/ci/assert-turbo-remote-cache.mjs --self-test
exit 0 · node scripts/ci/plan-test-core-shards.mjs --self-test
exit 0 · node scripts/ci/prune-turbo-cache.mjs --self-test
exit 0 · node scripts/ci/snapshot-next.mjs --self-test
exit 0 · node scripts/docs-audit/check-affected-docs.mjs
exit 0 · node scripts/docs-audit/check-drift-comment.mjs
exit 0 · node scripts/pm/check-governed-queue-guard.mjs --self-test
exit 0 · node scripts/pm/release-rehearsal-clone.mjs --self-test
exit 0 · node scripts/release-pending-publish.mjs --self-test
exit 0 · pnpm --filter @objectstack/lint run check:doc-formula-expressions
exit 0 · pnpm --filter @objectstack/lint run check:doc-security-posture
exit 0 · pnpm --filter @objectstack/spec run check:api-surface
exit 0 · pnpm --filter @objectstack/spec run check:authorable-surface
exit 0 · pnpm --filter @objectstack/spec run check:browser-reachable-entries
exit 0 · pnpm --filter @objectstack/spec run check:docs
exit 0 · pnpm --filter @objectstack/spec run check:dual-source-exports
exit 0 · pnpm --filter @objectstack/spec run check:duration-unit-keys
exit 0 · pnpm --filter @objectstack/spec run check:empty-state
exit 0 · pnpm --filter @objectstack/spec run check:entry-nameability
exit 0 · pnpm --filter @objectstack/spec run check:error-code-provenance
exit 0 · pnpm --filter @objectstack/spec run check:export-origins
exit 0 · pnpm --filter @objectstack/spec run check:exported-any
exit 0 · pnpm --filter @objectstack/spec run check:generated
exit 0 · pnpm --filter @objectstack/spec run check:liveness
exit 0 · pnpm --filter @objectstack/spec run check:llms-txt
exit 0 · pnpm --filter @objectstack/spec run check:skill-examples
exit 0 · pnpm --filter @objectstack/spec run check:skill-refs
exit 0 · pnpm --filter @objectstack/spec run check:strictness-ledger
exit 0 · pnpm --filter @objectstack/spec run check:variant-docs
exit 0 · pnpm --filter @objectstack/spec run check:yaml-examples
exit 0 · pnpm check:adr-anchors
exit 0 · pnpm check:agent-test-spelling
exit 0 · pnpm check:authz-resolver
exit 0 · pnpm check:bash32-floor
exit 0 · pnpm check:changeset-gate-self-tests
exit 0 · pnpm check:ci-filter-parity
exit 0 · pnpm check:cli-command-ids
exit 0 · pnpm check:closed-ceremony-text
exit 0 · pnpm check:corpus-claim-drift
exit 0 · pnpm check:cross-package-test-inputs
exit 0 · pnpm check:dispatcher-error-vocabulary
exit 0 · pnpm check:doc-anchors
exit 0 · pnpm check:doc-authoring
exit 0 · pnpm check:doc-frontmatter
exit 0 · pnpm check:docs-audit-scope
exit 0 · pnpm check:docs-redirects
exit 0 · pnpm check:docs-single-h1
exit 0 · pnpm check:docs-spec-enumerations
exit 0 · pnpm check:docs-transcript-drift
exit 0 · pnpm check:driver-memory-census
exit 0 · pnpm check:dts-closure
exit 0 · pnpm check:dual-build-cjs-loads
exit 0 · pnpm check:engine-double-contract
exit 0 · pnpm check:entry-guard
exit 0 · pnpm check:gitlink-declared
exit 0 · pnpm check:issue-citations
exit 0 · pnpm check:keyed-text-bounds
exit 0 · pnpm check:lean-entry-closure
exit 0 · pnpm check:logger-receiver-detach
exit 0 · pnpm check:merge-driver
exit 0 · pnpm check:nul-bytes
exit 0 · pnpm check:object-def-param-keys
exit 0 · pnpm check:optional-error-sink
exit 0 · pnpm check:org-identifier
exit 0 · pnpm check:page-declaration-shape
exit 0 · pnpm check:parse-guard
exit 0 · pnpm check:platform-object-tenancy-census
exit 0 · pnpm check:pm-prior-rulings
exit 0 · pnpm check:pnpm-filter-targets
exit 0 · pnpm check:pnpm-flag-spellings
exit 0 · pnpm check:published-files
exit 0 · pnpm check:published-readme-links
exit 0 · pnpm check:query-options-erasure
exit 0 · pnpm check:react-page-adapter-contract
exit 0 · pnpm check:refd-timer-probe
exit 0 · pnpm check:registry-log-declared
exit 0 · pnpm check:rest-log-spy-declared
exit 0 · pnpm check:role-word
exit 0 · pnpm check:scripts-symbol-anchors
exit 0 · pnpm check:sdui-reference
exit 0 · pnpm check:settings-bind-window
exit 0 · pnpm check:skill-identifier-liveness
exit 0 · pnpm check:slot-lookup
exit 0 · pnpm check:sourcemap-no-sources-content
exit 0 · pnpm check:spec-docblock-symbol-anchors
exit 0 · pnpm check:spec-parsed-alias
exit 0 · pnpm check:system-context-census
exit 0 · pnpm check:test-source-alias
exit 0 · pnpm check:tier-file-adoption
exit 0 · pnpm check:type-check-coverage
exit 0 · pnpm check:type-check-debt
exit 0 · pnpm check:undeclared-dep-imports
exit 0 · pnpm check:vendor-version-stamps
exit 0 · pnpm check:vouch-for-reference-callers
exit 0 · pnpm check:watch-hint-literal
exit 0 · pnpm check:where-matcher
exit 0 · pnpm check:wildcard-fallthrough
exit 0 · pnpm --dir ui exec vitest run scripts/ (under the verify lock, chained below)
Generated artifacts, overlap, line citations
pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated   (after the merge of origin/main)
  All 14 generated artifacts are up to date
node scripts/gen-sdui-manifest-node.mjs
  wrote sdui.manifest.json (106 components), re-recorded scripts/sdui-manifest.record.json
node scripts/gen-sdui-reference.mjs
  wrote 106 components on 7 pages
node scripts/pm/overlap-check.mjs
  VERDICT clean exit 0 (origin/main merges cleanly, 0 open PR heads share a file)
pnpm --dir ui run check:new-line-citations
  VERDICT new-cross-file-line-citations: 0 new citation(s)
eslint on the 10 touched ui files: 0 errors (warnings are pre-existing; the new context lives in a non-component module, so no new react-refresh warning)

Not run locally, CI's: the repo-wide pnpm lint, test:repo, and the full UI and Core test farms. Local-only family check:dev-prereqs: self-test passes; its scan reports this container's workspace as not fully built (10 of 108 packages without dist/), a reading about this machine, not the diff.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic (one describe() text and its doc comment).
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; the repo-wide pnpm lint is CI's (eslint on the touched ui/ files: 0 errors).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 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, except the 维护者速读 block, which the dispatch contract writes in Chinese.

Generated by Claude Code

…sing empty-sections line

Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
Co-authored-by: Claude <noreply@anthropic.com>
…ord:details sections description; changeset

Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
Co-authored-by: Claude <noreply@anthropic.com>
… the other record-page face contexts

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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 173 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 99a0e4fbfc11884c7845237a39ad7b6a1bf6c826 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Final green head for review: 429ee81c919cc60107bfaa016ec0fce21700aac8 · 2026-11-18T09:11Z

Check-runs on this head: 61 success, 9 skipped, 0 failed, 0 pending. Size +414 −42, 17 files, not governed. Dev report: #35019 comment 6973449823. Claim amendment for the file surface: #35019 comment 6973523661.
Reviews owed: L1 from L1-a, requested now. L2 contract review at CONTRACT_REVIEW_TIER is also owed for the published-schema face (packages/spec/src/ui/component.zod.ts, hideEmpty describe prose). It runs in this area thread at this head, under the seat's order of 2026-11-18T08:44Z.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Contract-review-claim: session_01JQwxbXBffgVtUPBEY2nLFm · head 429ee81 · 2026-11-18T09:12Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 review (#35019) · 2026-11-18T09:13Z

L1: REWORK (one must-fix, a record only; the code is accepted)
Head-sha: 429ee81

This is the first L1 on this PR. I read the full diff against the merge base aef42cba4e: 17 files, +414 / −42. I also read the card, premise correction 6970082809, claim 6971069096, amendment 6973523661 and the announcement 6974115233.

The fix, against the corrected scope.

  • RecordDetailsBody wraps its DetailView in EmptySectionsLineContext.Provider value.
  • DetailView draws EmptySectionsLine when that context or useDefaultRecordPage() is on and the body has no sectionGroups. That is the one gate that changed, and the existing EmptySectionsLine is reused unchanged, so there is no new design.
  • The context sits in defaultRecordPage.ts beside its siblings. It is not re-exported from the barrel (index.tsx changes only the registry's sections description), and it is not a DetailView prop or a schema key. That keeps it a renderer face, as ADR-0085 has it, and adds no metadata key.
  • The detail-view node, the drawer and a direct React caller read the default false and keep EmptySectionsFold.

Contract prose and its mirrors.

  • The hideEmpty describe() and doc comment in component.zod.ts now say that, read-only, a kept all-empty section is named in the body's closing line first, and that expanding the line draws it as its heading plus one fold row. That matches the code. No key, shape or default moves.
  • The same sentence is carried, consistently, by @object-ui/types (RecordDetailsComponentProps, DetailViewSection, which also states the detail-view difference), the registry's sections input, the README, and the three regenerated mirrors: sdui.manifest.json, scripts/sdui-manifest.record.json, component.mdx and record.mdx. The generation gates are green.
  • Whether that restatement of the ruled rendering (ruling C on objectui#13386, kept here as the expanded face) is right is the separate L2's question, not mine.

Shape and scope.

  • Fixes #35019 is on the first card line, and the corrected scope is delivered whole. No closing keyword sits next to another open card, and there is no content/docs/releases/ change.
  • check-governed-merges --pr 35161: not governed (0 of 17 paths), under the 3,000-line threshold.
  • Clause-②: no and Metadata-protocol: none are right. No accept set or authorable value moves, and the one new name is module-internal.
  • The changeset bumps plugin-detail, types and spec at patch, and is new, not on main. I checked each sentence against the diff:
    • "used to draw every field group the page keeps with hideEmpty: false as its own bordered card" is the old authored-page path.
    • "every record:details body does what the default record page already did" is the context gate.
    • "An omitted key still hides an all-empty group outright, and such a group is not named in the line" is pinned.
    • "Edit mode … a print page" is pinned.
    • "A standalone detail-view … still folds a body whose groups are all empty into one row" is the CONTROL pin.
    • "No metadata key, value or default changes" matches the diff.

Tests and evidence.

  • EmptySectionsLine.authoredPage-35019.test.tsx has 10 cases through the real RecordDetailsRenderer, with no default-page context and the HotCRM opportunity's groups as the fixture. They cover:
    • the line, its count and its names;
    • the partly-filled group's own fold row;
    • expand and collapse in authored order;
    • reveal plus a double-click into inline edit, which is the card's 就地编辑 acceptance;
    • edit mode;
    • an all-empty body;
    • the hideEmpty default;
    • a print page;
    • two CONTROL cases on a standalone DetailView.
  • Ablation: the gate was restored to onDefaultRecordPage &&. That turned 7 of 10 red, and the 3 that stayed green are the ones that hold either way. The restore was verified (blob == HEAD, empty diff).
  • The two existing pins that asserted the old authored face (record-details.emptySectionDefault.test.tsx and record-details.hideEmptyRetired-7129.test.tsx) now assert the line, expand it, and then assert the same heading plus fold row. The red set before the update was exactly those two files.
  • Local runs: plugin-detail 3,470 tests and the spec suites 417, both green. dispatch-gates: 123 derived, 123 run, all exit 0.

CI at this head, from check-runs: 61 success, 9 skipped, none failed or in progress.

Must-fix

  • M1. Two changed paths are outside the amended file surface.
    • The paths are ui/packages/plugin-detail/src/renderers/__tests__/record-details.emptySectionDefault.test.tsx and ui/packages/plugin-detail/src/renderers/__tests__/record-details.hideEmptyRetired-7129.test.tsx.
    • Claim 6971069096 allows only new test files named for the card. Amendment 6973523661 lists the prose, mirror and context files, but not these two existing pins.
    • The PR body names them under "Beyond the claim's file surface" with the right reason: they pinned the face this card changes, and the red set proves it. The claim record does not name them.
    • Fix: post a second claim amendment on 记录页:字段全空的分组各占一张卡,卡里只有一行「显示 N 个空字段」 #35019 that adds the two paths with that reason. No new head is needed. I'll read the amendment alone and ACCEPT on it at this head.

Should-fix

None.

Notes

  • N1. The PR body says a comment in app-shell's RecordDetailView still lists "the empty-sections line" among the faces only the synthesized page draws. That comment is now false, but it is another package and a comment only. It fits a loose-ends card.
  • N2. NOT MEASURED, as declared. This was not browser-verified on the HotCRM opportunity page. The pins drive the real renderer with that page's groups, which I accept for an M-sized renderer gate.
  • Owed after L1, not mine. The L2 contract review of the component.zod.ts describe at CONTRACT_REVIEW_TIER, at this head, which your area runs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 review, M1 re-read (#35019) · 2026-11-18T09:15Z

L1: ACCEPT
Head-sha: 429ee81

The head is unchanged since my REWORK 6974159363, so I re-read only the record that M1 named.

M1 is closed. Claim amendment 2 (6974180246) on #35019 is pinned to this head. It adds the two existing pins, record-details.emptySectionDefault.test.tsx and record-details.hideEmptyRetired-7129.test.tsx, and gives the stale-pin reason, with the red set as evidence. With the claim and both amendments, all 17 changed paths are now inside the declared surface.

Everything in 6974159363 still holds at this head:

  • the context gate;
  • the module-internal context;
  • the describe and its mirrors;
  • the changeset sentences;
  • the 10 pins, the CONTROL and the ablation;
  • CI (61 success, 9 skipped, none failed).

Must-fix

None.

Should-fix

None.

Notes

  • Owed after L1, not mine. The L2 contract review of the component.zod.ts describe at CONTRACT_REVIEW_TIER on this head, and N1's loose-ends card (the seat).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 429ee81c919cc60107bfaa016ec0fce21700aac8
Local-runs: none
Scope: packages/spec/src/ui/component.zod.ts + ui/packages/plugin-detail/src/renderers/record-details.tsx, ui/packages/plugin-detail/src/DetailView.tsx, ui/packages/plugin-detail/src/EmptySectionsFold.tsx, ui/packages/plugin-detail/src/defaultRecordPage.ts, ui/packages/plugin-detail/src/index.tsx, ui/packages/types/src/views.ts, ui/packages/types/src/record-components.ts
Security-touching: no

Inputs read: card #35019 (body and all 6 comments, including the premise correction 6970082809, the claim, the dev report and claim amendment 1), PR #35161 (body, 17-file list, net diff against main), and the check-runs on this head: 61 success, 9 skipped, 0 failed, 0 pending. Nothing was checked out, built or run.

① Derived judgments

  • Accept-set: unchanged — right. The only hunk in packages/spec/src rewrites the describe() string and the doc comment of RecordDetailsProps.sections[].hideEmpty. The schema expression stays z.boolean().optional(); no key, type, default or refinement moves. Spec property liveness and Type Check · source gates are green on the head.
  • Generated mirrors: right. content/docs/references/ui/component.mdx carries the new describe text verbatim; sdui.manifest.json, scripts/sdui-manifest.record.json and content/docs/ui/components/record.mdx move with the registry description. The gates that own them (Lint · repo & tooling gates, Lint · docs & code guards, Build Docs) are green.
  • Public surface: no new export — right. EmptySectionsLineContext is declared in defaultRecordPage.ts and is not re-exported: the barrel's only line for that module is still export { DefaultRecordPageContext } from './defaultRecordPage', and the index.tsx hunk is the one registry description string. No DetailView prop and no DetailViewSchema key is added.
  • Rendered behaviour: changes, and is declared. Every record:details body now folds its kept all-empty sections into EmptySectionsLine; on those bodies the whole-body fold (EmptySectionsFold) is no longer reachable. This is the scope ruled on the card (6970082809: "draw the same EmptySectionsLine on authored record:details pages too ... No new design and no new metadata key"), and the changeset states it.

② Semver level

  • Changeset .changeset/35019-empty-groups-line.md: @object-ui/plugin-detail, @object-ui/types and @objectstack/spec, each patch. That matches what publishes: spec and types ship prose only; plugin-detail ships a read-only rendering change with no API, prop or metadata change. Check Changeset is green.
  • Clause-②: no on the PR body and in the changeset is correct: no declared capability is narrowed, nothing an author can write is refused or reinterpreted, and hideEmpty keeps its keep-or-disappear meaning in both polarities. Metadata-protocol: none is correct for the same reason.

③ Boundary flags

  • open_questions: empty; nothing to answer.
  • Deviation, file-surface breach: answered by claim amendment 1 (6973523661). Read against the diff, the amendment's account holds: the files outside the original surface are the context and its provider (inside the ruled scope), restated prose, and regenerated mirrors. No behaviour sits in them beyond the provider.
  • Deviation, L2 face found: this record.
  • Deviation, first push before overlap-check: no effect on the head under review.
  • Deviation, origin/main advanced after the last merge: the review reads the three-dot diff at this head; the queue's own merge check owns staleness.
  • Deviation, not browser-verified: accepted for this face. The 10 new tests mount the real RecordDetailsRenderer, and Build & E2E UI, Live E2E UI and all 16 Test UI shards are green on the head.
  • Out-of-scope notes (stale app-shell RecordDetailView comment; the imprecise CONTROL name in recordPageV3Face-27055.test.tsx; the default page's { group } sections resolving hideEmpty to true): outside this diff, read and not reviewed. None contradicts the contract text under review. The first two are comment and test-name drift and can ride a follow-up.
  • SQL push-down: not applicable. The diff adds no query, no id materialisation and no in-app join; the fold reads the record already in the host context.

④ Design judgment

packages/spec/src/ui/component.zod.ts (hits). The restated describe() was read sentence by sentence against the tree at this head:

  • "disappears when ALL its fields are empty (renderer default: on ...)" — unchanged, and still true: record-details.tsx resolves hideEmpty: s.hideEmpty ?? true, DetailSection returns nothing for such a section, and isFoldableEmptySection returns false on hideEmpty === true, so a hidden section is never named or counted in the line.
  • "in read-only mode the details body names it in the one line that closes the body, beside every other all-empty section kept this way" — true. RecordDetailsRenderer wraps its DetailView in EmptySectionsLineContext; the schema it synthesizes carries sections (or the direct-fields fallback) and never autoTabs, tabs or sectionGroups, so it always reaches the non-tab sections block, where emptySectionsAsLine && !schema.sectionGroups?.length selects EmptySectionsLine. The line is emitted after every drawn section.
  • "expanding that line renders each in its place as its heading plus one fold row ..." — true. Revealed, the line maps every section through the same renderSection at its own index, and DetailSection's foldAllEmptySection draws the heading plus the fold row (ruling C, objectui#13386), unchanged.
  • "in edit mode it renders every field as an editable row" — true. isEditing empties the folded set in EmptySectionsLine, and foldAllEmptySection is off in edit mode. A print page is handled the same way and prints every row, as before.

The describe implements the card's ruling and agrees with its first and only consumer. The emptiness reading in the line (hasCellValue(data?.[name] ?? field.value)) is the one DetailSection folds by, over the same fields array after the security and hidden-field folds, so the line and the sections cannot disagree about which section is empty; a section those folds empty to zero fields is neither named nor drawn.

Implementing files.

  • renderers/record-details.tsx: the provider wraps exactly the one DetailView this renderer mounts; the comment on the hideEmpty default is restated consistently with the describe. Agrees.
  • DetailView.tsx: the gate is inRecordDetailsBody || onDefaultRecordPage, so the default page keeps what it drew, and a bare DetailView (context default false) keeps foldEmptySections. The autoTabs branch is untouched and unreachable from record:details. Agrees.
  • EmptySectionsFold.tsx: doc comment only; its statement that the line takes the whole-body fold's place where every section is empty matches the gate. Agrees.
  • defaultRecordPage.ts: the context defaults to false and its docblock's claim of being module-internal is true at this head. Agrees.
  • index.tsx, ui/packages/types/src/record-components.ts, ui/packages/types/src/views.ts: prose mirrors of the describe; consistent with it, subject to N3.

Attempts to break it, and what they found:

  • Loading: DetailView returns its skeleton while loading, so the line does not flash over an unloaded record.
  • Nested bodies: no other DetailView is mounted beneath the provider in DetailSection or the field renderers, so the context does not leak into a body it was not meant for.
  • A partly-filled section is never folded (fields.some(hasCellValue)), so the card's item 2 holds.
  • A malformed section turns the fold off for itself (try/catch, non-array fields) and still fails inside its own SectionBoundary.

No must-fix, no should-fix.

Nits (none affects correctness or the contract; none needs a change on this head):

  • N1 (nit) — The describe says the body "names" the section. A kept section with no label has no name to print: the line counts it ("1 empty section · Expand") and prints no name for it. The count and the expand behaviour are right; only the verb is loose for untitled sections. Accepted deviation, or one clause in a later prose pass.
  • N2 (nit) — The reader's remembered "show empty fields" choice (recordPagePreferences, per object) does not open the line, and the line's own expanded state is local and not remembered. A reader with that choice on used to see a kept all-empty group's fields directly on an authored page; they now expand the line on each visit, after which the fields show at once. This is the shipped line's behaviour and the ruling asked for no new design, and the PR's acceptance notes say the fields are one click further. Worth a follow-up card on whether the remembered choice should open the line.
  • N3 (nit) — DetailViewSection.hideEmpty in ui/packages/types/src/views.ts now reads "a detail-view body draws them in place". A detail-view body under the default record page context also draws the line (the onDefaultRecordPage arm of the gate), as it did before this PR. Pre-existing behaviour, slightly over-general sentence. Accepted deviation.

Implemented-by: claude/issue-35019-empty-groups-line
Reviewed-by: session_01JQwxbXBffgVtUPBEY2nLFm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

The filled brief handed to the isolated reviewer behind the contract-review record 6974227988 (reviewer run checked by verify-review-tier: every turn at CONTRACT_REVIEW_TIER). Delivery note set by the area: the reviewer wrote the record to a file and the area posted it with --tier-evidence.

Contract review brief — PR #35161 @ 429ee81c919cc60107bfaa016ec0fce21700aac8 (card #35019)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35019: its body and EVERY comment (rulings and earlier records included)
· PR #35161: its body, its file list, and the net diff against main at 429ee81c919cc60107bfaa016ec0fce21700aac8
· the check-runs on 429ee81c919cc60107bfaa016ec0fce21700aac8: 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/ui/component.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.

Security — if a hits path is under skills/** or ui/skills/** and the change teaches security, auth or permission
behaviour the path name doesn't show, the record says so and the seat adopting the record adds the security label.
The record says so on its Security-touching: line, and the arm lands on no alone: write no ONLY when no changed
hunk teaches permission, sharing, credential, token, authentication or other security behaviour, else yes.

⛔ 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/49ef2e5d-7385-538e-818f-5529608e498c/scratchpad/pr-35161/ 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-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Landing · head 429ee81c919cc60107bfaa016ec0fce21700aac8 · 2026-11-18T09:18Z

probe reading
L1 L1-a ACCEPT at this head, 6974197194 (REWORK 6974159363, M1 closed by claim amendment 2 on #35019, 6974180246)
L2 contract review PASS at CONTRACT_REVIEW_TIER, this head, 6974227988 (claim 6974131336, brief 6974247178; reviewer run checked by verify-review-tier); No must-fix, no should-fix; nits N1–N3 accepted as deviations
check-governed-merges.mjs --pr 35161 NOT governed (0 of 17 paths); 456 changed lines ≤ 3000
CI on head 61 success, 9 skipped, 0 failed; mergeable clean
K (first-parent commits on main since the PR base) 2 (< 15); generated mirrors regenerated in the diff and their gates green

Ready + auto-merge now; the area follows it to MERGED and closes out #35019. L1 note N1 (a now-false comment in app-shell RecordDetailView) goes to the seat for a loose-ends card.

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:ui size/m 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.

记录页:字段全空的分组各占一张卡,卡里只有一行「显示 N 个空字段」

2 participants