Repository navigation
fix(plugin-detail): a laid-out record page whose first details block draws no body keeps its approval band - #36287
Conversation
…by its first drawing details body The details column of the laid-out record page now wraps its nodes in ApprovalBandOnceScope, the rule a page drawn as written already uses, so a first record:details that draws no band (withheld by requiredPermissions, or drawing its own header) leaves the band to the next part instead of taking it off the page. ApprovalBandContext, which only the per-part suppression read, is removed. Pins the page:tabs fallback through the real renderers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oLLK7uoxp33riiBJL
…id-out page Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oLLK7uoxp33riiBJL
…proval-band-once # Conflicts: # ui/packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL Final green head for L1 (rework round 1, merge of main after #36234): |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL 维护者速读
席位核对 — ACCEPT (L1-d) · repo:objectstack#4 · head
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL Landing · head
State: ready + auto-merge; on MERGED |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5ozidcgr4FYrKfmrjD 维护者速读
席位核对 — ACCEPT (L1-d) · repo:objectstack#4 · head
|
Requested by Leehom · project thread
Fixes #35483
repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL
Clause-②: no
Metadata-protocol: none
This PR also carries the folded card #35484 (authored page with two details nodes), closed into this one by the fold ruling on the card.
维护者速读
What changes
Measured first on
origin/maina5a5312, as the card asks. Three readings, each a rendered test on an approval-locked record through the realrecord:details/page:tabsrenderers:page:tabsstrip, two details parts, inside the host'sApprovalBandOnceScoperecord:detailsnodesdetailsslot, firstrecord:detailswithheld byrequiredPermissionsdetailsslot, firstrecord:detailswithshowHeader: truerecord:detailsRows (a) and (b) were already fixed on
mainby the approvals-tab rework: the host wraps every page drawn as written inApprovalBandOnceScope. The one reachable route to (a) is a slotted page that places apage:tabsnode in a strip slot (highlights,header,actions,alerts): two strips, whichbuildDefaultPageColumnscannot partition. A page the synthesizer writes on its own always lays out.What still failed is the case both cards name ("without dropping the band from a page whose first details node ... draws no body"): on the LAID-OUT page,
RecordPageColumnsgave the band to the firstrecord:detailsnode and setApprovalBandContextfalse on every later one, so a first node that draws no band took it off the page. The fix gives the laid-out details column the same rule as a page drawn as written:RecordPageColumnswraps its details column inApprovalBandOnceScope: the first details body that reaches the band's place draws it.ApprovalBandContextis removed: the per-part suppression was its only provider, andDetailViewno longer reads it. It was module-internal (not in the barrel, not a prop, not a schema key), so no public face moves.resolveApprovalLockand the lock rule are untouched; alockRecord: falseapproval still readsIn approval · editable, once.All edits are under
ui/packages/plugin-detail/**;RecordDetailView.tsxandRelatedList.tsxare not touched.Read first, by risk:
ui/packages/plugin-detail/src/RecordPageColumns.tsxdrawDetailsNodes: the scope replaces the per-part context; the band still sits above a body table on the split page.ui/packages/plugin-detail/src/DetailView.tsx: the band now gates on the scope alone.ui/packages/plugin-detail/src/defaultRecordPage.ts: the context and its doc, merged into the scope's doc.Tests
RecordPageColumns.test.tsx: a new top-level describe (the shared harness file) pins a first part withheld byrequiredPermissionsand a first part withshowHeader: true(band once, on the second part), alockRecord: falseapproval behind a withheld first part (editable once, never locked), and CONTROLs for two drawing parts (band on the first), a single part, and a single withheld part (no band, notice shown). The harness'srecord:detailsstub now hands its node to the body it mounts.DetailView.approvalBandOnce-35484.test.tsx: a new top-level describe draws the synthesized page'spage:tabsfallback through the real renderers: the page cannot be laid out and its overview holds two details parts; one band under the scope; CONTROL two bands without it; CONTROL one part draws its one band. The file header's pointer to the host pin now names the file that holds it.Reverse verification (one-off, fix committed first): the three
srcfiles restored to a5a5312, the two test files kept: 3 failed, 39 passed (the two first-part cases and thelockRecord: falsecase: no band found). Restored withgit checkout HEAD,git diff HEADempty.Acceptance notes
overlap-checkreports PR feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234 (seat 1, the field-list card) sharing the four plugin-detail files, with a textual conflict inRecordPageColumns.test.tsx(both append to it). Whichever lands second takes a mechanical merge of that test file.page:tabsnode in a strip slot; whether that shape should be authorable at all is not this card's question (noted, not filed).Verification
Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx packages/plugin-detail/src/__tests__/DetailView.approvalBandOnce-35484.test.tsx— expect 42 passed.Readings at head 02f7053 (local, under the shared verify lock; shared-box wall times)
(a) scoped marks 2 bands 1·(a) unscoped bands 2·(c1) bands 1·(c2) refusal 1 bands 0·(c3) bands 0·(c4) bands 1; slottedhighlightsslot withpage:tabsgivesbuildDefaultPageColumnsnull.Test Files 2 passed (2),Tests 42 passed (42),VERDICT command-exit 0.Tests 3 failed | 39 passed (42),VERDICT command-exit 1; restored,git diff HEADempty.@object-ui/plugin-detailsuite:Test Files 403 passed | 1 skipped (404),Tests 3737 passed | 18 skipped (3755),VERDICT command-exit 0.pnpm --filter @object-ui/plugin-detail type-check(both programs,tsc --noEmit && tsc -p tsconfig.test.json):VERDICT command-exit 0.dispatch-gates --commandsderived 38 families; 37 run locally, each exit 0;pnpm --dir ui exec vitest run scripts/is reported separately in the dispatch report.Generated by Claude Code