Skip to content

记录页头部压成一行;只有一组按钮,随记录状态换内容(等我审批时是通过、拒绝);审批状态只留一个短标签 #35593

Closed
2 of 2 issues completed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #35590(专题:记录详情页重做,维护者直派)。⛔ 不是认领。优先级 p2(维护者 2026-11-19:「这一批卡p2」)。

维护者 2026-11-19 原话:「现在的两波按钮很奇怪」;把「并成一组」和 #34361 的旧裁决 A 并排摆出后:「同意」。「顶上一排审批相关的状态是否写太多,有的是否应该放到审批选项卡中」。「抽屉打开的时候,不需要第几条,上一条下一条」「也不需要显示对象名称」。

目标(图 37)

图 37 记录页:概览、相关表页签、抽屉

现状

现状:HotCRM 手写的商机页,待审批

图是深色稿,只表达结构和尺寸,颜色沿用现有主题变量。参照对象 Twenty 是 AGPL,只参照结构,⛔ 不抄代码。代码读数取自 origin/main 7ece0204a6。外壳(顶栏、左侧栏)不动。

  • 待审批的记录页上有两组按钮:页面主体上方的审批栏(DeclaredActionsBar,ui/packages/app-shell/src/views/RecordDetailView.tsx:5522-5533)是「通过、拒绝、更多审批操作」;标题右边是记录自己的操作(HotCRM 商机:生成报价单、克隆商机、记录通话、编辑、⋯)。
  • 审批栏上写「待你审批 · 第 2 步 · 销售总监签批 · 由你提交」;下面另有一块说明和「审批中已锁定」标记(ui/packages/plugin-detail/src/DetailView.tsx:1774-1781)。
  • 页签上方共有三到四层:标题和按钮、关键字段、阶段条、(待审批时)审批栏。
  • 抽屉头部显示「对象名 › 记录名」和「2 / 10」、上一条、下一条。
  • 记录操作由动作元数据的 locations、order、variant 决定(packages/spec/src/ui/action.zod.ts:774-804, 1789-1810),page:header 有 maxVisible(默认 3)。没有按审批状态切换头部按钮的规则;「等我审批」目前只在审批请求行上知道(viewer.can_act)。

