feat(review-panel): split reviews by author — board / human / manager

One flat list of `status = in_review` tasks couldn't tell the
operator whether the next decision belonged to the board (approval
pending), to the human user (top-level assignee or explicit
`requires_user_review`), or to a middle manager walking up the
`reports_to` chain. Three very different escalation paths rendered
identically, so "reviewed by X" was the only signal and operators
missed the ones actually waiting on them.

`PendingReviewList` now classifies each in-review task into one of
three kinds (`board` / `user` / `manager`) using the pending
approval set plus the existing assignee/manager lookup. Rendering
groups them under labelled sub-headings in priority order (board
first — the operator is the bottleneck there), each with its own
awaiting-text so the row's status is unambiguous at a glance.

The component accepts approvals via prop; the caller passes the
existing `pendingApprovals` it already holds. Translations for both
locales carry the new group labels.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-19 01:24:01 -04:00
1 parent d47e637a45
commit 0746664f72
4 files changed
+131 -18

No files matched your search

+5
View File
@@ -461,6 +461,11 @@ export const en: Record<string, string> = {
"exec.noReviewsDetail": "Review items show up here.",
"exec.awaitingReview": "awaiting review",
"exec.reviewedBy": "reviewed by",
"exec.reviewGroupBoard": "Board review",
"exec.reviewGroupUser": "Human review",
"exec.reviewGroupManager": "Manager review",
"exec.reviewAwaitsBoard": "awaiting board approval",
"exec.reviewAwaitsUser": "awaiting your review",
"exec.noApprovals": "No pending approvals",
"exec.noApprovalsDetail": "Approvals show up here when agents need you.",
"exec.deleteApproval": "Delete approval",
+5
View File
@@ -461,6 +461,11 @@ export const zh: Record<string, string> = {
"exec.noReviewsDetail": "待审核任务会出现在这里。",
"exec.awaitingReview": "等待审核",
"exec.reviewedBy": "由...审核",
"exec.reviewGroupBoard": "董事会审核",
"exec.reviewGroupUser": "人工审核",
"exec.reviewGroupManager": "主管审核",
"exec.reviewAwaitsBoard": "等待董事会批准",
"exec.reviewAwaitsUser": "等待你的审核",
"exec.noApprovals": "暂无待审批项",
"exec.noApprovalsDetail": "需要你批准的内容会出现在这里。",
"exec.deleteApproval": "删除审批",