Repository navigation
fix(plugin-detail): a record on a print page prints its own title field (objectui#12787) - #12814
Conversation
…ld (objectui#12787) record:details hid the row the page header's H1 shows (declared name field, titleFormat match, candidate fallback). A print page refuses page:header, so a printed invoice carried no invoice number. On a print page, read through usePrintPage() as DetailView and DetailSection do, the dedupe no longer applies; off a print page nothing changes. Claude-Session: https://claude.ai/code/session_016Vv5qFjotEeCQN4PUiWwiT Co-authored-by: Claude <noreply@anthropic.com>
…tui#12787) Claude-Session: https://claude.ai/code/session_016Vv5qFjotEeCQN4PUiWwiT Co-authored-by: Claude <noreply@anthropic.com>
席位核对 — ACCEPT · objectui#12787 · head
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Landing · head
|
Fixes #12787
Clause-②: no
What
On a page that declares
print,record:detailsnow prints the record's own title field. A printed invoice carries its invoice number again. Off a print page nothing changes.Off a print page,
record:detailshides the row that the page header's H1 already shows: the declared name field, else the field atitleFormatresolves to, else the first title candidate that has a value. A print page refusespage:header, so on paper nothing drew that value.packages/plugin-detail/src/renderers/record-details.tsxnow readsusePrintPage() !== nullwith its other hooks, above every early return, the same wayDetailView(PR #12785) andDetailSection(PR #12729) read it. On a print page the whole title ladder is skipped. An author'shideFieldsand therecord:highlightsdedupe still apply: their premise does not depend on a page header.No prop, type member, export or i18n key changed.
Measured
titleFormatmatch and the candidate fallback.showcase_invoice(next.2) declares nonameFieldand notitleFormat. On the live PDF, the invoice number was hidden by the candidate fallback (the derivedname), not by the declared-name branch.Tests
New
packages/plugin-detail/src/__tests__/record-details.printTitleField-12787.test.tsx, through the real renderer:PrintPageProvider, the title row prints for a declared name field (INV-1010), for atitleFormatthat resolves tocontract_no, and for the candidate fallback.Ablations, with the fix committed:
git diff HEADempty).Results at
05aab42:pnpm --filter @object-ui/plugin-detail test(run at1eb4c26, before a type-only follow-up to the new test): 282 files passed, 1 skipped; 2692 tests passed, 18 skipped.05aab42: 6 passed.type-check,build, tsc over the package's test config, eslint on the touched files (no new warnings),check:i18n-keys,check:i18n-drift, the changeset presence check,check:new-line-citationsandcheck:test-path-roots.Printed page
Setup:
@objectstack/*@18.0.0-next.2showcase backend, from the showcase source at the next.2 release commit.printpage onshowcase_invoicewhoserecord:detailsdeclaresname, added in a scratch copy only.PDF text read at capture:
f114263), record route: no INV-1010.Screenshots:
The images live on branch
claude/issue-12787-evidenceonly. This branch carries no PNG or PDF.Acceptance notes
page:header's refusal on a print page (the spec's contract),DetailView's own header and the auto-tabs strip on a print page, and the related list (objectui#12741).src/__tests__/, where the claim's file surface names it. The sibling title-dedupe pins live insrc/renderers/__tests__/.Built in cloud session
https://claude.ai/code/session_016Vv5qFjotEeCQN4PUiWwiT(claim6225037918).🤖 Generated with Claude Code
https://claude.ai/code/session_016Vv5qFjotEeCQN4PUiWwiT