Skip to content

feat(record): one header row and one button group on the record page (#35593, #35419) - #35679

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-0quaor
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-0quaor

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #35593
Fixes #35419

repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

What changes

The record page's header is one 44 px row, with one button group (epic #35590).

  • Full page. page:header draws into the page's top bar instead of a second row under it. Left: object icon, object name, /, record name, stage tag, approval tag. Right: n/m, ↓ ↑, a divider, the button group, ⊟.
  • Drawer. The pane's bar takes the same header: object icon, record name, stage tag, approval tag; then the button group, ↗ (open as page) and ✕. No object name, no n/m, no ↓ ↑ once the header holds the bar. The j / k keys stay.
  • One button group by state (DeclaredActionsBar header face):
  • The approval band goes away on the record page. A short tag (待你审批 / 审批中 / 已退回修改 / 已驳回) sits after the record's name. It scrolls to the approvals panel (record-approvals-panel) until the 审批 tab (记录页页签规则:第一个叫「概览」并含通栏的阶段条和关键字段;列出全部子表、带条数、只按宽度收进下拉;附件、审批、互动各一个页签 #35595) exists.
  • Locks. An approval lock draws no Edit, and the DetailView band draws no 「审批中已锁定」 badge once the header's tag names the approval (InlineEditProvider approvalTagDrawnByHost; the tag's tooltip says why; the tally stays). A state lock keeps Edit greyed and shows its lock tag beside the name (in the bar) or as before (no bar).
  • Reject needs a reason. Area ruling: client-side only, in the record page's reject dialog (requireRejectReason maps comment to required). The declaration and the approvals list are unchanged.
  • Kept. The request page's ApprovalDecisionPanel band and its pins are unchanged. A record layout with no page:header keeps the old band above its body as a fallback (counted through ApprovalGroupBeacon), so its decisions never vanish.

