figmar
5a715acb85
fix(test): remove jsdom pragma + add window stub DOM surface
...
CI / plugin-mount (push) Canceled after 0s
CI / ci-windows (push) Canceled after 0s
CI / ci (push) Canceled after 0s
A/B fix per WorkBuddy review:
- browser-globals.ts: add addEventListener/removeEventListener/dispatchEvent
to window stub, add compatMode to document stub
- Remove // @vitest-environment jsdom from 5 specs that only use
renderToString/createElement (SSR, no DOM needed)
Test Files 131 passed (131), Tests 1367 passed, EXIT=0
2026-10-11 20:01:21 +08:00
figmar
a6dd8aa42a
fix(test): add missing devDeps + sourcemap transform + jsdom directives
...
WorkBuddy review found 38 of 131 spec files failed at collection time
(0 tests executed) — the '1015 passed' was a false green because vitest
only counts 'Tests failed', not 'Test Files failed'.
Root cause: dsh-client-ui-primitives@0.2.0-rc.2 declares dependencies:null
but statically imports 23 external root packages. Our project declared
only 18. Under pnpm strict layout, the missing 5 (dsh-client-store,
dsh-util-code-language, dsh-util-workspace-path, diff, simple-icons)
were unresolvable when Vite inlined the primitives package.
Fixes:
- Add 7 missing devDeps: dsh-client-store@0.2.0-rc.2,
dsh-util-code-language@0.2.0-rc.2, dsh-util-workspace-path@0.2.0-rc.2,
diff@9.0.0, simple-icons@16.35 .0, zustand@5.0.15, immer@11.1.21
- vitest.config.ts: add transform plugin to strip sourceMappingURL
comments from dsh-client-ui-primitives (upstream ships lib/index.js
with trailing sourceMappingURL but package.json files excludes .map)
- 5 spec files: add @vitest-environment jsdom directive (they import
dsh-client-ui-primitives which calls window.addEventListener at module
load; node environment lacks window)
- Remove empty .map file hack from node_modules (ineffective + .gitignore
blocks it from version control)
Result: Test Files 131 passed (131), Tests 1367 passed | 9 skipped,
EXIT=0.
Verified: simple-icons 25 named exports all present.
Typecheck + build pass.
2026-10-11 19:33:01 +08:00
figmar
cebc21aef2
fix(c8): sidebar entry unity — DSH Icon*16 + order 40-50
...
Root cause of the visual split:
1. Icon system mismatch: apes used react-icons (FiCpu/FiGrid/FiUser,
static 14px ReactNode) while native builtins use DSH's Icon*16
components (function form, host-controlled size). Two different
icon libraries → inconsistent visual style.
2. Order 901-903 pushed apes tabs far after native builtins (10-35),
creating two visually separate groups in the tab strip.
Fix:
- icon: react-icons Fi* → @deepseek-ai/dsh-client-ui-primitives
Icon*16 (function form, same as builtins):
agents → IconAgentPresetOutline16
apps → IconGaugeOutline16
profile → IconUserOutline16
- order: 901/902/903 → 40/45/50 (immediately after native builtins)
- SIDEBAR_SERVICE_VERSION + dsh.plugin.json version → 1.1.0
(lockstep with package.json, required by manifest tests)
Gate: typecheck ✓ / build ✓ / test 119 files · 1249 passed · 9 skipped · 0 failed ✓
2026-09-16 02:44:35 +08:00
figmar
aa28c1fbc7
feat(v1.1.0): adapt to DSH 2.0.10 (0.1.5-rc.2), drop apes:tasks, DSW token styles
...
C1-C5 env repair:
- align all @deepseek-ai/dsh-* peer+devDeps to 0.1.5-rc.2 (DSH 2.0.10 ships it)
- fix 0.1.5-rc.2 npm packaging defect: 15 primitives runtime deps (anser,
shiki, katex, marked, ... ) were mis-declared as devDeps in the published
package -> add to local devDependencies so vitest can resolve them
- fix sidechat-seed contract: dsh-session@0.1.5 assertAssistantSettlementShape
now requires a top-level data.stream: Array on assistant messages -> seed
helper emits stream: []
C6 slim tabs:
- remove apes:tasks (overlaps the official DSH session tree in the native
sidebar); keep apes:agents / apes:apps / apes:profile
- clean dead code: ApesTasksView + job helpers import + apes i18n dead keys
(tasks/status/duration) and the unused menu-title keys
C7 style align:
- apes view inline colors -> DSW alias tokens (--dsw-alias-bg/border/label/
state-success/interactive) with literal fallbacks; geometry (font/spacing/
radius) stays inline (DSH exposes no --ds-* geometry tokens to plugin panels)
gate: typecheck ok / build ok / test 119 files · 1249 passed
2026-09-16 01:57:46 +08:00
figmar
427266a191
feat(apes): Phase 2 数据接入 — 4 个信息层 tab 接真实会话数据
...
CI / plugin-mount (push) Canceled after 0s
CI / ci-windows (push) Canceled after 0s
CI / ci (push) Canceled after 0s
- apes:tasks 接 jobsBySession + running sessions(live 任务列表:
label/status/kind/耗时 + owner 归属,复用 collectTreeJobs/orderJobs)
- apes:agents 接 subagent 拓扑(rootAncestor + subagentsByParent 目录,
parent→children activity running/inactive, 降级用 byId origin 过滤)
- apes:profile 接 byId[current](当前会话画像: title/cwd/running + agent 状态)
- apes:apps 展示 cwd/workspace 信息(无 DSH host feed, 保留说明)
数据源: ctx.sessions.list (useSyncExternalStore, uSES 安全订阅)
复用 pure helper: subagent-lineage.ts (rootAncestor/isSideThreadSummary)
+ subagent-jobs.ts (collectTreeJobs/orderJobs/isJobLive/jobDotState)
UI 独立内联样式, 不耦合 builtin CSS module / StateDot (保持 apes/ 隔离)
locales: 加 status/duration/empty/workspace 文案 (zh+en, 含 {param} 插值)
gate: 1250 passed | typecheck exit 0 | tsdown build complete
2026-09-07 01:45:39 +08:00
figmar
a7bcdef21b
feat(apes): Phase 1b — 补 apes:apps 信息层 tab (4 tab 齐活)
...
CI / plugin-mount (push) Canceled after 0s
CI / ci-windows (push) Canceled after 0s
CI / ci (push) Canceled after 0s
- tabs.tsx: +FiGrid icon, +AppsView placeholder, +apes:apps descriptor (order 902, profile 推到 903)
- locales.ts: +apesApps/apesAppsTitle/apesAppsHint zh/en 4 key
- tests: 3→4 tab 断言 (id 列表/contract/order 严格递增/disposer/i18n zh+en)
4 个 apes:* tab: tasks(900) / agents(901) / apps(902) / profile(903)
gate: typecheck + build + test 1250 passed / 9 skipped / 0 failed (无回归)
2026-09-06 21:32:49 +08:00
figmar
257b8b4eea
feat(apes): Phase 1 — 注册 3 个 apes:* 信息层 tab (tasks/agents/profile)
...
- 独立 src/client/apes/ 模块 (D1=B), index.tsx 仅 3 处最小改动
- 3 个静态占位 tab (react-icons FiList/FiCpu/FiUser), order 900+ 排在上游 builtins 之后
- 隔离 i18n 命名空间 'apes' (不碰上游 betterSidebar 字典), zh/en 双语
- index.tsx: attachApesLocale + 字典注册 + registerApesTabs effect
- tests/apes-tabs.spec.ts: 9 测试 (注册契约 + disposer + i18n zh/en/兜底)
gate: typecheck + build + test 1250 passed / 9 skipped / 0 failed
apps tab 延后 Phase 1b, messages 已砍 (无 DSH message-stream API)
2026-09-06 21:10:13 +08:00