HuanLinOTO
65eb0957fb
Merge PR #665 : fix(diff): 头部 +n/−m 改为 git 口径,一处改写不再两侧各计一次
2026-10-01 17:18:09 +08:00
HuanLinOTO
784b7cf9fb
Merge PR #650 : fix(editor): 「添加到对话」浮层透字——底色改用不透明令牌
2026-10-01 17:18:09 +08:00
HuanLinOTO
b1c17af429
Merge PR #779 : fix(markdown): render anchors without a stray close tag and keep <details> summaries as direct children
2026-10-01 17:18:09 +08:00
HuanLinOTO
8bf14268aa
Merge PR #691 : fix(sidechat): inherit the parent's CURRENT model selection, not its stale options snapshot
...
# Conflicts:
# tests/sidechat-routes.spec.ts
2026-10-01 17:18:08 +08:00
HuanLinOTO
8c37a7e7df
Merge PR #663 : fix(sidechat): clear the child inbox after create — fork markers alone do not fence the runtime inbox
...
# Conflicts:
# AGENTS.md
# tests/sidechat-seed-validation.spec.ts
2026-10-01 17:17:57 +08:00
HuanLinOTO
b0c07c78fb
Merge PR #742 : fix(security): stop git operands parsing as options, and harden the API dispatch
2026-10-01 17:15:48 +08:00
HuanLinOTO
5ce98edcd0
Merge PR #733 : fix(editor): never save a truncated read over the full file ( #732 )
2026-10-01 17:15:48 +08:00
HuanLinOTO
e85ec684ac
Merge PR #764 : fix(fs): fs.write 改用每请求唯一临时文件,避免并发保存互相损坏
...
# Conflicts:
# tests/smoke.spec.ts
2026-10-01 17:15:47 +08:00
HuanLinOTO
24a670c9e8
Merge PR #741 : fix(security): sandbox SVG served by the media route
2026-10-01 17:14:59 +08:00
HuanLinOTO
002046cc47
Merge PR #655 : fix(server): resolve session-relative paths in fs.write and fs.read
...
# Conflicts:
# src/path-security.ts
2026-10-01 17:14:58 +08:00
HuanLinOTO
188fea0328
Merge PR #754 : fix(preview): resolve workspace-relative paths against session cwd for HTML and media routes
2026-10-01 17:13:47 +08:00
HuanLinOTO
ea76981c0e
Merge PR #697 : fix(native): 跨会话打开改为排队到上屏重放(Fixes #694)
...
# Conflicts:
# src/client/native/surface.ts
2026-10-01 17:13:47 +08:00
HuanLinOTO
86ec5ccc75
Merge PR #736 : fix(native): focus through the controller on surface.activate; carry meta on close
...
# Conflicts:
# docs/external-plugin-guide.md
# src/client/native/surface.ts
# src/client/service.ts
2026-10-01 17:12:53 +08:00
HuanLinOTO
92ab1f83b8
Merge PR #776 : fix(native): 按会话记账 + 宿主 keepMounted,原生 tab 状态不再跨切换丢失(#636 #661)
...
# Conflicts:
# src/client/native/index.ts
# src/client/native/tab-adapter.tsx
2026-10-01 17:12:10 +08:00
HuanLinOTO
4e02951fb5
Merge PR #662 : fix(native): 文件 tab 图标不再依赖插件侧记录(Fixes #660)
...
# Conflicts:
# src/client/native/index.ts
2026-10-01 17:11:37 +08:00
HuanLinOTO
84d93ba6ce
Merge PR #718 : fix(native): keep a link's url seed on the tab it opens
...
# Conflicts:
# src/client/native/tab-adapter.tsx
2026-10-01 17:11:15 +08:00
HuanLinOTO
931215f08f
Merge PR #700 : fix(client): report a rejected sidebar sync instead of failing silently
2026-10-01 17:08:55 +08:00
HuanLinOTO
b47fb12457
Merge PR #652 : fix(state): contain a throwing store listener instead of blanking the sidebar
2026-10-01 17:08:18 +08:00
ymac
d1c8208d56
Merge origin/main (v0.24.1, DSH 0.2.0-rc.1) into fix/native-tab-state-retention
...
Two conflicts, both in the native tab adapter's per-session work — main's
`5c95002` moved the expansion set into the plugin store's session state while
this branch moved the RECORD identity to `sessionId::tabId`:
- `src/client/native/tab-adapter.tsx`: keep main's store-backed expansion as
the authority (`attachStore` / `syncExpanded` / `getSessionStates().expanded`)
and this branch's seat-scoped identity (`views` keyed `sessionId::tabId`,
`get/has/update/drop/versionOf/retain` take the seat session). `toggleExpanded`
keeps main's active-`reduce` / background-`reduceFor` split, but locates the
record by its seat and writes the SCOPE session's set — the set every view of
that session mirrors.
- `tests/native-surface.spec.ts`: main's five expansion cases adapted to the
session-scoped API (seat session on `ensure`, two-arg `get`/`drop`, seat on
`toggleExpanded`); the branch's cases now bind a store before toggling, since
expansion no longer lives in the record itself.
The `files` takeover guard and its registration invariants come from
main; this merge drops the branch's duplicate.
2026-10-01 16:37:35 +08:00
HuanLinOTO
2cbdf25594
Merge branch 'feat/plugin-catalog-agent-persona' into main (catalog train)
2026-10-01 15:23:42 +08:00
HuanLinOTO
3b233ceee4
Merge branch 'feat/plugin-list-dsh-memory-delta' into main (catalog train)
2026-10-01 15:22:37 +08:00
HuanLinOTO
afd96632d1
Merge branch 'feat/add-tylina-tab-catalog' into main (catalog train, includes train-breakage repair)
2026-10-01 15:21:04 +08:00
多玩幻灵qwq
084677665a
Merge pull request #810 from xlennart/codex/register-dsh-side-chat
...
docs: register dsh-side-chat in the tab catalog
2026-10-01 15:16:15 +08:00
多玩幻灵qwq
32812f3f44
Merge pull request #795 from OMSociety/feat/omsociety-plugin-entries
...
feat(plugin-list): 把 dsh-git-forge 与 dsh-ssh-tunnel 两条指向维护中的仓库与 npm 包
2026-10-01 15:15:48 +08:00
多玩幻灵qwq
7c32c110f2
Merge pull request #688 from KannaKuron/feat/plugin-entry-dsh-ide-git
...
feat(catalog): add dsh-ide-git to the tab plugin catalog
2026-10-01 15:14:55 +08:00
多玩幻灵qwq
e21b5c19ce
Merge pull request #585 from modusensus/catalog-dsh-mneme
...
feat(catalog): add dsh-mneme to the tab plugin catalog
2026-10-01 15:13:58 +08:00
多玩幻灵qwq
8d9183746c
Merge pull request #544 from Andor-Z/feat/dsh-turn-outline-listing
...
feat: list dsh-turn-outline in the plugin ecosystem (README + catalog)
2026-10-01 15:12:57 +08:00
多玩幻灵qwq
aa095e6b33
Merge pull request #514 from kp-z/add-dsh-dev-git-graph
...
Add dsh-dev-git-graph to the tab plugin catalog
2026-10-01 15:10:24 +08:00
Andor
2af19166b0
feat(catalog): unpin dsh-turn-outline prerequisite after 0.18.0 co-test
...
plugin 0.2.7 declares dsh-better-sidebar@^0.17.0 || ^0.18.0 and is
co-tested on better-sidebar 0.18.0 + DSH 0.1.2-rc.1, so the catalog
install line no longer needs the 0.17.1 stable-line pin.
2026-09-30 15:48:24 +08:00
Andor
737276b256
feat: list dsh-turn-outline in the plugin ecosystem (README + catalog)
...
Adds Andor-Z/dsh-turn-outline (turn-outline tab) to the ecosystem:
- README.md / README_EN.md tab-plugin table rows + header count 24 -> 26
(aligns with the actual row count, which was already 25)
- recommended-catalog entry in plugins-tabs.ts (npm install; better-sidebar
prereq pinned to 0.17.1 - stable-line policy, see the entry comment)
- pluginTurnOutlineName/pluginTurnOutlineDesc i18n keys across all 20
dictionaries (locales.ts zh/en + 19 locale chunks)
2026-09-30 15:48:24 +08:00
kola
a9a7a9901a
Merge upstream main and preserve absolute preview paths
...
Resolve client preview paths against the session cwd. Limit the server file fallback to relative input and retain upstream absolute HTML path semantics. Cover nested assets, Windows/UNC paths, and external files with workspace shadows.
2026-09-30 13:26:10 +08:00
cxl
06377fbc5f
docs: register dsh-side-chat in the tab catalog
2026-09-30 01:55:02 +08:00
山海学社OMSociety
e3215e7e2a
feat(plugin-list): 把 dsh-git-forge 与 dsh-ssh-tunnel 两条指向维护中的仓库与 npm 包
...
这两个插件的维护线在 OMSociety,且已发布到 npm(条目 id 即 npm 包名):
- url: thirsty5034/<repo> → OMSociety/<repo>
- install: GitHub 源形态 → npm 形态(dsh plugin --profile web add <pkg>@1.0.0)
- 注释里「package is GitHub-sourced until npm publish」同步改为已发布 npm
- README.md / README_EN.md 对应两行的链接与 stars 徽章同步
条目 id 与 locale 串不变,tests/plugin-list.spec.ts 的唯一性与形态断言不受影响。
2026-09-28 23:26:03 +08:00
Menghuan1918
0ac62b3a49
Merge origin/main (v0.22.1 与三个热修 PR) into feat/files-changes-uiux
...
冲突面 11 个文件,逐项裁决如下:
1. src/client/native/index.ts —— **取 main 版**。main 的 v0.22.1 在同一处做了更强的修复
(清理循环同样跳过 FILES_KIND,另加 `disposeSafely` 与「注册失败必须回滚已占用 id /
已建槽位」),是我们那行守卫的超集。
⚠️ 但 main 分支从来没有过我们 task-19 的 `records.attachStore(store)` 调用,整文件
采用会**静默丢掉**它(records 拿不到 store → `toggleExpanded` 直接 return → 点目录
树毫无反应),且 jsdom 单测看不见(它们自己绑 records)。已按原注释恢复该调用,并在
注释里记下这次合并教训。真实宿主 lane 证明:恢复前 `zz-expand-refresh` 红(请求为
空、`big` 不展开),恢复后 9/9 全绿。
2. package.json / dsh.plugin.json / src/client/service.ts —— 版本相关冲突取我们的
0.24.1(支持线 ^0.2.0-rc.1 不变)。
3. CHANGELOG / README(中英各一)—— 双方版本节全部保留:我们的 v0.24.1 / v0.24.0 +
**新增缺失的 v0.23.0 节**(开发线,内容随 v0.24.1 发布)+ main 的 v0.22.1。
同时修正两处事实错误:① 「0.1.7 线请固定 v0.23.0」→ **v0.22.1**(0.23.0 从未发布);
② 安装对照表里 0.1.7 行的安装命令同改。README 并补上 v0.23.0 摘要(含 ⚠️ 删除工作区
路径检测这一安全相关的行为变更)。
4. docs/external-plugin-guide.md —— 版本行取我们的(0.2.0 线)。
验证(合并后的树):pnpm typecheck / lint / test = **137 文件 / 1491 通过 / 9 跳过**
(含 main 新增的 native-registration.spec.ts);pnpm build ✓;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.2.0-rc.1 dsh' pnpm test:mount = **9/9**
(mount 5 + perf 2 + main 的 native-reload 1 + 我们的 zz-expand-refresh 1)。
2026-09-28 23:13:36 +08:00
Menghuan1918
98a446bbfc
fix(sidebar): 点击展开时文件树整体重建(两处根因)+ v0.24.1
...
用户报告:「点击展开的时候,文件树会频繁整体刷新,看起来非常难受」。
根因 1(主):src/client/native/index.ts 的 sync() 把 files 接管项当成多余注册。
它按 KIND 记账、永远不在 wanted 里,于是每次 sync 都被 dispose + 重建;而
disposeSubscriptions 同时订阅了 service 与 store,**任何会话状态写入**(展开/收起、
切 tab、拖底部工作台、选中…)都会跑一遍 sync。替换 slot 注册 = 宿主换 slot entry →
插件 tab body 被 unmount/remount → 文件树丢失层缓存、滚动位置与目录 watcher,并重新
fs.trees([root, ...expanded]) 重列整棵可见树。机械证明(临时插桩,已回退):
[probe-sync] enter live=[editor,git,subagent,sidechat,diff,files]
[probe-registerSlots] slot inject ran for dsh-better-sidebar:files
[probe-body] unmount tab3 kind=files
[probe-body] mount tab3 kind=files
修法:wantsFiles 提前,删除循环里对 files 接管项 skip(禁用 editor 时仍照旧释放)。
根因 2(次):FileTree.tsx 的 retryDir 先把该层缓存删掉再请求,行被「Loading…」
占位替换后重建——目录有外部写入(构建 / 格式化 / 模型跑 bash)时整层闪空。
修法:复用既有 force 路径 loadLevels([dir], { force: true }),保留旧行直到新答案到达
(与 refreshTick 的强制刷新路径行为一致)。
判别性证据(回退任一修复即红)
- tests/native-surface.spec.ts:三次 store 写入不得产生任何注册/注销 → 回退后
registered 6 → 12、disposed 全是 dsh-better-sidebar:files
- tests/file-tree-batch-load.spec.tsx:重列期间旧行仍在屏 → 回退后层被删空
- 新增真实宿主 lane tests/e2e/zz-expand-refresh.e2e.ts(quiescence 判据,无固定 sleep;
zz- 前缀保证它最后跑,因为它会自建 workspace + session):A1 展开只请求被展开那一层、
A2 tab body 存活(不重开 watch socket)、A3 屏上行数不归零;回退修复 1 后退出码 1
(Error: expanding a folder must ask for that folder, not the whole visible set)
修复后实测(40 子项目录,同一探针/机器/工作区)
| 阶段 | fs.trees payload | 新开 ws | DOM +/- | 被删行 | body 替换 | 层内最小行数 |
| 展开 big | [big](原 [root, big]) | 0(原 1) | +41/-1 | 0(原 45) | 0(原是) | 40(原 40) |
| 外部写入 big | [big] | 0 | +1/-0(原 +41/-40) | 0 | 0 | 40(原 0) |
| 展开 bravo | [bravo] | 0 | +2/-1 | 0(原 45) | 0(原是) | 41 |
证伪记录:新建 fs.watch(dir,{persistent:false}) 在 macOS 上无改动时 0 事件(Node 微
探针两遍 + 8 轮真实时序 + 浏览器侧从未收到 {dir} 陈旧帧)→ src/fs-watch.ts 与
use-dir-watch.ts 一行未改。
验证:pnpm typecheck / lint / test(136 文件 1486 通过 9 跳过,基线 1484 + 新增 2)/ build
全绿;DSH_CMD='npx -y --package @deepseek-ai/dsh@0.2.0-rc.1 dsh' pnpm test:mount = 8/8。
版本 0.24.0 → 0.24.1(package.json / dsh.plugin.json / SIDEBAR_SERVICE_VERSION /
README×2 / CHANGELOG×2 同步)。
2026-09-28 22:33:30 +08:00
Menghuan1918
b91675ae61
feat(dsh): 适配 DSH 0.2.0-rc.1(单线支持)+ v0.24.0
...
支持线从 ^0.1.7-rc.1 整体前移到 ^0.2.0-rc.1;0.1.7 线(含 npm latest 的
0.1.7-rc.2)停留在 v0.23.0。适配前实测确认这是纯增量,故本版无运行时兼容分支。
必改项(否则装不上/不加载)
- 14 条 DSH peer → ^0.2.0-rc.1。实测 caret 跨 minor 不成立:`^0.1.7-rc.1`
展开为 >=0.1.7-rc.1 <0.2.0-0,对 0.2.0-rc.1 判定 false(includePrerelease
也救不了)。判别性验证:把 peer 回退成 ^0.1.7-rc.1 后,在 0.2.0-rc.1 宿主上
`dsh plugin add` 直接拒绝并回滚包树——
"installation rejected: Plugin dsh-better-sidebar@0.24 .0 is incompatible with
dsh 0.2.0-rc.1: peerDependencies {…^0.1.7-rc.1…}";恢复 ^0.2.0-rc.1 后安装通过
- 28 个 @deepseek-ai/* devDependencies 精确钉 0.2.0-rc.1(cordis 4.0.4 /
cordis-plugin-group 1.0.4 / cordis-plugin-include 1.0.9 不变)
- 新增 @deepseek-ai/dsh-util-code-language@0.2.0-rc.1:0.2.0 的 ui-primitives
产物裸 import 它(0.1.7 的产物同样 import,只是旧树里恰好被传递提供),
不补则所有加载 ui-primitives 的 20 个 spec 在收集期失败
实测证据(写进 docs/plans/2026-09-28-dsh-0.2.0-rc.1-adaptation.md)
- 本插件消费的 19 个宿主包零值导出删除(对比 export {} / exports.x=)
- 类型面仅 3 处且全为增量:ui-primitives(DisclosureRow/TextShimmer/Tooltip
新增可选 prop、overlay 顶部内距)、dsh-session(新增 ToolCallRecovery)、
dsh-api-remotes(新增 product-analytics remote)
- 会话格式仍 v4、SUBAGENT_DESCRIPTOR_VERSION 仍 3、dsh/lib/bin.js 与
dsh-client-modules 运行时逐字节相同、web profile 客户端 inject 列表相同、
ui-primitives 裸 import 集合不变、agent-team 四包类型逐字相同
- 宿主 web profile:新增 desktop-only product-analytics/telemetry(web 上
disabled);time-context/schedule/ui-schedule(本就 disabled)移入可选
dsh-experimental-schedule-bundle;插件不依赖宿主 schedule
其余同步
- CI 与挂载 lane 钉 @deepseek-ai/dsh@0.2.0-rc.1(scripts/e2e-common.sh 的
DSH_NPX_SPEC/DSH_EXPECT_VERSION、ci.yml),注释记下「0.2.0 首个候选版只挂
next」与「caret 跨 minor 必失效」两条教训
- tests/market-manifest.spec.ts 的 peer 形状断言钉当前基线 tuple
- dsh.plugin.json engines.dsh → >=0.2.0-rc.1;SIDEBAR_SERVICE_VERSION → 0.24.0
- README/README_EN、CHANGELOG/CHANGELOG_EN、AGENTS.md(§2 钉版句 + §3 改为
「DSH 版本适配要点」并新增 §3.0 当前基线,0.1.7 内容降为历史分节)、
docs/external-plugin-guide.md 全部同步
验证:pnpm peers check 仅剩上游 better-locale 的 5 条 unmet(非本插件 peer);
typecheck / lint / test(136 文件 1484 通过 9 跳过)/ build 全绿;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.2.0-rc.1 dsh' pnpm test:mount = 7/7;
pnpm test:mount:aggregate 通过(聚合双挂载退让)
2026-09-28 21:21:45 +08:00
Menghuan1918
5c95002641
perf(sidebar): fs.tree 22.8ms→3.8ms + 删除工作区路径检测(放开权限)+ 树展开状态按会话
...
用户实测反馈:
1) `/sidebar/api/fs.tree` 性能极差 —— 先测后改(10k 条目目录、热缓存、中位数):
- 冷调用 cap=1000:22.76ms → **3.77ms**;TTL 内重复:≈23ms → **0.000ms**
- 改法:opendir for-await → readdir(withFileTypes) 一次取回;只为 cap 条建行
(slice + 定长数组);路径用字符串拼接而非 path.join;排序弃 localeCompare
(14.6ms/10k → 0.35ms)改小写比较 + 原名码点兜底;新增 1.5s 目录级缓存
(键 绝对路径\0cap,上限 512),由 fs.write/rename/remove/mkdir/upload 与
fs-watch 的变更通知显式失效
- 契约逐字不变;新增 tests/fs-tree.spec.ts 6 例 + fs-watch 失效用例(判别性验证)
2) 删除工作区路径检测(默认不检测、放开权限):
- path-security 变纯词法解析(realpath/包含性判定删除)、fs-operations 去 fence
分支、所有 fs 路由不再读 fence、403 分支消失、config 删 workspaceFence 字段
(schemastery 容忍未知键,旧 profile 不会加载失败)、settings 开关删除
- ⚠️ 安全影响:插件 fs 路由(tree/read/write/rename/remove/mkdir/媒体/HTML/
upload/archive)现在可读写宿主用户可访问的任意路径,只受 OS 权限约束;
指南 §8.1 已加醒目声明
- 死代码清理:FenceErrorNotice 组件 + EditorHost 分支 + 4 个词条(settingsFence*、
fenceErrorReason、fenceDisableAction)+ isOutsideWorkspace* 助手 + TreePanel 的
store prop + 相关 CSS 块
3) 批量列举路由 `fs.trees`(单层失败只在该层带 error)+ 客户端批量加载:
挂载/刷新时的 N+1 请求变为 1 个(8 个展开目录:9 → 1,探针断言)
refreshTick 不再先清缓存(旧行保留到新答案;失败保留旧行 + warn 提示)
4) 修复「关闭文件后返回文件树,展开状态被重置」:
原生承载面的展开集合原来存在每个 tab 的记录里(drop 即丢),改为**每会话状态**
的投影(ensure 从会话态读、toggleExpanded 写回会话态、registerNativeSurface 用
attachStore 订阅);同一会话多 tab 共享、不同会话隔离;revealed 保持 per-tab
验证:typecheck / lint / test(136 文件 / 1484 通过 / 9 跳过)/ build 全绿;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.1.7-rc.1 dsh' pnpm test:mount 7/7 通过;
版本镜像同步(dsh.plugin.json + SIDEBAR_SERVICE_VERSION)
2026-09-28 20:37:56 +08:00
Menghuan1918
ee1fe05067
feat(sidebar): 菜单层级/性能 + 选中条吸底 + 打包进度 + 修复「在侧边打开」
...
用户实测反馈 5 条:
1) 文件列表性能 / 右键菜单不再刷屏(先测量后改,探针 tests/file-tree-menu-perf.spec.tsx)
- 宿主应用列表按路径缓存:N 次打开菜单只请求 1 次(原每次 1 次 + Loading 帧)
- 行上的 git 数据改为原始值(tone/letter):共享 store 每次轮询重建对象不再触达行
(探针:开窗 folderIcons 4 → 0;root 行也 memo 化)
- 菜单开关不触发目录重列(fsTree=0);实测「菜单打开期间暂停轮询」会让变更行瞬时
掉色并多两次重渲染,故按测量结果放弃该做法(数字与理由写进探针注释)
2) 「已选择 N 项」条移到底部:滚动容器最后一个内容子节点 + sticky bottom(不遮最后
一行),窄栏 flex-wrap 换行不出横向滚动条
3) 菜单层级重构:一级只留默认动作(宿主默认应用 / 打开方式 ▸ / 在文件管理器中显示 /
新 Tab / 在侧边打开 / 下载 / 压缩并下载 / 复制路径 / 重命名 / 删除;目录行另有
新建文件夹、上传到此处),应用列表整体收进「打开方式」子菜单;宿主探测到本机关联
应用时默认不显示插件自研 open-with 项目,新增设置开关 openWithPluginTargets
(editor descriptor 的 pluginToggles)可强制并存;宿主不可用时插件项目照旧
4) 压缩并下载显示进度:宿主改为可观测任务(archive.build / archive.status /
/sidebar/archive?id=,4 并发 + 5 分钟 TTL + sessionId 绑定,buildZip 逐条目
onProgress),客户端轮询 250ms 显示「正在打包 done/total · N%」,ready 后 blob 下载,
失败进 zipFailed
5) 修复「在侧边打开没有效果」:根因是它只写插件底部工作台(原生右侧栏的 tab 不在
bottomSplits 里),现按承载面分流 —— 原生 tab 走 service.openTab(target:'side') →
宿主 openResource(preferNewPane, revealIfOpened:false) 真正分栏;底部工作台行为不变
(接入 API 变更已同步 docs/external-plugin-guide.md)
验证:typecheck / lint / test(135 文件 1461 通过)/ build 全绿;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.1.7-rc.1 dsh' pnpm test:mount 7/7 通过;
新增/更新测试:menu-perf(3)、archive(10)、open-in-app(18)、open-with(10)、multiselect(9)、
zip(37)、service(64)、editor-host(11)、builtins(23)、locales(20)
2026-09-28 20:11:46 +08:00
Menghuan1918
13d4bae321
fix(sidebar): 二轮独立验证的 9 项缺陷 + 目录级暂存
...
verifier 二轮报告(F1–F9)全部修复,每条都有「临时回退即变红」的判别性验证:
- F1【高】中文等非 latin1 下载名 → 真实宿主 500:content-disposition 改用
RFC 5987(ASCII 回退 + filename*=UTF-8'');补真 node:http 用例与根因对照断言
- F2【中】多选同名文件归档重名(解压互相覆盖):冲突项逐级上溯父目录消歧
- F3【中低】maxBytes 在读完之后才判定;budget<=0 的 0 字节 FIFO 会永久阻塞:
改为先 stat、读取前拒绝(FIFO 探针验证)
- F4【中低】SSH 模式 + 宿主不可用时 reveal 整条消失:保留 kind==='reveal' 目标
- F5【低】图钉嵌套交互语义非法且键盘不可达:改为诚实的鼠标热区,键盘入口归设置面板
- F6【低】变更树空闲 tick 全量重渲染:行 memo + 恒定 props + 内容键派生 +
共享 store 的 sameStatus 保住快照身份
- F7【低】排序随运行时 locale 漂移:显式 'en' collation + 码点兜底
- F8【低】POSIX 文件名的反斜杠被当成层级:不再替换
- F9【低】打包中重复点击静默、无反馈:busy 行(role=status)+ in-flight 守卫
- 新增:目录行「暂存/取消暂存该目录」(git pathspec 语义,不触发折叠)
验证:typecheck / lint / test(134 文件 1441 通过)/ build 全绿;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.1.7-rc.1 dsh' pnpm test:mount 7/7 通过
2026-09-28 18:20:08 +08:00
Menghuan1918
b011be1e98
feat(sidebar): 打开方式双源并存 + 多选压缩下载 + 文件变动层级树
...
用户追加三条需求,全部落地:
1) 打开方式 = 宿主探测应用 + 插件自研 open-with(并存)
- 逐字恢复 src/client/open-with.ts / open-with-settings.tsx / plugin-settings.ts /
src/open-external.ts / open.external 路由 / api.openExternal / editor descriptor
的 settings.render,以及 20 个 openWith* 词条(19 份词典从 main 取回原文)
- 恢复 menu-flip.ts + layout.css 子菜单翻转规则(子菜单回来了)
- FileTree 菜单段(无标题行):宿主行 → 分隔线 → 插件 pinned + 「在应用中打开 >」
子菜单(图钉 / SSH 后缀原样)→ 分隔线 → 宿主 reveal;宿主可用时过滤插件
explorer 目标,宿主不可用时插件行照旧(SSH 远端场景保持可用)
- 死键清理:菜单去掉标题行后 openInApp 词条无引用,已从 21 份词典删除
2) 文件页多选右键「压缩并打包下载」
- 新增 src/zip.ts(自研 ZIP:方法 0/8 按收益二选一、UTF-8 bit 11、目录条目、
自实现 CRC32、无第三方依赖)+ src/archive-route.ts(名净化 + 递归收集)+
GET /sidebar/archive(同一道 workspace fence、目录递归跳过符号链接、
10000 条目 / 256 MiB 上限)+ api.archiveUrl
- FileTree:多选 ≥2 项或单选目录时出现;fetch → blob → objectURL 下载,
路由错误(超限 / fence / 非 GET)以 zipFailed 显示在错误条
- 修掉真实缺陷:central directory 只写 MS-DOS 位而 version-made-by 声称 Unix,
Info-ZIP 会把每个文件解成 mode 000;改为 Unix 语义(0o100644 * 0x10000,
<< 16 会溢出 int32)。系统 unzip 复验:mode 644/755、unzip -t 无错
3) 文件变动页层级树 + 视觉打磨
- 新增 src/client/changes/change-tree.ts:单子目录链压缩成一行、目录先于文件、
大小写不敏感排序、文件带 GitFileStatus、目录带下级变更数
- GitLens 两组各自渲染树:折叠状态按「组+路径」独立、默认展开;分组头吸顶 +
计数胶囊;Stage all/Unstage all 改为带 aria-label 的 IconButton;选中 =
interactive-bg-active + 2px 内嵌强调条;12px/级缩进 + l1 参考线;
历史行 hash 徽标 / ref 胶囊 / 作者·时间右对齐
验证:typecheck / lint / test(134 文件 1422 通过)/ build 全绿;
DSH_CMD='npx -y --package @deepseek-ai/dsh@0.1.7-rc.1 dsh' pnpm test:mount 7/7 通过;
真实宿主截图确认三条需求(多选+双源菜单+zip 项、变动页树形层级)
2026-09-28 18:08:21 +08:00
gyixuan
9489f41068
fix(native): focus through the controller on surface.activate; carry meta on close
...
surface.activate() only returned records.has(tabId) without focusing, so
external plugins with multi-instance native tabs (dsh-sidenote's side
chats) could never bring an existing tab to the front programmatically.
Focus via ISidebarRight.focus (dsh >= 0.1.5), which focuses the tab and
its pane.
surface.close() now also returns the record's meta so service.closeTab
can hand it to descriptor.onClose — native closes previously dropped it,
leaving meta-driven lifecycle consumers (e.g. recently-closed records)
starved.
2026-09-28 14:32:50 +08:00
ymac
aec7101374
feat(native): keep visited tab bodies mounted, and pin state retention end to end
...
DSH 0.1.7 gives a tab TYPE the `keepMounted` switch: a marked body stays
mounted through hiding, tab selection and Session switches. That is exactly
what the plugin tried to fake with module-level memory, so declare it on
every plugin type (the descriptor types and the `files` takeover) and let
the host hold the component state — tree scroll, unsaved drafts, chip
renames — with no plugin-side memory at all.
With the bodies staying up, the per-session record registry from the
previous commit is what keeps co-resident sessions apart; both halves are
required, because a body may still be remounted by the host (type disposal,
session teardown) and the records must outlive that.
Verification on a real host (`scripts/e2e-mount.sh`: npm pack -> fresh
scratch profile -> real `dsh web` pinned to 0.1.7-rc.1 -> headless Chromium),
new lane `tests/e2e/tree-scroll.e2e.ts`: build state in conversation A,
switch to B, come back, and compare the whole observable vector (tree
expansion, scroll offset, chip title) — plus the negative half, that B does
not inherit A's state.
That lane also exposed a defect in the old one: it picked its "second
conversation" by row index, but the session tree's first row is a WORKSPACE
row and a seeded session with no messages takes no row at all, so the
"A -> B -> A" round trip was re-selecting the same session and every
assertion held vacuously. It now identifies sessions by
`data-row-key="session:<id>"` and creates a real second session through the
rail.
`tests/e2e/mount.e2e.ts` reaches the side-chat tab through its guide entry
now: with the record retained, the chip shows the thread's own title, so
the old `/Side Chat/` chip match no longer names it.
Docs: AGENTS.md records the two facts that must hold together, and
docs/plans/2026-09-25-native-tab-state-retention-keepmounted.md replaces the
park/archive design (PR #712 ) with this one.
2026-09-28 11:27:50 +08:00
ymac
7cf962652e
fix(native): key a tab record by (session, tab id), not the bare id
...
Native tab ids restart in every session (`tab1`, `tab2`, …), and DSH 0.1.7
keeps a visited tab body mounted across hiding, tab selection and Session
switches, so several sessions' same-named tabs are alive at once. The
plugin's registry was a single-keyed map, which made the entering session's
body adopt the leaving one's record — and the leaving body's unmount cleanup
then delete it. The visible result was #636 : after a conversation switch the
explorer stopped responding entirely (no request sent), in both directions.
Records are now filed under `sessionId::tabId`, and the seat session is
carried explicitly instead of inferred:
- `createNativeTabRecords` takes the seat session on `ensure`, and
`get/has/update/drop/toggleExpanded/versionOf` all take it too;
`retain(sessions)` reclaims the records of sessions that are gone;
- the title slot gets its own seat `sessionId` — the chip is drawn BEFORE
the body, so it used to read whichever record the live slot happened to
hold (another conversation's title on the switch frame);
- `SidebarSurface.update/has/activate` take an optional `sessionId`: with
one, it names the session; without, the mounted seat answers, a unique
match still resolves, and an id that names a tab in several sessions
resolves to none rather than guessing (writing into another conversation
is worse than refusing);
- `BetterSidebarService.updateTab` forwards it, and the six call sites that
know their own scope (EditorHost, SideChatView, ChangesTab,
tree-mutations) pass theirs.
Tests (native-surface.spec.ts, +8): per-seat-session identity (same-named
tabs stay apart, a patch/drop hits exactly one session, `retain` reclaims),
and surface resolution (explicit session wins, mounted seat is the
fallback, an ambiguous bare id is refused, close plus dead-session reclaim).
Each is red without this change.
2026-09-28 11:27:50 +08:00
ymac
673707cef7
fix(native): stop rebuilding the files takeover on every state pulse
...
`sync()`'s cleanup loop compared the live registrations against the
DESCRIPTOR list, which never contains the `files` takeover (its key is
`FILES_KIND`, not a descriptor id). Every store/service notification — a
Session switch is one — therefore disposed and immediately rebuilt it:
[native] DISPOSE type dsh-better-sidebar:files
[native] register type dsh-better-sidebar:files
Disposal unmounts that kind's body, so the explorer's own component state
(its scroll offset) was rebuilt on every pulse even when the plugin-side
record survived. Its lifetime really belongs to the editor type's switch,
which the loop below already handles; skip it in the cleanup pass.
Pinned by "keeps the files takeover registered across a Session switch
pulse": reverting the guard turns it red (`expected 2 to be 1` — 2 is the
rebuilt registration count).
Rebased onto #777 (`4099700`): the guard itself now lives on `main` — its
cleanup pass already skips `FILES_KIND` and releases through `disposeSafely`
— so what remains in this commit is the comment above that guard, recording
the second reason it is load-bearing (a re-registration on an already
inactive context orphaned the id), plus the regression spec below.
2026-09-28 11:27:50 +08:00
Menghuan1918
2e94b56c36
chore(release): v0.22.1——修复 files 接管 id 孤儿化与 macOS 拖拽失效
...
- package.json / dsh.plugin.json / SIDEBAR_SERVICE_VERSION → 0.22.1(三者锁步由
tests/service.spec.ts 与 tests/manifest-consistency.spec.ts 断言)
- README / README_EN:新增 v0.22.1 条目、同步三处徽章与 latest/支持线表格、
切回 npm 通道的示例版本号;「最近更新」保持两条(v0.22.1 + v0.22.0),
更早版本指针区间随之下移为 v0.21.1 → v0.12.3
- docs/external-plugin-guide.md:当前版本行 → v0.22.1
- CHANGELOG / CHANGELOG_EN:补 v0.22.1 条目(两个缺陷的根因链、真机证据、
修复要点与守卫清单)
支持线**不变**:仅 DSH 0.1.7-rc.1+(peer 下限 ^0.1.7-rc.1,CI 钉 0.1.7-rc.1);
0.21.1 / 0.22.0 用户直接升级;0.1.6-alpha.2 及更早仍固定 v0.19.1。
内容提要:① 修复客户端条目替换后 `dsh-better-sidebar:files` id 被孤儿化
(#777 + #785:清理循环跳过 FILES_KIND + 注册失败回滚已占用的 id 与槽位,
并新增部署级回归门 tests/e2e/native-reload.e2e.ts);② 修复 macOS 桌面版
窗口拖拽/双击缩放失效(#773 + #786:视口层用 initial !important 退出
app-region 计算,补齐放大视图,探针改用真实级联计算值)。
验证:make check 全绿(typecheck / lint / build / test 122 files 1293 passed
9 skipped / check:consumer-types);此外本地 pnpm test:mount 与
pnpm test:mount:aggregate 绿,npm 0.22.0 与修复版在 scratch profile 上的
红→绿对照见 PR #785 / #786。
2026-09-28 11:23:48 +08:00
Atlas Zeng
69f4349047
Merge pull request #786 from omdsh-dev/fix/desktop-app-region-rest
...
fix(desktop): 补齐 mermaid 放大视图的拖拽区退出 + 把 #772 的守卫换成真实级联探针
2026-09-28 11:22:22 +08:00
Atlas Zeng
e46250ae4d
Merge pull request #785 from omdsh-dev/fix/native-leak-guard-tests
...
fix(native): 钉牢 files 接管泄漏的守护断言 + 记录两条不变量
2026-09-28 11:17:35 +08:00
Menghuan1918
e7d2300cf8
fix(review): 按独立 review(Chromium 实测)修正 #786 的措辞、守卫与覆盖
...
reviewer 在本机跑 Chromium 逐条实测(同一批宿主规则 + 插件产物),结论:修复方向与形状正确
(`.mermaidModal` 预修复计算 `no-drag`、修复后 `none`;级联探针确实能把未修复产物判红),
但有几处措辞与守卫不到位。逐条处理:
1. **「app-region 会被继承」的说法在该引擎里不成立**:`[data-dsh-panel-host]` 不是 body
子元素(DOM 是 `body > [data-dsh-better-sidebar] > [data-dsh-panel-host]`),lane 用的
Chromium 不传播该属性(实测:`drag` 父元素里子元素读 `none`)。改写成「宿主是 body
子元素;在 Electron 里该值会传到它内部的面板层(#772 的 CDP 实测),lane 的引擎不传播,
所以面板层自己也声明同一条规则」——CSS 注释、指南 §12.1、探针注释三处同步。
2. **`regions.layer` 那条断言是真空断言**(修复前后都读 `none`):保留为回归钉子,但在
注释里明确标注它不具判别力、面板层的规则由 `panel-host-css.spec.ts` 钉住。
3. **给修复本身补行为级守护**:放大视图已经在同一 lane 里被真实打开过,于是在那里直接对
`[data-mermaid-modal]`(以及它的按钮)读计算值——断言用**页面里宿主自己的** darwin
规则(不再是探针复制的副本)。实测判别力:npm 0.22.0 上 `Received: "no-drag"`、修复版
`none`。
4. **「交互层不要加 initial」与放大视图的矛盾**:放大视图是**遮罩层例外**——模态语义下
只有其中控件必须保持 `no-drag`;残余代价(背景落在顶部拖拽带上时点背景会变拖窗)已写进
指南,避免后来者按字面判据「修」掉其中一边。
5. **`.selectionPopup` 的负向守卫可被选择器列表绕过**(reviewer 实测:`.selectionPopup,.x
{ initial !important }` 能通过):改成按**声明块**扫描——凡带 `-webkit-app-region:
initial` 的块,其选择器文本都不得出现 `selectionPopup`。
6. **补上 `none` 关键字的坑**:字面量 `none` 计算成 `no-drag`(是扣减值),只有 `initial`
/`unset`/`revert` 才是中性值——CSS 注释、指南与单元用例注释都已写明。
7. **未覆盖层给出结论**:`FileTree` 的 `.uploadDropChatHint` 是 body 直挂的装饰层,但只在
OS 文件拖拽悬停期间存在且 `pointer-events:none`,收益极小而**有意不处理**(写进指南,
不再让「覆盖清单」看起来是绝对集合)。
8. 顺带:`§12.2` 的同步集里 `tests/theme.spec.ts` 只守颜色(本轮无颜色改动),形状守护落在
已解析该样式表的 `tests/panel-host-css.spec.ts` 上——指南那句已按此表述。
验证:typecheck / lint 通过;panel-host-css 4 例通过;本地挂载 lane 7 passed(含新的放大
视图计算值断言);对 npm 0.22.0 的判别力实测:宿主探针红(`host` = `no-drag`)、放大视图
断言红(`modal` = `no-drag`),修复版全绿。
2026-09-28 11:17:03 +08:00
Menghuan1918
233201f7f8
fix(review): 按独立 review 结论修正 PR C 的注释、文档与用例保真度
...
独立 review(对照 606339f / 4099700 静态复核 + 日志逐行核对)提出的问题,逐条修正:
1. **补回被我自己抹掉的源码注释**:上次验证「未修复代码上 4/4 红」时用了
`git checkout 606339f -- src/client/native/index.ts`,随后 `git checkout HEAD --
<同一文件>` 把**尚未提交**的 `disposeSafely` 注释一起还原掉了 —— PR 描述里承诺的
「说明释放失败为何只走 console.error」因此在 diff 里根本不存在。已重新落盘。
2. **事故文档三处事实修正**:同一毫秒的 `already registered` 是 **7 条**(.339 一条 +
.340 六条,合计 burst 9 条),不是 6;验证段的「114 files / 1136 passed」是修复分支
(base 早于 #781)的数字,补上口径并给出合入 main 后的 122/1292;`index.ts:353` 标注
为 v0.22.0 行号(main 上因 #777 顺移)。
3. **撤回一处措辞过头**:「部分回滚分支从未被执行」→ 回收集合虽然进了、但 disposer
列表恒为空(释放动作未执行),改后能真正覆盖。
4. **e2e 门不再可能静默通过**:`test.skip(CLIENT_JS === undefined, …)` 改成硬失败——
这个门的价值就在于 harness 以后不再导出 DSH_HOME 时必须报错而不是变成 skip。
同时把「无 `[data-sidebar-right-unavailable]`」移到文件渲染断言**之后**(前者在空
pane 上恒真,不是真空但也没重量)。
5. **测试替身补齐保真度**:假注册表的 disposer 改为幂等(真宿主的 disposer 是幂等的
——cordis effect 二次释放返回同一个 task),避免「二次 release 又被记一笔」这种与
真实宿主不一致的行为被后续用例当成事实。
6. **AGENTS §2 的 HMR 机制加版本限定**:`mtime/ctime/size` 的 sha1 rev 是**钉住的宿主
0.1.7-rc.1** 的行为;DSH 源码树新版本改成只比 `mtime+size` 并对内容取 sha1,pin 上调
时该触发器必须同步复核(否则会红在替换断言上,而不是静默失效)。
验证:typecheck / lint 通过;pnpm test 122 files / 1292 passed / 9 skipped(重启前机器上有
两个 scratch dsh 服务时的 fs-watch 超时是负载抖动,单独跑 5/5 绿、清空负载后全量绿)。
2026-09-28 11:09:30 +08:00
Menghuan1918
b07c7116c8
fix(desktop): 补齐 mermaid 放大视图的拖拽区退出 + 把 #772 的守卫换成真实级联探针
...
#773 修掉了面板宿主层继承宿主 `body > :not(#root) { no-drag }` 导致的 macOS 拖拽
失效,但只覆盖了 `.mermaidModal` 之外的层——而放大视图是插件**第二个铺满视口的
body 直挂层**(`position:fixed; inset:0`,portal 到 body),打开期间会同样清空整窗
拖拽与 macOS 双击标题栏缩放。
- src/client/sidebar.module.css:`.mermaidModal` 加 `-webkit-app-region: initial
!important`(与面板宿主同一条契约),并在面板宿主那段注释里写明「哪些交互层
绝对不能加 initial」(`.selectionPopup` 是 `<button>`、FloatingWindow /
AnchoredPopover 自带指针拖拽,宿主 `:is(button, …)` 已给它们 no-drag;反过来
声明 `initial !important` 会让按下变成拖窗,重演 #103/#111)。
- tests/panel-host-css.spec.ts:新用例把形状钉在 Linux 的 `pnpm test` 里(宿主层
与面板层必须是 `initial !important`、`> *` 必须是 `no-drag`、`.mermaidModal`
同样退出、`.selectionPopup` 不得出现 `initial`)——没有 macOS runner,丢掉
`!important` 只能靠这里才不会静默复发。
- tests/e2e/mount.e2e.ts:把 #773 的**文本正则**断言换成**真实级联探针**——逐字
注入宿主两条 darwin 规则、翻转 `data-platform=darwin`,读取计算值并断言
`[data-window-drag]` 仍 `drag`、宿主层与面板层为 `none`、`[data-dsh-panel-host]
> *` 为 `no-drag`,随后还原。探针把 `[data-window-drag]` 放在 `#root` 内:直挂
body 的元素会被宿主那条 id 级规则本身命中(这正是问题机制)。
- docs/external-plugin-guide.md §12.1:按仓库规则同步这条皮肤契约(含交互弹层
的反例判据与守卫位置)。
实测(scratch profile + 真实 dsh web + Chromium):
- npm dsh-better-sidebar@0.22 .0:探针红,`host` 计算值 `no-drag`(正是线上症状)
- 本分支打包版:探针绿(`strip=drag` / `host=none` / `layer=none` / `child=no-drag`)
- 本地挂载 lane:7 passed(mount + perf,含新探针)
验证:typecheck / lint 通过;panel-host-css + theme 用例通过;新产物
`app-region:initial!important` 2 处(面板宿主 + mermaid 模态)、`app-region:no-drag` 2 处。
2026-09-28 11:04:52 +08:00