feat(web-shell): add session workflow cockpit - #8561
Conversation
E2E test reportTested locally on macOS with a fresh daemon session and the experimental Session Workflow setting enabled.
Demo session: 44444444-4444-4444-8444-444444444444 |
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / afterℹ️ No screenshot changed against the PR base — but this PR edits 5 render-shaping files:
Either the change has no visual effect (logic, plumbing, a state the scenarios never reach), or no scenario renders this UI — in which case the preview cannot see it, and an empty result is a coverage gap rather than a clean bill of health. To make it visible, add a scenario to Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Superseded by #8583, which covers the Session Workflow data flow, revision-bound approval, persisted Agent replay, and the unified Chat/Workflow UI. Closing this draft to keep a single implementation path. |
What this PR does
Adds a dedicated Workflow page for the experimental Plan & Review experience. The page presents the approved Todo plan as a dependency DAG, keeps the chat mounted behind it, and remains available from the session header after execution completes.
The same view follows live Todo and Agent updates after approval, shows progress and dependency details, links Agent calls to their matching Todo IDs, and opens the existing subagent transcript panel for completed or running Agent work. Historical sessions reuse persisted transcript and task data, so reopening a session after a daemon restart restores the DAG and Agent details.
Todo dependency metadata is preserved across status-only updates within an active plan, while an explicit empty dependency list or a new completed-plan cycle clears stale dependencies.
Why it is needed
The first two phases added the experimental rollout boundary and exact revision-bound approval, but the user experience still ended at the approval surface. Users could not move smoothly between chat and a durable, detailed Workflow view, and status-only Todo updates could lose dependency edges.
This completes the session-scoped cockpit without adding a scheduler, a second Workflow product, or a new persistence layer.
Reviewer Test Plan
How to verify
Evidence (Before & After)
Before: the revision-bound DAG was limited to approval and compact Todo surfaces, with no durable session Workflow page or cockpit-style step and Agent detail.
After: Plan & Review opens a dedicated pre-execution Workflow page, follows the approved plan through execution, and remains navigable after completion and daemon restart.
Local daemon acceptance used a three-node DAG with two parallel read-only Agents and one dependent summary node. The session restored after restart with all three nodes completed, both Agent task records present, and each subagent transcript replaying eight events.
Tested on
Environment (optional)
Node.js 22, local qwen serve daemon and Web Shell development server.
Risk & Scope
Linked Issues
Closes #8389. Follows #8391 and #8393.
中文说明
本 PR 做了什么
为实验性的 Plan & Review 体验增加独立 Workflow 页面。页面将已审批的 Todo 计划展示为依赖 DAG,在其后保持 chat 挂载,并且在执行结束后仍可从 session 顶部入口进入。
同一页面会在审批后持续跟随 Todo 和 Agent 的实时更新,展示整体进度与依赖详情,将 Agent 调用按照 todo_id 关联到对应 Todo,并复用现有 subagent transcript 面板查看运行中或已完成的 Agent 工作。历史 session 复用持久化 transcript 与 task 数据,因此 daemon 重启后重新打开 session 仍可恢复 DAG 与 Agent 详情。
同一活跃计划内仅更新状态时会保留 Todo 依赖元数据;显式传入空依赖列表或进入已完成计划之后的新周期时,则会清除过期依赖。
为什么需要
前两个阶段已经增加了实验性开关以及与准确 revision 绑定的审批,但用户体验仍停留在审批界面。用户无法在 chat 与持久、详细的 Workflow 页面之间顺畅切换,而且只更新 Todo 状态时可能丢失依赖边。
本 PR 完成 session 范围内的驾驶舱,同时不新增调度器、第二套 Workflow 产品或新的持久化层。
Reviewer Test Plan
如何验证
前后对比证据
之前:与 revision 绑定的 DAG 仅存在于审批和紧凑 Todo 界面,没有持久的 session Workflow 页面,也没有驾驶舱式步骤与 Agent 详情。
之后:Plan & Review 在执行前打开独立 Workflow 页面,在执行过程中跟随已审批计划,并且在任务完成和 daemon 重启后仍可进入。
本地 daemon 验收使用一个三节点 DAG,其中两个只读 Agent 并行执行,第三个摘要节点依赖前两个节点。重启后 session 恢复为三个节点全部完成、两个 Agent 任务记录存在,并且每个 subagent transcript 均可重放八条事件。
测试环境
Node.js 22,本地 qwen serve daemon 与 Web Shell 开发服务器。
风险与范围
关联 Issue
关闭 #8389。后续于 #8391 和 #8393。