feat(tasks): 第二轮真机反馈——聚合条动作行、模式 chip、弹窗用量/耗时、原生侧栏转录、动效

用户在自己跑的 3080 实例上测完报回六条,逐条修:

1. 「已完成的聚合卡下方空荡荡」= 上一轮把计数收进徽标后那条只剩一个
   chevron(我的取舍造成)。小条改为动作行:组图标 + 「展开」(新词条
   tasksFoldExpandShort × 20 词典)+ 出错尾注 + 展开箭头。
2. 「展开后的子代理点不回去」= 真缺陷:expandedGroups 压过了 foldedIds,
   展开组内卡片的 chevron 失效。改成手动折叠优先(手动 → 页级规则 →
   组展开),补模型 + 组件两层判别性用例。
3. 「一次性一直显示」→ 模式词搬进徽标行成 chip(用户口径)。智能体卡不再
   有 mono 元信息行,卡片高度预算拆成 GRAPH_AGENT_NODE_H / GRAPH_NODE_H
   (只有 workflow run 卡保留元信息行),rowStrideFor(nodes) 按模型里有没有
   run 选行距。
4. 动效:接入 @formkit/auto-animate(用户选定,~3KB、无依赖无安装脚本)+
   useAutoAnimateRef 包装(WAAPI 守卫 → jsdom 空转、尊重 reduced-motion),
   挂到画布卡片层 / 树视图 / 任务抽屉;详情卡另加 140ms 入场关键帧。核心
   bundle +56KB(未压缩 CJS)。
5. 弹窗多两项:Token 用量(宿主 tokenUsage 四桶求和,悬停给明细)+ 耗时
   (宿主 subagentTiming,按 3s 轮询刷新)。SidebarProjectionSnapshot 镜像
   补两个键、模型新增 metrics 入参;**按存在性渲染**,没有测量就不显示这一
   行(0 是投影初始态,与「没工作过」不可区分)。
6. 「查看转录」改为在原生右侧栏打开:宿主 ui-subagent 的 subagentchat tab
   类型(宿主自己的子代理列表就是点行=主窗、点 chevron=侧栏)。插件照抄其
   地址公式并调 openResource(..., { kind, preferNewPane: true }),三级降级回
   主窗;页脚变「主按钮 + caret 菜单(在主窗口中打开)」。

测试 2238 passed / 17 skipped(191 文件)、tsc 0 错误、eslint 0 错误、构建
通过;新构建已装进 sidebar-test profile,:3080 上挂载正常、0 pageerror。
动效观感与真实数据的两行数值未在真机逐帧核验(右栏在无头上下文里被
transform 移出视口,合成点击不稳)——已如实记进设计文档的第二轮偏差段。
This commit is contained in:
Menghuan1918 committed 2026-10-11 23:15:40 +08:00
1 parent ba9dc57f56
commit 9ccc147e00
44 files changed
+1160 -181

No files matched your search

+83
View File
@@ -239,6 +239,19 @@
color: var(--dsw-alias-label-secondary);
}
/* The identity chip (the node's mode word) rides the badge row: it is the same
word on every card of its kind, so a line of its own only repeated itself.
Plain ink, no border — the kind badge beside it owns the box. */
.kindChip {
flex: none;
max-width: 46%;
font: var(--dsw-font-xxxs-11);
color: var(--dsw-alias-label-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* The workflow phase badge: the SECOND grouping axis. It takes the ink family
(the level edge owns the accent family) so the two never read as one. */
.phaseBadge {
@@ -390,6 +403,32 @@
text-overflow: ellipsis;
}
/* The aggregate's bar is the ACTION row: the group's glyph, the word naming
what a click does, and the chevron. The count lives on the badge above, so
the bar carries the action instead — a lone chevron in an empty strip read
as a broken card. The failure tail keeps the error ink, because it is the
one fact the ✓ badge cannot say. */
.barFoldGlyph {
flex: none;
display: inline-flex;
align-items: center;
color: var(--dsw-alias-label-tertiary);
}
.barAction {
flex: 1;
min-width: 0;
color: var(--dsw-alias-state-business-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.barError {
flex: none;
color: var(--dsw-alias-state-error-primary);
}
.barFold {
flex: none;
display: inline-flex;
@@ -758,6 +797,7 @@
values and the body (secondary), the keys, group headers and hints
(tertiary). A card never paints a fourth rung. */
.popCard {
animation: dsh-pop-in 140ms cubic-bezier(0.2, 0.8, 0.3, 1);
display: flex;
flex-direction: column;
gap: 4px;
@@ -772,6 +812,18 @@
box-sizing: border-box;
}
@keyframes dsh-pop-in {
from { opacity: 0; transform: translateY(4px) scale(0.985); }
to { opacity: 1; transform: none; }
}
/* Motion is decoration: the card is fully usable without it. */
@media (prefers-reduced-motion: reduce) {
.popCard {
animation: none;
}
}
/* The head band. It is exactly one control tall (28px, the host's `sm`), so a
card with a head action and a card without one put their title on the SAME
line of the grid; the micro caps inside ride the middle of that band and
@@ -1034,6 +1086,37 @@
text-overflow: ellipsis;
}
/* The jump split of the detail card: the primary action keeps the row and the
caret beside it opens the main-window alternative — the same split the host's
own subagent jump control wears. The menu is positioned from the caret (the
card is the portal's content root, so nothing clips it) and dismisses on an
outside pointerdown via the host's own hook. */
.popFoot > .jumpMore {
position: relative;
flex: none;
display: inline-flex;
width: 28px;
}
.jumpMoreButton {
width: 100%;
padding: 0;
}
.jumpMenu {
position: absolute;
right: 0;
bottom: calc(100% + 6px);
z-index: 4;
min-width: 152px;
padding: 4px;
}
.jumpMenuItem {
width: 100%;
justify-content: flex-start;
}
/* 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. */