要做的

  1. 头部一行(高 44)。整页:对象图标、对象名、「/」、记录名、当前阶段标签、审批状态标签;右边是「第几条」、上一条、下一条、分隔线、一组按钮。
  2. 抽屉头部:只有对象图标、记录名、阶段标签、审批状态标签;右边是一组按钮、「整页打开」、「关闭」。不显示对象名,不显示「第几条」和上一条、下一条(列表就在旁边)。
  3. 只有一组按钮,随记录状态换内容:
    • 平时:「编辑」、一个主操作(按动作元数据的顺序取第一个)、「⋮」。
    • 等我审批:「通过」(主色)、「拒绝」、「⋮」。「⋮」里先是其余审批操作(转交、加签、退回、回复等),分隔线,再是记录自己的操作。
    • 我提交的、等别人批:「撤回」、「催办」、「⋮」。
    • 记录锁定时不显示「编辑」。
    • 任何状态下只有一个主色按钮(承接 手机记录页待审批时有两个主按钮:顶部「通过」与底部操作栏的第一个动作都是主色 #35419:手机上顶部「通过」和底部操作栏第一个动作同为主色)。
  4. 独立的审批栏取消。头部只留一个短标签:「待你审批」/「审批中」/「已驳回」等,点它跳到「审批」页签。第几步、原因说明、进度、锁定说明都不在头部(去处见子卡「页签规则」)。
  5. 「已锁定」标记:因审批锁定时不单独显示(「待你审批」已说明);因其他原因锁定时仍在记录名旁显示。从别处触发编辑时提示「审批中,暂时不能修改」并给出去「审批」页签的链接。
  6. 「拒绝」必须填理由并确认后才提交。

不做的

  • 不改各个动作本身的行为和权限;不改审批流程。
  • 不动外壳;不动审批请求对象自己的记录页(管理员用)。

取代的裁决

#34361 的裁决 A(保留独立审批条)由本卡取代,已在该卡留注。A 的实现在本卡合入前保持现状。

验收(1280×800,zh-CN,HotCRM 待审批的商机)

  • 页签行以上只有一行头部;页面上只有一组按钮。
  • 审批人打开:右上是「通过」「拒绝」「⋮」;「⋮」里审批操作和记录操作之间有分隔。提交人打开:「撤回」「催办」「⋮」。无关的人打开:记录自己的操作,没有审批按钮。
  • 审批结束后头部恢复为「编辑」、主操作、「⋮」。
  • 抽屉头部没有对象名、没有「第几条」和上下条按钮;整页有。
  • 手机宽度(390)下任何状态只有一个主色按钮。
  • 点「拒绝」不填理由不能提交。
  • 一次合入、一次验收。PR 正文列出迁移和作废的测试,以及同笔修改的 docs/qa/platform-checklist 条款。

Reader: domain:ui 车道。ui/packages/app-shell/src/views/RecordDetailView.tsx、DeclaredActionsBar.tsx、ui/packages/components/src/custom/record-top-bar.tsx、ui/packages/components/src/renderers/layout/containers.tsx(page:header)。若「等我审批」需要进入记录的判断数据,先与 domain:spec 对一下。

Dedupe: 审批 记录页 按钮 头部、record page header actions approval state(objectstack,open)→ 0;承接 #35419;取代 #34361。

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    enhancement
    priority:p2
    domain:ui
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Feature (one-line record header, one button group that changes with record state, a short approval tag) · a child of the maintainer's record-page topic #35590 (his words for this batch: 「这一批卡p2」) → p2 as he set it.

  3. added
    pm:queue
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Claim: area ux-4 round 2 · epic #35590 (the maintainer, verbatim, 2026-11-19 project chat: 「继续处理 35590 的记录详情页子卡」; on the epic: 「这一批卡p2」 — named directly, so it runs ahead of the p1-only rule) · 2026-11-19T21:53Z
    Area: ux-4
    Session: session_01Utp6Cb8qTxAVaE2QKwquQU
    Account: os-bill
    Branch: pending — mode:thread: the card thread pushes only the branch the platform assigns it; the area posts a Branch: amendment here when the thread opens
    Worktree: the card thread's own checkout
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: ui/packages/app-shell/src/views/RecordDetailView.tsx header region only (~5522-5533 and the header/drawer-header composition it calls; ⛔ ux-2's regions ~5071, ~2307-2312, ~5665), ui/packages/app-shell/src/views/DeclaredActionsBar.tsx, ui/packages/app-shell/src/hooks/useRecordApprovals.ts (read side only), ui/packages/components/src/custom/record-top-bar.tsx, ui/packages/components/src/renderers/layout/containers.tsx (page:header only; the tab region ~547-644 is #35595's), ui/packages/plugin-detail/src/DetailView.tsx (~1774-1781 lock badge only), the record page's phone action bar (name the file in the report), new i18n keys in ui/packages/i18n/src/locales/*.ts, docs/qa/platform-checklist/areas/*.json record-page items, their tests, new e2e specs under ui/e2e/ named for the card, root .changeset/. ⛔ The approval request object's own record page (ApprovalDecisionPanel) keeps its band. ⛔ packages/spec/**, server, REST. Stop on any other breach and report.
    Container & model: L, mode:thread, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (maintainer-ordered redesign, epic #35590 sub-card 1); rides #35419 (p2 Bug, same rule: one primary button in every state, phone width)
    Thread-read: 7017188073
    Premise: holds at origin/main — the record page already knows "pending on me": viewer.can_act is read in ui/packages/app-shell/src/hooks/useRecordApprovals.ts and DeclaredActionsBar.tsx, so the button-group switch needs no new spec or server read. Header actions come from action locations / order / variant and page:header.maxVisible (packages/spec/src/ui/action.zod.ts ~774-804, ~1789-1810); no new key.
    Pre-claim lane: ui/packages/app-shell/**, ui/packages/components/**, ui/packages/plugin-detail/** → domain:ui, area ux-4.
    Pre-claim deps: none (sub-card 1, "可先做"). Siblings in this area run after it: #35595+#35596 (share RecordDetailView.tsx, containers.tsx), #35602 (shares DetailView.tsx).
    Prior rulings read: approval bar,record header,page:header,maxvisible,declaredactionsbar,record-top-bar,approve reject,recall → 3 hits; ADR-0044 D1, ADR-0044 D2 (returned state, revise), ADR-0098 Decision §4 — none binds the header layout; #34361 ruling A (separate approver band, pinned in DeclaredActionsBar.approverFold-34361.test.tsx and DeclaredActionsBar.tsx ~152, ~994) is superseded by the maintainer's 「同意」 on epic #35590 direction 2 (noted on #34361); its pins migrate in this PR; thread: none; repo: objectstack-ai/objectstack.
    Serial constraints cleared: open-PR scan of 52 open PRs: none touches RecordDetailView.tsx, DeclaredActionsBar.tsx, record-top-bar.tsx, containers.tsx or DetailView.tsx (#35629 touches buildDefaultPageSchema.ts, not in this surface).
    Scope: card items 1–6 (one 44px header row; drawer header without object name, n-of-m or prev/next; one button group by state — normal: 编辑 + one primary + ⋮; pending on me: 通过 (primary), 拒绝/驳回, ⋮ with approval ops, separator, record ops; my submission pending: 撤回, 催办, ⋮; no 编辑 while locked; one primary in every state incl. phone; the standalone approval band goes, a short status tag links to the 审批 tab; lock badge only for non-approval locks; reject requires a reason). #35419 rides: phone bottom bar actions drop to secondary while pending on me; the reject label follows the platform's current zh-CN wording (#35021). Fixes #35593, Fixes #35419.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Claim amendment to comment 7023265689 (area ux-4) · 2026-11-19T21:56Z
    Branch: claude/project-thread-0quaor (mode:thread: the platform-assigned branch of the card thread; replaces the claim's pending line)
    Thread session: session_01Utp6CbcHxEWkJvtLGgxfdd
    Worktree: the card thread's own checkout

  7. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Claim amendment to comment 7023265689 (area ux-4) · 2026-11-19T22:00Z
    File surface (adds): ui/packages/app-shell/src/views/recordDrawerStack.tsx (drawer header trail + stepper), ui/packages/components/src/custom/navigation-overlay.tsx (draws the drawer header), one new host-slot context file under ui/packages/components/src/renderers/layout/ for the one-row header, and its export in ui/packages/components/src/index.ts; their tests.
    Premise readings (card thread, card-35593/readings-a1-a5.md at origin/main c0716ed): 撤回 = approval_recall, 催办 = approval_remind, both already declared (no new action); zh-CN approval_reject already reads 「驳回」 on main (#35419 item 2 holds with no change).
    Item 6 (reject needs a reason): the producer declares approval_reject.comment required: false in plugin-approvals (server, outside this lane). This PR makes the record page's reject dialog require a reason before it submits; the API/MCP door is unchanged here. Tightening the producer is a follow-up card under #35593 (filed by the area).
    Item 3 default budget: in the one-row header the inline action budget is 1 when the page declares no page:header.maxVisible (an authored value wins), so the normal state is 编辑 + one primary + ⋮. The spec describe text ("renderer default 3") gets a prose follow-up card.
    Serial constraints cleared: open-PR scan of the added files: no open PR touches them.

  8. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Claim amendment 2 to comment 7023265689 (area ux-4) · 2026-11-20T00:31Z
    File surface (adds, after the fact — the card thread's acceptance fix for item 5 reached past the claimed files): ui/packages/react/src/context/InlineEditContext.tsx — one optional InlineEditProvider prop approvalTagDrawnByHost (default off) so the DetailView band skips the 「审批中已锁定」 badge when the record header's approval tag already says it; and its pin ui/packages/plugin-detail/src/__tests__/DetailView.approvalTagHostDrawn-35593.test.tsx. Host-only React prop, default keeps today's output; not authorable, not packages/spec, Clause-②: no stands. The L1 read names it.

  9. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU
    os-dev-report

    {
      "issue": 35593,
      "status": "done",
      "branch": "claude/project-thread-0quaor",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35679",
      "session": "session_01Utp6CbcHxEWkJvtLGgxfdd",
      "premise_still_valid": true,
      "summary": "The record page's header is one 44px row on the full page and in the drawer. It holds one button group by state: normal is Edit + one primary + ⋯; pending on me is 通过 (the only primary), 驳回 and ⋮ (other approval levers, a separator, then record ops); my submission pending is 撤回, 催办 and ⋮. On phone only 通过 is filled (#35419). The approval band is gone; a tag (待你审批 / 审批中 / 已退回修改 / 已驳回) scrolls to the approvals panel until #35595 lands. Under an approval lock there is no Edit, and the band draws no lock badge once the header tag names the approval. Reject requires a reason, client-side only. Final green head 5ff9d4dc, 30 files +1457/-259.",
      "tests": "New: page-header-record-bar-35593 (8), approvalDeclaredActions (+7 header tests), record-top-bar-27524 (+1), DetailView.approvalTagHostDrawn-35593 (3). Migrated record-page pins: phoneFace-27058, userActionPredicates, editLockedByState-32756, topBar-27524, headerMenuIcons-12529, accessibleNames-12625, placedHeaderActions-29951, headerRefresh, childWriteRefreshesParent-12244, printPageHeaderActions-12906, recordPageTiers-26678, harness; e2e class reads in record-flow-phone-targets and record-header-title-width. Retired: none. Local runs at 5ff9d4dc: 20 files / 197 tests and 11 files / 129 tests passed. CI Test UI 16/16 green.",
      "gates": "Local: overlap-check --branch=HEAD clean (exit 0; #35691 merges cleanly), check:test-source-alias OK, check:platform-checklist OK, tsc --noEmit for plugin-detail and app-shell exit 0, eslint 0 errors. CI on 5ff9d4dc: every check run is success or skipped (Test UI 1-16/16, Test Core 1-3/10, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Lint & Repo Gates, TypeScript Type Check, Check Changeset, PR-body guards). The two cancelled runs were superseded by green re-runs triggered by body edits.",
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm. Showcase acceptance: 16 screenshots at DSF 2 in project files objectstack-seat5/area-ux/ux-4/record/card-35593/.",
      "mcp_calls": "read-only: pull_request_read get_check_runs, get_job_logs, actions_list, issue_read; no write tool",
      "api_writes": "relay only: pr_create 1, comment 1 (PR #35679), issue_patch 3 (PR #35679 body), plus this report comment",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Deviations (also in the PR body): no toast when edit is triggered while locked, since nothing can trigger edit under an approval lock; approval detail stays in the panel and band until #35595; the drawer keeps its ⋯ 「Open as full page」 item and its ⤢; the panel keeps its own remind; a state lock keeps a greyed Edit; the authored subtitle is not drawn; follow-ups #35659 and #35660. InlineEditContext.tsx was edited outside the surface and the area amended the claim after the fact (7026413128).


    Generated by Claude Code

  10. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Claim amendment 3 to comment 7023265689 (area ux-4) · 2026-11-20T00:58Z
    File surface (adds, after the fact): two existing e2e specs edited in PR #35679 to match the one-row header — ui/e2e/record-flow-phone-targets.spec.ts and ui/e2e/record-header-title-width.spec.ts. Text-only amendment per L1-a R2 (comment 7026939627).

  11. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU

    Close-out · 2026-11-20T01:40Z: PR #35679 merged as 72d19c4 (L1-a ACCEPT 7026939627, carried over the merge-only head; landing 7027349875); the card closed on merge, and #35419 rode the same PR. Deviations recorded in the PR body: the reject reason is required in the UI only (producer side → #35659); the header button budget defaults to 1 while spec prose still says 3 (→ #35660); approval detail stays in place until the 审批 tab lands with #35595; 编辑 is hidden while approval-locked rather than showing a message. pm:dispatched removed.

  12. removed
    pm:dispatched
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions