Skip to content

fix(plugin-detail): a laid-out record page whose first details block draws no body keeps its approval band - #36287

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35483-approval-band-once
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35483-approval-band-once

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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/main a5a5312, as the card asks. Three readings, each a rendered test on an approval-locked record through the real record:details / page:tabs renderers:

Row Page Bands drawn
(a) synthesized page falling back to its page:tabs strip, two details parts, inside the host's ApprovalBandOnceScope 1 (2 marks); 2 without the scope
(b) authored page, two record:details nodes 1 (already pinned at host level by the PR that closed the approvals-tab card)
(c1) laid-out synthesized page split around a body table, first part with every section empty 1
(c2) laid-out slotted page, details slot, first record:details withheld by requiredPermissions 0
(c3) laid-out slotted page, details slot, first record:details with showHeader: true 0
(c4) laid-out slotted page, two plain record:details 1

Rows (a) and (b) were already fixed on main by the approvals-tab rework: the host wraps every page drawn as written in ApprovalBandOnceScope. The one reachable route to (a) is a slotted page that places a page:tabs node in a strip slot (highlights, header, actions, alerts): two strips, which buildDefaultPageColumns cannot 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, RecordPageColumns gave the band to the first record:details node and set ApprovalBandContext false 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:

  • RecordPageColumns wraps its details column in ApprovalBandOnceScope: the first details body that reaches the band's place draws it.
  • ApprovalBandContext is removed: the per-part suppression was its only provider, and DetailView no longer reads it. It was module-internal (not in the barrel, not a prop, not a schema key), so no public face moves.
  • resolveApprovalLock and the lock rule are untouched; a lockRecord: false approval still reads In approval · editable, once.

