refactor(web): remove the dead right-panel and subagent-preview code

v0.1.1 replaced both surfaces: the session tray took the right panel's
todo/tasks, and the in-place `?sub=` child view took the subagent preview.

- delete `features/chat/side-panel.tsx` (nothing imported it since the tray
  landed)
- delete `SubagentModal` and its private helpers (`SUB_BADGE`, `SUB_DOT`,
  `SubagentEntry`, `parseSubagentLines`, `SUB_ROLES`); the child view builds its
  timeline from the parent's entries instead of `subagent.read`
- drop `chatCommands.readSubagent` (its only caller is gone)
- drop the deprecated store slice `PreviewTarget` / `preview` / `setPreview`,
  including the session-migration re-key and the `PanelTab` alias
- drop their exclusive CSS (`.sub-item*`, `.sub-preview*`, `.sub-steer`) and the
  6 orphan catalog keys (chat.subagentTitle, chat.preview, chat.previewNote,
  chat.task, chat.currentSubagents, chat.steerRequired)
- tests: remove the two SubagentModal cases and the preview/readSubagent
  expectations (295 tests, down from 297 — exactly the deleted cases)

Verification: typecheck clean, vitest 295/295, vite build green, visual matrix
24/24 clean.
This commit is contained in:
yuez committed 2026-10-27 09:26:36 +08:00
1 parent bcf50b516f
commit 3789394c85
12 files changed
+12 -653

No files matched your search

+4 -1
View File
@@ -253,4 +253,7 @@ Chat:`≥1100` 树 280px + 流,`1000–1099` 树 240px,`<1000` 单栏 +
- `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`(未被引用,可单独删除)。
`chat-telemetry.css` 管状态行。
- v0.1.1 前夜的 dead code 已删:`side-panel.tsx`(右 panel)、`SubagentModal`(宽浮层子代理预览,
由 `?sub=` child view 取代)、store 的 `preview`/`PreviewTarget` 切片、`chatCommands.readSubagent`,
以及它们独占的 `.sub-item*`/`.sub-preview*`/`.sub-steer` 样式和 6 个孤儿词条。