状态:产品边界已确认,正在独立 worktree 实施。本文已合并原 side-pane-only 计划与 Subagent Session Directory 计划;当前代码不是产品语义来源。
目标: 父对话流中的 Agent/Task 工具始终保持单行摘要,不再展开 Prompt、输出、活动或子工具。存在 childSessionId 时,点击摘要行在桌面/普通 Web 打开右侧只读 tab,在手机 /remote 打开现有右侧抽屉;不存在 childSessionId 时摘要行不可点击。桌面/普通 Web 的摘要提供当前父 Session 的 Subagent 目录,按正在运行/已结束分组并对已结束项分页。失败原因同时保留在父摘要状态和当前 child 详情中,但不为 child 详情新增持久化或timeline row。
架构方向: 继续复用 V4 SessionPane、conversation projection、workspace side-pane state 和手机现有 drawer。新增只读 session/subagents 查询,把父 active transcript、已持久化 child session 与 runtime overlay 组合为单一投影;不新增数据库表。UI 侧显式区分顶层 task 分组身份 rootSessionId、直属父会话 parentSessionId 与目标 childSessionId。桌面保持 desktop-continuous,手机保持 web-remote-replayable;relay、desktop main 和 Host 不持有目录状态。
非目标: 本次不恢复 subagent 派生 subagent 的 runtime 能力,不新增 child 错误持久化,不改变 permission/AskUserQuestion 的归属,不改变 side-pane tab 的持久化或订阅生命周期,不新增数据库表或 Agent tool 字段,不修改 Workflow,不在手机提供目录,也不为手机另起 Host/Agent runtime。
| 字段 | 内容 |
|---|---|
| 变更类型 | 现有行为纠偏与回归保护;统一 foreground/background/mobile 的 subagent 详情入口 |
| 用户可见入口 | 父会话 Agent 摘要行、Running subagent 状态行、桌面/普通 Web 右侧 tabs、手机 /remote 右侧抽屉、child 只读会话 |
| 现有主 spec | docs/subagent-session-side-tabs.md、docs/agent-tool-call-renderer.md |
| 现有 catalog/matrix | docs/conversation-session-case-catalog.md SAT01-SAT23、BG26、Z01;docs/testing/conversation-session-e2e-coverage-matrix.md |
| 主要 UI owner | ConversationAgentToolCallRow、SessionPane、SubagentSessionSidePane、AnimatedSidePanePanel、workspaceSidePane、WorkspaceShellLayout |
| 主要测试 owner | packages/ui/test/subagentSidePane.test.ts、pending SAT E2E、BG26 E2E、Z01 pending E2E |
| 不下沉的边界 | CLI projection/runtime 继续持有摘要与撤销权威;不把状态移到 relay/main,也不改 Host attachment、owner/lease、queue 或 workspace execution path |
| 轮次 | 问题 | 用户答案 | 固定边界 | 后续 |
|---|---|---|---|---|
| 1 | 父对话里的 Agent 是否继续行内展开 | 不再在对话流展开;点击整行打开侧栏 | 父对话只承载状态摘要和详情入口 | accepted |
| 1 | subagent 报错显示在哪里 | 父摘要行显示即可;详情中也可以显示 | 父行保留“执行失败”与根因 hover/focus;有 child 时详情也显示当前错误 | accepted |
| 1 | 没有 childSessionId 时如何处理 |
不可点击 | 不创建临时错误 tab,不保留 inline fallback | accepted |
| 1 | 嵌套 subagent 是否允许递归打开 | 允许留口子;当前 runtime 已不能派生 subagent | UI 身份模型与 callback 支持递归;真实 runtime E2E 暂时剪枝 | accepted + runtime-pruned |
| 1 | 手机如何展示 | 不内联,使用右侧抽屉 | 复用现有 mobile side-pane overlay,不新增移动页面 | accepted |
| 2 | child 详情中的 permission/AskUserQuestion 是否特殊跳转 | 不用特殊处理 | 不自动关闭抽屉、不新增“回父对话处理”提示 | accepted |
| 2 | child 错误是否成为持久 timeline 内容 | 不用持久化,能显示即可 | 直接消费当前 snapshot.control.lastError;不新增 row/schema/storage |
accepted,覆盖前一轮 B 选择 |
| 3 | 目录是否新增数据库表 | 不新增 | 复用 active transcript、SQLite child session 与 runtime overlay | accepted |
| 3 | 目录范围 | 当前 active branch;Workflow 不改 | Agent 与兼容 Task alias;只显示可靠持久 child | accepted |
| 3 | 状态与分页 | running 不分页;ended 每批 20 | terminal success/fail/cancel/lost 同组,保留具体状态 | accepted |
| 3 | 多端 | 桌面/普通 Web 有目录;手机只保留详情抽屉 | 手机不提供目录 | accepted |
| 3 | mini/expanded | mini 不显示 ended;expanded 有 ended count | ended-only 不强制 mini;expanded 的 count 收进“智能体”折叠分组,点击 count 打开目录 | accepted |
| 3 | branch 生命周期 | edit/retry 失效、compact 保留、fork 继承 ended 引用 | 自动关闭失效详情 tab且不进最近关闭 | accepted |
| 4 | 协议边界 | 允许只读 session/subagents 查询 |
不新增 Agent tool/error 字段或数据库表 | accepted |
| 4 | 手机无 child 完整错误 | 本次只保留短错误 | 不新增 touch 专用完整错误入口 | accepted |
| 5 | child 详情是否支持文件摘要撤销 | 支持 | 对话保持只读;只开放单 turn workspace-only rewind,父 task 可仍在运行 | accepted |
Agent 工具摘要行(永远不展开)
│
├─ childSessionId 可用
│ ├─ foreground / background
│ ├─ running / success / failed / cancelled
│ └─ click / Enter / Space
│ ├─ desktop-continuous -> 创建或激活右侧只读 tab
│ └─ web-remote-replayable -> 创建或激活手机右侧抽屉中的 tab
│
├─ childSessionId 尚未到达
│ ├─ 当前保持不可点击摘要
│ └─ childSessionId 后续到达 -> 变为可点击;不得自动打开详情
│
└─ childSessionId 永远不存在
├─ 启动前 provider/model/config/tool 失败
├─ 摘要显示 terminal 状态和现有错误状态入口
└─ 不可点击、不创建临时 tab、不显示 inline detail
aria-expanded 或 collapsible content。role=button、tabIndex=0 或详情 action test id。backgrounded 只影响 runtime 生命周期和状态,不影响是否可打开 child。compactForRemoteControl 不再作为 subagent detail 的禁止条件;它仍可继续约束 embedded browser、外部 App、分屏等无关能力。activeTaskId 或父对话历史。child live runtime(seq 1..N) -> detached publisher(raw=N)
child runtime released -> checkpoint/session_entry
preview/apply cold resume -> SessionResumed(new raw epoch)
-> RewindTriggered
-> workspace_file_rewind/session_entry
-> publisher transport seq 继续 N+1..
session_entry,不新增表或 migration。SessionResumed 只重设 gateway 的 raw cursor,不回退对外 transport sequence;刷新后 child turn 保持
reverted,且父 Agent 行、父 task aggregate 和聊天历史不变。父 Agent tool projection.error
-> 父摘要“执行失败”
-> 现有 hover/focus/copy 根因
child 当前 snapshot.control.lastError
-> child 只读详情中的错误 notice
-> 仅展示当前 projection 已提供的错误
-X-> 不新增 turnError row
-X-> 不新增协议 schema
-X-> 不新增 session/task 持久化
Turn execution failed。control.lastError,可以照常显示;本文不把“child 详情错误跨刷新必然存在”定义成新合同。cancelled/stopped 与 failed 继续分开,不把用户主动停止渲染为 provider 错误。现有 parentSessionId 同时承担“直属父会话”和“tab 随哪个顶层 task 显隐”,只适用于一级 child。未来递归必须拆开:
root task A
└─ child B
└─ child C
打开 C:
rootSessionId = A # tab 分组、切 task 显隐、最近激活记录
parentSessionId = B # 直属 lineage,未来 breadcrumb/诊断使用
childSessionId = C # 详情订阅目标
tab stable id = workspaceKey + rootSessionId + childSessionId
workspaceKey = workspaceIdentity?.trim() || workspacePath
rootSessionId === parentSessionId,因此现有 tab id 文本保持兼容。SubagentSessionSidePane 内的 Agent 行复用与主 SessionPane 相同的 summary action;只由宿主 wrapper 继承 rootSessionId。parentSessionId 只是避免接口再次把 lineage 与可见分组混用。Desktop renderer attachment Mobile /remote attachment
{desktop-continuous} {web-remote-replayable}
│ │
├─ parent conversation subscription ├─ parent replayable subscription
└─ child side-tab subscription └─ child drawer replayable subscription
\ /
existing shared Host / CLI
relay / desktop main:
只做 attachment、鉴权和 rpc-frame 透传
不拥有 tab、conversation、error、snapshot 或 child 状态
WebRemoteControlMobileShell 已有右侧 overlay;打开时背景聊天继续 inert。workspaceIdentity 与 remoteSessionId;不得只用 workspacePath 创建 tab/连接 key。| 冲突 | 当前事实 | 目标判断 | 分类 |
|---|---|---|---|
| background Agent 被禁止直开 | 9ebfe37525a 在 openSubagentSessionFromSummary 增加 backgrounded guard,并把 canOpenChildSession 绑定 showSubagentOutputPreview |
违反 SAT01 与本次确认的 foreground/background 一致性 | bug-candidate |
| BG26 强制展开 | BG26 E2E 点击 TID_TOOL_SUMMARY_TRIGGER 并等待 inline output |
应改为父行失败 hover + 直开 child + child 当前错误 notice | spec/test conflict |
| SAT11 inline fallback | 当前 spec 对无 child、启动失败、嵌套和手机保留 inline 展开 | 全部取消 inline;无 child 静态,nested/mobile 走详情容器 | spec conflict |
| 手机 detail callback 断路 | mobile V4ChatPane 没有 onOpenSubagentSession prop,Agent 行 context 得到 undefined |
用现有 DI 链接回 app-shell handler | bug-candidate |
| 手机 compact gate | Agent row 与 Status panel 在 compactForRemoteControl 时不提供入口 |
subagent detail 应进入现有右侧抽屉 | bug-candidate |
| child pane 无递归 callback | SubagentSessionSidePane 未接收/下发 onOpenSubagentSession |
下发带 root/parent/child 身份的 wrapper | capability gap |
| read-only pane 丢错误 | control.lastError 只传给 composer;read-only 隐藏 composer |
在 read-only SessionPane 内直接展示当前错误 notice | bug-candidate |
| inline preview 数据耦合 | showSubagentOutputPreview、SubagentDrilldown、agentOutputPreview 和 Agent content bridge 只服务 inline |
移除 V4 inline path 和已无消费者的桥接 | cleanup |
| root/parent 混用 | tab visibility、stable id、last-active map 都只使用 parentSessionId |
拆为 root grouping 与 immediate lineage | design defect |
| Domain | 是否纳入 | 原因 | 主要来源 |
|---|---|---|---|
| Conversation/session behavior | yes | Agent 行 guard、tool terminal 状态、child target 时序、错误 projection | conversation protocol、SAT/BG/Z catalog |
| Permission/tool/subagent UI | yes | ToolLayout action/inline 互斥、Agent renderer、nested child | docs/agent-tool-call-renderer.md、ToolCallBlocks |
| UI shell/responsive | yes | desktop tab 与 mobile drawer 使用同一 side-pane state | DESIGN.md、WorkspaceShell、MobileShell |
| Mobile remote/replayable | yes | 必须保持 shared-host/replayable 边界 | web remote architecture、task realtime sync |
| Workspace identity/remote runtime | yes | tab/connection 隔离需要 identity + remoteSessionId | workspace constraints、workspaceSidePane |
| Persistence | limited | 复用现有 parent transcript/event 与 child session;不新增表, tabs 仍为 renderer memory | directory/ side-pane spec |
| CLI/runtime/protocol | yes, read-only | 新增 session/subagents 查询和 active-branch 投影; 不恢复 nested runtime、不改变 workflow |
protocol schema + query unit |
| 状态/事实 | Authority | UI mirror/cache | 证明方式 |
| -------------------------------------- | --------------------------------------------------- | ------------------------------------------- | --------------------------------- | ------------------------------ | --------------------- |
| Agent tool status/error/childSessionId | CLI ProductProjection ToolCallRow + SubagentRow | ConversationProjectionStore、legacy adapter | snapshot/delta + DOM |
| child 当前 control.lastError | child conversation projection | SessionDataLayer lease/store | child snapshot + read-only notice |
| side-pane tabs/active tab | renderer useAppPanels/workspace side-pane state | current workspace shell memory | reducer unit + DOM tab count |
| root task visibility | shell activeTaskId | last-active subagent map | task switch unit/E2E |
| workspace isolation | workspaceIdentity?.trim() | | workspacePath | tab id/connection registry key | same-path remote unit |
| delivery profile | trusted Host attachment | transport/session layer | clientMode/deliveryKind evidence |
| mobile drawer open/inert | renderer MobileShell | DOM overlay state | UI integration test/manual remote |
| 维度 | 值/等价类 | 是否展开 | 剪枝理由 |
|---|---|---|---|
| child target | present、temporarily absent、permanently absent、present but unavailable | yes | 直接决定 action、静态行与 pane 错误 |
| Agent execution | foreground、background | pairwise | 目标行为相同,但 regression 来自 background guard |
| terminal status | running、success、failed、cancelled | representative | action invariant 相同;failed/cancelled 单独断言 |
| client/surface | desktop/ordinary Web side tab、mobile drawer | yes | 容器和 delivery kind 不同 |
| nesting | root child、nested child future capability | yes | 身份模型不同;runtime E2E 剪枝 |
| open lifecycle | first open、repeat open、task switch、closed/reopen | representative | stable id 与 parent group 风险 |
| data source | live child publisher、cold child store、subscribe error | representative | 详情可用性不同但不得退回 inline |
| workspace | local、remote same path/different identity | pairwise | identity/remoteSessionId 强不变量 |
| error source | parent tool error、child control.lastError、inner child tool error | yes | 防止错误层级混淆 |
| theme/locale/input | light/dark、zh/en、pointer/keyboard/touch | pairwise | UI/i18n/a11y 验收,不做全排列 |
| Candidate | State + event | Expected effect | Status | Notes |
|---|---|---|---|---|
| SDS-C01 | desktop foreground + child present + activate row | open/reuse right read-only tab; no inline | accepted | 更新 SAT01 |
| SDS-C02 | desktop background + child present + activate row | 与 foreground 相同 | accepted | 修复 9ebfe37525a regression |
| SDS-C03 | any client + child permanently absent | static summary; no tab/no inline | accepted | 更新 SAT11 |
| SDS-C04 | child temporarily absent then arrives | static -> action;不自动打开 | accepted | SAT11 时序 |
| SDS-C05 | mobile replayable + child present | open existing right drawer with child tab | accepted | 更新 SAT10 |
| SDS-C06 | failed child + current lastError | parent hover + child read-only error notice | accepted | 更新 BG26;无新持久化 |
| SDS-C07 | failed child + renderer/task restore | parent failed/error restore;child notice 非必然合同 | accepted | 保留 BG26 parent restore |
| SDS-C08 | child pane contains nested Agent target | inherit root、record immediate parent、open/reuse nested tab | accepted UI contract | runtime E2E pruned |
| SDS-C09 | child target exists但 subscribe/hydration 失败 | pane 显示连接/订阅错误;父行不退回 inline | accepted | 使用现有 retry surface |
| SDS-C10 | cancelled Agent | 保持可打开已有 child;状态显示 stopped/cancelled,不显示 failure tooltip | accepted | focused unit |
| SDS-C11 | Running status item on desktop/mobile | 使用同一 tab/drawer request;cancel 阻止冒泡 | accepted | 更新 SAT12 mobile gate |
| SDS-C12 | mobile no child + 需要查看完整原始错误 | 当前仅确认整行不可点击和不内联;touch 专用错误入口未确认 | undefined | 不阻塞 desktop 主路径,见 backlog |
| SDS-C13 | mobile drawer closed/inactive tabs | 保持现有 lease/forceMount 行为 | ignored in this change | 性能后续,不改变 delivery 语义 |
| SDS-C14 | nested runtime 真正生成 child-of-child | 当前产品能力不存在 | pruned | 只测 UI request/reducer contract |
| SDS-C15 | 为启动失败创建 toolUseId 临时 tab | 禁止 | pruned | 用户明确无 child 时不可点击 |
| SDS-C16 | 将 child error 写入 timeline/schema/store | 禁止 | pruned | 用户明确“不用持久化” |
| ID | 剪枝/未决组合 | Guard/不变量 | 处理 |
|---|---|---|---|
| P01 | 所有 Agent inline Prompt/output/activity/child tools | agentSummaryNeverExpandsInConversation |
删除 V4 inline path,不保留 fallback |
| P02 | 无 child 时临时详情 tab | childDetailRequiresChildSessionId |
静态摘要;不以 toolUseId 发明第二身份 |
| P03 | 手机另起 runtime/host | shared-host attachment invariant | 复用现有 MobileShell + Host/CLI |
| P04 | nested provider E2E | current runtime capability guard | 只做 UI/reducer unit;能力恢复时补 E2E |
| P05 | child 错误新增持久化 | user decision | 只消费当前 control.lastError |
| P06 | permission/AskUser 特殊跳转 | user decision | 无新 UI/时序 |
| P07 | mobile hidden-tab lease 优化 | 不属于交互语义修复 | 保持现状,另开性能 case |
| Question | 当前默认 | 影响 |
|---|---|---|
| 手机无 child 的失败行如何查看完整原始错误 | 不新增独立 tap/popover;保留短状态,等待产品补充 | 不能以该未决项为由恢复 inline;若后续需要,只允许独立错误状态入口,不得创建 child tab |
| 手机抽屉关闭后是否释放 inactive child lease | 保持现有 side-pane 生命周期 | 后续基于 relay 带宽、内存和重开延迟数据单独决策 |
| Catalog mapping | Setup | Action | Assertions | Evidence | Status after doc backfill |
|---|---|---|---|---|---|
| SAT01 | desktop/ordinary Web;foreground 与 background 各有 childId | click、Enter、Space | 相同右侧 tab action;无 aria-expanded/chevron/inline;重复打开去重 | DOM + side-pane reducer | planned |
| SAT02/SAT03 | 6+ child tabs,至少两个 streaming | 依次打开并切换 | 6+ 稳定 tabs;desktop continuous 持续更新 | DOM + child topic seq | pending/manual review |
| SAT05 | tab 关闭/重开;renderer refresh | reopen | 标题与稳定 id 保持既有合同;不恢复 tabs | reducer + hydration | covered/focused |
| SAT06 | same path remote identity A/B | open children | tab/connection 不串;remoteSessionId 原样传递 | reducer + connection key | covered/focused |
| SAT10 | mobile /remote replayable,childId present |
tap Agent row/Running row | 现有右侧 drawer 打开;聊天 inert;无 inline;active task 不变 | mobile DOM + scoped request | planned |
| SAT11 | childId absent/start failure;另含 delayed childId | activate before/after target | absent 不可点击;target 到达后可点击但不自动开;永不 inline | DOM + request spy | planned |
| SAT12 | Running panel 中 subagent/bash/no-id 混合 | activate/cancel | subagent desktop/mobile 打开同一详情;bash/no-id 不打开;cancel stop only | DOM + request spy | planned |
| SAT13(新增) | child side pane 当前 snapshot 有 lastError | open child | read-only pane 显示原始错误;不创建 timeline error row | snapshot + DOM | planned |
| SAT14(新增) | synthetic nested row contract:A -> B -> C | 在 B pane 激活 C | request/root=A,parent=B,child=C;tab 随 A 显隐;重复去重 | unit/reducer | planned, runtime E2E pruned |
| BG26 | background child provider 429 | terminal notification、hover、open、task switch | parent failed/hover;click opens child;live child notice 含原文;parent restore 保持;无 inline | provider fixture + projection + DOM | planned update |
| Z01 | Agent 在 child 创建前 provider/model 失败 | 查看并尝试激活失败行 | 根因可见;无 child action、无 inline;sibling Agent 正常 | runtime tool_result + DOM | planned update |
执行顺序必须保持:spec/catalog/matrix -> failing tests -> source -> runtime evidence -> full checks -> commit。
Files:
docs/subagent-session-side-tabs.mddocs/agent-tool-call-renderer.mddocs/conversation-session-case-catalog.mddocs/testing/conversation-session-e2e-coverage-matrix.mddocs/superpowers/plans/2026-07-10-background-subagent-failure-detail.md(历史完成计划,不倒改)Steps:
planned 或 missing,不得提前写 covered。Files:
packages/ui/test/subagentSidePane.test.tspackages/ui/test/workspaceSidePane.test.tspackages/ui/test/agentToolCallBlock.test.tspackages/ui/test/v4AssistantWorkRenderItems.test.tspackages/ui/test/v4ToolCallRowAdapter.test.tspackages/ui/test/v4SessionPaneLayoutParity.test.tspackages/ui/test/workspaceShellRemoteMobileLayout.test.tspackages/ui/test/webRemoteControlMobileShell.test.ts only if new integration assertion is neededSteps:
openSubagentSessionFromSummary blocked set 移除,只有缺 child/root/callback 才返回 false。rootSessionId、parentSessionId、childSessionId;visibility 和 last-active 只按 root。V4ChatPane 收到 onOpenSubagentSession 与 remoteSessionId,drawer 继续是右侧 overlay 且背景 inert。control.lastError 存在时展示 notice;普通无错 child 不展示。content 作为“可展开活动正文”桥接。Files:
packages/ui/src/lib/workspaceSidePane.tspackages/ui/src/hooks/useAppPanels.tspackages/ui/src/app-shell/types.tspackages/ui/src/v4/conversationRowContext.tspackages/ui/src/v4/SessionPane.tsxpackages/ui/src/app-shell/SubagentSessionSidePane.tsxpackages/ui/src/app-shell/AnimatedSidePanePanel.tsxpackages/ui/src/app-shell/WorkspaceShellLayout.tsxInterfaces:
interface OpenSubagentSideTabRequest {
rootSessionId: string;
parentSessionId: string;
childSessionId: string;
subagentType: string;
title: string;
}
Steps:
rootSessionId;直属 parentSessionId 不参与分组。rootSessionId ?? parentSessionId 兼容,不新增磁盘 migration。SubagentSessionSidePane 接收 DI callback;nested request 继承 tab.root,使用当前 child 作为 immediate parent。AnimatedSidePanePanel 只透传打开意图,不直接操作 session/runtime。workspaceIdentity 与 remoteSessionId;tab key 不使用裸 workspacePath 表达身份。Files:
packages/ui/src/v4/ConversationAgentToolCallRow.tsxpackages/ui/src/v4/conversationAssistantWorkItems.tspackages/ui/src/ToolCallBlocks.tsxpackages/ui/src/ToolCallBlocks/fileSummaryTypes.tspackages/ui/src/ToolCallBlocks/renderers/agent.tsxpackages/ui/src/ToolCallBlocks/ToolSummaryRow.tsx if needed to remove static aria-expandedpackages/ui/src/v4/toolCallRowAdapter.tspackages/ui/src/v4/SubagentDrilldown.tsxSteps:
canOpenChildSession 只依赖有效 child/root/callback,不依赖 foreground/background、mobile compact 或旧 inline preview flag。canToggle=false;静态摘要不挂 role=button、keyboard handler、chevron 或 aria-expanded。showSubagentOutputPreview、agentOutputPreview、SubagentDrilldown 和 inSubagentDrilldown 数据链。content adapter bridge;保留 error 与 output 的通用 projection 映射。pnpm dep:refs 与 rg 证明所有非 V4 消费者也已消失;本次只保证 conversation V4 不可展开。Files:
packages/ui/src/v4/SessionPane.tsxpackages/ui/src/v4/ConversationReadOnlyErrorNotice.tsxpackages/ui/src/i18n/locales/zh-CN.ts, packages/ui/src/i18n/locales/en-US.tsSteps:
snapshot.control.lastError 和既有 error normalization 派生展示消息,不另建 store。readOnly && controlLastError 时在 timeline/detail surface 中渲染紧凑语义错误 notice;不得依赖隐藏的 composer。role=alert/可读文本、长错误换行和可复制行为;同时验证 light/dark 与 zh/en。TurnErrorRow、V4 row schema、CLI projection event、task/session persistence 或 restore migration。control.lastError 与 transport subscribe error 不混为一类。Files:
packages/ui/src/v4/V4ChatPane.tsxpackages/ui/src/app-shell/WorkspaceShellLayout.tsxpackages/ui/src/v4/SessionPane.tsxpackages/ui/src/v4/ConversationStatusPanel.tsx only for the current mobile gatepackages/ui/test/workspaceShellRemoteMobileLayout.test.tspackages/ui/test/webRemoteControlMobileShell.test.tsSteps:
V4ChatPane 增加 remoteSessionId 与 onOpenSubagentSession DI props,并透传给 SessionPane。workspaceRemoteSessionId 和现有 handleOpenSubagentSession。compactForRemoteControl gate;不放开分屏、embedded browser、external app 等其它 mobile gate。setIsSidePaneCollapsed(false)、workspace side-pane state 和 WebRemoteControlMobileShell 的右侧 overlay;不创建新 drawer component。Files:
packages/desktop/test/e2e/conversation-session/subagents/conversation-session-subagent-side-tabs.test.tspackages/desktop/test/e2e/conversation-session/background/conversation-session-background-subagent-rate-limit.test.tspackages/desktop/test/e2e/conversation-session/tools/conversation-session-tool-error-surface.test.tsSAT manual-review steps:
aria-expanded、无 chevron、无 inline content。BG26 steps:
TID_TOOL_SUMMARY_TRIGGER 展开和等待 inline EXPECTED_RESULT 的逻辑。Z01 steps:
Mobile evidence:
/remote replayable;先用 shell integration unit + 实际手机/窄 viewport manual review。planned/manual-review。交互 bug 不能只靠静态阅读。完成首次实现后必须抓运行时证据。
/remote 或真实 mobile viewport + shared-host attachment 验证右侧 drawer、背景 inert、关闭/重开、replayable catch-up。activeTaskId 不变,child 订阅 sessionId 正确。workspaceIdentity 与 remoteSessionId。packages/ui/src/logger.ts 且逐事件 trace 走 debug。Targeted tests:
pnpm vitest run \
packages/ui/test/subagentSidePane.test.ts \
packages/ui/test/workspaceSidePane.test.ts \
packages/ui/test/agentToolCallBlock.test.ts \
packages/ui/test/v4AssistantWorkRenderItems.test.ts \
packages/ui/test/v4ToolCallRowAdapter.test.ts \
packages/ui/test/v4SessionPaneLayoutParity.test.ts \
packages/ui/test/workspaceShellRemoteMobileLayout.test.ts \
packages/ui/test/webRemoteControlMobileShell.test.ts
E2E checks:
pnpm --filter @zcode/desktop typecheck:e2e
pnpm --filter @zcode/desktop e2e:fixture:check -- \
--spec ./test/e2e/conversation-session/background/conversation-session-background-subagent-rate-limit.test.ts
pnpm --filter @zcode/desktop exec wdio run wdio.conf.ts --spec \
'./test/e2e/conversation-session/background/conversation-session-background-subagent-rate-limit.test.ts'
e2e-case-lifecycle 执行 manual/capture review、case-local fixture 整理和 promotion;不得直接标 formal covered。pnpm dep:refs --list-exports <file>,再对 changed export 做 pnpm dep:refs <file>:<symbol>;用 rg 补查 JSX/字符串消费者。pnpm typecheck。pnpm lint。git diff --check。fix(ui): open subagent details outside conversation flow。| Surface | Desktop continuous | Ordinary Web | Mobile replayable | Required evidence |
|---|---|---|---|---|
| foreground Agent summary | automated unit + SAT manual/E2E | shared unit/manual | mobile integration/manual | DOM action/no-inline + request |
| background Agent summary | BG26 + SAT coverage | shared unit/manual | mobile integration/manual | row failed/hover + child open |
| no child/start failure | Z01 + focused unit | shared unit | focused unit/manual touch | static row + root error |
| child current error | BG26 live | shared unit/manual | mobile manual | snapshot.control.lastError -> notice |
| recursive UI contract | reducer/unit only | reducer/unit only | reducer/unit only | root/parent/child request |
| remote workspace identity | unit + remote manual | unit/manual | remote mobile manual | workspaceKey + remoteSessionId |
| accessibility | pointer + Enter/Space | same | touch + drawer | role/tabIndex/focus/inert |
| Risk | Detection | Mitigation |
|---|---|---|
| 无 child 行仍被 ToolLayout 默认设为可展开 | static markup/DOM unit | V4 明确 canToggle=false,断言无 aria-expanded/content |
| background output 不再 inline 后错误丢失 | BG26 parent hover + child notice | 保留 row.error;只删除 content 展开桥接 |
| nested tab 切 task 后消失 | root/parent reducer test | visibility/last-active 只使用 rootSessionId |
| mobile request 丢 remoteSessionId | shell prop capture + remote manual | V4ChatPane/SessionPane 显式透传 |
| mobile 慢连接影响 desktop | connection/clientMode evidence | 不修改 delivery profile;owned subscription 保持隔离 |
| read-only error notice误当成 transport error | focused snapshot tests | 业务 lastError 与 subscribe retry surface 分开 |
| 删除 SubagentDrilldown 误伤其他入口 | dep:refs + rg | 只在无消费者后删除;否则保留文件但断开 V4 path |
| E2E 为通过而再次改产品代码 | catalog/matrix review | spec 先行;BG26/SAT01 以本计划为准 |
回滚只允许回滚本次 UI wiring/identity/error notice;不得通过恢复 background/mobile inline fallback 来回滚。若 child pane 有阻断性故障,应修复 pane/订阅错误面,而不是重新让父 conversation 承担详情。
docs/subagent-session-side-tabs.md、catalog 和 matrix 与用户裁决一致。pnpm typecheck、pnpm lint、git diff --check 全部通过。