feat(tasks): 小条只说原生状态、聚合按组展开、浮窗活动行移到标题下
用户 brief:下方条不再显示「运行中」而是原生状态;「最近活动」以小字号写到
标题下方;展开不要点一个全开;顺带修其他的。
四条用户确认的口径:
- 小条(图模式 CardBar):运行中/已结算都由**活动行取代状态词**,措辞取宿主
`chat` 命名空间(正在分析请求 / 正在读取文件 · main.ts / 正在准备读取文件 /
正在运行命令 · npm run build),与主对话逐字一致。**`空闲` 与 `出错` 保留
状态词**(不被任何活动措辞蕴含),**没有活动数据时回退状态词**,小条不空。
状态点、执行扫光、折叠 chevron、22px 高度全不变 → 画布几何零改动。
- 根节点接上 live:live 路由一直把拓扑根的 fold 放进 `live[rootSessionId]`,而
模型从未挂到根节点上——主代理卡片的状态文本因此恒为 thinking 兜底(这就是
「大部分时间一直显示正在分析请求」的真因),树模式根行也恒为「思考中…」。
- 节点详情:删掉「最近活动 | 值」那一行(键值格的值列在 280px 被省略、标签又
占三分之一宽),改为标题下的 10px 活动行 + 夹两行的实时文本;**无数据不渲染
这一块**(此前每个浮窗都显示「最近活动:正在分析请求」,已结算节点也一样)。
新增共享规则 `activityLine(node)`:running → 宿主 live 措辞,其余 → 宿主
done.* 措辞,无 summary → undefined(调用方回退状态词,不谎报)。删 `tasksNodeActivity`(20 份词典)。
- 按组展开:模型新增 `expandedGroups`(键 = 新增的导出 `foldGroupId`,哈希
`fold:<parentId>[:idle]`),只覆盖「本来就要折」的分支——点聚合只开该组,兄弟组/
页级规则/手工折叠都不动。页面侧 `expandGroup` 同时把该组成员从 `foldedIds` 摘掉,
**控制条收起时清空按组展开**(判据写在收起分支,自查时抓到一次反了并补了判别性
用例:翻回去即红)。树里的聚合行同一语义,行内副文案固定为「展开」。
- 聚合卡计数只说一次:待命组徽标此前印**字面量字母 N**(`tasksFoldIdleGroup` 在 20 份
词典里都没有 `{count}` 插值),现在插值真实计数;小条只留 `出错 N` 尾注 + 展开箭头,
完整 tally 仍是 `aria-label` 与 tooltip(屏幕阅读器看不到徽标)。
- 树模式实时行图标按活动类别取:`tool-icons.tsx`(工具名映射,只有一处写死 bash 的
调用)换成 `activity-icons.tsx` 的 `activityGlyph(kind)`,`Record<ProcessActivity, …>`
让上游新增类别编译失败而不是静默兜底。
测试 2227 passed / 17 skipped(190 文件)、tsc 0 错误、eslint 0 错误、构建通过。
tasks-page 新增 FakeChatLocale(挂宿主 chat 命名空间,否则只能断言到 fallback 的
detail,钉不住契约)。设计文档 docs/plans/2026-10-11-tasks-status-and-group-fold.md,
其中记录了「README 的 v0.22.0 发布说明不改」的偏差理由(git log -L 显示那四条自发布
提交后再未被碰过,进行中通道是 CHANGELOG 的 Unreleased)。
This commit is contained in:
1 parent
64a61ccfe4
commit
79ee383c5e
35 files changed
+934
-218
No files matched your search
@@ -370,15 +370,17 @@
|
||||
}
|
||||
|
||||
/* The merged activity: the main agent's own wording for the node's newest
|
||||
range. It deliberately keeps the BAR's font — no mono family. The state word
|
||||
beside it is UI copy, and the two stacks do not share metrics: measured at
|
||||
11px, the sans stack reports ascent/descent 11/2 against the mono stack's
|
||||
10/3, so a mono activity line sits 1px LOWER than the state word it follows
|
||||
(the reader reported exactly that misalignment). The mono face bought
|
||||
nothing here either: every CJK glyph in this line comes from the same
|
||||
fallback family, so only the Latin fragments changed face — half a sentence
|
||||
in mono, one pixel off. Machine text keeps its mono voice where it belongs
|
||||
(the meta row above, the job rows, the terminal well). */
|
||||
range, and the bar's primary content — it takes the state word's place for a
|
||||
running node's native status and a settled node's summary. It deliberately
|
||||
keeps the BAR's font — no mono family. Where the state word DOES stay beside
|
||||
it (`空闲` / `出错`) the two stacks do not share metrics: measured at 11px,
|
||||
the sans stack reports ascent/descent 11/2 against the mono stack's 10/3, so
|
||||
a mono activity line sits 1px LOWER than the state word it follows (the
|
||||
reader reported exactly that misalignment). The mono face bought nothing here
|
||||
either: every CJK glyph in this line comes from the same fallback family, so
|
||||
only the Latin fragments changed face — half a sentence in mono, one pixel
|
||||
off. Machine text keeps its mono voice where it belongs (the meta row above,
|
||||
the job rows, the terminal well). */
|
||||
.barActivity {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
@@ -1012,6 +1014,36 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* The node's merged activity, set under the title instead of in the key/value
|
||||
grid: it says what the node is DOING (a subtitle), and the grid's
|
||||
right-aligned value column ellipsised it at the popover's 280px while its
|
||||
"最近活动" key spent a third of the width naming the position. */
|
||||
.popActivityBlock {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.popActivity {
|
||||
font-size: 10px;
|
||||
line-height: 1.45;
|
||||
color: var(--dsw-alias-state-business-primary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* The streamed text tail under it keeps the card's smallest voice, clamped to
|
||||
two lines: the tail is capped at 400 characters upstream, which would
|
||||
otherwise push the state rows out of the card. */
|
||||
.popActivityBlock .popHint {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* The card's smallest voice (the empty-description line, the drag hint, the
|
||||
invalid-subject rule). Doubled so that a container rule — the markdown well's
|
||||
body ink, the meta line — can never lift it a rung. */
|
||||
|
||||
Reference in new issue
Block a user