ZinChl
e38aa56fec
fix(tasks): 会话「驻留」不再当作「agent 在跑」——崩溃重启后的子代理状态(#800)
宿主目录行的 `activity` 是**会话驻留**而非运行态(宿主自己的字段注释:
"recursive catalog listing observed a resident Session … does not encode a
durable outcome or guarantee continuation delivery")。崩溃重启后,DSH 打开
被中断子会话的历史流会把它 prepare → retain → attach 成驻留 Session,但不会
启动 agent,于是 `activity === 'running'` 成立、卡片显示「运行中」并附带实时
预览行,而实际上没有任何东西在跑。
权威运行位其实早就在手边:会话摘要的 `running`(根卡片已经在用,
`subagent-lineage` 统计后代也在用,DSH 官方子代理下拉同样用它)。改为
「摘要的 running 优先、目录标志兜底」:
- `src/client/tasks-model.ts`:子节点 activity/state 由
`summary.running ?? (view.running === true)` 决定。摘要没有该字段的老宿主
继续走目录标志,行为不变。
- `src/client/team-projection.ts`:同一规则(原先恰好相反,优先了驻留标志)。
测试:
- `tests/tasks-page.spec.tsx` 新增两条:驻留但未运行 → 不是 running 卡片
(旧代码下断言 `data-running` 为 null 会红);摘要无 running 字段 → 回落到
目录标志(旧行为保留)。同时把两条既有用例的 fixture 修正为两路一致
(原先 live 说 running、摘要说 false,本身自相矛盾)。
- `tests/team-projection.spec.ts` 新增两条:摘要 false + live true → idle;
摘要 true + live false → running。
2026-09-30 02:24:36 +08:00
..
2026-09-28 23:13:36 +08:00
2026-08-18 20:29:14 +08:00
2026-09-03 20:29:50 +08:00
2026-08-27 21:44:04 +08:00
2026-08-15 00:28:59 +08:00
2026-09-09 11:15:30 +08:00
2026-08-21 23:49:13 +08:00
2026-08-12 18:27:28 +08:00
2026-09-22 17:09:08 +08:00
2026-09-28 20:37:56 +08:00
2026-09-21 20:35:11 +08:00
2026-09-09 23:09:48 +08:00
2026-09-28 18:20:08 +08:00
2026-09-28 18:08:21 +08:00
2026-09-27 22:18:19 +08:00
2026-09-21 20:35:11 +08:00
2026-09-21 20:35:11 +08:00
2026-08-29 15:31:13 +08:00
2026-08-21 01:28:17 +08:00
2026-09-03 12:04:35 +08:00
2026-09-07 23:51:10 +08:00
2026-09-28 00:27:31 +08:00
2026-09-01 23:05:26 +08:00
2026-09-07 23:51:06 +08:00
2026-09-03 17:32:04 +08:00
2026-09-28 20:37:56 +08:00
2026-08-11 11:16:36 +08:00
2026-09-09 15:18:06 +08:00
2026-09-11 15:28:49 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 22:33:30 +08:00
2026-09-28 00:27:31 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-02 10:55:03 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-08-18 18:05:01 +08:00
2026-09-27 22:18:57 +08:00
2026-08-22 22:50:13 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-08-23 02:50:37 +08:00
2026-08-16 23:35:57 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-08-29 15:31:08 +08:00
2026-09-28 18:20:08 +08:00
2026-09-03 10:42:56 +08:00
2026-09-03 10:42:56 +08:00
2026-08-16 23:35:57 +08:00
2026-08-12 01:16:20 +08:00
2026-09-11 12:02:41 +08:00
2026-09-01 16:01:34 +08:00
2026-09-09 15:18:06 +08:00
2026-09-21 20:35:11 +08:00
2026-09-22 17:09:08 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:18:19 +08:00
2026-08-13 10:26:57 +08:00
2026-09-02 23:15:19 +08:00
2026-09-23 22:24:56 +08:00
2026-08-24 12:05:14 +08:00
2026-08-23 22:02:47 +08:00
2026-09-09 15:18:06 +08:00
2026-09-28 21:21:45 +08:00
2026-09-03 12:04:35 +08:00
2026-09-28 18:08:21 +08:00
2026-08-18 01:22:28 +08:00
2026-09-23 22:24:56 +08:00
2026-08-18 01:22:28 +08:00
2026-09-28 11:09:30 +08:00
2026-09-28 22:33:30 +08:00
2026-09-03 19:59:00 +08:00
2026-09-28 18:08:21 +08:00
2026-09-28 18:08:21 +08:00
2026-09-28 00:27:31 +08:00
2026-09-28 18:08:21 +08:00
2026-09-28 18:20:08 +08:00
2026-09-21 20:35:11 +08:00
2026-09-28 11:17:03 +08:00
2026-09-21 20:18:16 +08:00
2026-08-16 23:35:57 +08:00
2026-09-03 19:59:00 +08:00
2026-09-23 20:46:11 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-23 22:36:05 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:18:35 +08:00
2026-09-06 23:46:46 +08:00
2026-09-03 10:00:13 +08:00
2026-09-09 23:09:48 +08:00
2026-09-21 20:35:11 +08:00
2026-08-13 01:39:59 +08:00
2026-09-03 12:04:35 +08:00
2026-09-28 20:11:46 +08:00
2026-09-02 23:20:17 +08:00
2026-08-16 16:24:28 +08:00
2026-09-09 11:15:30 +08:00
2026-09-03 19:59:00 +08:00
2026-09-21 20:35:11 +08:00
2026-09-27 22:18:57 +08:00
2026-09-27 22:18:57 +08:00
2026-09-22 17:09:08 +08:00
2026-09-09 15:18:06 +08:00
2026-09-22 17:09:08 +08:00
2026-09-22 17:09:08 +08:00
2026-09-22 17:09:08 +08:00
2026-09-22 17:09:08 +08:00
2026-09-22 17:09:08 +08:00
2026-09-28 20:37:56 +08:00
2026-09-21 20:35:11 +08:00
2026-09-22 17:09:08 +08:00
2026-09-27 22:19:05 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:18:35 +08:00
2026-09-21 20:35:11 +08:00
2026-09-09 15:18:06 +08:00
2026-09-09 15:18:06 +08:00
2026-09-21 20:35:11 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:19:05 +08:00
2026-09-30 02:24:36 +08:00
2026-09-30 02:24:36 +08:00
2026-09-27 22:19:05 +08:00
2026-09-03 12:04:24 +08:00
2026-09-27 22:18:57 +08:00
2026-08-21 01:28:17 +08:00
2026-09-09 11:15:30 +08:00
2026-09-28 18:20:08 +08:00
2026-08-20 18:28:57 +08:00
2026-08-21 01:28:17 +08:00
2026-09-27 22:18:14 +08:00
2026-09-27 22:18:14 +08:00
2026-09-28 23:21:06 +08:00