Repository navigation
fix(plugin-detail): an empty body table of the record page keeps its header instead of folding into one line that reads the empty sentence before its title - #30378
Merged
Conversation
…header instead of folding into the stack's empty line A body table (its relationship id in RecordBodyTablesContext) shares the details column with its siblings, so the related-list empty fold took the column for a stack and folded the empty one into one line that read the empty sentence before the table's title. A body table now answers foldable: false, and an empty one draws its empty sentence under its header, where the table of a non-empty one is. Claude-Session: https://claude.ai/code/session_01Utp6CXft9FMzbd2ggz2oyp Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXft9FMzbd2ggz2oyp Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXft9FMzbd2ggz2oyp Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2 Waits-on: main-red #30367
|
Claude-Session: https://claude.ai/code/session_01Utp6CXft9FMzbd2ggz2oyp Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2 维护者速读
席位核对 — ACCEPT · domain:ui#2 · head
|
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2
Fixes #29944
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/plugin-detail/src/renderers/record-related-list.tsx(bodyTable判定与foldable)→ui/packages/plugin-detail/src/RelatedList.tsx(空正文表格的表头与表头下空态)→ 测试record-related-list.emptyFold-25895.test.tsx末尾新 describe。pnpm --dir ui exec vitest run packages/plugin-detail/src/renderers/__tests__/record-related-list.emptyFold-25895.test.tsx,预期 8/8 通过(在 main 源码上新用例失败:折叠行出现)。What changes
On the record page v3 (
RecordPageColumns, and the tab-strip page whose Details tab carries the body tables), the record's body tables are drawn as siblings of the details sections in one container. The related-list empty fold (RelatedListEmptyFold.tsx, #25895) keys a stack by the DOM parent of eachrecord:related_listroot, so it took the details column for a Related tab stack: once one body table had rows, an empty one left its place and was drawn as one line after the last table, reading the empty sentence first (「暂无相关记录 偏离 + 新建」).record-related-list.tsxreadsRecordBodyTablesContext(the page's body-table relationship ids, already provided by the record page host) and, outside the related column's panels, a list whoseobject.fieldid is in the set answersfoldable: falseto its stack. The body tables and the Related tab are a partition of the page's relationships (buildDefaultPageSchema:related.filter(isBody)vs the rest), so no Related tab list is in the set, and the fold rule itself (decideEmptyFold) is untouched.RelatedList's card face, a body table no longer writes 「暂无相关记录」 inline in its header row; while expanded and empty it draws the sentence in the card body under the header (a dashed box where the table would be,data-body-table-empty). The header keeps title, count 0, ⤢ and New. Lists that are not body tables keep the inline sentence. The card header gains adata-related-list-headattribute (the panel face already hasdata-related-panel-head).RelatedListEmptyFold.tsx: the file header names the body-table exception; no code change there.No new authoring key, no spec change, no change to the Related tab or the related column.
Tests
ui/packages/plugin-detail/src/renderers/__tests__/record-related-list.emptyFold-25895.test.tsx(the fold's shared harness; it now takes an optional body-table set):ACCOUNT_STACK) under a body-table context that lists another relationship folds exactly as before.13c0c5ba, test file from this branch):Tests 1 failed | 7 passed (8), the new case failing onexpect(fold()).toBeNull(): the fold line (a div with two children) was drawn.RelatedList,record:related_list,related-list,RecordPageColumnsor the empty sentence, plus three app-shell files that assert on the empty sentence or the New button:Test Files 118 passed | 1 skipped (119),Tests 1016 passed | 8 skipped (1024).scripts/ablation-replace.mjs, each landing verified and restored to the HEAD blob (tests importsrc, no build involved):!bodyTable &&dropped fromfoldable→ new case red (fold line drawn);A first attempt at leg 1 was refused by the tool before any run (its replacement text already occurred in the file), then re-run with a distinct replacement.
pnpm exec turbo run type-check --filter=@object-ui/plugin-detail --concurrency=2: 52/52 tasks.pnpm lintinui/packages/plugin-detail: 0 errors; per-file warning counts on the three source files equal main's (102 / 17 / 1), the test file 0.Acceptance notes
record:related_listboth draw". Measured on the published@object-ui/plugin-detail@18.2.0: the pre-18.3 empty card wrote the sentence inline in its header row (title, 0, sentence, New), not under it. This PR follows the first half of the Expected (under the header, as the non-empty tables place their table) and keeps the inline sentence for every list that is not a body table. The second symptom on the card, 「合同 0 暂无相关记录」, is that inline header line on a body table; it is covered by the same change.Verification
Derived gates (dispatch-gates --commands, final tree)
Head
4b04fd97(after mergingorigin/mainat8589756a). Every command's exit code was captured before any pipe.dispatch-gates --ran:Run reconciliation — 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN(a derived zero: all 35 recorded an exit code).check-sdui-manifest:sdui.manifest.json is present and intact (… 106 components).Standing ui gates
pnpm --dir ui check:new-line-citations:VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only -> exit 0.Generated by Claude Code