Skip to content

fix(plugin-detail): the record meta line leaves the owner out only when the strip the page drew carries it - #28994

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-hrggqk
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-hrggqk

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #28909

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 改了什么:记录页正文下方的元信息行,现在只在「页面实际画出的要点条」里有 owner_id 时才省略负责人。RecordMetaFooter 新增可选属性 drawnHighlightFields,由画要点条的宿主(RecordDetailView)把它实际画出的字段交给页脚;不传时仍按对象声明的 highlightFields 判断,行为不变。
  • 为什么改:Default record page: no derived highlight strip (declared highlightFields only); the stage field leaves the body when the path draws it; the owner appears once, under one word #28868 让负责人只出现一次,但页脚问的是声明列表(最多 6 个),而手机记录头在副标题后最多只画 4 个。owner_id 声明在第 5、6 位且前面是四个非文本字段时,手机页上要点条和元信息行都不显示负责人,用户看不到记录归谁。
  • 风险与回滚:低。只影响默认记录页和带插槽的记录页上「负责人写不写在元信息行」这一处;桌面端结果不变。无新元数据键、无新门禁。回滚即还原本 PR。
  • 先看: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

  • RecordMetaFooter gains 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 carries owner_id. When the prop is omitted, the footer asks deriveHighlightFields(objectSchema, null) as before, so other hosts (the standalone DetailView, the Studio page preview) are unchanged.
  • RecordDetailView hands 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 the fields of the record:highlights blocks among renderedPage'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:
    • on a phone, the header's strip after the subtitle (at most PHONE_HIGHLIGHTS_MAX, four);
    • on a desktop, the declared strip (at most six);
    • on a slotted page, the page's own highlights slot.
  • The plugin-detail README ("The provenance footer belongs to the record page") now tells a host that draws a strip to pass drawnHighlightFields.
  • File surface: the claim, amended in 6569734511 to add the drawn-strip reader with its one const in RecordDetailView.tsx and ui/packages/plugin-detail/README.md.
  • recordPhoneHeader.ts is read, not edited. DetailView.tsx is not edited: its footer runs outside DefaultRecordPageContext, so it never names the owner, and on a record page the page draws the footer instead.

Tests

  • New: ui/packages/app-shell/src/views/RecordDetailView.phoneOwnerLine-28909.test.tsx, a real RecordDetailView mount on the phoneFace-27058 harness. The lead declares highlightFields: ['name', 'email', 'status', 'phone', 'website', 'owner_id']: the title, four non-text highlights, then the owner fifth.
    • At 390 px the strip has 4 entries without the owner, and the meta line names 「Ada Admin」.
    • At 1440 px the strip has 5 entries with the owner, and the meta line has no owner entry (its id entry is still drawn).
  • New: 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.tsx and RecordDetailView.phoneFace-27058.test.tsx re-run green unchanged.

Acceptance notes

  • The strip is read from top-level blocks only. A record:highlights block nested inside a container in an authored highlights slot 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.
  • Field-level security is not subtracted. The record:highlights renderer 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.
  • The shared HighlightFieldsContext registry (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 (base ff881050). origin/main has moved 10 commits since; none touches plugin-detail or app-shell/src/views, so main is not merged in. Commands ran under os-verify-lock.

New and neighbouring tests · 4 files, 24 tests

pnpm --dir ui exec vitest run --maxWorkers=2 on RecordMetaFooter.drawnStrip-28909, RecordMetaFooter.ownerOnce-28868, RecordDetailView.phoneOwnerLine-28909 and RecordDetailView.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 empty git diff HEAD). @object-ui/plugin-detail resolves to its src under ui's vitest alias, so no dist rebuild was needed.

  • Host leg: drawnHighlightFieldsOf(renderedPage) replaced by undefined in RecordDetailView. 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.
  • Footer leg: the drawnHighlightFields ?? read removed in RecordMetaFooter. 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, drawnHighlightFields or the plugin-detail README (git grep -l over packages/** and apps/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 run tsc --noEmit and tsc -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 --commands derived 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 as GITHUB_EVENT_PATH and 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 include check-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.mjs and vitest 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

…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
…that draw a strip

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

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu

席位核对 · ACCEPT · 2026-11-02T06:09Z

Head-sha: be4cc7d079c6219332c2a733295a731b39816207

  • Shape:
    • The PR is a draft against main. The first card line is Fixes #28909, and no other card sits beside a closing keyword.
    • 6 files, +359 / −5. No governed path: check-governed-merges --pr 28994 reports NOT governed.
    • Clause-②: yes (widening) and Metadata-protocol: none start their lines in the body and the changeset, as claimed (6569483057, amendment 6569734511). The changeset is patch.
  • Read in the diff:
    • RecordMetaFooter gains one optional prop, drawnHighlightFields. The meta line leaves the owner out only when that list carries owner_id. When the prop is omitted, the declared strip decides, as before, so DetailView and other hosts are unchanged.
    • RecordDetailView passes the fields of the rendered page's top-level record:highlights blocks (drawnHighlightFieldsOf) at both call sites. That is the strip the page drew: 4 on a phone, up to 6 on a desktop, or a slotted page's own strip.
    • The README gets one sentence for hosts. There is no metadata key and no gate.
  • Gates (check-runs on this head): 44 success, 11 skipped, 0 failed or pending. mergeable_state is clean.
  • Tests (dev):
    • New phoneOwnerLine-28909 cases: at 390 px, owner declared 5th, the meta line names the owner. At 1440 px, same declaration, the strip names the owner and the meta line does not.
    • New drawnStrip-28909 footer tests (4 cases). ownerOnce-28868 and phoneFace-27058 stay green: 4 files, 24 tests.
    • Footer sweep: 13 files, 109 tests.
    • Ablations: host leg 1 red, footer leg 4 red, both restored.
    • Derived gates 34 of 34 pass.
  • NOT MEASURED: the seat ran no live session.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #28909 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 06:10
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 2, 2026 06:10
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 0be247c Nov 2, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-hrggqk branch November 2, 2026 06:24
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 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.

Record page on a phone: an owner_id declared 5th or 6th in highlightFields is shown neither in the phone header nor in the meta line

1 participant