All edits are under ui/packages/plugin-detail/**; RecordDetailView.tsx and RelatedList.tsx are not touched.

Read first, by risk:

  1. ui/packages/plugin-detail/src/RecordPageColumns.tsx drawDetailsNodes: the scope replaces the per-part context; the band still sits above a body table on the split page.
  2. ui/packages/plugin-detail/src/DetailView.tsx: the band now gates on the scope alone.
  3. 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 by requiredPermissions and a first part with showHeader: true (band once, on the second part), a lockRecord: false approval 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's record:details stub now hands its node to the body it mounts.
  • DetailView.approvalBandOnce-35484.test.tsx: a new top-level describe draws the synthesized page's page:tabs fallback 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 src files restored to a5a5312, the two test files kept: 3 failed, 39 passed (the two first-part cases and the lockRecord: false case: no band found). Restored with git checkout HEAD, git diff HEAD empty.

Acceptance notes

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)
  • Measurement (scratch file, deleted), real renderers at a5a5312: (a) scoped marks 2 bands 1 · (a) unscoped bands 2 · (c1) bands 1 · (c2) refusal 1 bands 0 · (c3) bands 0 · (c4) bands 1; slotted highlights slot with page:tabs gives buildDefaultPageColumns null.
  • Two pinned files after the fix: Test Files 2 passed (2), Tests 42 passed (42), VERDICT command-exit 0.
  • Reverse verification (src at a5a5312, tests kept): Tests 3 failed | 39 passed (42), VERDICT command-exit 1; restored, git diff HEAD empty.
  • Whole @object-ui/plugin-detail suite: 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 --commands derived 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

…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
@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 22, 2026
…proval-band-once

# Conflicts:
#	ui/packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

Final green head for L1 (rework round 1, merge of main after #36234): a67d129769218577c4a3b953426f5755a858ab8e. Check-runs on it (pr-state 05:37Z): 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; no commit status; mergeable state clean. Delta report: #35483 comment 7074658973 (conflict only in RecordPageColumns.test.tsx; the fix still applies). Sent to L1-d for a delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

维护者速读

  • 记录页上审批状态条(「审批锁定中」等)每页只显示一次。这次补的情形:按栏排版的记录页里,第一块详情读者看不到或自带页头时,以前整页一条都不显示,现在由下一块详情显示。
  • 卡上另两种情形主干早已修好,这个 PR 只是补了测试钉住。锁定规则本身不变。
  • 结论:通过。
  • 要你做什么:现在不需要。

席位核对 — ACCEPT (L1-d) · repo:objectstack#4 · head a67d129769 · 2026-11-22T05:39Z

First L1 read, whole diff (no earlier L1 record exists; the area's "delta read" wording referred to the dev's merge round). Read at a67d129769: 6 files, +228/−67. The face is Clause-②: no, Metadata-protocol: none. No contract face and not Tier H, so no L2 is owed.

Checked and fine

  • Shape. Draft, base main, first line Fixes #35483. Fixes is right: the card asks to measure and pin the page:tabs fallback and the no-body first part, and to apply one band per page where it is wrong; both are pinned and the wrong one is fixed. The folded record page: an authored page with two details nodes draws the approval-lock band in each #35484 is already closed. l1-face is CLEAN.
  • Premise correction, on the record. The body says rows (a) and (b) were already fixed on main (the host wraps every page drawn as written in ApprovalBandOnceScope) and that the laid-out page's no-body first part drew 0 bands. Checked at the head: RecordDetailView.tsx mounts ApprovalBandOnceScope around the page:tabs fallback only, and RecordPageColumns is the other branch of the same ternary, so the new inner scope never nests in the host's.
  • The fix. drawDetailsNodes now wraps the details column in ApprovalBandOnceScope instead of giving the band to the first record:details index; ApprovalBandContext is deleted with its only reader (DetailView) and provider. The scope draws the band on the first connected mark in document order, registered in a layout effect that re-renders synchronously, so there is no unbanded frame. A first part withheld by requiredPermissions or drawing its own header renders no mark and the next part takes the band. Pages with a drawing first part keep the band on it, above the body table.
  • Tests. RecordPageColumns.test.tsx: withheld first part and showHeader: true first part each draw the band once on the second part; lockRecord: false behind a withheld first part reads editable, once; CONTROLs for two drawing parts, a single part, and a single withheld part (no band, no body). DetailView.approvalBandOnce-35484.test.tsx: the page:tabs fallback with two parts under the scope draws it once, with CONTROLs outside the scope and for one part. Reverse check on the merged head (three src files restored to main): exactly the three no-body cases red; restored.
  • Merge of main (feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234). One conflict, both sides appending a describe to RecordPageColumns.test.tsx; both kept. feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234's details-column changes do not touch the band, and no ApprovalBandContext reader remains in the merged tree.
  • Changeset. Read sentence by sentence against the diff: "once per page", "used to give the band to the first record:details node … a locked record showed no band at all", "draws the band by the first details body that reaches its place", "the band stays above a body table" (for every other page) and "whether the band reads locked or editable … is unchanged" all match.
  • Overlap. overlap-check.mjs --branch=pr-36287 --pr=36236,36208,36298,36296 against current origin/main: all clean. No RelatedList.tsx touch; RecordDetailView.tsx is not in the diff.
  • Gates. At a67d129769: 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success; mergeable_state clean. Local: the whole plugin-detail package 3784 passed, type-check exit 0.

Nit (no re-read)

  1. The Acceptance notes' overlap line still describes feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234 as pending ("whichever lands second takes a mechanical merge"); it has landed and this head carries that merge. Body-only; fix it if the body is touched again.

Out-of-scope item

  1. A page:tabs node in a strip slot (the one route to the fallback): dropped — no defect: the band is drawn once there (pinned above); whether that shape should be authorable is a spec question with no observed harm and no producer.

Landing

  • Fixes #35483: merging closes the card; the area clears pm:dispatched at close per landing rule B. Non-governed, the area lands it.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

Landing · head a67d129769218577c4a3b953426f5755a858ab8e · ACCEPT → PR #36287 comment 7074874886 (L1-d)

Probe Reading
check-governed-merges.mjs --pr 36287 NOT governed; 295 changed lines (+228 / −67), under 3000
check-runs on the head 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; mergeable clean

State: ready + auto-merge; on MERGED Fixes #35483 closes the card and the area clears pm:dispatched. The ACCEPT's nit (Acceptance notes still call #36234 pending) is a stale line in the body only; #36234 merged before this head and the merge is in it.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 05:40
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5ozidcgr4FYrKfmrjD

维护者速读

  • 记录页上审批状态条(「审批锁定中」等)每页只显示一次。这次补的情形:按栏排版的记录页里,第一块详情读者看不到或自带页头时,以前整页一条都不显示,现在由下一块详情显示。
  • 卡上另两种情形主干早已修好,这个 PR 只是补了测试钉住。锁定规则本身不变。
  • 结论:通过。
  • 要你做什么:现在不需要。

席位核对 — ACCEPT (L1-d) · repo:objectstack#4 · head a67d129769 · 2026-11-22T05:40Z

This record supersedes comment 7074874886, whose signature line named the area's session by mistake; the verdict is unchanged. First L1 read, whole diff (no earlier L1 record exists; the area's "delta read" wording referred to the dev's merge round). Read at a67d129769: 6 files, +228/−67. The face is Clause-②: no, Metadata-protocol: none. No contract face and not Tier H, so no L2 is owed.

Checked and fine

  • Shape. Draft, base main, first line Fixes #35483. Fixes is right: the card asks to measure and pin the page:tabs fallback and the no-body first part, and to apply one band per page where it is wrong; both are pinned and the wrong one is fixed. The folded record page: an authored page with two details nodes draws the approval-lock band in each #35484 is already closed. l1-face is CLEAN.
  • Premise correction, on the record. The body says rows (a) and (b) were already fixed on main (the host wraps every page drawn as written in ApprovalBandOnceScope) and that the laid-out page's no-body first part drew 0 bands. Checked at the head: RecordDetailView.tsx mounts ApprovalBandOnceScope around the page:tabs fallback only, and RecordPageColumns is the other branch of the same ternary, so the new inner scope never nests in the host's.
  • The fix. drawDetailsNodes now wraps the details column in ApprovalBandOnceScope instead of giving the band to the first record:details index; ApprovalBandContext is deleted with its only reader (DetailView) and provider. The scope draws the band on the first connected mark in document order, registered in a layout effect that re-renders synchronously, so there is no unbanded frame. A first part withheld by requiredPermissions or drawing its own header renders no mark and the next part takes the band. Pages with a drawing first part keep the band on it, above the body table.
  • Tests. RecordPageColumns.test.tsx: withheld first part and showHeader: true first part each draw the band once on the second part; lockRecord: false behind a withheld first part reads editable, once; CONTROLs for two drawing parts, a single part, and a single withheld part (no band, no body). DetailView.approvalBandOnce-35484.test.tsx: the page:tabs fallback with two parts under the scope draws it once, with CONTROLs outside the scope and for one part. Reverse check on the merged head (three src files restored to main): exactly the three no-body cases red; restored.
  • Merge of main (feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234). One conflict, both sides appending a describe to RecordPageColumns.test.tsx; both kept. feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234's details-column changes do not touch the band, and no ApprovalBandContext reader remains in the merged tree.
  • Changeset. Read sentence by sentence against the diff: "once per page", "used to give the band to the first record:details node … a locked record showed no band at all", "draws the band by the first details body that reaches its place", "the band stays above a body table" (for every other page) and "whether the band reads locked or editable … is unchanged" all match.
  • Overlap. overlap-check.mjs --branch=pr-36287 --pr=36236,36208,36298,36296 against current origin/main: all clean. No RelatedList.tsx touch; RecordDetailView.tsx is not in the diff.
  • Gates. At a67d129769: 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success; mergeable_state clean. Local: the whole plugin-detail package 3784 passed, type-check exit 0.

Nit (no re-read)

  1. The Acceptance notes' overlap line still describes feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234 as pending ("whichever lands second takes a mechanical merge"); it has landed and this head carries that merge. Body-only; fix it if the body is touched again.

Out-of-scope item

  1. A page:tabs node in a strip slot (the one route to the fallback): dropped — no defect: the band is drawn once there (pinned above); whether that shape should be authorable is a spec question with no observed harm and no producer.

Landing

  • Fixes #35483: merging closes the card; the area clears pm:dispatched at close per landing rule B. Non-governed, the area lands it.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 46ad134 Nov 22, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35483-approval-band-once branch November 22, 2026 06:44
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: a synthesized page that falls back to page tabs may still draw the approval-lock band once per details part

1 participant