New in @object-ui/react: InlineEditProvider approvalTagDrawnByHost. New in @object-ui/components: RecordHeaderBarContext (the host bar's two slots and a claim) and RecordHeaderStateContext (tags + group). RecordTopBar / NavigationOverlay take actionSlotRef; NavigationOverlay also takes stepperHidden; PageHeaderActions takes defaultMaxVisible. Bar height sm:h-10 → sm:h-11.

Why

Card #35593 (Twenty-style record header, structure and sizes only, no code copied): three stacked bands became one row, and the approval's levers were a second button group competing with the record's.

Verification

Clause-②: no
Metadata-protocol: none

Acceptance, #35593

Item Reading Where
1 one 44 px row, full page ✓ ui/packages/components/src/renderers/layout/containers.tsx (drawsInBar, recordStageTag), RecordDetailView.tsx (pageHeaderBar, barTitleSlotEl), record-top-bar.tsx (actionSlotRef, sm:h-11)
2 drawer header ✓ recordDrawerStack.tsx (headerBar, stepperHidden, onExpand)
3 one group by state ✓ DeclaredActionsBar.tsx (headerLeads, SUBMITTER_LEAD_VERBS), containers.tsx (stateGroup), defaultMaxVisible={inBar ? 1 : undefined}
4 band → tag ✓ (tag scrolls to the approvals panel until #35595) RecordDetailView.tsx (approvalTag, recordHeaderState)
5 lock badge / toast badge ✓; toast: see deviations RecordDetailView.tsx (affordances.edit && !approvalLocked, approvalTagDrawnByHost, stateLockChip), DetailView.tsx (badge gate), InlineEditContext.tsx
6 reject reason ✓ client-side DeclaredActionsBar.tsx (staticParams = requireReason && routeVerb === 'reject')

Acceptance, #35419

Item Reading Where
phone, pending on me: only 通过 filled ✓ DeclaredActionsBar.tsx (headerTone, data-header-tone); pinned in RecordDetailView.phoneFace-27058.test.tsx
驳回 wording ✓ already shipped on main (zh-CN approval_reject = 「驳回」) no change

A1–A5 readings

  • A1 holds: 撤回 = approval_recall, 催办 = approval_remind; both declared; the record page no longer excludes remind.
  • A2: one primary holds; the default budget of 3 is set to 1 in the one-row header (area-approved plan).
  • A3: surface amended by the area (drawer composition, the context file and its export). Amended after the fact (7026413128) for ui/packages/react/src/context/InlineEditContext.tsx: a host-only prop approvalTagDrawnByHost, default off, so every host that never passes it keeps the band's badge unchanged. Why: card item 5 says an approval lock draws no lock badge. The record page's header tag already names the approval, and the band in @object-ui/plugin-detail only learns what the host draws through InlineEditProvider, the same way approvalRecallDrawnByHost (record page under approval: the admin override bar ("管理员代为通过 / 代为拒绝 / 代为转签 / 撤回 / 回复") sits above the record title as five primary-looking buttons, and 撤回 is drawn twice on the page #25877) works. Placement only; it never decides whether the record is locked. Clause-② stays no.
  • A4: the lock badge lives in the DetailView band; it now yields to the header's tag for an approval lock. No toast path exists (see deviations).
  • A5: the phone bar is PageHeaderActions' bar face portalled into the page's action bar; it now calls the state group too.

Tests

New pins:

  • ui/packages/components/src/__tests__/page-header-record-bar-35593.test.tsx (8): bar claim and portal, budget 1, authored maxVisible, recordChrome: false, tags, state group modes.
  • RecordDetailView.approvalDeclaredActions.test.tsx (+7): approver / submitter / unrelated / override / no request, approval tag, reject reason required.
  • record-top-bar-27524.test.tsx (+1): action slot order and empty hiding.
  • DetailView.approvalTagHostDrawn-35593.test.tsx (3): no approval-lock badge when the host draws the tag; kept otherwise; an editable approval keeps its badge.

Migrated (record page only; the request page's band pins are untouched):

RecordDetailView.editLockedByState-32756 now reads the approval lock off the tag (no band badge).

CI-only stall (Test UI shard 12 on e1989c8): RecordDetailView.approvalDeclaredActions.test.tsx's @object-ui/react mock factory imported @object-ui/components, which imports @object-ui/react; the factory awaited the module it was building and the file hung at collection, with no test clock running. Reproduced locally (300 s timeout, every describe); fixed in 5ff9d4d (context handed through the hoisted holder), file now 20/20 in ~10 s.

Retired: none. The record-page band expectations in RecordDetailView.approvalDeclaredActions.test.tsx now read the header-less fallback band.

Checklist: docs/qa/platform-checklist/areas/approvals.json approvals.record-page-decisions revision 10 (steps 2, 4, 7, 9; acceptance 0, 1, 3, 4; source 0).

Gates: @object-ui/components and @object-ui/app-shell type-check green; dispatch-gates --commands set green locally (check:new-line-citations is not a script on this tree); overlap-check --branch=HEAD clean.

Screenshots (showcase, 1280×800 zh-CN and 390, DSF 2), in the project files objectstack-seat5/area-ux/ux-4/record/card-35593/: approver (EXP-2001, 通过 / 驳回 / ⋮, menu), submitter (Mei: 撤回 / 催办 / ⋮), unrelated on a locked record (Ada: 审批中 tag, ⋯ only, no Edit), unrelated without access to the request (no tag), approver who is also submitter, reject dialog (审批意见 required; empty confirm stays open), next step locked, after approval (编辑 + ⋯, no tag), 390 approver (only 通过 filled) and submitter, drawer.

Deviations

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbcHxEWkJvtLGgxfdd

, #35419)

The decisions are the record header's group; a header-less layout keeps
the band. Approval tag, reject reason required, no Edit under an
approval lock. Tests migrated; checklist item and changeset.

Claude-Session: https://claude.ai/code/session_01Utp6CbcHxEWkJvtLGgxfdd
Co-authored-by: Claude <noreply@anthropic.com>
…he one-row header (#35593)

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

Copy link
Copy Markdown
Contributor Author

Test UI on e1989c8 is red only because shard 12/16 was cancelled at its 30-minute limit (job 135945280237). The shard's log stops after packages/app-shell/src/views/metadata-admin/package-scope.test.ts passed at 23:12:13 and prints nothing until the cancel at 23:27:13. No test failed in it.

I re-ran the same slot locally at e1989c8, with the file list plan-test-ui-shards.mjs files --slot 12 computes from this tree: 432 files, 6282 tests passed, 19 skipped, 0 failed, in 488 s. The 58 files in that slot that render the record page, the drawer, page:header or DeclaredActionsBar also pass on their own.

So I read it as a stalled shard, not a failure this diff causes. Every other job in run 44632666515 passed. Per the fleet rule I don't re-run it myself; the seat may re-run the failed job once, and a second failure counts as real.


Generated by Claude Code

…ds with the icon (#35593)

Acceptance on the showcase:
- The header's approval tag names the lock (its tooltip says why), so the
  DetailView band draws no 「审批中已锁定」 badge for an approval lock when the
  host's header draws the tag (`approvalTagDrawnByHost`). The tally and an
  editable approval's badge stay; a host that does not say so is unchanged.
- The drawer's row leads with the object's icon once the record's header
  holds the bar, as the full page's crumb does.

The approval-actions test's `@object-ui/react` mock factory imported
`@object-ui/components`, which imports `@object-ui/react` itself: the factory
awaited the module it was building and the file hung at collection with no
test clock running (the silent Test UI shard 12). The stub now gets the
context through the hoisted holder, assigned after the imports.

Claude-Session: https://claude.ai/code/session_01Utp6CbcHxEWkJvtLGgxfdd
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

Final head for L1: 5ff9d4dc51e01a7563a2cbc7098e0352fafe504d · 2026-11-20T00:53Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:记录详情页顶部合成一行:左边是对象、记录名和状态标签,右边只有一组按钮,随状态变化。平时是编辑、一个主操作和「⋯」;轮到你审批时是通过、驳回和「⋮」;自己提交等人审批时是撤回、催办。原来正文上方的审批栏不再出现;驳回必须填写理由。
  • 为什么做:按您在记录详情页专题里「同意」的方向二,去掉两组按钮并存的情况。
  • 出错会怎样:最坏是审批按钮缺失或位置不对;页面布局里没有页头的仍保留原审批栏,审批申请本身的页面不变。
  • 要你做什么:无。
  • 席位意见:通过;区域需要先合并一次主干,并补登记两个已有的端到端测试文件(文字即可),之后由区域合并。

席位核对

L1-a: ACCEPT, two items before queueing · head 5ff9d4dc51e01a7563a2cbc7098e0352fafe504d · Fixes #35593, Fixes #35419 (epic #35590) · K=16 · merge-tree clean · not governed (0 of 30) · 1,716 lines · CI 52 success, 15 skipped; the two cancelled (Check Changeset, PR-body guards) each have a later success on this head · 2026-11-20T00:55Z

Maintainer's word: verified. The epic #35590 body records direction 2 with the maintainer's 「同意」 given "与 #34361 的旧裁决并排确认后 … 取代 #34361 的 A". So the record page drops the band. The request page's ApprovalDecisionPanel keeps its band, as the claim's ⛔ requires, and a layout with no page:header keeps the fallback band (ApprovalGroupBeacon counts the headers that host the group).

Reject needs a reason: in scope. Card item 6 is 「拒绝」必须填理由. The claim records that the server's approval_reject.comment stays required: false and that tightening the producer is a follow-up card. Only the record page's dialog requires the reason here.

Fences.

  • RecordDetailView.tsx hunks sit in the header and approval-group composition: the bar slots, the beacon, approvalBandDrawn beside approvalBarDrawn, and the header row.
  • containers.tsx hunks are in PageHeaderActions and PageHeaderRenderer only, not the tab region.
  • No packages/spec, server or REST change.
  • A merge-tree of this head with ux-2's feat(spec, ui): master_detail children are overview body tables by default #35691, which also edits RecordDetailView.tsx, is clean.

Item (1): approvalTagDrawnByHost. It is an optional InlineEditProvider prop, default false, carried in the memo deps. DetailView skips only the approval-lock badge when it is set (isLocked && inline?.approvalTagDrawnByHost). The jsdoc says "PLACEMENT ONLY … never whether the record is locked", and the code matches. Amendment 7026413128 names the file and its pin DetailView.approvalTagHostDrawn-35593.test.tsx. It is host-only and not authorable, so Clause-② no holds.

Pins. RecordDetailView.approvalDeclaredActions.test.tsx (+152) and page-header-record-bar-35593.test.tsx (new) cover the three button-group states and the one-row header. Eleven existing RecordDetailView.* tests migrate to the one row.

R1 (before queueing): merge main and re-run green. K=16 is past the 15 line. It is merge-only, so no fresh L1 unless the merge needs hand resolution.

R2 (text only, no push, no fresh L1): claim amendment for two existing e2e specs. The claim allows "new e2e specs under ui/e2e/ named for the card". This PR edits two existing ones:

  • ui/e2e/record-flow-phone-targets.spec.ts: the top bar's sm:h-10 becomes sm:h-11, the 44px row;
  • ui/e2e/record-header-title-width.spec.ts: the title-column anchor moves to objectLabel={objectLabel}, because the host bar's chip now comes first in the file.

Name both in one amendment line on #35593.

Routing. Clause-② no, no contract face, not governed: ux-4 lands it after R1 and R2. No L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

Landing · area ux-4 · 2026-11-20T01:18Z

Reading Value
check-governed-merges --pr 35679 not governed, 1,716 lines → ordinary queue landing
K (merge base..origin/main) 3 (< 15)
CI on head 5e534f5f58 50 success, 11 skipped, 0 failed or pending; mergeable clean

Head 5e534f5f58e8acfa057b3b472880bbd98d965493 is a merge-only update (origin/main into 5ff9d4dc51, clean, no file of this PR touched by main). L1-a ACCEPT 7026939627 on 5ff9d4dc51 carries over per its R1; R2 closed by claim amendment 3 on #35593 (the two edited e2e specs). No L2 needed. Ready + auto-merge now. #35593 and #35419 close on merge; follow-ups #35659 (producer-side reject reason) and #35660 (spec prose for the header budget).

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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants