refactor(web): drop the v0.1.0 leftovers from chat.css

The port left two generations of chat rules in one file. The newer owners are
now the only source of truth: tool-core/tool-file/tool-shell/tool-search own
tool rows and diffs, chat-msg owns message blocks, chat-stream owns the reading
column and spacing, chat-composer owns the pending bar, chat-tray owns the tray
and head chips, chat-telemetry owns the status line.

Removed (293 lines):
- the whole `.tool` card + `.diff` review block (`.tool--done`/`--error`,
  `.tool__name/__sum/__ico/__pre`, `.diff__*`), superseded by `[data-kind]`
- queued-message chips (`.chip--queue`, `.chip--sending`, `.q-steer*`) and the
  old `.composer__queue`, replaced by the composer `role=status` bar
- stream spacing/width from v0.1.0 (`max-width: 68rem`, 16px gaps, virtual
  `padding-bottom`) — chat-stream.css owns 52rem + 18/28px now
- dead stream-head furniture (`.chat-conn`, `.stream-meta`, `.chat-btn--*`) and
  the `.sub-d2/.sub-d3` indent modifiers; `.stream-status` stays hidden in the
  head below 840px via a scoped rule
- `.icon-btn--danger:hover`, `.composer__note`

Audit: a selector/class scan over 184 top-level blocks reports 0 rules whose
classes are unused; nothing overrides the new files any more.

Verification: typecheck clean, vitest 297/297 (the two 5s timeouts seen while a
Playwright matrix ran in parallel reproduce as passes on a quiet run), vite
build green, visual matrix 24/24 clean, and r3→r5 screenshots differ by
<0.1% pixels (anti-aliasing only).
This commit is contained in:
yuez committed 2026-10-27 09:14:53 +08:00
1 parent 88e73c7737
commit bcf50b516f
2 files changed
+33 -299

No files matched your search

+4 -1
View File
@@ -250,4 +250,7 @@ Chat:`≥1100` 树 280px + 流,`1000–1099` 树 240px,`<1000` 单栏 +
- `scripts/e2e/ui-e2e.mjs` 需要真 `pi` + nvim 才能跑;本轮只做了选择器适配,未在该环境回归。
- 对比度抽样与 `prefers-reduced-motion` 扫描仍未自动化(§8)。
- `chat.css` 中 v0.1.0 的 `.tool`/`.diff` 卡片规则仍保留:新样式通过 `[data-kind]` 提高优先级覆盖,后续可清理。
- `chat.css` 已清理 v0.1.0 残留(`.tool` 卡片、`.diff` review、队列 chips、stream 固定 68rem/16px 间距、
连接 chip/右 panel 按钮等),样式所有权现在唯一:`tool-*.css` 管工具、`chat-msg.css` 管消息块、
`chat-stream.css` 管阅读列与间距、`chat-composer.css` 管状态条、`chat-tray.css` 管 tray/chips、
`chat-telemetry.css` 管状态行。旧代码仍留 `side-panel.tsx`(未被引用,可单独删除)。