Files
apes-sidebar/docs/plans/2026-09-17-dsh-0.1.6-alpha.2-adaptation.md
T
Menghuan1918 b554665bde feat(tasks-ui): readability pass, height-budget fix and leftover sweep
The native port is finished off with the readability work the earlier rounds
left open, plus the cleanup of everything the shadcn era or the older canvas
left behind.

- Geometry: node height is now composed from named parts (chrome, two title
  lines, meta row) and per-node extras, so a teammate card that carries a task
  line no longer gets clipped by the old fixed 68px budget; the layout spec
  follows the new model and GRAPH_ROW_STRIDE stays exported for it.
- Readability: row rhythm (28-32px), three ink levels for title/meta/owner,
  truncation with title hints, current-row and hover expressed as an accent bar
  plus a hover fill (no shadows), phase frames and edges back on the l1/l2
  hairlines, control cluster uniformly 28px, drawer durations on tabular
  figures, kill action revealed on hover/focus without shifting the row, no
  horizontal overflow at 360px.
- Task window: the markdown body is pulled onto the page scale (12px body,
  12/13px headings, tightened list indent and paragraph spacing) while the
  shared MarkdownText/markdownTextProps contract is untouched.
- Cleanup: dead stylesheet rules, unused TSX exports and helpers, stale
  comments that still described the retired Variant-D canvas, zero-reference
  i18n keys across the dictionaries, and the Tailwind/shadcn/Variant-D
  narrative in the design doc, AGENTS.md and the plugin guide (kept as one
  short "why it was rolled back" section).

Verified here: typecheck and lint clean; 133 files / 1413 tests; build with no
radix-ui or --tw- strings in lib/client.js (988.9 KiB); the 70-assertion
real-browser contract at 70/70 with the 20 reference screenshots regenerated;
mount e2e 7/7.
2026-09-27 22:18:19 +08:00

8.2 KiB
Raw Blame History

DSH 0.1.6-alpha.2 适配(devDeps/CI 钉版推进,peer 下限不动)

