fix: show task approvals in their task cards

Task Center previously separated task approvals from their tasks and showed an empty approval section. Associated approvals now appear with allow-once and deny actions inside task cards, and those tasks appear under Active. Only unassociated approvals retain a separate section; no approval section or badge is shown when there are no pending requests.

Release note: Review and handle pending approvals directly in their Task Center cards. Tasks awaiting approval appear under Active, while requests without a matching task remain separately accessible.
This commit is contained in:
mesalogo
2026-09-16 14:31:28 +08:00
parent cb245a6402
commit da23810205
8 changed files with 179 additions and 44 deletions
@@ -76,7 +76,11 @@ Task 行只显示聚合后的用户状态,不要求用户理解内部 Job/Run
- 进行中包含 `idle`、`queued`、`running`、`waiting_approval`、`failed` 和 `interrupted`;
暂停对应 `paused`,已结束包含 `completed` 和 `cancelled`。分类只影响列表筛选,
不改变任务状态语义;任务行保留具体状态、错误信息和原有操作。
- 等待审批区域和审批徽标按项目范围展示,不受状态筛选影响,保留拒绝和允许一次操作。
- 关联当前范围内顶层任务的审批直接显示在任务卡内,可拒绝或仅此次允许;有待审批的任务
归入“进行中”,审批随任务卡参与状态筛选,不再重复显示独立审批分类或区域。
- 普通会话或无法关联到当前范围内任务的审批保留独立处理区域,不受任务状态筛选影响;
该区域仅在存在此类审批时显示。没有审批时不显示审批标题、空提示或徽标。
- 审批徽标统计当前项目范围内全部待审批请求,不受状态筛选影响。
- 支持立即运行、暂停、恢复、取消、编辑和删除。
- 后台变化更新状态和徽标,不自动抢占当前页面。
- 立即运行、重试和恢复在 UI 上都是 Task 操作,内部 Job/Run 不单独显示。