Repository navigation
fix(plugin-detail): an authored record page folds its all-empty field groups into one closing line - #35161
Conversation
…to one line Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm Co-authored-by: Claude <noreply@anthropic.com>
…d:details page Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm Co-authored-by: Claude <noreply@anthropic.com>
…sing empty-sections line Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm Co-authored-by: Claude <noreply@anthropic.com>
…ribe 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>
📓 Docs Drift CheckNothing 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): |
|
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm Final green head for review: 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. |
|
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm Contract-review-claim: session_01JQwxbXBffgVtUPBEY2nLFm · head 429ee81 · 2026-11-18T09:12Z |
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review (#35019) · 2026-11-18T09:13ZL1: REWORK (one must-fix, a record only; the code is accepted) This is the first L1 on this PR. I read the full diff against the merge base The fix, against the corrected scope.
Contract prose and its mirrors.
Shape and scope.
Tests and evidence.
CI at this head, from check-runs: 61 success, 9 skipped, none failed or in progress. Must-fix
Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review, M1 re-read (#35019) · 2026-11-18T09:15ZL1: ACCEPT 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, Everything in 6974159363 still holds at this head:
Must-fixNone. Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm Contract reviewServed-tier: 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 ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The describe implements the card's ruling and agrees with its first and only consumer. The emptiness reading in the line ( Implementing files.
Attempts to break it, and what they found:
No must-fix, no should-fix. Nits (none affects correctness or the contract; none needs a change on this head):
Implemented-by: VERDICT: PASS |
|
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 @
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm Landing · head
Ready + auto-merge now; the area follows it to MERGED and closes out #35019. L1 note N1 (a now-false comment in app-shell |
Fixes #35019
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm
Clause-②: no
Metadata-protocol: none
维护者速读
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:detailsbody drew every group the page keeps withhideEmpty: falseas 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), butDetailViewdrew that line only underDefaultRecordPageContext, 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 authoredrecord:detailspages, no new design, no new metadata key.RecordDetailsRenderernow wraps theDetailViewit mounts in a new module-internalEmptySectionsLineContext(indefaultRecordPage.ts, beside the other record-page face contexts; not re-exported from the barrel, not a prop, not a schema key, theRecordPageProvenanceContextprecedent).DetailViewdrawsEmptySectionsLinewhen that context oruseDefaultRecordPage()is on and the body has nosectionGroups. Every other body keepsEmptySectionsFoldunchanged.record:detailsreaches, and which this covers.record:detailsalways handsDetailViewa schema withsections(or the direct-fieldsfallback), neverautoTabs,tabsorsectionGroups, so it always reaches the non-tab sections block, which is the branch this changes. The HotCRM opportunity page's{ group }references are resolved tosectionswithfieldsby the renderer, so they arrive assections. Not changed: theautoTabsbody andsectionGroupsbodies (reached only by adetail-viewnode), and the direct-fieldsfallback (one section, no fold either way). A boundrecord:details(per-elementdataSource) draws the line too; measured producers of a boundrecord:detailsin HotCRM and the showcase/CRM examples: 0.record:detailsbody 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).hideEmptykeeps its default, and a group the default hides is never named in the line.describe()ofRecordDetailsProps.sections[].hideEmptyin@objectstack/specsaid a kept all-empty section renders, read-only, as its heading plus one fold row. Onrecord:details, its only renderer, it is now named in the closing line first. Restated there and in its mirrors: the@object-ui/typesdocs (RecordDetailsPropssection,DetailViewSection.hideEmpty), therecord:detailssectionsinput description in the component registry, the plugin README. Regenerated, not hand-edited:content/docs/references/ui/component.mdx(check:generated --fix),sdui.manifest.jsonwithscripts/sdui-manifest.record.json(node scripts/gen-sdui-manifest-node.mjs),content/docs/ui/components/record.mdx(node scripts/gen-sdui-reference.mjs).record-details.emptySectionDefault.test.tsxandrecord-details.hideEmptyRetired-7129.test.tsxeach pinned a kept all-empty section drawing its heading first throughrecord: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
ui/packages/plugin-detail/src/__tests__/EmptySectionsLine.authoredPage-35019.test.tsx, 10 tests, through the realRecordDetailsRendererwith noDefaultRecordPageContext(the HotCRM opportunity's groups as the fixture):hideEmptydefault is not named;DetailView: a card per empty group with its fold row, and the whole-body fold when all are empty.61c05ae8):DetailViewmutated back to the old gate (return onDefaultRecordPage && …in place ofreturn emptySectionsAsLine && …) throughscripts/ablation-replace.mjswith a trap restore: anchor x1 to x0, replacement x0 to x1, blob03ed8fb5to2022a062; 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 HEAD03ed8fb5and an emptygit diff HEAD. Nodist/is in the resolution path (the tests import the sources relatively), so no rebuild leg applies.a0d385a9, the switch alone): plugin-detail 2 failed files, 383 passed; the two failures are the two pins named above.429ee81c, results under Verification.Acceptance notes
{ group }sections with nohideEmpty, sorecord:detailsresolves them totrueand 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 withhideEmpty: false, as the HotCRM opportunity page does. Unchanged by this PR; an observation..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.RecordDetailViewstill 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 bareDetailView, which still draws none, so it stays green.record:detailsrenderer.Verification
All readings on head
429ee81c(after mergingorigin/mainataef42cba).Tests and type-checks · one verify-lock run · VERDICT command-exit 0
Derived gate families · 123 derived, 123 run, 0 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commandson 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)".Generated artifacts, overlap, line citations
Not run locally, CI's: the repo-wide
pnpm lint,test:repo, and the full UI and Core test farms. Local-only familycheck:dev-prereqs: self-test passes; its scan reports this container's workspace as not fully built (10 of 108 packages withoutdist/), a reading about this machine, not the diff.Human Minimum
packages/specholds no runtime logic (onedescribe()text and its doc comment).pnpm lintis CI's (eslint on the touchedui/files: 0 errors).main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code