日期:2026-09-17 分支:feat/tasks-graph-workflow-teams(PR #680)

背景

用户实机(桌面 3384)已在 DSH 0.1.6-alpha.1 上运行,而插件此前钉的是 0.1.5-rc.2(latest/next 仍是 rc.2,alpha 线已到 0.1.6-alpha.2)。本次把插件的 devDependencies 与 CI 挂载钉版推到 0.1.6-alpha.2,peer 下限保持 ^0.1.5-rc.1 不动——rc.2 用户不受影响,插件同时兼容两条线。

同时按要求核对了「rebase 上游」:插件仓库 origin/main tip 1fcf43ccbedd(2026-09-11)是当前分支的祖先(13 ahead / 0 behind),git 层面无可 rebase 的内容;本文件记录的是 DSH 上游适配。

上游 delta(rc.2 → 0.1.6-alpha.2,只列触达本插件的面)

@deepseek-ai/dsh-client-ui-primitives 逐模块 diff(.d.ts)+ 全量 lib/**/*.js 裸 import 扫描的结论:

# 变更 影响 处置
1 移除 IconSendOutline16(该版本唯一被移除的图标;新增 7 个) SideChatView 编译失败 换成 IconSendOutline14(编译器建议的继任者)
2 TerminalBlockLabels 新增必需字段 noExitCode: string(语义:命令结束时拿不到退出码——被未知信号终止或从未启动) 标签对象类型不符 补 noExitCode 并新增词条 sideChatBlockNoExitCode(20 份词典同步)
3 ConnectionIndicator 移除 reconnectLabel(停用态文案本身已命名重连动作) 传了不存在的 prop 跨线兼容 shim:rc 线里该 prop 是必需且是重连按钮的 hover/焦点动作文案,peer 范围仍覆盖 rc,因此把组件类型加宽一次(ConnectionIndicatorCompat)并继续传该 prop——rc 渲染它、alpha.2 忽略多余键(src/client/SideChatView.tsx 有注释说明何时删掉这个 shim)
4 Menu / Modal:仅文档 + 键盘语义细化(Tab 在列表内 settle、Escape 归属、菜单打开时 Escape 先给菜单) 无类型破坏 不改代码;e2e/harness 覆盖既有交互
5 index.d.ts 新增导出:Checkbox、isDarwinDesktop、MarkdownDelegateProvider/MarkdownDelegate/MarkdownExternalLinkHandler、UserTextReferences;模块新增 SiteGlyph 纯增量 不使用,不改代码
6 dsh-tools 在本线不再 peer dsh-code-runtime 旧 hoist 失去理由,且上游从未发布该包 alpha.2 从 devDependencies 删除 dsh-code-runtime(保留会造出「22 个 alpha.2 + 1 个 rc.2」的混合树)
7 primitives 仍声明零 dependencies,但 lib/index.js 新增两个裸 import:diff(DiffBlock 的 structuredPatch)与 simple-icons(品牌字形) 缺失会让所有 import primitives 的 spec 在 vite 解析期直接 Failed to resolve import(6 个 jsdom 套件实测挂掉) diff@^9.0.0(对齐桌面实机 9.0.0)与 simple-icons@^15.0.0 进 dependencies;并在 AGENTS.md §3.9 记录「先扫裸 import 与 node_modules 的差集」

上游发布完整性核查:23 个 @deepseek-ai/* devDeps 中 22 个有 alpha.2,唯一缺失的 dsh-code-runtime 正是第 6 条里被上游放弃 peer 的那个;dsh-tool-bash-persistent / dsh-sandbox-windows-acl / dsh-app-boot 等历史上出过 ETARGET 的包都已发布,因此把 CI 钉到 alpha.2 没有踩到「分阶段发布」的坑(仍保留 NODE_OPTIONS=--max-old-space-size=4096)。

改动清单

文件 变更
package.json 22 个 @deepseek-ai/* devDeps 0.1.5-rc.2 → 0.1.6-alpha.2;删除 @deepseek-ai/dsh-code-runtime;新增 diff@^9.0.0、simple-icons@^15.0.0
pnpm-lock.yaml 随装更新
src/client/SideChatView.tsx IconSendOutline16 → IconSendOutline14;标签对象补 noExitCode;删 reconnectLabel
src/client/locales.ts / locales-ja.ts + 18 份第三语言词典 新增 sideChatBlockNoExitCode(20 份 key 集同步)
.github/workflows/ci.yml 挂载车道保持 0.1.5-rc.2(见下「CI 钉版为什么留在 rc.2」),注释里记入探针证据
AGENTS.md §2 钉版说明、§3 新增 #680 适配段、§3.9 追加 diff/simple-icons 两个 hoist
本文件 适配记录

peer 范围、dsh.client.inject、chunk externals 白名单、SIDEBAR_SERVICE_VERSION(0.19.1)均未改动——alpha.2 对宿主契约只做了第 4/5 条的文档级与增量变更。

验证(真实输出)

  • pnpm install:+ diff 9.0.0、+ simple-icons 15.0.0,Done;pnpm peers check → No peer dependency issues found。
  • pnpm typecheck → 0 错误(修完上述 3 处后)。
  • pnpm lint → 0。
  • pnpm vitest run → 136 文件 / 1503 用例通过 / 9 skipped(其中 locales.spec 16/16)。
  • pnpm build → 成功;ui-bundle 守卫仍绿(核心包 835.6 KiB、chunk 709.8 KiB、无 preflight/oklch/lucide)。
  • pnpm test:mount(DSH_CMD="npx -y --package @deepseek-ai/dsh@0.1.6-alpha.2 dsh",真实挂载 + 无头 tab 全扫)→ 7/7;PERF_SUMMARY mount=480ms longtasks=2/221ms(预算 ≤8);资源清单里 /sidebar/bundle/tasks.js 真实下载(decodedBodySize 726905),懒加载路径在 alpha 线上同样成立。

注(2026-09-21 回退后):上面两条引用的 ui-bundle 守卫与 tasks 懒加载 chunk(/sidebar/bundle/tasks.js)都是已废弃的 shadcn/ui 视觉基座时期的产物,该基座已整体回退(见 2026-09-14 任务页设计文档 的「回退记录与结论」):src/client/ui/**、ui-bundle spec 与 tasks chunk 均已删除,任务页回到核心包 + 原生 CSS Modules。以上数字是当时的实测记录,原样保留。

CI 钉版为什么留在 rc.2(含证伪过程)

第一版把挂载车道也钉到 0.1.6-alpha.2,CI 的 plugin-mount 确定性失败(重跑同样红):mount.e2e.ts:216 等 [data-dsh-better-sidebar] [title](插件底部工作台 tab 条)90s 不出现,perf.e2e.ts:182 同样卡在底部拖拽条。失败截图显示外壳正常但没有活动会话(会话面板停在空态占位),按 e2e 自己的注释「没有 session scope → 工作台没有 pane」推断:alpha 线在 CI 上不再自动激活 scratch profile 的种子会话。

关键一步是证伪「这是本分支引入的」:从 origin/main 拉探针分支 probe/dsh-alpha2-ci-pin,只改这一行钉版(零插件改动),用 gh workflow_dispatch --ref 触发(ci.yml 的 push 只对 main 生效,探针分支没有 PR 就不会自动跑)——plugin-mount 同样红、同一断言、同一处(run 35484961070)。本地(macOS)同一钉版 pnpm test:mount 却 7/7,说明这是 alpha 线 + Linux CI 车道的组合问题,与插件代码无关。

按仓库硬约束(不改 DSH 源码)与 KISS,处置是:devDeps 继续跟 alpha.2(对齐维护者实机),车道回到已发布的 rc.2,并在 ci.yml 注释与 AGENTS.md §2/§3 写明证据与「车道学会在 alpha 线激活种子会话之前,alpha 只做本地验证」。把车道适配 alpha 线(例如断言前显式点击种子会话,或等外壳自动选中)留作独立事项:那是 e2e 基础设施改动,不该混进依赖钉版推进。

不做 / 留待发版决定

  • 不改 peer 下限(用户确认):^0.1.5-rc.1 继续容纳 rc.1/rc.2 用户;本适配对他们是无感的。
  • 不改 README 的版本徽章与安装策略文案:它们描述的是已发布的 v0.19.1("已在 0.1.5-rc.2 上验证"),把分支上的 alpha.2 验证写进去会让已发布版声称未做过的验证。发版时(若该分支进入某个 alpha 版本)再一并更新。
  • 不清理 sideChatConnReconnect:跨线 shim 仍在用它(rc 线必需),删它要动 20 份词典且会让 rc 用户少文案。
  • 源码编译需要 alpha.2 的类型:标签对象里 noExitCode 在 rc 线类型上不存在(多余属性会被 TS 拒绝),所以本分支的 pnpm typecheck 以 alpha.2 为准;运行时两线都安全(多余键被忽略)。