Repository navigation
fix(plugin-detail): the record meta line leaves the owner out only when the strip the page drew carries it - #28994
Merged
Conversation
…strip the page drew carries it RecordMetaFooter takes the drawn strip from its host; RecordDetailView hands it the record:highlights fields of the page it renders, so a phone header cut to four highlights no longer hides a late-declared owner from both places. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTfAbHWaonqGhm5rxk
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTfAbHWaonqGhm5rxk
…that draw a strip Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTfAbHWaonqGhm5rxk
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T06:09ZHead-sha:
|
8 tasks done
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 Steedos · project thread
Fixes #28909
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
owner_id时才省略负责人。RecordMetaFooter新增可选属性drawnHighlightFields,由画要点条的宿主(RecordDetailView)把它实际画出的字段交给页脚;不传时仍按对象声明的highlightFields判断,行为不变。owner_id声明在第 5、6 位且前面是四个非文本字段时,手机页上要点条和元信息行都不显示负责人,用户看不到记录归谁。ui/packages/app-shell/src/views/RecordDetailView.tsx(drawnHighlightFieldsOf与两个RecordMetaFooter调用点)、ui/packages/plugin-detail/src/RecordMetaFooter.tsx(stripFields一行)、RecordDetailView.phoneOwnerLine-28909.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/RecordDetailView.phoneOwnerLine-28909.test.tsx packages/plugin-detail/src/__tests__/RecordMetaFooter.drawnStrip-28909.test.tsx,预期 2 个文件、6 个测试全绿。What changes
RecordMetaFootergains one optional prop,drawnHighlightFields?: readonly string[]: the fields the page's highlight strip actually draws, handed over by the host that draws it. The meta line leaves the owner out only when this list carriesowner_id. When the prop is omitted, the footer asksderiveHighlightFields(objectSchema, null)as before, so other hosts (the standaloneDetailView, the Studio page preview) are unchanged.RecordDetailViewhands the footer the strip it rendered, at both call sites (the laid-out page's details foot and the page-foot append). A module-level reader,drawnHighlightFieldsOf(page), collects thefieldsof therecord:highlightsblocks amongrenderedPage's top-level blocks, in either form the block accepts (a bare name or a{ name }entry). That is where the synthesizer places the strip, so the list is:PHONE_HIGHLIGHTS_MAX, four);highlightsslot.drawnHighlightFields.RecordDetailView.tsxandui/packages/plugin-detail/README.md.recordPhoneHeader.tsis read, not edited.DetailView.tsxis not edited: its footer runs outsideDefaultRecordPageContext, so it never names the owner, and on a record page the page draws the footer instead.Tests
ui/packages/app-shell/src/views/RecordDetailView.phoneOwnerLine-28909.test.tsx, a realRecordDetailViewmount on thephoneFace-27058harness. The lead declareshighlightFields: ['name', 'email', 'status', 'phone', 'website', 'owner_id']: the title, four non-text highlights, then the owner fifth.ui/packages/plugin-detail/src/__tests__/RecordMetaFooter.drawnStrip-28909.test.tsx, 4 cases on the prop: drawn strip without the owner (declared with it) keeps the owner; drawn strip with the owner (declared without it) drops it; an empty drawn strip keeps it; omitted, the declared strip decides.RecordMetaFooter.ownerOnce-28868.test.tsxandRecordDetailView.phoneFace-27058.test.tsxre-run green unchanged.Acceptance notes
record:highlightsblock nested inside a container in an authoredhighlightsslot is not collected. The meta line then keeps the owner, which can name it twice but never zero times. The synthesizer itself always places the strip at the top level.record:highlightsrenderer also drops fields the reader may not see (enforceFieldSecurity,redactFields). When the owner is withheld from the strip that way, it is withheld from the record row too, so the meta line has no owner value to show either.HighlightFieldsContextregistry (what the highlights renderer registers for the details body) was not used: the claim asks for an explicit prop from the host, and the registry fills in an effect after the first paint.Verification
All readings are on this branch at head
be4cc7d0(baseff881050).origin/mainhas moved 10 commits since; none touchesplugin-detailorapp-shell/src/views, somainis not merged in. Commands ran underos-verify-lock.New and neighbouring tests · 4 files, 24 tests
pnpm --dir ui exec vitest run --maxWorkers=2onRecordMetaFooter.drawnStrip-28909,RecordMetaFooter.ownerOnce-28868,RecordDetailView.phoneOwnerLine-28909andRecordDetailView.phoneFace-27058: Test Files 4 passed (4), Tests 24 passed (24).Ablation · two legs, both red, both restored
Both legs ran through
scripts/ablation-replace.mjs(anchor hit 1 to 0, blob moved, restore proved by blob equal to HEAD and an emptygit diff HEAD).@object-ui/plugin-detailresolves to itssrcunder ui's vitest alias, so nodistrebuild was needed.drawnHighlightFieldsOf(renderedPage)replaced byundefinedinRecordDetailView. The phone case went red ("on a phone: owner_id declared 5th …"), 1 failed and 5 passed. The desktop case stays green, as it should: there the strip carries the owner either way.drawnHighlightFields ??read removed inRecordMetaFooter. 4 failed and 2 passed: the three prop cases and the phone page case.Footer sweep · 13 files, 109 tests
Every ui test file that names
RecordMetaFooter,record-meta-footer,data-record-meta,drawnHighlightFieldsor the plugin-detail README (git grep -loverpackages/**andapps/console/**tests): Test Files 13 passed (13), Tests 109 passed (109). This narrows the run; CI's Test UI runs the rest of app-shell.Type-check and ui scripts
pnpm exec turbo run type-check --filter=@object-ui/plugin-detail --filter=@object-ui/app-shell --concurrency=2: 66 tasks successful (both packages runtsc --noEmitandtsc -p tsconfig.test.json).pnpm --dir ui exec vitest run scripts/: Test Files 169 passed, 2 skipped (171); Tests 4900 passed, 2 skipped.pnpm check:new-line-citations(ui): 0 new citations.node ui/scripts/check-readme-exports.mjs: NOT MEASURED. It exits 1 on a prerequisite (7 packages unbuilt in this worktree), not on this README. The README edit adds no fenced code block.Derived gates · 34 of 34 exit 0
node scripts/pm/dispatch-gates.mjs --commandsderived 34 families from the changed paths, and re-derived the same 34 after the README commit. All 34 ran with a draft of this body asGITHUB_EVENT_PATHand exited 0; the four body-reading gates (check-changeset-no-major,check-adr-0087-registration,check-closing-keyword-parity,check-partof-closing-keyword) re-ran on this final body and exited 0. The families run includecheck-changeset-no-major.mjs --base origin/main,check-adr-0087-registration.mjs --base origin/main,check-closing-keyword-parity.mjs,check-empty-changeset.mjs --base origin/main,check-sdui-manifest.mjsandvitest run scripts/above.dispatch-gates --ran: 34 derived families accounted for, 34 run, 0 NOT MEASURED.Full dogfood battery: not owed (no
!in the title, no(narrowing)arm). Diff: 6 files, 359 insertions and 5 deletions.Generated by Claude Code