merge #1089: fix(changelog) 恢复被 mermaid 合并截断的发布历史,并加完整性守卫
This commit is contained in:
commit
4f6b763d1e
3 files changed
+1152
-1
No files matched your search
+628
-1
@@ -53,4 +53,631 @@
|
||||
### v0.28.1
|
||||
|
||||
- 🛡 **并发同键冷读合并(OOM 修复)**:全量重启后会话全部转为 detached,12 条 `/sidebar/*` 路由共享的 cwd 解析会对同一会话各做一次宿主冷观察(整份日志读 + 解码;39MB 级会话 × 44 个并发请求 ≈ 1.7GB → OOM)。现在 `cwdOf()` 把**同一会话 + 同一客户端 cwd 提示**的并发请求合并为一次真实读,其余 await 同一结果;不引入 TTL(宿主本身按持久化 revision 缓存已完成冷读),客户端提示参与 key 以免跨提示串味。`tests/smoke.spec.ts` 新增「12 并发 → 1 次冷读」与「不同提示不合并」两例。
|
||||
- 💬 **侧边对话的渲染与上下文**(贡献者 PR [#1044](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1044) @NolanHo、[#1035](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1035) @NolanHo):本地图片与交付卡在转录里就地渲染;模型切换重写 system prompt 后,种子仍按最后一次 summarizing compaction 切尾,不再把压缩前历史整段带进新线程。
|
||||
- 💬 **侧边对话的渲染与上下文**(贡献者 PR [#1044](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1044) @NolanHo、[#1035](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1035) @NolanHo):本地图片与交付卡在转录里就地渲染;模型切换重写 system prompt 后,种子仍按最后一次 summarizing compaction 切尾,不再把压缩前历史整段带进新线程。
|
||||
- **runGit 输出上限加固**(贡献者 PR [#999](https://github.com/omdsh-dev/DSH-better-sidebar/pull/999) @lhh010):字节封顶后的 chunk 一律丢弃(闩锁)、超时/封顶路径统一销毁 stdio 并 SIGKILL 进程树、stderr 纳入同一预算;病态工作区的结果从「宿主 `RangeError` 崩溃」降为「一次 SCM 刷新失败」。
|
||||
- **worktree 会话的根选择与地址基准**([#947](https://github.com/omdsh-dev/DSH-better-sidebar/issues/947) / [#950](https://github.com/omdsh-dev/DSH-better-sidebar/issues/950) / [#952](https://github.com/omdsh-dev/DSH-better-sidebar/issues/952);贡献者 PR [#956](https://github.com/omdsh-dev/DSH-better-sidebar/pull/956) @yanzhaohui1999):同一会话不再有两个基准——聊天链接按会话 header cwd 解析、打开/保存不再二次拼接,linked worktree 里也不再静默读到另一检出的同名文件。
|
||||
- **关闭侧聊页签时归档其会话**([#942](https://github.com/omdsh-dev/DSH-better-sidebar/issues/942);贡献者 PR [#981](https://github.com/omdsh-dev/DSH-better-sidebar/pull/981) @mvanhorn):线程的完整父会话副本不再作为独立会话残留在工作区列表里。
|
||||
- **编辑器刷新后保留阅读位置**(贡献者 PR [#965](https://github.com/omdsh-dev/DSH-better-sidebar/pull/965) @finley08):页签重新落座不再回到文件顶部。
|
||||
- **浮窗右下角缩放手柄不再被 tab 内容压住**(贡献者 PR [#1012](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1012) @yanzhaohui1999)。
|
||||
- **草稿插入与选区引用**(贡献者 PR [#1002](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1002) @yanzhaohui1999、[#1052](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1052) @UNscientific-9):@ 提及 / 引用插入不再把输入框里已有的 chip 展平成纯文本;「添加到对话」改为紧凑引用 chip,正文只在发送时展开。
|
||||
- 🏷 **改名只在标题本来就来自文件名时才跟着改**(贡献者 PR [#929](https://github.com/omdsh-dev/DSH-better-sidebar/pull/929) @yanzhaohui1999;[#915](https://github.com/omdsh-dev/DSH-better-sidebar/issues/915) 后续):页签调解此前**无条件**把标题写成新的基名,于是**作者自设的标题**会被一次改名悄悄替换掉——宿主的 agent-opens 推送就带着模型自己给的名字(`use-host-feeds` → `openFile(scope, path, title)`),消费插件也可以自己标名字。现在只有标题**等于该页签路径的基名**(也就是打开时由文件名派生的那种)才跟着新名字走;目录改名本来就不动后代(后代基名没变),两处口径因此一致。原生承载面的 `SidebarSurface.pathTabs()` 随之交出每个记录的 `title`(`NativePathTab` 新增字段)。
|
||||
- 🧪 测试:`tests/editor-unsaved-guard.spec.tsx` 新增 1 例(同一个文件的两个页签:派生标题跟着走、自设标题原样保留,底部工作台那一路一并断言);`tests/native-surface.spec.ts` 的枚举断言带上 `title`。判别性实测:把判定换回无条件改写 → 该用例红。
|
||||
- 🧷 **改名 / 删除的页签调解覆盖后台会话的底部工作台**(贡献者 PR [#929](https://github.com/omdsh-dev/DSH-better-sidebar/pull/929) @yanzhaohui1999;[#915](https://github.com/omdsh-dev/DSH-better-sidebar/issues/915) 后续):上一批(#912)让调解同时走**原生右侧栏**的记录,但底部工作台那一路仍只读**当前会话**的快照(`pathTabsOf` 吃 `store.getSnapshot()`),而底部工作台是**按会话**存的——后台会话里开着的文件页(`target: 'bottom'` 的打开、或在原生承载面之前持久化下来的布局)既不跟着改名、也不随删除关闭,切回去的下一次保存照样把改名掉的文件 / 删掉的文件重建出来。现在枚举走 `store.getSessionStates()`(**每个已缓存会话**都在内),每行都带上**自己的会话**;写入也不再落到「碰巧在屏」的那个会话上——`updateTab` / `closeTab` 遇到**不在屏的会话**改走定向通道(`store.reduceFor`,与定向 `openTab(seed, scope)` 同一条路:写进那个会话的自己的布局,不发布、不通知),当前会话继续走发布通道、界面照常重渲染。删除仍先问未保存的草稿,且问题问在**内容会话**里(草稿注册表的键是 `sessionId::tabId`)。
|
||||
- 🧪 测试:`tests/editor-unsaved-guard.spec.tsx` 新增 2 例(后台会话的底部页面在改名后跟着走、且当前会话既没被写也没被重新发布;删除时按**它自己的**草稿先问、关在它自己的布局里)。判别性实测:把枚举收回「只看当前会话」→ 2 条红;把定向写入换回发布通道 → 2 条红;把草稿确认的会话换成当前会话 → 删除那条红。
|
||||
- **[#1013] 超过 1000 个分支/远程跟踪引用时仍可访问提交历史**(贡献者 PR [#1018](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1018) @wang-kaopu):界面显示明确标注的提交列表,保留提交选择与详情。列表读取本地分支、远程分支和当前 HEAD;分页通过 Git 引用、HEAD 与 shallow 边界的状态指纹校验,状态变化时要求刷新。引用输出上限为 8 MiB,引用数量上限为 100,000,shallow 元数据上限为 1 MiB。
|
||||
- **导出插件图标子路径**(贡献者 PR [#1020](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1020) @wang-kaopu):增加 `dsh-better-sidebar/icon` 包入口,方便其他包按 `exports` 规则读取 `icon.svg`。
|
||||
- **恢复提交图的 tag 显示**(#983):lightweight 与 annotated tag 装饰对应提交,行内与详情卡使用中性描边 pill,不影响 HEAD 与分支样式。Tag 独立按引用名保留前 5,000 条,并复用 8 MiB 输出上限(超限省略完整行之外的 tag,不让整页失败);不计入 1,000 分支上限。Tag 清单纳入分页指纹,创建、移动或删除 tag 后旧游标要求刷新。
|
||||
- 🐞 **重新载入后保存不再死锁在 `fs-conflict`**([#1059](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1059)):文件内容没变、只有修改时间变了(`touch` / `git checkout` / 格式化工具)时,编辑器的保存基线只在内容变化时刷新,重新载入拿到同样的文本后仍发送旧 `expectedMtimeMs`,宿主持续拒绝保存。现在:① 保存基线也跟随每次重新载入的 `mtimeMs` 更新;②「Reload from disk」发现磁盘文本与载入内容一致时**就地更新基线并保留草稿**,不再经过会丢草稿的脏确认,只有文本确实变化时才走原来的脏保护重载。真正的文件切换仍走原来的模式 / 草稿 / 脏标记重置。`tests/text-editor-save-baseline.spec.tsx` + `tests/editor-conflict-reload.spec.tsx` 守护。
|
||||
- 🐞 **桌面壳兜底入口避开标题栏左侧系统按钮**([#992](https://github.com/omdsh-dev/DSH-better-sidebar/issues/992)):macOS 桌面壳的原生红绿灯不在命中测试栈里,旧走查退到视口左缘(`left=4`)时会把入口压在系统按钮下。现在 darwin(非全屏、标题栏行)把左移下限抬到标题栏保留区 88px;下限之上仍无空位时接受与宿主内容重叠——空白会话没有别的底部工作台 opener,不隐藏唯一入口。web 保持原来的 100 步有界走查。`tests/dock-fallback.spec.tsx` 守护。
|
||||
- ⚡ **页签内容不再因无关重渲染而重读整份文件**(贡献者 PR [#1057](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1057) @UNscientific-9):页签 body 拿到的 `scope` 对象此前每次渲染都新建,而编辑器、差异预览、侧聊都拿它当记忆化/副作用的依赖;只要某个**被比较的字段**变了(在文件树里展开目录走 `expanded`,以及 `revealed`、语言切换、页签注册表更新),差异预览就会重跑全文改写、「内容」页重新读取整份文件并闪一下加载态。现在 `scope` 由 `useSessionScope` 按会话与 cwd 缓存,页签内容、差异页签、以及徽标 / 右侧动作区 / `+` 菜单的注册表接口共用同一份稳定对象(后三者是对外部插件公开的接口,插件对 `scope` 做记忆化不再逐渲染失效)。差异预览「内容」页的刷新改由表头刷新按钮驱动——它此前只靠这种副作用顺带刷新,改稳之后会失去刷新路径。
|
||||
- **Markdown 链接里的 Windows 反斜杠**(贡献者 PR [#1055](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1055) @z11y11w):`[x](C:\ws\_analysis\r.md)` 的 `\_` 被 Markdown 当作转义,路径少一个分隔符(变成 `C:\ws_analysis\r.md`),点击后 `ENOENT`。源代码改写现在把本地 destination 的反斜杠统一成正斜杠(Windows 两种写法都接受),UNC 前缀保持 `\\`,避免被解析成协议相对的 `//host/share`。修复 #1037。
|
||||
- **右栏展开时仍可开关底部工作台**(贡献者 PR [#1053](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1053) @WinterXMQ):会话头的底部工作台开关此前在宿主右侧面板展开时整枚隐藏,导致「先开右栏就再也打不开工作台」,必须先收起右栏。现在照常显示(它在会话头 utilities,与右栏那簇控件分属两列,不会重叠)。空白会话的 fixed 兜底入口保持原行为:那个入口锚在右栏控件左侧,展开时锚点落在面板内部。`tests/bottom-toggle.spec.tsx` 守护。
|
||||
- ⚡ **卡顿扫描与一轮低风险收敛**(前端页面 + 宿主 `/sidebar/*` 请求;逐条取证与误报核实见[扫描记录](docs/plans/2026-10-24-perf-scan.md)):
|
||||
- **文件树在隐藏页签里不再干活**:宿主把访问过的页签 body 常驻挂载,此前每个隐藏的文件树仍会在窗口获得焦点、刷新 tick 或另一个树展开目录时发 `fs.trees` 并重渲染整棵树;现在停靠树在隐藏时不加载(含折叠链预加载:隐藏后才返回的在飞层不会再拉下一节)、不监听焦点刷新,重新可见时由目录 watcher 对整套被 watch 的目录发一次批量 `fs.trees`(此前是每目录一次 POST;隐藏期间恰好没有缓存且展开集身份同时变化时最多两批,超过宿主 64 条路径上限仍按上限拆批)。
|
||||
- **任务图滚轮缩放改为每帧一次提交**:高回报率滚轮/触控板此前每个 wheel 事件都重绘整张图,且每帧只保住一步缩放;现在与平移共用 `frame batcher`,同一帧的缩放量按步夹紧后完整复合、只提交一次(与逐帧应用等价);背景拖拽期间滚轮让位给拖拽,避免两种手势互相覆盖。
|
||||
- **侧聊打字与流式输出不再重扫整段转录**:用户/助手行的本地图片与链接改写按**行对象**缓存(未变化的行在既有 `sidechat-transcript` 里本就是同一对象),输入框每键与每次流式 push 只重算变化的行。
|
||||
- **Git diff 只解析一次 + 默认展开有预算**:变动页此前对同一份 patch 在 header 统计与文件行里各解析一遍(≤8MB 在 UI 线程跑两次),现在共用一份解析;默认展开按「变更行预算 2000」封顶,大 commit 不再一次挂载数千行(首屏仍有内容,其余文件一键展开)。
|
||||
- **提交图历史行只挂载视口窗口**:`data-graph-count` 仍报整页条数,DOM 只保留视口 ± 8 行,上下留白维持真实滚动条与「加载更多」哨兵位置;深历史滚动/追加不再线性增长。
|
||||
- **宿主侧两处常驻成本**:`/sidebar/bundle/*.js` 的 `HEAD` 不再为响应体 `readFile`(ETag 冷路径仍读一次算内容 hash,memo 命中后不读;客户端每次 HEAD 都在 GET 之后,因此实际是热命中);`active-worktree` 在 15s TTL 到期、会话事件游标(`session.seq`)未动**且已解析到 git 顶层**时直接续期,不再重复快照/扫描最多 4000 条事件(实测 miss 9.6–44.7ms,空闲的 5s 轮询每到第三个就踩中);非仓库/探测失败仍按 15s 重探,父目录后来 `git init` 或探测暂时失败都能恢复。
|
||||
- 🧪 测试:`tests/tasks-page.spec.tsx`(同帧 5 次滚轮只提交一次且缩放量等于合计;同帧复合与逐帧应用等价;拖拽期间滚轮被忽略)、`tests/file-tree-dir-watch.spec.tsx`(re-arm 单次批量回调)、`tests/file-tree-batch-load.spec.tsx`(隐藏零请求、回屏恰一次批量、折叠链在隐藏后才返回时不继续预加载且回屏后接续)、`tests/editor-host.spec.tsx`(隐藏树对窗口焦点零提交、回屏一次批量)、`tests/sidechat-markdown-labels.spec.tsx`(输入框连敲两键:未变化行改写 0 次)、`tests/diff-files-collapse.spec.tsx`(默认展开按行预算 + 复用调用方解析)、`tests/git-graph-windowing.spec.ts` + `tests/git-graph-ui.spec.tsx`(窗口/留白/滚动跟随/页替换夹紧;隐藏时不留视口观察者)、`tests/bundle-route.spec.ts`(HEAD 无 body)、`tests/active-worktree.spec.ts`(游标未动不重扫、游标推进重扫、非仓库/失败仍按 TTL 重探、无游标宿主回退旧语义)。每条都在旧代码上先复现失败(见扫描记录 §3 与 §7)。
|
||||
- **任务图展开修复**:平移画布后,聚合卡和 Agent 卡的下一次点击不再被误判为拖动;展开聚合与查看详情恢复正常。
|
||||
- **任务图性能**:卡片内容使用独立 memo 边界,平移与布局补间不再重复渲染内容;布局用索引和显式栈替代逐边查找与深递归,同次宽度适配复用相同列数的布局。2000 个非根 Agent 的纯布局对照及 200/500 Agent 真浏览器证据见[验证记录](docs/plans/2026-10-23-tasks-folding-performance-validation.md),布局加速不外推为整页加速。
|
||||
- **任务页拖拽改为每帧一次更新**:图模式背景平移、后台任务浮窗标题拖动、锚定弹层拖动不再按鼠标事件频率重绘(高回报率鼠标下此前每个 pointermove 都提交整块画布);松手同步落位,点击判定与最终位置不变。实测同一帧内 100 次移动的画布提交由 98 次降到 1 次。
|
||||
- **已结束分支整体聚合**:只有整条分支全部结束才自动聚合;仍有运行后代、当前查看路径或未知子代理目录的分支保持可见,聚合计数覆盖隐藏的 Agent 后代。
|
||||
- **四项独立自动规则**:复用设置齿轮与现有偏好存储,分别控制已结束叶子聚合、已结束分支聚合、同一父级至少 3 个空闲队友聚合(workflow 内沿用原规则,也受空闲开关控制),以及 Agent 总数至少 8 个时后台任务抽屉自动收起,默认全部开启。未手动操作时设置即时生效;手动展开或收起始终优先。
|
||||
|
||||
### v0.28.0
|
||||
|
||||
- **正式版支持线前移到 DSH 0.2.1-rc.1+**:13 条 DSH peer 下限统一为 `^0.2.1-rc.1`,开发依赖、CI 与安装脚本使用精确 RC 基线。不新增运行时兼容层、不改功能实现。
|
||||
- **沿用已发布 alpha 的功能**:上游 alpha.5 → rc.1 完整源码树差异共 355 项,全部为 `package.json`,源码零变化;本次仅同步版本、依赖声明与文档。伴随依赖调整为 Cordis peer `^4.0.5` / dev `4.0.5`、group `1.0.5`、schemastery `~3.18.5`,include 保持 `1.0.10`。
|
||||
- **发布渠道切换至 npm `latest`**:插件 v0.28.0 即将接管 `latest`,现有 workflow 按正式版本号自动选择该标签,无需修改。**宿主 npm `latest` 此时仍是 0.2.0-rc.2,不能安装本版**;该宿主必须固定插件 **v0.26.1**。DSH 0.2.1-alpha.5 用户固定 **v0.28.0-alpha.0**;0.2.0-rc.1、0.1.7 及更早支持线保持原指引。用户已明确接受两个包的 `latest` 不对齐风险。
|
||||
- **RC 验证独立取证**:结果见 [DSH 0.2.1-rc.1 适配记录](docs/plans/2026-10-17-dsh-0.2.1-rc.1-adaptation.md);未完成的检查保持待验证,不沿用下方 alpha 发布时的测试数字。
|
||||
|
||||
### v0.28.0-alpha.0(预发布)
|
||||
|
||||
- **支持线前移到 DSH 0.2.1-alpha.5+**:13 条 DSH peer 使用 `^0.2.1-alpha.5`,开发依赖与 CI / 安装脚本钉精确基线。0.2.0-rc.2 用户请固定 npm 已发布的 **v0.26.1**(v0.27.0 尚未发布);本 alpha 使用 `dsh-better-sidebar@0.28.0-alpha.0`,不是 `latest`。
|
||||
- **宿主 Connection 准入**:HTTP/WS 路由统一调用 `ctx.connection.requestRejection(req)`,不再依赖已删除的 `webRuntime` 或插件自建信任例外。
|
||||
- **移除 runtime invariants 接入**:上游删除 `@deepseek-ai/dsh-invariants` 与 `/invariant` 子路径,本插件同步移除 companion、类型与发布入口;压缩种子测试继续使用公开的 surface fold 和 seed validator。
|
||||
- **当前执行目录接入**:文件 / Git / 终端与新建 sidechat 跟随会话 `working_directory`;live 读 workingDirectory,cold 用 sessionQuery all projections 并释放 lease,linked worktree 保持 base-keyed,新 sidechat seed 尾部盖章当前 cwd。
|
||||
- **宿主伴随 API / 依赖**:补齐 `TerminalBlockLabels.commandLine(line)` 与 21 份词典;同步 Cordis `4.0.5`、schemastery `~3.18.5-alpha.2`、group `1.0.5-alpha.2` 与 include `1.0.10`,不直接钉 loader 或设置 override。alpha.5 优先用 package 的 `engines.dsh` 判断兼容性,本插件不新增该字段,继续用 13 条 DSH peers。
|
||||
- **验证记录**:[发布整合验证](docs/plans/2026-10-17-alpha-release-validation.md) 收录最新 dev 的 221 文件 / 2681 用例单 worker 通过、真实 alpha.5 挂载与 Context 三态联动验证;[初始适配记录](docs/plans/2026-10-16-dsh-0.2.1-alpha.5-adaptation.md) 保留适配阶段证据。
|
||||
- **提交图使用完整可用高度**:移除 `min(60vh, 460px)` 高度限制,更改区下方到固定底栏之间的空间全部分配给图谱;打开差异预览或缩放窗口时自动调整。长历史仍在图谱内部滚动,待提交文件很多时保留原有外层滚动,避免把整个页面撑高。
|
||||
- **dsh-context 可选联动**:Context 侧栏入口可用时,在 Agent 详情、后台任务输出窗和会话标题栏提供诊断入口;后台任务仅查看明确的真实属主,不改变任务输出观察或停止命令的会话语义。跨会话先定位目标再打开 Context,复用其他分栏已有的标签;用户继续导航时取消,等待最多 10 秒。未安装、禁用或仅显示会话标签页时隐藏入口,不修改上下文、不恢复 Agent 执行,也不修改 dsh-context 偏好。全部入口共用 Cordis 作用域内的可选适配器,空闲时不新增轮询。
|
||||
|
||||
### v0.27.0
|
||||
|
||||
- 🌿 **Git 页面重做:VS Code Source Control 结构 + 只读提交图(同一页签)**([#941](https://github.com/omdsh-dev/DSH-better-sidebar/issues/941),贡献者 PR [#944](https://github.com/omdsh-dev/DSH-better-sidebar/pull/944) @hairyf + [#969](https://github.com/omdsh-dev/DSH-better-sidebar/pull/969) @vlln):「文件变动 > Git」的内容区改为 Source Control 结构——可折叠的 Changes(多行 Message + 仅填草稿的 Generate、Merge / Staged / Changes 三组各自独立折叠与计数、整行 hover)与 Graph 区、常驻底栏(可点击分支 + `*`/`+`/`!` 标记、upstream 的 `↓`/`↑` 与安全 Pull-then-Push);Push/Pull 与 worktree·子仓库选择移入 More Actions;提交只消费已暂存项,冲突 / 空消息 / 无暂存时禁止,草稿按会话·仓库·worktree 隔离。Graph 区由 **#969 的有界只读引擎**渲染(专用 `git.graph` 路由:子先于父的拓扑序、分支筛选、游标失效显式返回 `graph-stale`、每页 200 / 偏移 10000 / 分支 1000 / 进程 10 s / 输出 8 MiB 上限,超限报错不静默截断;泳道连线与引用徽章用主题状态色,hover 卡片与提交详情卡;**纯读取**——不 checkout / fetch / 改任何 ref)。底部预览面板改为固定三签 `提交详情 / 内容 / 差异`(有内容才有差异,读操作落在内容签)。**设计取舍与实施偏差见 [docs/plans/2026-10-16-git-page-vscode-scm-merge.md](docs/plans/2026-10-16-git-page-vscode-scm-merge.md)**(贡献者 PR [#939](https://github.com/omdsh-dev/DSH-better-sidebar/pull/939) @hairyf 的官方下划线 Tabs 镜片切换保留;第三个「提交图」镜头刻意未上线)。
|
||||
- 🌿 **页签名「文件变动」→「Git」**(贡献者 PR [#968](https://github.com/omdsh-dev/DSH-better-sidebar/pull/968) @vlln):21 份词典、两份 README 与相关测试同步(页签内部镜头名保持现状)。
|
||||
- 🐞 **变更面板两侧行数不再相加**([#908](https://github.com/omdsh-dev/DSH-better-sidebar/issues/908),贡献者 PR [#909](https://github.com/omdsh-dev/DSH-better-sidebar/pull/909) @UNscientific-9):`MM` 文件的两次读数各自成字段(`staged` / `unstaged`),每个分组只读自己那一侧,Merge 组不印行数——同一行被两次 diff 看见时不再印成 `+2 −2`。
|
||||
- 🐞 **git 命令遇到 `dubious ownership` 不再整页失效**([#690](https://github.com/omdsh-dev/DSH-better-sidebar/issues/690),贡献者 PR [#827](https://github.com/omdsh-dev/DSH-better-sidebar/pull/827) @yanzhaohui1999):守卫按**单条命令**应答——git 自己指名被拒的仓库目录,插件只对那次调用注入 `-c safe.directory=<dir>`(不写配置文件、从不用 `*`,下一条命令重新面对守卫)。
|
||||
- 🐞 **工作区根目录自身是仓库时,子目录里的独立仓库不再被藏起来**(贡献者 PR [#607](https://github.com/omdsh-dev/DSH-better-sidebar/pull/607) @iasiv5):仓库发现改为**有界深度 BFS**(≤3 层、零子 git 进程、跳过隐藏目录 / 符号链接目录 / `node_modules`),root 与各层子仓库同属一个候选集合;发现根按 realpath + Windows 正斜杠归一(同一个检出不会以两种拼法出现两次)。
|
||||
- 🐞 **「本轮文件」三处修正**:按**会话 cwd 解析完整路径**、同一文件的相对与绝对写法归入同一行([#875](https://github.com/omdsh-dev/DSH-better-sidebar/issues/875),PR [#886](https://github.com/omdsh-dev/DSH-better-sidebar/pull/886));**PTC(`<code>` 内)文件调用可见**([#913](https://github.com/omdsh-dev/DSH-better-sidebar/issues/913),PR [#921](https://github.com/omdsh-dev/DSH-better-sidebar/pull/921));操作改为一行一条**按时间倒序平铺**、不再按文件分组(PR [#940](https://github.com/omdsh-dev/DSH-better-sidebar/pull/940) @hairyf)。路径解析与 PTC 支持来自 @wang-kaopu,平铺操作列表来自 @hairyf。
|
||||
- ⚡ **`changes.ops` 空窗不再重复整窗**([#870](https://github.com/omdsh-dev/DSH-better-sidebar/issues/870),贡献者 PR [#885](https://github.com/omdsh-dev/DSH-better-sidebar/pull/885) @wang-kaopu):游标改由客户端显式传递(不传 = 从最早一条起,含 seq 0),primed 之后请求带 `wait` 挂在宿主侧等下一个工具事件(25 s 上限)而不是每 2.5 s 重放同一窗;路由体移入 `src/changes-ops.ts`,并保留 PTC 四种事件类型。
|
||||
- **修复选中行错位与异常边框**:整合提交图时误删了 Git 文件行与本轮操作行共用的选中声明,留下的选择器串到了缩进参考线规则,导致选中文件脱离分组。恢复原有主题背景与行内标记,不改变图谱高度或滚动结构;`tests/theme.spec.ts` 与真实挂载 `tests/e2e/git-layout.e2e.ts` 覆盖选中前后布局、暂存与未暂存同名文件、冲突行和窄侧栏。滚动状态保持测试默认使用独立临时仓库,避免复用旧目录。
|
||||
- **侧边对话从最近一次 summarizing compaction 起种**(贡献者 PR [#964](https://github.com/omdsh-dev/DSH-better-sidebar/pull/964) @NolanHo):新子会话不再全量复制父日志,保留必要的事件结构与成组记录;新增真实宿主校验器回归。
|
||||
- 🧪 测试:新增 `tests/git-scm.spec.tsx` / `git-graph-ui.spec.tsx` / `graph-layout.spec.ts` / `changes-ops-route.spec.ts` / `e2e/git-graph.e2e.ts` / `e2e-aggregate-auth.spec.ts`,改写 `changes-tab.spec.tsx`(底部面板三签、图谱区在 Git 镜头内)、`git.spec.ts`(porcelain v2 状态与发现根归一)、`git-view-worktree.spec.tsx`(图页竞态)、`unbounded-caches.spec.ts`(长轮询契约)等 20 余份既有 spec;删除随内联图退场的 `git-graph.spec.tsx`。
|
||||
|
||||
### v0.26.1
|
||||
|
||||
- ⚡ **稳态开销治理:0.25 引入的常驻轮询、每 tab 成本与 `keepMounted` 的无界复利**(社区反馈「0.24 没问题,之后就会卡」——侧栏在前台开久了卡、多轮对话后 DSH 卡、重装重启又暂时好;分界线经产物级 A/B 落在 v0.25.0,v0.26.0 的 git 轮询修复没触及这些;方法与全部实测数字见 [docs/plans/2026-10-15-perf-steady-state.md](docs/plans/2026-10-15-perf-steady-state.md)):
|
||||
- **两个 500ms 表先治**(v0.25 引入,实测单 tick 0.5→9.7ms、最坏约 3 500 次强制布局读取/秒,且**无论是否可见都在跑**):宿主右侧面板展开态改**全模块一条共享表**(引用计数,隐藏即 `clearInterval`,恢复即补读);空白会话的兜底入口只在它**真的渲染**时建表(此前 interval 注册在 early return 之前,渲染 `null` 也照跑),让位走查 400→100 步(400px),隐藏期间不测量不写 state。同批:`settings-nav-icon` 的 `document.body` 观察者改 **rAF 合帧**并去掉 `characterData`(流式 token 改动文本节点不再逐次触发全文档查询)、`use-center-column` 的 1.5s 兜底表只在「一列都没有」时 armed(此前周期与复核窗口等长,注释声称的 query-free 快路径永不生效)、`session-phase` 隐藏时不请求且值未变不 `setState`(blank 会话不再每秒重渲染)。
|
||||
- **「每 tab」收敛成「每会话」**:`use-session-root` 重写为按会话引用计数的共享 store——一条 5s 表,只在 ≥1 个**可见**订阅者时存在,页面隐藏停表、恢复/聚焦/取消 park 立刻补刷;native tab body 传自己的 `visible`(宿主对 parked body 报 false)。文件树目录 watch 与侧边聊推送同样按可见性门控(parked 不建 socket、不做重列、恢复即重连补刷)。**此前每访问一个页签就永久多一条「每 5s 一次 `git rev-parse` 子进程 + 4 000 条事件回扫」**——`cwdOf()` 被 12 条 `/sidebar/*` 路由共用,实测每次未命中 9.6–44.7ms。
|
||||
- **`keepMounted` 保留语义、加上界**(切走不卸载仍然成立,草稿/滚动/展开态照旧):`git-status.slots` 释放归零即删并按 256 上限淘汰、`ops-stream.streams` LRU 32(保留 `seq` 游标,parked 页签回来仍折到错过的写操作)、`state.bySession` LRU 32 且 `getSessionStates()` 不再每次整份复制(`syncExpanded` 原先每次 store notify 都 O(会话数) 复制)、`previewScrollMemory` 64、`commitDrafts` 32、`pendingAnchors` 写入时按 TTL 清扫。
|
||||
- **宿主侧**:`active-worktree` 加在飞去重(并发 8 次只 spawn 一次)、`ACTIVE_ROOT_TTL_MS` 3s→15s(与客户端 5s 轮询错配导致**每次都未命中**)、三个模块级缓存加 LRU 上界(512/512/256);`git.ts` 的两条 `--numstat` 加 pathspec(未忽略的大目录下从「两条全仓库 diff」变成零条,未跟踪路径不参与)并给 `runGit` 加 **8 MiB 输出上限**与产出侧行数上限;单层 `fs.tree` 补 `ProbeGate`、折叠探测每层封顶 32 且截断层不探测;`sidechat.events` 冷线程加 `(revision, size)` memo;`agent-opens` 每会话队列封顶 64;teardown 主动关闭三个 `noServer` WSS 的**已接受连接**(ws@8 的 `close()` 不会终止在连 socket,句柄会活到浏览器断开)。
|
||||
- 🧪 测试:新增 `tests/steady-state.spec.tsx`(跨模块门禁:非 blank 会话只允许**一条** 500ms 表且**不得**有 5s 表、页面隐藏时零表、兜底入口在场但渲染 `null` 时命中测试必须为 0、`session.cwd` 请求必须为 0;末节是**客户端 `setInterval(` 站点清单**——新增未登记的周期任务即红,登记了门控词却删掉门控也红)、`tests/right-panel-open.spec.tsx`、`tests/session-phase.spec.tsx`、`tests/session-root-poll.spec.tsx`、`tests/unbounded-caches.spec.ts`;扩展 `dock-fallback` / `settings-nav-icon` / `center-column-locator` / `file-tree-dir-watch` / `use-sidechat-push` / `state` / `active-worktree` / `git-worktree` / `fs-tree-probe-gate` / `sidechat-routes` / `smoke` / `agent-opens` / `git-status-poll` / `subagent-live-polling` / `subagent-jobs-view` 共 15 份既有 spec;判别性由逐条「临时回退 → 对应用例变红 → 还原」实测。`tests/e2e/perf.e2e.ts` 新增 `steady-state` 指标与两条硬断言(兜底入口不渲染即不得命中测试;`session.cwd` 必须按会话而非按访问过的页签计数)。
|
||||
- **明确未做**:关闭 `keepMounted`(用户选定保留语义 + 加上界)、文件树/侧聊列表虚拟化、CSS `:has` 回潮、任何宿主侧改动、给 perf lane 加耗时阈值门禁。**无公开接入 API 变化**(`ctx.betterSidebar` / TabDescriptor / FileViewerDescriptor / localStorage 格式均未动)。
|
||||
|
||||
### v0.26.0
|
||||
|
||||
- ⚡ **git 状态轮询不再拖慢界面**([#212](https://github.com/omdsh-dev/DSH-better-sidebar/issues/212) 后续;设计与实测见 [docs/plans/2026-10-13-git-poll-ladder-and-idle-notify.md](docs/plans/2026-10-13-git-poll-ladder-and-idle-notify.md)):一次抓取是 `git status --untracked-files=all` 加两条全仓库 `--numstat`(4 个进程),在**未忽略的大目录**(嵌套 `node_modules`、pnpm store,就是「根锚定 `/node_modules` 盖不住子目录」那种仓库)上实测 **59,631 条 / 9.24 MB / 0.131 s**,而截断上限是在整份输出产出并解析成五万多个对象**之后**才生效的。三处一起收:
|
||||
- **编辑器 gutter 不再持有轮询**——它此前把**功能开关**当成了页签可见性传进共享 store,而那个参数正是启动定时器的开关;加上原生页签 `keepMounted`(切走不卸载),**只要打开过任何一个文件,整页生命周期就每 2.5 s 跑一次那个扫描**,哪怕你正在打字。现在它只读共享答案、只在**换文件或保存**时各重读一次;页签不可见时连订阅都不建立。
|
||||
- **节奏降到 30 s 起,并按实测自动退档**——往返超 750 ms / 2 s / 5 s 依次退到 60 s / 180 s / **停止自动轮询**(快响应自动回落;暂存、提交、丢弃、保存、手动刷新这类事件驱动的刷新永远即时,也是恢复通道)。文件列表与染色条目的语义零变化,只是后台不再常驻 git 进程。
|
||||
- **空闲轮询不再触发重渲染**——store 的 `notify()` 原先每 tick 无条件自增 `version`,而它就是 `useSyncExternalStore` 的 snapshot,于是**每个消费者每 2.5 s 整体重渲染一次**(文件树那一列逐行重算 git 状态也在其中),即便数据一字未变;现在只有真的变了才通知。
|
||||
- **linked-checkout 清单的计数改单命令**——变动页的 worktree 选择器每 30 s 为**每个** checkout 跑一次完整 `status()` 只为读条目数,现改为一条轻量 `status --untracked-files=normal`。**一处刻意的语义变化**:未跟踪**目录**计 1(此前展开计入每个文件,而且数字还被 2000 上限悄悄截断)。文件树与变动页的逐文件行不受影响。
|
||||
- 🧪 测试:新增 `tests/git-status-poll.spec.tsx`(7 例:非轮询消费者不得启动定时器、非轮询先到不阻塞后来的轮询者而轮询者离开即停表、空闲同结果不通知、30 s 基线、慢往返退档与快响应回落、极慢往返停止自动轮询且事件刷新可恢复、不可见不订阅);`tests/editor-git-gutter.spec.tsx` +3(在屏编辑器推进 120 s 仍只读一次、不可见完全不订阅、换文件与保存各只重读一次而纯重渲染不重读);`tests/git-worktree.spec.ts` +1(未跟踪目录计 1,完整 `status()` 仍展开)。判别性:分别回退空闲守卫、`poll` 归属与 gutter 的 `poll: false`,对应用例当场红(已逐条实测)。同批还把 `.delta/` 加进 `vitest.config.ts` 的 `exclude` 与 `eslint.config.js` 的 `ignores`——那是 DSH worktree 通道留下的陈旧检出,`.git/info/exclude` 忽略它,但这两个工具只读各自的配置,不排除时本地 `pnpm test` 会报 6 文件 / 7 用例**假红**、`pnpm lint` 报 1115 errors(`eslint` 的「点开头目录默认也不进」那句注释同时订正)。
|
||||
|
||||
- ⚡ **文件树两处性能放大收敛:折叠链预加载 + 宿主逐子目录探测**(逐条核查结论与「按用户决定不做」的清单见 [docs/plans/2026-10-13-file-tree-perf-fold-preload-and-probe-budget.md](docs/plans/2026-10-13-file-tree-perf-fold-preload-and-probe-budget.md)):① **折叠链的预加载与渲染现在共用同一个 32 链上限**——`compactLoadTargets` 此前扫描**所有已加载层**,而渲染侧 `compactChain` 在 `MAX_COMPACT_DEPTH` 就停手,于是渲染收在 32 节、预加载仍继续请求第 33、34… 节(每节一次串行 `fs.trees` POST 加一次全树 render,标签却不会再变长);现改为从渲染根(`cwd` + 展开集)沿**同一条** `compactChain` 下行,上限自然继承。顺带订正了「安全上限,健康缓存下永不触及」这处不准确注释:合法的深单子目录链(`src/main/java/com/...` 这类)真会触及,循环守卫是 `compactChain` 的 `visited` 而不是这个常量。② **`fs.trees` 整批共享一个探测预算**——新增 `PROBE_BUDGET` / `ProbeGate` / `createProbeGate`,`listDirectory` 增加可选 `gate` 参数(只在真实文件系统探测外层取槽,**缓存命中的层一次都不花**),路由每请求建一个 gate 并传给它的所有层:此前一个批次最多 64 条路径 × 每层 32 路探测可**同开约 2048 个 `opendir`**,冷挂载一棵宽目录树就是一次 syscall 风暴。单层与 `fs.tree` 单路径行为逐字不变(gate 缺省即原并发)。**明确未做**:文件树**不引入虚拟化**(memo 边界 + 每层 1000 行上限 + `truncated` 提示已够,用户判断当前性能无问题)、**watch 上限不加用户提示也不加全局句柄**(无法 watch 的机器本就存在,VS Code 同样不提示)、不改 `DirRow` 的 chain identity。
|
||||
- 🧪 测试:新增 `tests/fs-tree-probe-gate.spec.ts`(gate 在飞上界、排队任务抛错后释放且保持 FIFO、`limit<1` 夹紧;`listDirectory` 每个目录探测恰花一个槽位、缓存命中零开销;三层共享一个 gate 合计 9 次);`tests/file-tree-compact.spec.ts` 与 `tests/file-tree-compact-fold.spec.tsx` 新增「到渲染上限即停」(把实现回退到旧扫描,两条当场红:预加载会一路问到链尾);`tests/smoke.spec.ts` 新增路由级断言「一次 `fs.trees` 只建一个 gate」(`vi.mock` 包一层计数,其余导出保持真实)。
|
||||
|
||||
- 🐞 **文件树的「加载中」占位不再把子树永久卡死**:`loadLevels` 对非强制加载会先写一个空 `{}` 占位(渲染即 Loading 行),而应答被世代守卫**丢弃**时(刷新 tick / 排除列表变化 / 卸载都会 bump 世代)那个占位没人回收——之后任何加载都把「缓存里有条目」当成已加载(空占位也算命中,注释里写明是为了避免重复请求),于是这一层再也不会被重新请求,**子树停在 Loading 行直到下一次强制刷新或重挂**。现在占位的**所有权跟着请求走**(`pendingRef`:path → 写下它的世代):应答被丢弃时只回收**本次调用仍持有、且仍是空占位**的层(已有列表或错误的一律不动——丢弃的应答不得清空屏上的行),并**补发一次**该批请求,让丢弃自愈而不是等下一个 tick。
|
||||
- 🧪 测试:`tests/editor-host.spec.tsx` 新增「a listing dropped by a refresh tick does not strand the level on Loading…」(首答延迟 300 ms、tick 在飞行中使其失效、tick 触发的强制重列人为挂死);去掉本修复该用例当场红并打印现场。
|
||||
|
||||
- 🖥️ **底部工作台可以同时开多个终端 Tab([#927](https://github.com/omdsh-dev/DSH-better-sidebar/issues/927),PR [#926](https://github.com/omdsh-dev/DSH-better-sidebar/pull/926))**:`terminal-bottom` 去掉 `single: true` 改为提供 `createTab`——每开一个 mint 一个 `terminal-bottom:<uuid>` 的 id,并在 `meta.terminalInstance` 里记下自己的实例;宿主侧的出现键与内容身份都带上它(`dsh-better-sidebar:terminal-bottom:<instance>[#run]`),于是两个 tab **各自一个 shell**、刷新后各回各的进程,关掉一个只结束它自己那条。**旧 tab(`meta` 里没有 `terminalInstance`)读出来仍是 `undefined`,身份与改造前逐字节相同**,恢复绑定不丢。**维护者收尾**:`nextTerminalMeta()` 必须把实例一起带过去——`patchTab` 是**整份替换 `meta`**,只回 `terminalRun` 会让「新建终端」之后的 tab 掉回旧命名空间,于是两个都换过进程的 tab 撞在同一个 `…terminal-bottom#1` 上、被宿主(按 `(sessionId, key)` 记忆一个 model)发成**同一个 shell**。设计文档 `docs/plans/2026-10-05-bottom-terminal-tab.md` 的「一个终端」限制随之标注放开。
|
||||
- 🧪 测试:`tests/terminal-tab.spec.tsx` +3(实例随「新建终端」保留、旧 tab 不长出实例;两个实例各自 `#1` 不撞、且都不等于旧的裸 `#1`;两个实例渲染出两个宿主终端与两条不同的 `(session,key,contentId)`),描述符关闭钩子补一条「带实例的 tab 只结束自己的终端」。判别性:把 `nextTerminalMeta` 退回只回 `terminalRun`,前两条当场红。(贡献者 PR [#926](https://github.com/omdsh-dev/DSH-better-sidebar/pull/926) @eleven-lings)
|
||||
|
||||
- 💬 **侧边对话补齐到接近原生:实时推送 + 排队可见 + per-thread 模型选择 + 底栏重构**(PR [#925](https://github.com/omdsh-dev/DSH-better-sidebar/pull/925);设计、真机证据与「哪些做不到」的清单见 [docs/plans/2026-10-12-sidechat-native-surface.md](docs/plans/2026-10-12-sidechat-native-surface.md)):
|
||||
- **实时推送**:新增 `/sidebar/ws/sidechat`(`src/sidechat-push.ts`,客户端 `src/client/use-sidechat-push.ts`)。宿主把 `session/event`(60 ms 去抖)与 `agent/assistant-stream`(250 ms 去抖)压成**纯失效帧** `{threadId}`——不带事件体、客户端收到才带 `afterSeq` 增量重拉,协议面最小、单一事实源、断线自愈;每 socket 最多观察 64 个线程,空闲时**零帧**,重连指数退避 1→15 s,轮询降级为 15 s 兜底。
|
||||
- **排队可见**:`sidechat.events` 增返 `pending`(`agent.inbox.nextStep/nextTurn` 投影,按 claim 顺序),队列在底栏可见;`sidechat.dequeue` 可按 id 撤一条、不带 id 清空整队。注入门控同时看 `boundaryDelivered` 与 `boundaryPending`——否则「首问还没被 claim 就连发第二条」会注入第二对 boundary + question。
|
||||
- **per-thread 模型选择**:宿主对 `origin:'subagent'` 会话**显式禁用**自带选择器(`modelDirectories.assertAvailable`),`sessionController.selectModel` 也被 subagent fence 挡住,所以插件自建两条路由——`sidechat.models`(直通 `sessionController.modelCatalog()`,缺服务即 `available:false`,此时 UI 只提供「继承主对话」)与 `sidechat.model`(`ctx.get('llm').resolveCallConfig` 归一化后**同时**落 `session.append('model/selection')` 与 `installModelSelection(agent.ctx, ref)`,否则控制器缓存的 per-agent selection 永不回读投影;resume 后按日志里的有效选择重装)。
|
||||
- **幽灵输入改为精确清扫**:冷恢复(`sidechat.prompt` → `agents.resume`)此前没有 create 路径那道 `inbox.clear()` 围栏。现在改为 `dropInheritedGhosts`——只折**继承前缀**得到幽灵 id 集合,再逐个 `agent.inbox.remove(id)`,精确且幂等,不会误杀「用户在线程里排队、宿主重启后尚未领取」的合法输入。同时确认幽灵的来源比原先记录的更宽:父会话 mid-turn 且工具有未返回调用时,种子被截断在 `turn/start` **之前**,而 inbox 的领取 splice 发生在 `turn/start` **之后**,所以父会话本轮开头已领取的输入在种子折叠里仍是 pending。
|
||||
- 🧪 测试:新增 `tests/sidechat-push.spec.ts`、`tests/use-sidechat-push.spec.ts`、`tests/sidechat-transcript.spec.ts`;`tests/sidechat-core.spec.ts` / `tests/sidechat-routes.spec.ts` / `tests/sidechat-view.spec.tsx` 大幅增补(含真实 `Session.create` + 真实 `SessionProjectionRegistry` 的种子验证);挂载 lane 的 sidechat 宿主路由烟测同步。
|
||||
|
||||
|
||||
- 🛡 **三处静默数据问题**([#898](https://github.com/omdsh-dev/DSH-better-sidebar/issues/898) / [#899](https://github.com/omdsh-dev/DSH-better-sidebar/issues/899) / [#900](https://github.com/omdsh-dev/DSH-better-sidebar/issues/900)):① 编辑器草稿守卫的记账键从**裸 tab id** 改成 **`会话::tab id`**——原生右栏每个会话的 id 都从 `tab1` 重新计数、底部工作台对同一路径在各会话复用 `editor:<path>`,两套身份原先挤在同一个键上,**另一个会话打开编辑器就会把本会话的草稿记录一并删掉**(刷新时静默丢失);② 面包屑折叠行(`a/b/c` 压成一行)的重命名此前提交的是**链头**目录、与预填名不一致——不改字直接回车等于把父目录改名,现在落到链尾;③ 无 BOM 的 16 位小端数据(低幅采样表 / 未压缩音频数据段这类)不再被判成 UTF-16 文本打开、保存后整份改写(奇数长度还会丢尾字节):新的文本闸门要求 ≥90% 的单元是合法文本单元。同批还带了 dev 新增代码的一轮去重(内部导出 `runGitRaw` / `bottomTerminalKey` / `formatModelRoute` / `dirtyCountForSession` 收敛,仓内调用点同批改完)。(贡献者 PR [#901](https://github.com/omdsh-dev/DSH-better-sidebar/pull/901) @UNscientific-9)
|
||||
- 🧪 测试:`tests/editor-unsaved-guard.spec.tsx`(跨会话草稿:第二个会话挂同一个原生 id,既不能清掉、也不能确认掉第一个会话的草稿)、`tests/file-tree-compact-fold.spec.tsx`(折叠行重命名断言落到链尾:`/tmp/a/b/c` → `renamed`)、`tests/text-encoding.spec.ts`(uint16LE 采样表 / WAV `data` 段 / 奇数长度判二进制,真 UTF-16LE/BE 仍是文本)。
|
||||
|
||||
- 🧷 **文件的重命名 / 删除现在作用于两个承载面的页签([#915](https://github.com/omdsh-dev/DSH-better-sidebar/issues/915))**:改名 / 删除后的页签调解此前**只遍历插件自己的底部工作台**(`pathTabsOf` 走 `state.bottomSplits`),而当前架构下文件**默认开在 DSH 原生右侧栏**——原生承载面一挂上,`service.openTab` 就直接走 native、**从不写 store**,那些页签因此从不参与调解。后果是数据面的:把开在右侧栏的文件改名,页签仍绑着旧路径,**下一次保存用 `mkdir -p` 把改名掉的文件重建出来**(磁盘上新旧两份、新名字那份是旧内容,界面还报「已保存」);删掉文件,页签仍在、保存把它复活,而且**连「有未保存改动,确定关吗」都不弹**。现在两个页签空间一起遍历:原生一侧由 `src/client/native/tab-adapter.tsx` 的 `NativeTabRecords.pathTabs()` 按路径枚举(原生 id **每会话各自计数**、多会话同号并存,所以每条都带上**自己的 seat 会话**与内容会话的 `cwd`),经 `SidebarSurface.pathTabs?()` 由承载面交回 service——与 `tabTypeOf?` 同一条缝,插件不再另持一份承载面句柄。策略同时补齐三处:**目录改名按子树搬移**(此前只做精确匹配,改了目录名之后 `dir/a.ts` 整条漏掉,而删除那条早就是子树口径,两条现在统一走 `isWithinWorkspace` + `relativeTo`)、**改名不再重载文档**(`path` 变化原本会触发编辑器重载,而改名并没有改字节——重载等于白丢只活在编辑器实例里的草稿;现在这次移动经 `markRetargetedPath` / `consumeRetargetedPath` 交给编辑器**认领**,文档与草稿都留着、下一次保存直接落到新名字,没有这个标记的 `path` 变化(真实切换文件)照旧加载;认领检查排在清空工具栏状态**之前**,否则会把「有未保存改动」的标记以及关闭前的确认一起清掉)、**删除照旧先走草稿确认**,拒绝即保留,关闭时带上该页签自己的会话。另有一处 **导航门控**:原生承载面每次渲染都会**重投同一次导航**,原来无条件按地址改 `path`,于是插件侧的改址会被下一次渲染当渲染垃圾丢掉——现在 `path` 与 `meta` 同闸门,**只被「尚未采纳的导航修订」覆盖**,真实导航(新修订)仍按地址改回。**聊天链接打开的页签也覆盖**:走地址的页签在工作区内是**相对拼写**(`src/a.ts`),而文件树给的是**绝对路径**,按原样比较会被整条判成「无关」——比较统一在按会话 `cwd` **解析后的绝对拼写**上进行,写回记录时写的是调用方给的新名(绝对拼写,即文件树那一侧的拼写),而改名标记里另存该页签自己的旧拼写、由它自己认领(`movedPath` 的相等判断交给 `relativeTo` 的 `.`,原先的字符串相等在 `E:/a` 与 `E:\a` 混拼时会漏出一个 `新名/.`)。**改名后的关闭确认按内容会话记账**:草稿注册表的键是 `sessionId::tabId`,而原生页签的座位会话与内容会话可达地不同(编辑器由文件地址解析出的 scope 驱动),所以调解把**内容会话**(`scopeSessionId`)而不是座位 id 传给 `confirmDiscardDraft`——传座位时只要两者不同就会查不到草稿、静默放行、把未保存改动丢掉(这正是 #901 修的那一类)。净效果:改动的 5 个源文件是 `src/client/tree-mutations.ts`(新增 `pathTabKey` / `consumeRetargetedPath` / `clearRetargetedPath`)、`src/client/EditorHost.tsx`(认领这次移动)、`src/client/native/tab-adapter.tsx`(`pathTabs()` 枚举 + 导航门控)、`src/client/service.ts`(`NativePathTab` / `SidebarSurface.pathTabs?()`,以及**只在内部使用的 `BetterSidebarService.nativePathTabs()`**——原生枚举**没有**当成消费 API 宣传:它带 `@internal`,而 `SidebarSurface` 的成员本就不在接入指南的公开方法表里)、`src/client/native/surface.ts`(把枚举转交给 service)。(贡献者 PR [#912](https://github.com/omdsh-dev/DSH-better-sidebar/pull/912) @UNscientific-9)
|
||||
- 🧪 测试:`tests/editor-unsaved-guard.spec.tsx` 新增 `tree rename/delete reconciliation` 一组 7 例(真实 service + 真实原生承载面 + 记录仪控制器:文件改名改址 / **聊天链接的相对拼写**也改址 / **两个 seat 同号 id 的改名标记互不干扰** / **改名不重读文件且草稿仍在**(断言 `fsRead` 调用数不变 + 脏标记仍在)/ **目录改名按子树改道两个空间** / 删除文件时脏页签**先问** / 目录删除连子树一起关);`tests/native-surface.spec.ts` 新增 `native records: path enumeration and the navigation gate` 一组 2 例(枚举只含带路径的记录并跨会话 / **插件侧改址扛得住同一导航修订的重投**,新修订仍按地址改回)。(不再包含已废弃的 `tests/tree-mutations.spec.ts`——那是被取代的 PR #917 的新增面,#912 把用例并进了上面两个既有文件。)
|
||||
|
||||
- 🔁 **引用行号的四处收尾([#826](https://github.com/omdsh-dev/DSH-better-sidebar/issues/826) 后续)**:上一批把行号接进了编辑器,真机手测与代码审计在这条路上又抓到四类问题,一并收掉。
|
||||
- **跳转后回不到预览**:`line` 的「已消费」记忆原本在 **viewer 组件实例**里,而 `EditorHost` 每次 reload 都用 loading 行把 viewer 整个重建——重建出的实例 `mode` 回到 `preview`、记忆为空,于是同一条行号再次强制切编辑;**而「预览」按钮本身就会 reload**(#167 part B 的编辑→预览重载),所以读者点下去必然被切回去,页头刷新 / #855 自动刷新 / 预览态保存后的刷新同理。记忆改由**宿主**持有(它比 viewer 活得久):viewer 落地后回调 `onLineConsumed()`,`EditorHost` 记住已消费的 `${path}#${line}` 并停止再下发(换文件清空、换行号自然重置)。公开面纯增量:`FileViewerProps.onLineConsumed?: () => void`。
|
||||
- **插件自绘的预览里点 `#L131` 根本不跳行**:`MarkdownDelegate.openFile(path, { line })` 收到的行号只被当成「这是行号不是标题锚点」的判据,随后在 `use-markdown-surface` → `openSidebarFile` → `openTab` 三跳里被丢掉(种子没有 `line` 字段、原生分支的 `surface.openResource` 也没传,而末跳 `src/client/native/surface.ts` 本来就支持)。现在补齐三跳,并新增 `lineOfHostFragment` 兜住只有 destination 的调用方(区间取起始行);四处插件自绘 markdown(编辑器预览 / 侧边对话转录 / 文件变动阅读窗 / 任务窗口)从此与聊天正文行为一致:**跳到那一行 + 离开预览**。
|
||||
- **换文件会继承上一个文件的行号**:`updateTab` 的补丁只有 title/path/meta,合并模式在页头换文件、以及文件树里重命名打开的文件,都把上一个文件的行号留在记录里——新文件跳到旧行号,markdown 还被拉进编辑态(与 reload 那条同症状,触发点不同)。规则统一成「**改 path 就是一次新的打开**」,两个记录层(`patchTab` 与原生 `records.update`)都清掉瞬态行号;只改 title / meta 的补丁不动它。
|
||||
- **落地没有光标,还会被预览的阅读位置覆盖**:落地只 `dispatch({ selection })`,而 CodeMirror **只在获焦的编辑器里画光标**、零长度选择本身什么都不画——文件短时一页装得下又没有光标,读者无从判断落在哪。且「进入编辑态按预览滚动位置恢复」那条副作用**声明在落地之后**,同一次提交里会把选择与滚动重新写回读者刚才预览的位置:先在预览里滚动、再点带行号的引用,跳转被静默抹掉。现在行号引用这条路上 `view.focus()`(普通打开不动读者焦点,他可能正从聊天输入框点链接),并在落地前清空 `previewSyncRef`。
|
||||
- 🧪 测试:新增 `tests/editor-line-nav-mode.spec.tsx`(4 例,**真 `TextEditor` 过真 `EditorHost`**:落地后能切回预览 / 页头刷新不回弹 / 同文件新行号仍落地 / 换文件不继承行号),`tests/text-editor-line-jump.spec.tsx` +6(落地获焦 / 普通打开不抢焦点 / markdown 翻转后仍获焦 / 消费契约两例 / 预览位置覆盖),`tests/markdown-surface.spec.tsx` +2(真实宿主 `MarkdownText` 下点 `#L42` 与 `#L20-L25` 进记录、标题锚点仍只走 parked 片段),`tests/native-tab-line.spec.ts` +2(换 path 清行号 / 只改 title 保留),`tests/markdown-navigation.spec.ts` +1(`lineOfHostFragment`),`tests/file-open-claim.spec.ts` +1(种子透传与「不传就不带这个键」)。判别性:去掉 `previewSyncRef` 清空 → 预览覆盖用例红(期望第 3 行的 offset 8、实得按比例算出的 14);去掉两个记录层的清行号 → 对应两条红。(回归报告 [#914](https://github.com/omdsh-dev/DSH-better-sidebar/issues/914);贡献者 PR [#916](https://github.com/omdsh-dev/DSH-better-sidebar/pull/916) @yanzhaohui1999)
|
||||
|
||||
- 💾 **带基线保存时目标已不存在判冲突([#911](https://github.com/omdsh-dev/DSH-better-sidebar/pull/911))**:文件读进来之后被删掉或改名走,此前会当成「没有基线可比」直接写回,`mkdir -p` 于是把用户刚删掉的文件(连同父目录)**无提示重建出来**,界面还报「已保存」。数字基线只可能来自一次成功的读取,所以「读不到」是冲突而不是新建意图——现在同样回 409 `fs-conflict`,文案分成「已不存在」与「已在磁盘上被改过」两种;新建走 `fs.createFile`、上传走上传路径,都不受影响。(贡献者 PR [#911](https://github.com/omdsh-dev/DSH-better-sidebar/pull/911) @UNscientific-9)
|
||||
- 🧪 测试:`tests/fs-write-route.spec.ts` +2(删文件后保存 → 409 且文件不复活、无临时残留;父目录被删 → 409 且目录不重建)。
|
||||
|
||||
- 🧭 **改动块内以 `---` / `+++` 开头的正文不再被当成文件头([#910](https://github.com/omdsh-dev/DSH-better-sidebar/pull/910))**:删掉一行以 `-- ` 开头的源码(SQL / Lua / Haskell 注释、文档里的命令行参数行)在 git diff 里就是 `--- …`,与文件头分隔行**逐字节同形**——解析器据此把该文件**从这一行往后的改动整段丢掉**,而且不报错。现在两条头部分支只在**尚未进入 hunk** 时生效,并补了「真文件头跟在 hunk 之后仍能解析」的反证用例。(贡献者 PR [#910](https://github.com/omdsh-dev/DSH-better-sidebar/pull/910) @UNscientific-9)
|
||||
- 🧪 测试:`tests/diff-rows.spec.ts` 3 例(删除的 `-- foo` 留在 hunk 内、新增的 `++ i;` 不改文件名、真文件头仍能开场)。
|
||||
|
||||
- 📜 **超大文件的预览改成 VS Code 那种追加式滚动**:第一版做的是「上一页/下一页」的显式翻页(新页替换当前页),现在改为**滚到底自动取下一页并拼接**——读者读过的内容不会被抽走,行号跨页连续,「加载全部」就是一路追加到 EOF(必须串行:每一页的 `offset` 就是上一页响应的 `nextOffset`)。超限提示条最右侧新增「加载全部」按钮,加载中显示已读字节进度,到 EOF 后自动置灰。
|
||||
|
||||
配套的**行数上限**(`MAX_PREVIEW_ROWS = 50_000`)是这里唯一 VS Code 不需要、而本插件必须有的东西:它的 `TextModel` 与视图都做了虚拟化,所以模型里塞进一个 GB、DOM 仍然很小;本插件渲染的是真实元素。到顶后停止追加并明确提示改用下载——看得见的天花板胜过卡死的标签页,且这个数远高于任何人在侧栏里真会读的日志(6 MB 参考日志约 3.5 万条记录)。上限由读取 hook 持有而不是视图按**已渲染**行数判断:`loadAll` 在 `await` 循环里推进时 React 尚未重渲染,读渲染态的数字会滞后好几页把上限冲过去(新 spec 直接抓到:worker 十秒内 OOM)。
|
||||
|
||||
|
||||
> 📦 **上传、下载、HTML 预览与打包全部改为流式传输,不再有大小限制。** 三个部署限额键 `readLimit` / `mediaLimit` / `uploadLimit` 随之删除(旧 profile 里残留的值会被当作未知键静默忽略,无需迁移);`listLimit` 保留。
|
||||
|
||||
- ⚡ **下载不再有 20 MB 上限,宿主内存不再随文件增长**:`/sidebar/file` 与 `/sidebar/html` 从「整份 `readFile` → `res.end(buffer)`」改为 `createReadStream` + `pipeline`。关键在**写响应头的时机**——先等流的 `open` 事件再 `writeHead`,所以文件读不到(ENOENT/EACCES/目录)仍然回插件的 JSON 错误信封,而不是一个 200 加空体;提交之后再失败(文件被换掉、客户端断开)就 `destroy()` 掉连接,并给 `writeJson` 加了 `headersSent` 早退守卫,避免路由的 catch 块在已提交的响应上抛 `ERR_HTTP_HEADERS_SENT` 把「下载被截断」升级成「请求崩溃」。判别性用例见 `tests/file-stream-route.spec.ts`(21 MiB 真 `node:http` 下发、中途断开存活、不可读路径仍是 4xx 信封)。
|
||||
|
||||
- ⚡ **上传的两道 128 MB 闸门删除**:上传本就已经端到端流式(`for await (chunk of req)` → 临时文件 → 原子 rename),挡路的只是客户端的 `MAX_UPLOAD_BYTES` 预检与宿主的逐块 `limit` 检查,两者一并去掉;流式核心、失败清理、不留残file的保证一字未改。
|
||||
|
||||
- ⚡ **打包改由系统命令完成,不再自己写 ZIP**:删除手写的 300 行 ZIP writer(`src/zip.ts`,连同 `ZIP_MAX_BYTES` / `ZIP_MAX_ENTRIES` 两道上限),改为探测并调用系统的 `zip`(恒带 `-y`,否则会**跟随**符号链接、一个 `a -> .` 的自指环会一直递归)或 `tar`(Windows 10 1803+ 自带 `bsdtar` 而没有 `zip`)。压缩包的 stdout 直接写进 OS 临时目录,**从不整包进内存**,下载时流式下发、流结束后删除。`archive.status` 的 `done/total` 逐条目进度随之消失(子进程不报),状态收缩为 `{ state, bytes }`;工具都不存在时 `archive.build` 立刻回新的 wire 错误码 **`unavailable`**,界面显示一句可操作的提示。客户端的下载也从 `fetch → blob` 改回普通 `<a download>` 直链——Blob 会把整包放进标签页内存,正好抵消宿主侧的改造。
|
||||
|
||||
- ⚡ **编辑器保存拆掉 1 MiB 的墙**:`fs.write` 原走 JSON,而 `/sidebar/api` 的请求体上限是 1 MiB,所以「能打开的文件存不回去」。保存改为 `POST /sidebar/write` 的 raw 路由(**文档即请求体**),编码与行尾还原逻辑(#523 / #871 的两条保证)原样保留并由 `tests/fs-write-route.spec.ts` 继续钉住,另加一条「远超旧上限的一次保存」。
|
||||
|
||||
- 🧾 **超大文件从「截断成只读」改为「只读分页预览」**:`fs.read` 从「全读或截断」变成三态(`text` / `binary` / **`too-large`**)。超过编辑上限(5 MiB)的文本文件不再回半份文档,而是只带 4 KiB 嗅探头的 `too-large`,客户端据此渲染**分页只读预览**(等宽行列表,日志查看器形态)并提供下载出口;超过该大小的**二进制**走原来的 media 路径,行为完全不变。`FileViewerProps.truncated` 与 `truncation` 文案键一并删除——「拿到半份文档但看起来能编辑」这个状态本身就是 #732 的成因。新 `fs.readPage` 按字节窗口分页,窗口回退到最后一个换行,所以一页是整数行;超长单行原样返回而不是空页(否则「下一页」会停在一个永不前进的偏移上)。
|
||||
|
||||
- 🔧 **`.jsonl` 预览不再谎报「文件过大」**:预览态的 JSONL(小于编辑上限)走的是同一套分页记录视图,但顶部那段「文件过大,仅提供分页预览」对它是一句谎话——**阈值决定提示,不是组件决定**。`LargeFileView` 现在自己按 `MAX_EDITABLE_BYTES` 判断,一个 2 KB 的记录文件不再顶着超限提示条。
|
||||
|
||||
- 🆕 **`.jsonl` / `.ndjson` 有原生支持了**:此前它们既没有语法高亮(`lang.ts` 无映射 → 纯白文本),也不能简单地映射到 `json()`——`@lezer/json` 的文法只接受一个顶层值,实测 400 条记录的文件会解析出 **402 个错误节点**。现在有一个手写的逐行 JSON 词法分析器(一行一次、不携带跨行状态、未闭合字符串直接标错),新增第 4 个内置 viewer `jsonl`:**预览**是每条记录一张可折叠卡片(默认折叠成一行摘要,点开用宿主的 `JsonTree`),**编辑**是原样可保存的 CodeMirror,由预览/编辑开关切换。行引用(`a.jsonl#L131`)仍会先切到编辑档再落行。
|
||||
|
||||
- 🎨 **修掉「错误标记看不见」**:`tags.invalid` 在深浅两种配色下都是 `#ffffff` —— 在浅色主题里就是白底白字。它是 JSON/JSONL 语法错误落到的 token,读者本该能看出哪段没解析;现改为红色波浪下划线。
|
||||
|
||||
- 🔧 **`stat` 失败从 500 变 400**:两条字节路由原先让 `stat` 的原始 rejection 逃成「internal」500,读起来像插件故障;不可读的用户路径是 400。
|
||||
|
||||
- 🔧 **分页读取的编码一致性(一处只有真机才会发现的回归)**:第一版锁死了第一页嗅探到的编码,于是「长 ASCII 前缀 + GBK 正文」的文件第一页判成 UTF-8 后,后半段 GBK 字节被按 UTF-8 解成乱码——而一次性全读是能正确解出来的。现在**只锁宽字符编码**(UTF-16/UTF-32 是文件属性,一页恰好没有 NUL 不能重新裁决),字节序编码逐页各自嗅探(纯 ASCII 页在两种编码下解出来是同一个字符串)。这在分页按行对齐的前提下是安全的:`0x0A` 既不能是 UTF-8 的续字节,也不能是 GBK 的尾字节。双向用例见 `tests/fs-read-page.spec.ts`。
|
||||
|
||||
- 🧪 新守护:`tests/file-stream-route.spec.ts`、`tests/fs-read-page.spec.ts`、`tests/jsonl.spec.ts`、`tests/jsonl-language.spec.ts`、`tests/archive-tools.spec.ts`、`tests/archive.spec.ts`、`tests/editor-large-file.spec.tsx`(超限只读预览 + 可编辑反证)。`tests/zip.spec.ts` 随 writer 一起重写为 `tests/archive.spec.ts`;唯一一条真二进制用例自探测、缺席即跳过(CI 上没有 `zip` 的 Windows runner 不会红)。
|
||||
|
||||
- 📖 设计过程、与 VS Code Web 的对照(含「VS Code 并不分页,它的模型是阈值 + 确认 + 关闭 tokenization」这一条纠错)以及实施偏差记录见 [docs/plans/2026-10-11-streaming-transfer-jsonl-preview.md](docs/plans/2026-10-11-streaming-transfer-jsonl-preview.md)。
|
||||
|
||||
- 🃏 **任务卡小条只说原生状态**:运行中小条不再是「● 运行中 正在读取文件」这样把状态念两遍,而是**活动行取代状态词**——`正在分析请求` / `正在读取文件 · main.ts` / `正在准备读取文件` / `正在运行命令 · npm run build` 等措辞全部来自宿主 `chat` 命名空间,与主对话逐字一致;已结算小条同理(只留 `已读取文件、执行了命令`,不重复「已完成」)。**`空闲` 与 `出错` 保留状态词**(「待命」「失败」不被任何活动措辞蕴含),**完全没有活动数据时回退状态词**,小条永不空着。状态点、执行扫光与折叠 chevron 不变,小条仍是 22px——画布几何与卡片高度预算零改动。
|
||||
- 🧩 **主代理卡片接上自己的实时数据**:`subagents.live` 路由一直把拓扑根的 fold 结果放在 `live[rootSessionId]`,而模型从未把它挂到根节点上——于是**主代理卡片的状态文本恒为 thinking 兜底**(「正在分析请求」),与主会话在做什么无关。现在根卡显示真实状态,树模式根行的实时行也从恒定的「思考中…」变成真实活动。
|
||||
- 🔎 **节点详情浮窗的活动行移到标题下方**:那行原来在键值格里(`最近活动 | 值`),右对齐的值列在 280px 里被省略,标签又占掉三分之一宽;现在它是标题下的一行 10px 小字(宿主措辞),实时文本尾行紧接其下并夹到两行。**没有活动数据就不渲染这一块**——此前每个节点浮窗都会显示「最近活动:正在分析请求」,已结算节点也不例外。词条 `tasksNodeActivity` 随这一行从 20 份词典删除。
|
||||
- 🗂 **聚合卡改为「按组展开」**:点一个聚合卡只展开**该组**(`fold:<parentId>` / `fold:<parentId>:idle`),兄弟组、页级折叠与手工折叠都不受影响——此前一次点击会清空手工折叠集并关掉全局规则,等于**点一个全开**。控制条按钮仍是页级展开/折叠,且**收起时清掉按组展开**(全局收起必须真的收起);树里的聚合行同一语义,行内副文案固定为「展开」(该行只在折叠态存在)。
|
||||
- 🔢 **聚合卡不再两处写计数**:待命组的徽标此前印的是**字面量字母 N**(`tasksFoldIdleGroup` 在 20 份词典里都是 `'N waiting' / 'N 个待命'`,没有 `{count}` 插值)——现在插值出真实计数,小条只保留`出错 N` 尾注与展开箭头;完整 tally 仍是卡片的 `aria-label` 与 tooltip。
|
||||
- 🎨 **树模式实时行的图标按活动类别取**:`tool-icons.tsx`(工具名映射,只有一处写死的调用)换成 `activity-icons.tsx` 的 `activityGlyph(kind)`——读文件 / 搜索 / 编辑 / 命令 / 网页 / 子代理 / 计划 / 提问 / 通用工具各用自己的宿主图标,尚未派发时是思考图标;`Record<ProcessActivity, …>` 让上游新增类别编译失败而不是静默兜底。
|
||||
- 🧪 测试:`tests/tasks-page.spec.tsx` 新增一个 `FakeChatLocale`(挂宿主 `chat` 命名空间,否则只能断言到 fallback 的 detail)并补 5 条(原生状态取代状态词、无数据回退、根卡真实状态、浮窗活动块位置与「无数据不渲染」、一次只开一组+全局收起折回、徽标真实计数);`tests/tasks-model.spec.ts` 补 4 条(按组展开的双向隔离、组 id、`expandedGroups` 盖过残留手工折叠、根节点带 live);新增 `tests/activity-icons.spec.ts`(类别全覆盖 + 读/命令/搜索/网页互不同型 + `undefined` 走思考图标)。[设计文档](docs/plans/2026-10-11-tasks-status-and-group-fold.md)。
|
||||
|
||||
- 🔌 **预览插件目录收录音频预览插件**:[`@huanlin/dsh-plugin-better-sidebar-plugin-audio`](https://github.com/HuanLinOTO/dsh-plugin-better-sidebar-plugin-audio)——设置页「添加插件」弹窗的预览插件目录里可一键复制安装命令(20 份词典同步 `pluginAudioName` / `pluginAudioDesc`,条目写进 `tests/plugin-list.spec.ts` 的目录断言,README 的预览插件表格 3 → 4)。(贡献者 PR [#881](https://github.com/omdsh-dev/DSH-better-sidebar/pull/881) @HuanLinOTO)
|
||||
|
||||
### v0.25.0
|
||||
|
||||
> 📦 **支持线前移:仅适配 DSH `0.2.0-rc.2+`**(peer 下限 `^0.2.0-rc.2`,CI 与挂载 lane 钉 `@deepseek-ai/dsh@0.2.0-rc.2`)。DSH 的 npm `latest` 现在正是 **0.2.0-rc.2**(不再停在 0.1.7-rc.2),本版就钉在它上面。**0.2.0-rc.1 及更早(含 0.1.7 线)请固定 v0.24.1**——`^0.2.0-rc.2` 对 rc.1 判定为 false,会被宿主的启动兼容性预检整行静默禁用;0.1.7 线的最后支持版是 v0.22.1。本次前移是一次纯声明与钉版变更:0.2.0-rc.2 对本插件消费的宿主面仍是纯增量,运行时零改动。
|
||||
|
||||
> 🙏 **本版包含以下贡献者的工作**(按合并先后;括号内为其 PR 带来的能力):
|
||||
> [@NolanHo](https://github.com/NolanHo)(#880 搜索框粘贴路径直开 + 噪声目录名单、#884 子进程输出偶发清空)、
|
||||
> [@yanzhaohui1999](https://github.com/yanzhaohui1999)(#865 文件引用落到那一行、#828 行号后缀切分)、
|
||||
> [@finley08](https://github.com/finley08)(#890 编辑器显现后重新测量、#859 桌面壳 HTTP 走页面基址、#832 新建文件)、
|
||||
> [@ZinChl](https://github.com/ZinChl)(#806 目录命中点击、#809 打包状态按会话、#811 树批量拆分、#813 重启后的子代理、#814 任务折叠守卫)、
|
||||
> [@graydovee](https://github.com/graydovee)(#807 空白会话的底部入口)、
|
||||
> [@btsd321](https://github.com/btsd321)(#818 tab 条右侧动作)、
|
||||
> [@ZhangFengshun](https://github.com/ZhangFengshun)(#641 宿主加载不带会话日志偏移)、
|
||||
> [@PerryLink](https://github.com/PerryLink)(#843 目录条目清理)、
|
||||
> [@UNscientific-9](https://github.com/UNscientific-9)(#842 checkout 的 `--end-of-options`、#645 引用胶囊)、
|
||||
> [@lpf20200901](https://github.com/lpf20200901)(#821 插件目录 memory-delta)、
|
||||
> [@dat-lequoc](https://github.com/dat-lequoc)(#837 编辑器可见性重测量)、
|
||||
> [@lhh010](https://github.com/lhh010)(#823 插件目录 file-trace)、
|
||||
> [@MengJiapeng](https://github.com/MengJiapeng)(#803 多仓库 git 历史)、
|
||||
> [@zhanghunuaa](https://github.com/zhanghunuaa)(#802 文件树跟随活动 worktree)、
|
||||
> [@mengge237](https://github.com/mengge237)(#817 自动激活保留已开页)、
|
||||
> [@Waser750](https://github.com/Waser750)(#840 侧边对话归档线程)、
|
||||
> [@suiyideali](https://github.com/suiyideali)(#587 编辑器内查找)、
|
||||
> [@wang-kaopu](https://github.com/wang-kaopu)(#612 WSL 外部打开、#523 非 UTF-8 编码、#566/#565/#521 Windows 路径)、
|
||||
> [@nyantused-cpun](https://github.com/nyantused-cpun)(#600 编辑器草稿保护)、
|
||||
> [@bulingbuling688](https://github.com/bulingbuling688)(#574 工作区提及)、
|
||||
> [@ingeb0rga](https://github.com/ingeb0rga)(#845 IME 229 守卫)、
|
||||
> [@shyuan-hub](https://github.com/shyuan-hub)(#264 面包屑折叠与排除模式,方向)、
|
||||
> [@rijiu915](https://github.com/rijiu915)(#363 Markdown 跨文件锚点,方向)。
|
||||
> 谢谢每一位!
|
||||
|
||||
|
||||
- 🧷 **右侧面板展开时不再显示底部入口**:宿主右上角在那种状态下是它自己的一簇控件(Split / Fullscreen / Collapse right sidebar),插件的「展开底部面板」挤进去只会跟它们打架 —— 现在右侧栏一展开,头部入口与空白会话的备用入口都退场,收起后重新出现。这条规则把「展开态该把入口摆在哪儿」整个问题去掉了,让位逻辑只需服务收起态(那里宿主的角落只有一个按钮)。**判据必须按「可见」而不是「在不在 DOM 里」**:实测宿主把两个角落控件都留在文档里(落屏时 `data-sidebar-right-expand` 与 `data-sidebar-right-toggle` 各 1 个、而面板已经展开),只查属性会一直读成「没展开」、按钮照旧冒出来。判别性用例见 `tests/dock-fallback.spec.tsx`(造一个可见的 Collapse 控件,还原门即红)。
|
||||
|
||||
- 🧷 **再修一处同源的碰撞:右侧栏打开时,空白会话的底部入口压在宿主「收起右侧栏」上**。备用入口是按宿主**角落控件**的 rect 左移 8+28px 定位的,但那只认控件**关闭形态**的属性 `data-sidebar-right-expand`——右侧栏**打开**时这个属性整个消失、同一个座位换成 `data-sidebar-right-toggle`,于是定位落到视口兜底坐标(`innerWidth - 44`),而那里正是宿主自己的角落按钮群。实测 2200px 视口、右侧栏打开时:入口落在 `2156..2184`,与宿主「Collapse right sidebar」(`2166..2194`)**重叠 18px**、并切到「Fullscreen」2px——与用户截图逐字一致。现在锚点同时认两种形态,**并且让位不再是一个固定偏移**——宿主的角落控件是肩并肩一簇(打开态实测 `Split@2094 / Fullscreen@2130 / Collapse@2166`,各 28px、间隔 8px),只往左挪 36px 会精确落在**下一个**按钮上(实测压住 Fullscreen 28x28px),所以改为逐个槽位左移直到与**任何**宿主按钮都不相交。真机复测(2200px 视口):关闭态入口 `2124..2152`、宿主 `Open right sidebar@2160`,打开态入口让到 `2058..2086`、整簇从 `2094` 起——**两种状态都零重叠**。**占位判定改用命中测试**:早先按 `button, [role="button"]` 筛「谁占着这一格」,而右侧栏的**页签芯片**不是这两者——页签一多,让位就停在芯片上(用户报的「tab 多的时候位置也错误」)。现在用 `document.elementsFromPoint` 直接问页面「这一格下面有什么」:**不透明的小控件**(≤300px 宽,含页签芯片)算占位,整行的背景板(会话头 titleRow、面板 tabStrip、面板本体)不算;并且沿水平方向采 **5 个点**——只测中心点会漏掉「中心空着、右缘却压着邻居」的情况(实测这样压住 Split/Fullscreen)。让位步长同时收到 4px。判别性用例见 `tests/dock-fallback.spec.tsx`(还原锚点即红 `expected '980px' to be '464px'`;关掉让位步进即红 `expected '464px' to be '428px'`)。
|
||||
|
||||
- 🧷 **修掉「展开底部面板」按钮在会话头与备用入口之间叠成两个**:blank 会话里宿主不渲染会话头,插件的会话头入口随之不可达,于是空白会话专用入口以 `position: fixed` 贴到宿主「Open right sidebar」按钮左侧(#698 / #623)。但**相位判定不足以互斥**——相位是每 1s 轮询来的,而会话头入口由宿主自行决定何时渲染,两者之间必然存在窗口(相位读取失败时还会按「非 blank」降级,一个从未成功读到的会话可能一直停在 blank);而两套入口在版面上**就是同一个位置**,同时在场即精确重叠成一团。现在除相位外再加一条与相位无关的兜底:**会话头那套入口只要真的在 DOM 里,备用入口就让位**,判别性用例见 `tests/dock-fallback.spec.tsx`(造出「相位说 blank + 会话头入口在场」的不一致状态,还原守卫即红)。最多 500ms 的让位延迟(与位置对齐同一节拍)。
|
||||
|
||||
- 🎯 **文件引用终于落到那一行([#826](https://github.com/omdsh-dev/DSH-better-sidebar/issues/826) 第二半)**:第一半把 `path:131` 的行号从地址上切了下来、文件能打开了,但行号**被解析出来就扔掉**——点开停在第 1 行。现在两种写法合流到同一个字段:`#L131` 由宿主解析成 `navigation.params.line`,`path:131` 由插件在 `src/client/path-line.ts` 切出,都落到 `SidebarTab.line`,再经 `FileViewerProps.line` 交给 viewer;文本编辑器在**到达时定位一次**并给编辑器焦点(CodeMirror 只在获焦时画光标),越界行号钳到最后一行,区间(`:起-止`)只取起始行、列号丢弃(编辑器只有一处光标)。定位直接写 `view.scrollDOM.scrollTop` 而不是 `scrollIntoView`——后者会走遍每一层可滚动祖先,浏览器缩放时连 window 都算上、把整个侧栏拖上去。**`line` 是瞬态**:`sanitizePersistedTab` 的白名单不含它(与 `revealed` 同处理),链接可能是几天前写的,刷新后不该把读者拽回那一行。**markdown / html 收到行号会先强制切到编辑态再定位**——预览里没有源码行号可放,而它自己挂载时的滚动恢复(`useLayoutEffect`)会和跳转抢同一个 `scrollTop`;引用要的是源码,所以让源码先可见。**公开面纯增量**:`FileViewerProps.line?: number`(§5 已同步),第三方 viewer 忽略它即可。原地把 `a.ts:131` 切到 `a.ts` 时行号会被**清掉**(更新路径比的是当前值而不是「有没有传」),否则每次通知都会把读者弹回去;同一引用重复投递不重复跳,同一文件的新行号照跳。
|
||||
- 🧪 测试:`tests/native-tab-line.spec.ts`(6 例:记录铸造 / 宿主 `#L` 片段 / 普通打开不种子 / 新导航改行 / **裸路径清行** / 重复投递保住记录身份)、`tests/text-editor-line-jump.spec.tsx`(6 例:落到指定行 / 越界钳位 / 普通打开不跳 / **markdown 强制切出预览** / 无行号留在预览 / 只落一次),`tests/native-surface.spec.ts` 的 `fileParamsOf` 断言补上 `line` 并加区间与 `行:列` 两例。scroll 那一步刻意不断言(骑在两层嵌套 rAF 之后、且 jsdom 不排版),断言的是同一次 dispatch 的 selection anchor。(贡献者 PR [#865](https://github.com/omdsh-dev/DSH-better-sidebar/pull/865) @yanzhaohui1999)
|
||||
|
||||
- 🖥️ **桌面壳里插件路由不再满屏「Failed to fetch」**:HTTP 与 WebSocket 需要**不同**基址,而壳正是把两者拉开的地方——页面在 `dsh-app://app/`,注入的 `__DSH_TRANSPORT__.streamBaseUrl` 却是宿主的 `http://127.0.0.1:<port>`(另一个 origin)。壳的 `protocol.handle` 会把非静态的 `dsh-app://app/*` 路径**同源转发**给宿主,所以 HTTP 必须骑**页面基址**(`hostHttpBase()` → `document.baseURI`,反代目录前缀也带在里面,一套规则覆盖两种部署);发到注入 origin 就是跨源,而插件自己的 `/sidebar/*` 路由不带 `Access-Control-Allow-*`,浏览器直接拒(文件树 / git / 编辑器全部请求失败)。WebSocket 反过来,必须用注入 origin:自定义 scheme 承载不了 `ws:`,而 `dsh-app://app` 的 host 是字面量 `app`,DNS 永远不解析。`tests/base-path.spec.ts` 钉住三种场景(壳内页面基址 + 注入 origin 的 socket、无页面基址时回退注入基址、普通 http 页面同源不变)。
|
||||
- 👁️ **被 park 过的编辑器不再是一片空白**:原生页签在宿主里靠 `keepMounted` 存活,宿主把不活跃的 body **移动**进隐藏 seat、需要时再移回来——而移动一个节点**不改变它的 border box**,所以只看尺寸变化的 `ResizeObserver` 一次都不触发,一个在隐藏宿主里被打开的编辑器会把视口量成 0 并把这个空的虚拟视口一直留着(症状很有辨识度:**行号槽照常画,正文空白**)。现在每次「显现」都重新测量:`IntersectionObserver` 报显现本身(补上移动这条 ResizeObserver 看不见的路径),`requestAnimationFrame` 兜住「显现与挂载同帧」的那一次(此时 CodeMirror 的首次测量仍可能读到 0),另接 `visibilitychange` 与 `window` resize;四种观察器都可缺省、逐个 dispose,旧浏览器/测试环境不受影响。
|
||||
- 🛡️ **会话切换不再把上一个项目的写操作带进新项目([#848](https://github.com/omdsh-dev/DSH-better-sidebar/issues/848))**:右侧栏的每个 page 都按「会话 + 页签 id」**复用同一个组件实例**,而页签 id 每会话重新计数——换会话(或换 cwd)时组件是**原地重渲染**而不是重挂,于是上一个项目里选中的行、打开的行菜单、内联重命名/新建编辑器、以及**已经弹出来的删除确认框**都会活到下一个项目里。最危险的是选中集:「删除选中」会把**新会话的 scope 配上一个会话的绝对路径**发给宿主,而 v0.23.0 起包含性检查是刻意移除的,宿主对绝对路径照单执行——**它会删掉另一个项目的文件**。现在这些状态随会话与 cwd 一起失效(选中集、锚点、行菜单、内联编辑器、确认框、拖拽落点、busy 标志、错误条),批量删除与打包构建按 generation 捕获自己的 scope、并把**结算**(pruneTree / 选中集 / busy / 任务条)在换代后退役(它们结算的是「在屏项目」的状态,已经不一定是自己开始的那个项目了)。
|
||||
- **一并修掉两处「靠 passive effect 兜底」的窗口**:换会话的清理写在 `useEffect` 里,而点击可以落在「swap 已提交、effect 尚未 flush」之间,此时 props 已经是新会话。单行删除的确认框与拖拽上传因此改为**在调用点复核自己 armed 时的 scope**(`sameScope`),不一致就整条请求不发(fail closed);请求本身用 armed scope,scope 与路径永远同源。实测还原守卫即红:那个窗口里会发出 `fsRemove({sessionId:'s2',cwd:'/projects/beta'}, '/projects/alpha/a.ts')`。
|
||||
- 🧪 测试:新增 `tests/file-tree-session-scope.spec.tsx`(6 条:选中集/确认框随换代清除、同会话重渲染**不**清除、批量走的在途结算不写进新会话、上面那条窗口的判别性用例、以及一条钉住「请求里的 scope 与 path 必须同源」的正向对照——只数调用次数抓不到 scope 被换掉的回归)、`tests/task-window-delete-arm.spec.tsx`(3 条:任务窗口的两步删除按钮不跨任务武装)、`fs-operations` / `git-view-worktree` / `file-tree-archive` 各补相关用例。**已知未修(另立跟进)**:宿主侧 `fs.remove/rename/mkdir` 没有项目归属校验,客户端仍是唯一守卫;`isWorkspaceRoot` 的 `catch` 会吞掉 EACCES/EPERM 而回退到拼写比较。
|
||||
|
||||
- 🪟 **保存不再把 CRLF 文件写成 LF([#871](https://github.com/omdsh-dev/DSH-better-sidebar/issues/871))**:上一批只修了读取侧,写入侧仍有洞——编辑器传送的永远是 LF 文档(CodeMirror 没有别的行模型),而 `fs.write` 把它原样落盘,于是在 Windows 检出上**改一行 = 整文件 diff**。现在保存前用**同一趟** 64 KiB sniff 读取同时取出编码与行尾(`text-encoding.ts` 的 `encodingOfFile` 扩成 `fileFormatOf`,新增 `detectEol` / `restoreEol`),落盘改为 `encodeText(restoreEol(content, eol), encoding)`:CRLF 文件保持 CRLF、LF 文件不被引入 `\r`、已含 `\r\n` 的内容不会被写成 `\r\r\n`。口径与宿主自己的 `edit` 工具逐字一致(前 4096 字符多数票;孤立 `\r` 既不计票也不改写),所以插件保存与模型 `edit` 对同一个文件得到同一个结论——顺带核实:宿主的 `write` 工具**不做**这件事(`writeText` 原样写模型文本),模型整份覆盖时文件仍会变成 LF,那是宿主写入、插件无权干预,已在 issue 里留结论。**客户端零改动**,保存入口(含快捷键与草稿边沿)自动全覆盖。新文件仍是 UTF-8 + LF:「项目级行尾约定」不在本批范围。
|
||||
- 🧪 测试:`tests/text-encoding.spec.ts` 补 3 条新用例(CRLF/LF 检测、多数票与孤立 `\r`、`restoreEol` 不双写)并把既有的编码三例扩成 `fileFormatOf` 断言;`tests/fs-write-route.spec.ts` 补 3 条端到端(CRLF 文件写 LF 文档后除被编辑行外全 CRLF 且无裸 `\n`、LF 文件不引入 `\r`、GBK + CRLF 组合下两个 restore 同时开火)。判别性:把 `restoreEol(...)` 换回 `content` → 2 条端到端红,其余仍绿。
|
||||
- 🔎 **搜索框支持直接粘贴路径:指名路径 stat 直开、相对片段按路径匹配**([#879](https://github.com/omdsh-dev/DSH-better-sidebar/issues/879)):`fs.search` 之前把整个输入当作文件名子串在整个 cwd 树里递归匹配——文件名永不包含分隔符,所以粘贴任何带 `/` 的路径都是**结构性零命中**,却仍烧满 10 万条访问预算(实测含 worktree 森林的 Rust 仓库上 1.9s 返回 `{matches:[],truncated:true}`,工作区外文件如 `/tmp` 下的实验产物图因此在右侧无从预览)。现在 `searchFiles` 按查询形态分流:**指名单一目标的 query(绝对路径、`~/…`、`./x`、`../x`)经 `resolveTarget`——与 fs.read 同一解析原语(`~` 展开 #713、会话 cwd 拼接、win32 WSL/dsh-remote 命名空间改写、词法 resolve)——stat 直取**,命中返回**解析后的绝对路径**(resolve 剥掉 shell 补全带的尾分隔符;客户端对匹配行与树行做精确字符串比对,客户端 `resolveSidebarPath` 对绝对路径透传,TreePanel 现有点击链路零改动即可打开),目录目标按 #801 契约同列 `dirs`(行内树导航而非按文件打开;**工作区外的目录命中行只清空查询**——树以 cwd 为根,没有可导航的行,客户端守卫同时避免了 `ancestorDirs` 为外部路径合成垃圾 `expanded` 条目),目标缺失立即返回空结果(不再烧预算换一个注定为空的遍历);**含分隔符的相对片段按根相对路径匹配**(大小写不敏感,Windows 两种分隔符都收;同名文件消歧正是 #306 的诉求)。引擎不参与路径分支——fd 的 `--fixed-strings` 不带 `--full-path`、rg 的三个 glob 以单路径段为匹配单元,路径语义由遍历独占,引擎 argv 构造零改动(新 skip 名仍由 `SKIP_DIR_NAMES` 派生进 fd `--exclude` / rg glob,`check:engines` 门禁不受影响)。用户 exclude 列表不作用于直开分支:粘贴路径是显式意图,与点击后的 `fs.read` 行为一致(fs.read 同样不应用 exclude)。POSIX 上 `\` 仍是文件名合法字符而非分隔符(`~\foo` 形态仅在 win32 计入路径手势);单独的 `~` 按客户端 `isAbsolutePath` 的口径视为指名 home 目录,其余不带分隔符的 `~`/点前缀拼写(`util.ts~`、`~$doc.docx`、`.env`)仍是名字查询,引擎资格不受影响。
|
||||
- 🧹 **噪声目录名单补 worktree 森林与语言环境**:`SKIP_DIR_NAMES` 增加 `.worktrees` / `.worktree`(两种 git worktree 布局拼写,`.worktrees/` 正是 DeepSeek Harness 自己的约定)、`target`(Rust / Maven 构建产物)、`venv` / `.venv` / `__pycache__`(Python 环境与字节码缓存)——此前两片 worktree 森林实测可烧掉 100k 预算的 97k,真实目录从未被遍历、`truncated` 恒真。walk 与两条引擎 argv 共用同一名单(fd `--exclude` 与 rg glob 对自动派生),引擎与遍历的跳过行为保持一致。
|
||||
- 🧪 测试:`tests/fs-search.spec.ts` 新增 9 条——路径片段匹配(深度无关 / 大小写 / 目录行的 dirs 拆分 / 噪声围栏照常生效)、直开分支(文件与目录目标、目标缺失即空且 `maxVisited:1` 下仍 `truncated:false` 钉住「未走遍历」、尾分隔符 / `./` / `../` / `~` 经 `resolveTarget` 解析后返回解析路径)、`probed===false` 证明路径分支不触引擎、不带分隔符的 `~`/点前缀拼写仍是名字查询(引擎资格保持)、分隔符 query 不进引擎(假引擎返回污染行判别)、POSIX 反斜杠名字(探针式 skipIf 只在名字可存在的平台运行)、worktree/语言环境森林不进入;`tests/smoke.spec.ts` 新增 1 条路由级用例(绝对命中 / 立即空结果 / 相对片段 / `./` 锚定解析四态穿真实 mount);`tests/file-tree-search-persist.spec.tsx` 新增 1 条(工作区外目录命中行只清空查询、不触发任何 toggle)。判别性:还原 `fs-search.ts` 的分支即红(引擎污染行会浮出来);还原 skip 名单即红(森林内的 guide.md 命中);拿掉客户端守卫即红(外部路径的垃圾 toggle 浮出)。
|
||||
- 🐞 **修掉 `streamLines` 以 `exit` 结算子进程输出、负载下 fd 目录结果偶发静默清空**([#883](https://github.com/omdsh-dev/DSH-better-sidebar/issues/883)):Node 的 `exit` 在进程死亡**瞬间**触发,stdout 管道可能还有未排空的数据;正确信号是 **`close`**(进程结束**且 stdio 全部关闭**,stdout 读到 EOF、readline 的全部 `line` 事件已发出)。宿主负载高时 `exit` 抢在管道排空前到达,`lines` 数组还是空就 resolve——fd 双调用的第二路(`--type d`)最常受害,签名恒为 **`matches` 完好、`dirs: []`**,目录命中行退化为按文件打开(报 `is a directory`,正是 #801 修的错误面被偶发化)。实证(装 fd 的 Linux 宿主,`tests/search-engines.spec.ts` 单文件连跑):干净 dev 基线 **7/30 复现**、签名恒一;`exit`→`close` 一行后 **0/30**。截断 / 超时 / spawn-error 三条既有结算路径换事件后语义不变(`finish` 幂等守卫 + `if (truncated)` 分支照旧);探测函数的 `--version` 调用是 `stdio: 'ignore'`、只读退出码,`exit` 即正确信号,不改。上游 CI 从未暴露的原因:ubuntu lane 无 fd(真引擎用例自跳过,双 spawn 路径不存在)、ci-windows 串行跑撞不进竞态窗口——#872 记录的「慢机/负载才暴露」类隐患。
|
||||
- 🧹 **`runChild` 的 fd 分支不再吞掉第二路的失败**:删除 `streamLines(dirChild, cap).catch(() => ({ lines: [], truncated: false }))`——rejection 现在流进 `runEngine` 既有的 broken 标记 + 本次回退 JS 遍历(与主路对称;旧 catch 把失败降级成「目录恰好为零」,在所有环境都不可见)。
|
||||
- 🧪 测试:`setEngineHooks` 新增 `spawner` 缝隙(类型收窄为 `EngineSpawner`),两条**确定性**用例用脚本化 PassThrough 子进程直接钉住契约——「`exit` 先于 stdout 排空时零行丢失」(复放竞态的真实次序:先 exit、数据在途、close 后至;exit 版代码在「close 前仍未结算」断言即红)与「fd 目录路失败整路 reject 并标记 broken」(swallow-catch 版代码红在「以空 dirs resolve 而非 reject」)。判别性均已临时还原对应实现验证:还原 `exit` → 用例 1 红;还原 catch → 用例 2 红。真引擎用例('matches literals…')此前正是该竞态的偶发受害者,负载机器上 ~23% 概率红。
|
||||
- 🪟 **修掉 CRLF 行尾文件在预览里的三层 `\r` 误判与「预览渲染两遍」(ci-windows 上暴露)**:Windows 检出下 README 的锚点用例全红,根因不是 slug 而是① `markdown-html.ts` 的 `isBlank`、`mermaid-blocks.ts` 的 `CLOSE_FENCE_RE`、`markdown-code.ts` 的 `closesFence` 都把行尾的 `\r` 当内容——于是 **HTML 段永不终止**(实测 `splitHtmlBlocks(README.md)`:LF 36 段 vs CRLF **4 段**,`# b` 被当原始 HTML 文字渲染)、**mermaid 围栏吞掉文件余下部分**、**链接改写从第一个围栏起全部失效**(首个分歧在第 16883 字节);② `TextEditor` 的 draft 快照把 CodeMirror 归一化后的 LF 文档在挂载后一个 commit 发布出去,`previewMdText` 从 CRLF 翻成 LF,宿主 `MarkdownText` 于是重建了文本变化的标题节点——挂载那一趟写入的 **26/26 个 id 被丢弃**(断言时只剩 7/26、13/15 个 TOC 锚点 `id=missing`),MutationObserver 一个微任务后才自愈。现已把 draft 定义成「编辑」:与已加载正文逐字节相等(或行尾归一后相等)时不发布。
|
||||
- 🧪 测试:新增 `tests/markdown-crlf.spec.ts`(7 条 **CRLF ≡ LF** 不变式,覆盖分段器 / mask / 两个改写器 / mermaid 分段器)与两条真实渲染器用例(含把 `README.md` **在内存里**转成 CRLF,让 ubuntu / macOS lane 也跑 Windows 的拼写);测试脚手架 `scanDocumentAnchors` 改为 CRLF 安全(实测 CRLF 标题 0 → 26)。判别性:还原三个扫描文件 → 9 条红;还原 `TextEditor` → CRLF 检出下 2 条红(即 CI 原症状)。
|
||||
- 📝 **已知未修(另立 [#871](https://github.com/omdsh-dev/DSH-better-sidebar/issues/871))**:同一归一化意味着**保存会把 CRLF 文件写成 LF**(一次内容修改变成整文件 diff),需要产品取舍;本轮只修读取侧。
|
||||
- 🔄 **模型改完文件后,正在看的预览自己刷新**([#855](https://github.com/omdsh-dev/DSH-better-sidebar/issues/855)):此前模型在会话里 `write` / `edit` 一个你正开着的文件,侧栏里仍是旧内容,只能手点刷新(或切走再切回、关掉重开)。现在**命中即静默重载**:走页头刷新按钮那条完全相同的加载路径(同样的 `fsRead` / `load()`),因此手动刷新入口原样保留。信号来自**插件自有的会话事件增量流** `changes.ops`(不是新的文件系统观察者):宿主按 `seq > afterSeq` 增量下发 `tool/call` + `tool/result`,客户端折成文件操作后只认**结算成功**的 `write` / `edit`(`running === false && !isError`)——半写内容与失败的调用都不触发重载。**每会话一个共享轮询器**(`src/client/ops-stream.ts` 的成员选举,2.5s、self-scheduling,与文件变动页的会话透镜同一节奏、同一路由):一个会话开 N 个编辑器 tab 每 tick 仍只有 **1 个** `changes.ops` 请求,页签全部离开即停;**没有 fs.watch,也没有任何周期性的 `fsRead` 指纹轮询**。**叠加口径**:文件变动页的**会话透镜保留它自己的轮询器**(两条流的可见性条件不同),所以同一会话**同时**开着会话透镜与编辑器时,该会话每 tick 是 **2 个** `changes.ops` 请求——「1 个」说的是编辑器这一份,不是全会话总数(把两者合并会改动会话透镜那条已被既有 spec 钉住的「只在透镜在屏时轮询」语义,见[设计文档 §4.1](docs/plans/2026-10-06-editor-auto-refresh.md))。
|
||||
- **只刷新命中的那一个**:命中判定用 `resolveSidebarPath` 把模型写的相对路径按会话 cwd 归一(含 `.` / `..` 词法折叠、Windows 盘符与 UNC 大小写折叠),未命中的文件**零重读**、不重挂、不动滚动位置。
|
||||
- **脏态优先**:编辑器上报 `dirty` 时自动刷新**直接跳过**——草稿只活在编辑器实例里,重载会重挂它,用户没保存的输入永远不会被磁盘内容覆盖;处于**编辑态**(`mode === 'edit'`)同样跳过,免得光标跳走。**跳过不等于死路**:未 dirty 时既有的「编辑 → 预览」边沿照旧重载并拿到新内容(实测 `fsRead` 1→2,`tests/editor-refresh.spec.tsx` 的 B 例);**dirty 时这条边沿自身也带 dirty 守卫**(`EditorHost.tsx` 的边沿判定要求 `dirty !== true`;`tests/editor-refresh.spec.tsx` 的 B 例两半都钉住了它——干净时 `fsRead` 1→2,dirty 时仍是 1)因而被抑制,此时的两条出口是**页头刷新按钮**(`window.confirm` 后重载,draft 换成新内容)与**「保存 → `fs-conflict` 横幅的 reload」**(`TextEditor.tsx` 的保存带 `mtimeMs` 基线,模型写过就会被拒成 `fs-conflict` 而不会静默覆盖模型字节,横幅里的 reload 就是新内容入口)。一句话:**dirty 期间保持旧内容直到用户显式动作,不存在看不到新内容的死路**。
|
||||
- **不误报历史**:流的第一帧是**基线**——打开文件之前会话里已经结算的写入一条都不会触发(该文件刚刚才被读过),只有**打开之后**才结算的动作会刷新。会话作用域按会话 id 分账,别的会话写同一个路径不会串台。
|
||||
- 🧪 测试:`tests/editor-auto-refresh.spec.tsx`(14 例,jsdom + 假计时器),每条都做了**还原源码即红**的证伪:拿掉重载调用 → 「命中即重读重渲染」与「相对路径命中」红;拿掉路径命中判定 → 「未命中零重读」红;拿掉 dirty 判定 → 「脏草稿不被覆盖」红;把每会话一条流改成全局共享 → 「另一会话写本文件不刷新」红(并带正向对照,证明两个编辑器确实都在轮询);拿掉成员选举 → 「N 个 tab 每 tick 恰 1 个请求」红(3 个 tab 变 3 个请求);拿掉编辑态判定 → 编辑态用例红;拿掉基线 → 「打开前写过的文件不被重读」红;放行 running / err 的调用 → 「结算成功才刷新」红;**放行 `kind === 'read'`** → 「模型 read 本文件零重读」红;**放松 `EditorHost` 的 `opBaseline` 守卫**(只留 `null` 判断、不再按路径比对基线)→ 「重新定向到刚被 touch 的路径不重复读」红(既有 12 例仍全绿);**塞进一个周期性 `fsRead`** → 「无事件不轮询 fsRead」红。`tests/editor-refresh.spec.tsx` 的既有 4 条(#167)未改动、仍绿。
|
||||
- ⚠️ **滚动位置与「真实浏览器」边界(如实记录)**:重载走的是既有那条加载路径(与 #167 的保存后刷新、页头刷新按钮逐字相同),所以 markdown / html **预览态**的滚动位置由 `TextEditor` 既有的模块级 per-file 滚动记忆恢复(`previewScrollMemory` + 布局 effect;jsdom 量不出 `scrollHeight`,这一层是**读源码得出、未在真机浏览器验证**);`code` 这类「编辑器就是唯一视图」的文件(`toolbar.mode` 恒为 `preview`)**无法保留光标/滚动**——重挂会回到文档开头,但**内容不会丢**(dirty 时根本不刷新)。真实浏览器里「预览是否真的刷到了新内容」这一层本轮**只在 jsdom 验证**,没有做真机点击验证。[设计文档](docs/plans/2026-10-06-editor-auto-refresh.md)
|
||||
- 🔗 **Markdown 里的本地 `.md` 链接改在侧栏打开,标题锚点可跳转**([#363](https://github.com/omdsh-dev/DSH-better-sidebar/issues/363)):插件自绘的四处 markdown(编辑器预览 / 侧边对话转录 / 文件变动阅读视图 / 任务笔记)原先把 `[x](./other.md)` 渲染成**不可点的纯文本**——宿主渲染器只有在 `MarkdownDelegateProvider` 提供 `openFile` 时才把本地目标变成可点元素,且它自己的 `parseFileLink` **只认行号 fragment**(`#L24`),带标题 fragment 会让整个目标判为非法,于是「点了没反应」。现在链接被判为「同文档 fragment」或「要打开的文件」:同文档的就地滚动预览**自己的滚动容器**(不用 `window.scrollTo`,也不用 `scrollIntoView`——后者会连整条侧栏一起滚),跨文件的把 fragment 以 `%23` 编码带过宿主解析器、按「会话 + 绝对路径」暂存,目标文件渲染出来后落到对应标题。
|
||||
|
||||
- 🔗 **Markdown 里的本地 `.md` 链接改在侧栏打开,标题锚点可跳转**(贡献者 PR [#363](https://github.com/omdsh-dev/DSH-better-sidebar/pull/363)(@rijiu915)提出方向;因宿主渲染器的两条硬约束——本地链接无官方 delegate 时退化为纯文本、`#标题` 片段被 `parseFileLink` 判非法——维护者以**官方 `MarkdownDelegateProvider` + `%23` 片段载体**重新实现,该 PR 已带署名关闭):插件自绘的四处 markdown(编辑器预览 / 侧边对话转录 / 文件变动阅读视图 / 任务笔记)原先把 `[x](./other.md)` 渲染成**不可点的纯文本**——宿主渲染器只有在 `MarkdownDelegateProvider` 提供 `openFile` 时才把本地目标变成可点元素,且它自己的 `parseFileLink` **只认行号 fragment**(`#L24`),带标题 fragment 会让整个目标判为非法,于是「点了没反应」。现在链接被判为「同文档 fragment」或「要打开的文件」:同文档的就地滚动预览**自己的滚动容器**(不用 `window.scrollTo`,也不用 `scrollIntoView`——后者会连整条侧栏一起滚),跨文件的把 fragment 以 `%23` 编码带过宿主解析器、按「会话 + 绝对路径」暂存,目标文件渲染出来后落到对应标题。
|
||||
- **标题 id 现在与 GitHub 逐字一致**:`githubHeadingSlug` 改成 GitHub `github-slugger` 的真实规则——**不 trim、不折叠连续空白**(每个空格各转一个 `-`)、删 emoji 与 `\uFE0F` 等 variation selector、删标点与符号、保留任意文字系统的字母/数字/组合标记、重复标题 `-1`/`-2`,文档里已存在的显式 id 先占用。**这是本批最有用户价值的一处**:仓库自己的两份 README 目录锚点因此从 **0/15 全部失效**(点击被认领成按钮但 `scrollTop` 纹丝不动,静默 no-op)变为 **15/15 全部可用**(真实 `TextEditor` + 真实宿主 `MarkdownText` 渲染后逐个锚点点击实测)。旧实现错在两处:先 `trim` 再把空白折叠成一个 `-`(GitHub 两者都不做,`## 🛠️ Development & Build` 的真实 id 是 `-development--build`),以及保留 `\p{M}` 而把 VS16 留在 id 里(`🖼️ 特性巡礼` 曾得到含不可见字符的 `"\uFE0F-特性巡礼"`)。
|
||||
- 🧹 `<a id="x"></a>` 这类空显式锚点(GitHub README 常用)被标为 `hidden`——不再占版面,id 仍在,`#x` 深链照旧。
|
||||
- **范围决定**:非 markdown 的本地链接(`./notes.txt`、`./pic.png`、`./docs`)**维持纯文本不变**——本批只认领 `.md` / `.markdown`,目的是不把用户交到插件不打算服务的动作上。`#L24` 行号目标仍交给宿主自己的语法,**本批不做「打开后跳到第 24 行」**。
|
||||
- 🧪 测试:`tests/markdown-navigation.spec.ts`(认领判定 / `%23` 载体 / 幂等 / 跨文件 fragment 表)、`tests/markdown-slug.spec.ts`(**以真实 `github-slugger` 正则做对照**的 slug 判定 + 两份 README 的锚点解析率断言)、`tests/markdown-surface.spec.tsx`(真实渲染下的 host delegate 点击路径、祖先滚动容器、跨文件落点)。
|
||||
- 🐞 **修掉 `~~~` 代码围栏内的链接与图片被改写**:两份源码改写器(`markdown-images.ts` / `markdown-navigation.ts`)各自内联的围栏 mask 只认三个反引号,于是 `~~~` 围栏里当作**示例**展示的 `[y](./b.md#u)` 会被写成 `[y](./b.md%23u)`、`` 会被写成 `/sidebar/file` URL(与 58d7f71 基线逐字对比,这是本批唯一的渲染差异)。现在抽出一个共享 mask(`src/client/markdown-code.ts`,CommonMark 规则:**3 个及以上反引号或 3 个及以上波浪号**开栏、闭合不短于开栏、未闭合则延伸到文末),两个 pass 共用。**图片那条盲区是既有缺陷而非本批引入**(58d7f71 上 `rewriteLocalImageUrls('~~~\n\n~~~')` 已经会改写),一并修掉。
|
||||
- 📝 如实记录的窄边(不修、无损坏):目的地含**转义括号**(`[x](./a\(1\).md)`)或**单引号 title**(`[x](./a.md 'title')`)的链接不会被认领,回退成纯文本——与本批之前的渲染逐字一致。
|
||||
|
||||
- 💻 **底部工作台也有终端了**([#774](https://github.com/omdsh-dev/DSH-better-sidebar/issues/774)):`+` 菜单新增内置类型 **`terminal-bottom`**——页面是插件自绘的 xterm,**进程由宿主的会话级终端服务 `ctx.webTerminals` 供给**(`@deepseek-ai/dsh-api-terminal-controller` 的 client 半边),插件不持有 PTY,也与右侧栏那条 **互不干扰**(右列仍是 `ui-sidebar-terminal` 的地盘)。**恢复语义**:页面每次都用**同一份 `(sessionId, key, contentId)`** 调宿主的 `webTerminals.view()`,宿主持久化在 localStorage 的 `(会话, contentId) → 终端 id` 绑定因此能在刷新后认回**同一个 shell**;`terminalId` **不写进 `tab.meta`**(`view()` 显式传 id 会关掉宿主的「缺了就建」,一个过期 id 会把页签永久卡在 `missingTerminal`),DSH 重启后 PTY 已消失而绑定还在,所以状态面板的「**新建终端**」按钮把 `tab.meta.terminalRun` +1 换一代 `contentId` 另铸进程。**关页签**才结束进程(`onClose` → `webTerminals.close()`),卸载**不**关——宿主的契约是「视图跨 DOM 卸载存活」,这正是刷新能认回同一个 shell 的原因。宿主没挂终端控制器时该行置灰、页面显示「宿主未提供终端能力」,**不**把整行拖成 `pending`(`webTerminals` 走结构化探测,没有写进 `dsh.client.inject`)。
|
||||
- 🧩 **新 API:`TabDescriptor.bottomOnly`**(#774)——只投插件自己的底部工作台、**永不注册原生右侧栏承载面**的类型:`openTab` 落点强制 `'bottom'`(`target: 'side'` 也被改道),原生 tab 类型与 guide 条目都不注册。它是 `terminal-bottom` 不变成「宿主右栏里第二个终端胶囊」的全部机制(挂载 lane 钉住宿主 `terminal` guide 条目恰好 1 条),也**不是** `hidden` 的替代品——后者会连 `+` 菜单一起摘掉。字段说明与承载面差异已进 [接入指南](docs/external-plugin-guide.md),内置清单从 5 变 6。
|
||||
- 📦 **新依赖 `@xterm/xterm@^6.0.0` + `@xterm/addon-fit@^0.11.0`**(与宿主自用版本一致,两者安装期零脚本),**只进新 chunk `lib/client-terminal.js`**:核心包 `lib/client.js` 里连一处 `@xterm/xterm` / `xterm-char-measure-element` 都没有(chunk **748,716** 字节,xterm 与它的样式表整份在内;实测于合并 dev 之后的树,该 chunk 还内嵌 zh/en 词典,所以数字随词典增删浮动——#774 分支单独构建时是 749,897 字节),并已写进 `package.json#files` 与 registry 清单——chunk 名镜像点同步到 8 处。
|
||||
- 🧪 测试:`tests/terminal-tab.spec.tsx`(15 条,jsdom + `vi.mock` 掉 xterm/addon-fit,钉住 `view()` 调用形状与 contentId 恒定性、mount/detach、`write`/`resize` 转发与上限夹紧、snapshot 重放 + `acknowledge`、无服务降级、「新建终端」走真实 `updateTab` 路由、`onClose` → `close()`);`tests/builtins.spec.ts` 内置清单 5 → 6 并新增「`terminal-bottom` 是 `bottomOnly`,其余内置都不是」;`tests/native-registration.spec.ts` 新增「`bottomOnly` 类型一个原生 tab 类型、一个 slot、一条 guide 条目都不产生」(**删掉 `sync()` 里那行 skip 即红**——此前这半边只有挂载 lane 抓得住);`tests/chunk-artifact.spec.ts` 新增「chunk 里必须有 xterm、核心包里一处都不许有」的产物断言;`tests/e2e/mount.e2e.ts` 新增第三条真实浏览器用例(展开底部 → **空面板里的「Terminal」类型卡片** → 断言 `.xterm` 挂载、`/sidebar/bundle/terminal.js` 有响应、无 pageerror,且宿主 `terminal` guide 条目**仍恰好 1 条**、`terminal-bottom` 的 guide 条目**为 0**;`+` 菜单那条点击路径 lane 里没有覆盖,两条入口共用同一份 `buildNewTabOptions`)。
|
||||
- 📄 词条 `terminalNew` / `terminalUnavailable` / `terminalGone` 进 `locales.ts` 的 zh/en 与 19 份第三语言词典。[设计文档](docs/plans/2026-10-05-bottom-terminal-tab.md)。
|
||||
|
||||
- 🧹 **移除「位置兼容模式 / 标题栏条带」整套机制与设置**([#430](https://github.com/omdsh-dev/DSH-better-sidebar/issues/430),细节与消费者普查见 [移除记录](docs/plans/2026-10-05-remove-titlebar-compat-strip.md)):这套设置想让人手动声明「我的桌面壳在顶部占了 N 像素」、好让插件把内容下移,但**插件内部早已没有消费者**——唯一的三条读 `--dsh-title-bar-strip` 的 CSS 规则随「顶部自绘 chrome 交还宿主」在 v0.19.0(`223b254`)删除,而用户期望被移动的「侧边栏按钮」是**宿主原生控件**(插件没有它的位置 API),宿主也不读这条契约(DSH 源码树对该契约与 `desktopWindow` 全 0 命中)。于是改设置只会写一个没人读的变量、**什么都不动**。本版把整套机制删除:`titlebar-strip.ts` / `wco.ts` / `shell-presets.ts` 三个模块与各自 spec、`titleBarScheme` / `titleBarPresetId` / `titleBarCompat` / `titleBarStripPx` 四个偏好键与设置界面、12 个词典 key × 21 份词典、挂载 lane 里两条 WCO / preset 场景。**保留**:`desktop-env.ts` 的 `hostTransportBase()`(反向代理前缀与 `dsh-app://` 解析基准,另有 3 个消费者)与「**自定义 CSS**」逃生口(改为独立分组、**非空即生效**)。旧偏好数据**安全忽略**(宿主 schema 为 OPEN 不报错、客户端 `parsePrefs` 只按声明字段构造、一次性 `settings.yaml` 回迁丢弃未声明键),三层各有测试与变异证伪。
|
||||
- 🧪 测试:新增「旧数据被安全忽略」三层断言(`tests/prefs.spec.ts` / `tests/plugin-shape.spec.ts` / `tests/smoke.spec.ts`),挂载 lane 改为**负向断言**(戳记 URL 下 `body[data-dsh-title-bar-compat]` 必须缺席、`--dsh-title-bar-strip` 必须为空)并保留「自定义 CSS 实时注入」用例;删除 5 个只服务该机制的 spec。
|
||||
- 🗂️ **资源管理器补「新建文件」**([#132](https://github.com/omdsh-dev/DSH-better-sidebar/issues/132),移植贡献者 PR [#832](https://github.com/omdsh-dev/DSH-better-sidebar/pull/832) 的交互语义):目录行右键「新建文件夹」旁新增「**新建文件**」,在该层顶部插入同款行内输入(Enter 提交 / Escape 取消 / 失焦提交 / IME 保护,图标跟随输入的文件名),与「新建文件夹」**互斥**(开一个即关另一个)。与 PR 的差别是**写路径落在服务端**:新增路由 `fs.createFile` → `fs-operations.ts` 的 `createWorkspaceFile`,复用既有 rename/mkdir 的单段名与「已存在即拒」规则(`fs-error` 409,同一句 `"x" already exists`),并额外拒绝 Windows 非法字符(`< > : " | ? *` 与控制字符)与保留设备名(CON / PRN / AUX / NUL / COM1-9 / LPT1-9,带不带扩展名都拒);落盘用 `wx`,**同名文件绝不被截断**;客户端在已加载的那一层先做一次大小写不敏感的占用检查(`newFileExists`),服务端仍是最终裁决。词条 `newFile` / `newFilePlaceholder` / `newFileInvalid` / `newFileExists` 同批进入 `locales.ts` 的 zh/en 与 19 份第三语言词典。
|
||||
- ↕️ **资源管理器排序三档**([#132](https://github.com/omdsh-dev/DSH-better-sidebar/issues/132)):文件树头部工具区(刷新 / 上传按钮旁)新增排序菜单——**按名称 / 按类型**二选一(打勾)+ **文件夹优先**独立开关。排序作用于 `level.entries` 的**副本**,不改服务端、不原地重排共享的目录缓存;**默认(名称 + 文件夹优先)与宿主原有顺序逐元素一致**(`tests/file-tree-sort.spec.tsx` 直接拿 `fs-tree.ts` 的 `compareEntries` 当基准)。「按修改时间」不在本批范围(维护者另立 issue)。
|
||||
- 🧪 测试:`tests/fs-create-file.spec.ts`(11 例:成功 / 根目录为父 / 空名·`.`·`..`·分隔符·`../escape` 路径穿越 / 全部 Windows 非法字符 / 保留名与近似名 / 已存在且内容不被截断 / 同名为目录 / 不可写父目录 / 工作区外父目录 / 路由 200·409·400 三态),`tests/file-tree-new-file.spec.tsx`(11 例:菜单只在目录行、根层与子层提交、Escape、非法名、占用名、服务端拒绝进错误条、失焦提交、两种创建器互斥),`tests/file-tree-sort.spec.tsx`(12 例:三档顺序、文件夹优先两种取值、默认等于宿主顺序、不原地排序、`typeOf`,以及 FileTree 渲染与 TreePanel 头部控件端到端切档)。
|
||||
|
||||
- 📑 **Tab 右键菜单补两项**([#109](https://github.com/omdsh-dev/DSH-better-sidebar/issues/109)):「**关闭全部页签**」与「**在资源管理器中定位**」。前者作用域与相邻三项一致——**右键所在的那个标签组**(分栏各管各的),含右键的那个页签本身(这是它与「关闭其他页签」的区别),逐条走既有单页签关闭路径(descriptor `onClose` 生命周期 + 终端 pty 释放 + 会话作用域),页签在滚动视口外也能关;菜单只从页签上打开,所以该项恒可用。后者对页签关联的文件(`tab.path`,即编辑器/文件夹窗口)调用宿主 **open-in-app** 的 reveal——与资源管理器行右键「在文件管理器中显示」**同一个适配器**(`createOpenInApp` → `ctx.remote.session.openWorkspacePath({ action: 'reveal' })`),不新增任何宿主调用;变更 / 任务 / 侧边对话 / diff 页签没有可定位的文件(diff 的 ref 是仓库相对路径,不是宿主能定位的路径),该项置灰,无 resolver 时同样置灰。词条 `closeAllTabs` / `revealTabInFileManager` 同批进入 `locales.ts` 的 zh/en 与 19 份第三语言词典。
|
||||
- 🧪 测试:`tests/tab-bar-context-menu.spec.tsx` 把菜单整份钉到 **6 项**(标签序 + 每行 disabled 数组),新增「关闭全部」「定位」「无关联文件置灰」「无 resolver 置灰」用例,并新增一条 Workbench 用例钉住 reveal resolver 穿到**分栏后每个 pane 的** tab 条(回退任一层传递即红)。
|
||||
- 🔍 **文件搜索优先走本机原生引擎(fd / ripgrep),缺失或失败自动回退 JS 遍历**([#203](https://github.com/omdsh-dev/DSH-better-sidebar/issues/203),PR [#303](https://github.com/omdsh-dev/DSH-better-sidebar/pull/303) 重写落地):`fs.search` 之前是纯 JS 递归遍历,十万级目录秒级、10 万条访问预算一顶就静默截断。现在启动后惰性探测一次(每个候选二进制 `--version` 500ms 内验证通过才用,进程内缓存),探到就用引擎,探不到/运行失败回退原遍历;rg 优先用 DSH 自己捆绑的 `@vscode/ripgrep`(agent 侧搜索工具同一个二进制,从 CLI 入口的依赖树推导候选路径),fd 走 `--fixed-strings` 字面量匹配。噪声目录排除名单单源化到 `SKIP_DIR_NAMES`(18 项,walk 与两条 argv 共用),引擎输出统一归一化成 walk 契约(根相对、`/` 分隔、大小写不敏感),**路由与客户端零改动**。**目录命中按 #801 的契约同时产出 `dirs`**:fd 用 `--type d` 直接列目录,rg 由文件路径倒推匹配的目录段(`deriveRgMatches`)——唯一残留差异是**空目录在 rg 下不可见**(已记录)。运行失败禁用该引擎(坏二进制不该拖慢后续搜索),**超时只降级本次**(树太大不等于二进制坏)。调试插桩 `DSH_SEARCH_DEBUG=1` 写 `$DSH_HOME/search-debug.log`,默认完全静默。Windows 侧由 `ci-windows` lane 承载:`choco install fd ripgrep` + `pnpm check:engines` 对插件自己的 argv 做字节级断言(不得含 `\`/CR、非 ASCII 文件名必须命中)。
|
||||
- 🧪 测试:`tests/search-engines.spec.ts`(探测缓存 / 失败禁用 / 超时不禁用 / argv 对称性 / `deriveRgMatches` / 捆绑 rg 候选路径推导 / 真引擎在场时的端到端),`tests/fs-search.spec.ts` 的 dispatch 组(引擎优先、`dirs` 透传、预算透传、运行失败回退并禁用)。
|
||||
|
||||
### v0.24.1
|
||||
|
||||
> 🎁 **本版包含从 v0.22.1 起的全部内容**(v0.23.0 的文件页 / 文件变动页 UI/UX 重构与性能打磨、v0.24.0 的 DSH 0.2.0-rc.1 支持线前移,以及本节的修复)。
|
||||
>
|
||||
> 🐞 **修复版**:文件树「一操作就整体刷新」的两处根因。① 原生承载面(`src/client/native/index.ts` 的 `sync()`)把 `files` 接管项当成多余注册——它按 KIND 记账、永远不在 `wanted` 里,于是**每次会话状态写入**都被 dispose + 重建;替换 slot 注册等于替换宿主的 slot entry,**整个插件 tab body 被卸载重挂**(展开/收起、切 tab、拖底部工作台都会触发)→ 文件树丢失层缓存、滚动位置与目录 watcher,并重新 `fs.trees([root, ...expanded])` 重列整棵可见树。② 目录实时刷新(`FileTree.tsx` 的 `retryDir`)**先把该层缓存删掉**再请求,行被占位替换后重建(构建 / 格式化 / 模型跑 bash 时整层闪空)。
|
||||
|
||||
- 🧪 判别性证据:真实挂载 lane 新增 `tests/e2e/zz-expand-refresh.e2e.ts`(展开只请求该层、tab body 存活、行数不归零;回退任一修复即红),配套两个 jsdom 单测(回退后 `registered` 6 → 12、`disposed` 全是 `dsh-better-sidebar:files`;另一条断言重列期间旧行仍在屏)
|
||||
- 📉 修复后实测(40 子项目录):展开 `fs.trees` payload 由 `[root, big]`(空缓存特征)变为 **`[big]`**,新开 WebSocket 1 → **0**,被删行 45 → **0**,外部写入由「删 40 建 40」变为 **只增 1 行**
|
||||
- 🔧 `src/fs-watch.ts` / `use-dir-watch.ts` / `TreePanel.tsx` / `tab-adapter.tsx` 零改动(`fs.watch` 新建自身不投递事件,已实测证伪)
|
||||
|
||||
### v0.24.0
|
||||
|
||||
> 📦 **支持线前移**:仅适配 DSH **0.2.0-rc.1+**(peer 下限 `^0.2.0-rc.1`,CI 钉 `@deepseek-ai/dsh@0.2.0-rc.1`)。**0.1.7 线(含 npm `latest` 的 0.1.7-rc.2)请固定 v0.22.1(0.1.7 线最后发布的版本)**——宿主 0.2.0 的启动兼容性预检按 `semver.satisfies(宿主版本, peer范围, {includePrerelease:true})` 判定,caret 范围跨 minor 不成立(实测 `^0.1.7-rc.1` 对 `0.2.0-rc.1` 为 **false**,整行会被静默禁用),因此本版不保留任何 0.1.7 兼容分支。
|
||||
|
||||
- 📦 **基线抬到 `0.2.0-rc.1`**:14 条 DSH peer + 27 个 `@deepseek-ai/*` devDependencies 同步钉版;`dsh.plugin.json` 的 `engines.dsh` 随之前移;挂载 lane(`scripts/e2e-common.sh`)与 CI 钉版同步。
|
||||
- 🔍 **适配前的实测结论(纯增量,故无运行时改动)**:本插件消费的 19 个宿主包里**零个值导出被删除**;类型面仅 `dsh-client-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 plugin` / `dsh web` / 启动行 / `--version`)与 `dsh-client-modules` 运行时**逐字节相同**、web profile 的客户端 inject 列表相同、`ui-primitives` 的裸 import 集合相同(无需新增测试期依赖)。
|
||||
- 🧩 **宿主 web profile 组成变化与本插件无关但已核对**:新增 desktop-only 的 `product-analytics` / `desktop-product-telemetry`(web profile 上 `disabled`);原先就 `disabled` 的 `time-context` / `schedule` / `ui-schedule` 三行移入可选的 `dsh-experimental-schedule-bundle`。「宿主 tab 只有 terminal、browser 缺席」的挂载断言不受影响。
|
||||
- 🧪 **测试与规则**:`tests/market-manifest.spec.ts` 的 peer 形状断言改为钉当前基线 tuple,并把「caret 跨 minor 必失效」写进注释(这条与 §3.4 第 12 条里「includePrerelease 更宽松」的经验不冲突:宽松只发生在同一 minor 内)。
|
||||
- ⚠️ **唯一残留**:可选集成 `@huanlin/dsh-plugin-better-locale`(未被任何源码/测试 import,仅结构化运行时探测)的 peer 钉在 `^0.1.0-rc.8`,其最新 0.4.3 同样钉 `^0.1.5-rc.2`——两者在 0.2.0 上都会被宿主预检禁用,故 `pnpm peers check` 会报它的 5 条 unmet peer。这是上游未适配 0.2.0 的结果,与本插件自身 14 条 peer 无关。
|
||||
### v0.23.0
|
||||
|
||||
> 🧭 **开发线版本(从未发布到 npm,全部内容随 v0.24.1 一并发布)**:文件页与文件变动页的整体 UI/UX 重构,加上一轮性能与交互打磨。文件页新增 **Ctrl/Cmd 与 Shift 多选**(VS Code 语义)、批量操作条、**Git 变更着色**(与 VS Code 同色的新增/修改/删除/冲突,目录带汇总点)、**新建文件夹**、拖拽上传体验重做;**多选可右键「压缩并下载」**,打包在宿主侧成为带进度的任务(`archive.build` / `archive.status`,逐条目回调,4 并发 + 5 分钟 TTL + sessionId 绑定)。「打开方式」改为**双源并存**:宿主探测到的本机关联应用(资源管理器 / VS Code / Cursor / Zed / 自定义编辑器,含 SSH 远端)与插件自研目标,可用设置开关 `openWithPluginTargets` 强制并存;右键菜单收敛层级(一级只留默认动作,应用列表进子菜单)。文件变动页**重构为层级树**,Git 视角(工作区 / 暂存 / 历史)与 Agent 视角(会话内改动)各自保留,目录行可暂存/取消暂存。交互与性能:`/sidebar/api/fs.tree` 实测 **22.8ms → 3.8ms**(10k 条目,readdir 一次取回 + 只为 cap 建行 + 小写比较排序 + 1.5s 目录级缓存,由写操作与 fs-watch 失效),新增批量路由 `fs.trees`(挂载/刷新的 N+1 请求变 1 个),右键菜单打开不再重列目录、行不再随 git 轮询重渲染。修掉「在侧边打开」没有效果(原来只写未展开的底部工作台,现按承载面分流到宿主 `openResource(preferNewPane)` 真正分栏)。
|
||||
|
||||
- ⚠️ **行为变更(安全相关)**:**删除工作区路径检测**——插件 fs 路由(tree/read/write/rename/remove/mkdir/媒体/HTML/upload/archive)不再做包含性检查,可读写宿主用户能访问的任意路径(仅受 OS 权限约束),`workspaceFence` 设置与围栏提示一并移除。
|
||||
- 🧩 抽出可复用的全局组件与共享 store(`IconButton` / `Chip` / `SectionHeader` / `Notice` / `ConfirmDialog` / `StatusBadge` + 共享 git 状态 store),皮肤契约(`tests/theme.spec.ts`)继续守护;ZIP 打包器自研(无第三方依赖)并修掉非 latin1 文件名的下载头 500(RFC 5987)。
|
||||
- 🐞 同时修掉:关闭文件后返回文件树时展开状态被重置(原生承载面的展开集合原先按 tab 记录,现改为**每会话状态**的投影)。
|
||||
|
||||
### v0.22.1
|
||||
|
||||
> 📦 **正式版**(npm `latest`):仅支持 **DSH 0.1.7-rc.1+**(peer 下限 `^0.1.7-rc.1`,CI 钉 `@deepseek-ai/dsh@0.1.7-rc.1`)——**支持线不变**,0.21.1 / 0.22.0 的用户直接升级即可;**DSH 0.1.6-alpha.2 及更早请继续固定 v0.19.1**。这是一次补丁版:两个缺陷在真机上可稳定复现,而当时的单元测试**全绿**。
|
||||
|
||||
- 🐛 **`files` 接管 id 被孤儿化 → `native register files error: … already registered` 刷屏 + 文件树落到宿主空态(需刷新页面才恢复)**(社区 issue #770 / #771 / #766)。根因链由官方桌面壳日志逐字确认(`desktop.frontdesk.log` 2026-09-27 15:51:39.338):客户端条目替换(插件市场更新 / Plugins 页禁用→启用 / HMR 重打)期间,插件 teardown 逐个注销内置描述符 → `service.notify()`(同步内联)驱动 `sync()` 在**已经 inactive** 的插件上下文上运行;清理循环把**不是描述符**的 `files` 接管释放后又**在同一轮里重建**它——`tabs.register` 建在**宿主**上下文上(宿主上下文仍活着)因此照样取走 id,紧随的 `ctx.slots.inject` 建在插件上下文上抛 `cannot create effect on inactive context`,`live.set(FILES_KIND, …)` 永不执行,disposer 丢失 → 该 id 在**整个页面生命周期内不可再注册**。修复(社区 PR #777,@yanzhaohui1999):① 清理循环**跳过 `FILES_KIND`**——接管的寿命只由编辑器类型的 `wantsFiles/hasFiles` 开关与 seat disposer 决定;② **任何在宿主取走 id 之后失败的注册都回滚释放**该 type 与已建好的槽位,失败只留一个「下次通知可重试」的状态,绝不留下无处释放的 id;③ teardown / 清理循环逐个安全释放(一个释放抛错不再中断其余)。
|
||||
- 🐛 **macOS 桌面版窗口拖拽「拖一次就失效」并且双击标题栏缩放也失效**(issue #772)。插件宿主是直挂 `body` 的子元素,宿主的 `html[data-platform=darwin] body > :not(#root) { -webkit-app-region: no-drag }`(选择器含 id,只有 `!important` 能压过)命中它,而 app-region **无视 `pointer-events`**——铺满视口的面板层把下面每条 `[data-window-drag]` 拖拽带一起抵消。修复(社区 PR #773 合并;随后 #786 补齐):`[data-dsh-better-sidebar]`、`[data-dsh-panel-host]`(`> *` 保持 `no-drag`)与放大视图 `.mermaidModal` 用**中性值** `-webkit-app-region: initial !important` 退出计算——`initial` 的计算值 `none` **不**扣减拖拽区,而字面量 `none` 不是中性值(它计算成 `no-drag`);交互弹层(`.selectionPopup`、`FloatingWindow`、`AnchoredPopover`)**不**加 `initial`,否则按下会变成拖窗(重演 #103/#111)。
|
||||
- ✅ **守护**:`tests/native-registration.spec.ts` 把两条不变量钉在注册表的**事件日志**上(在未修复代码上 4/4 红,且「失败后仍能重新注册」不再是非判别断言);槽位失败判据改为 `name::key`,让 `registerSlots` 的**部分回滚**释放路径真正被执行;新增**部署级回归门** `tests/e2e/native-reload.e2e.ts`(`utimesSync` 已安装的 `lib/client.js` → 页面内条目替换 → 断言无 `native register … error`、无诊断条、`files` 接管重新可用;npm 0.22.0 上连续 3 次运行全红、修复版连续 3 次全绿(该用例只有 1 个 test,重复跑三次))。拖拽契约由 `tests/panel-host-css.spec.ts` 在 Linux 的 `pnpm test` 里钉形状(无 macOS runner),并由挂载 lane 的**真实级联探针**按宿主规则读计算值(面板宿主/放大视图在未修复产物上都判红)。
|
||||
- 📐 **基线不变**:`@deepseek-ai/dsh-*` 仍钉 `0.1.7-rc.1`,peer 下限 `^0.1.7-rc.1`;无公共 API / 契约 / 词典 / chunk 改动。事故记录与「为什么否决 #766 的吸收方案」见 [docs/plans/2026-09-28-native-files-takeover-reload-leak.md](./docs/plans/2026-09-28-native-files-takeover-reload-leak.md)。
|
||||
- 🧪 **验证**:`pnpm test` 122 files / 1293 passed / 9 skipped;`pnpm test:mount` 与 `DSH_CMD=… pnpm test:mount:aggregate` 绿;打包产物里 `app-region:initial!important` ×2、`no-drag` ×2。
|
||||
|
||||
### v0.22.0
|
||||
|
||||
> 📦 **正式版**(npm `latest`):仅支持 **DSH 0.1.7-rc.1+**(peer 下限 `^0.1.7-rc.1`,CI 钉 `@deepseek-ai/dsh@0.1.7-rc.1`)——本版没有动支持线,0.21.1 的用户直接升级即可。**DSH 0.1.6-alpha.2 及更早仍请固定 v0.19.1**。主内容是把任务管理页从「子代理拓扑」重做成**工作流图**,并在随后几轮里按真机反馈打磨;期间 DSH 0.1.7 删掉了 Agent Teams 的 Remote 方法,团队与后台任务两个数据面随之改写。
|
||||
|
||||
- 🧩 **任务管理页 = 工作流图(全新主显示模式)**:会话树渲染为分层节点 + 贝塞尔连线的画布——拖拽平移、滚轮缩放到光标、内容包围盒居中适配(双击背景重新适配)、右下角控制条(图/树切换 + 折叠开关 + 缩放 + 适配)。**经典缩进树保留**(键盘可导航),两种模式共享同一个视图模型,折叠状态与团队富化不会视觉漂移;默认视图走设置里的偏好。
|
||||
- 🃏 **双段式节点卡**:上段 = 类型徽章(主代理 / 子代理 / 成员 / 工作流 / 已完成聚合)+ 相位徽标 + 名称 + 元信息;下段小条 = 状态点 + 状态词 + **主 Agent 同款合并活动行**(并发工具按类别归并 + 计数 + 最新在跑那条的细节,措辞直接取宿主 `chat` 命名空间的词条)+ 已完成节点的折叠 chevron。运行中小条从左到右**完整扫过**(1.5s,令牌渐变,`prefers-reduced-motion` 下关闭)。卡片 8px 圆角、只用上段极淡底色表达层级、当前会话用加粗 accent 描边。
|
||||
- 🔀 **工作流 run 入图**:宿主侧从 `tool-workflow/*` 会话事件折叠出 run(与官方 workflow-run 面板同一批事件),run 挂在发起代理下、成员 agent 重新挂到 run 节点下并按相位分框、同色相位徽标;catalog 里没有的成员用 run 自身数据合成占位节点,所以跑完的 run 仍能看到它的成员。
|
||||
- 🗂 **折叠分两组,各自说清自己是什么**:`✓ N 已完成`(已完成 + 出错,失败会单独报 `出错 N`)与 `N 个待命`(跑完一轮、随时可被叫起来的 teammate)是**两行**;**手动 chevron 永远有效**(不设阈值),**自动聚合**只在「待命成员 ≥3」时收空闲成员——1~2 个待命成员就是这个团队的工作集,而且它们的卡上会挂任务行。聚合卡名字行写「前两个名字 + `+N`」,点聚合全部展开。
|
||||
- 🪟 **两个常驻浮动窗**(抽出可复用的 `FloatingWindow`):后台任务输出与共享任务详情/编辑都在其中——可拖拽、可四边拉伸、内容区自滚动、只靠关闭按钮或 Escape 结束时消失(外部点击、失焦、锚点离屏都不关)。任务窗把窗口余量交给描述区(编辑态交给多行输入框),拉大窗口是给内容更多空间而不是留白;动作行固定在 footer,长描述不会把按钮推出视野。
|
||||
- 👥 **Agent Teams 任务板(实验层)**:团队成员富化到对应节点上、常驻任务条列出成员与共享任务;任务状态机跟随宿主(待办 → 认领 → 进行中 → 完成 → 重开)+ 改派 / 编辑 / 两击删除,CAS 过期修订单独提示(别人改过 → 已刷新)。**成员活动由 `subagents.live` 的 running 叠加**,不是在客户端猜。
|
||||
- 🔄 **后台任务改读宿主客户端服务**:0.1.7 的 web profile 挂载客户端 `ctx.jobs`(推送 roster + 非消费输出流 + kill),插件因此删掉自建的 `jobs.list` / `jobs.output` / `jobs.kill` 三条路由与事件回放镜像,也彻底不碰模型 `job_output` 游标(宿主把这层约束变成了能力)。输出改在常驻浮动窗里流式显示并尾随,代理数 ≥ 8 时抽屉自动折叠。
|
||||
- 🛠 **DSH 0.1.7 的两处数据面重写**:① 团队读——0.1.6 的 `agentTeams.remoteView` 三个 Remote 方法被上游删除,插件改为读 Lead Session 的 **`agentTeam` Session projection**(与 `subagentCatalog` 同源、推送式),删掉 `teams.view` 路由与 5 秒轮询;写路径保留两条路由(`createTask` / `updateTask`),拒绝从「返回联合」变为「抛 `TeamError`」,`TEAM_TASK_STALE_REVISION` 映射成 409 `team-conflict`。② 后台任务——见上一条。**修掉的真实故障**:0.1.7 上团队条从来不渲染(路由报 `remoteView is not a function`,页面静默无提示)。
|
||||
- 🐛 **真机抓到的四个缺陷**(单测都绿的):
|
||||
- 逐节点折叠按钮点了没反应——它被**自动**折叠的守卫卡住了(`isAutoFoldable` 要求非成员且是叶子),而按钮是**手动**触发,现在两种触发各有各的守卫;
|
||||
- 「待命」的卡片**从来不画**折叠按钮(chevron 的渲染条件写死成「已完成/出错」),现在「不在执行」即提供;
|
||||
- 认领任务后标签变「阻塞」——`ready` 的语义只是「待办且无未完成 blocker 可认领」,对所有非 pending 任务都是 false,现在收敛成唯一规则 `taskBlocked/taskStatusLabel/taskTone/taskDotState`;
|
||||
- 任务窗「完成」在队列中的任务上必失败——宿主状态机要求先认领,动作行现在跟随状态。
|
||||
- 🎨 **窄屏与手机设置**:卡片/行距/字号按原生右侧栏的窄宽重新定档(内容包围盒居中、缩放夹取、平移边界、相位框配色、连线 stub 加粗、卡片高度预算重算);设置页新增**手机**分组——窄屏(≤768px)时新任务页不再自动弹出、任务管理页默认走树状图。
|
||||
- 📐 **基线**:`@deepseek-ai/dsh-*` 钉版与支持线**不变**(0.1.7-rc.1,peer `^0.1.7-rc.1`)。新增词条若干(含 `teamTaskClaim` / `tasksFoldIdle` / `taskWindowCreate` / `tasksStateProvisioning` 等)×20 份词典;设计文档见 [docs/plans/2026-09-14-tasks-graph-workflow-teams-design.md](docs/plans/2026-09-14-tasks-graph-workflow-teams-design.md)、[2026-09-27-tasks-graph-polish.md](docs/plans/2026-09-27-tasks-graph-polish.md)、[2026-09-27-floating-window-mobile-settings.md](docs/plans/2026-09-27-floating-window-mobile-settings.md)、[2026-09-27-agent-teams-dsh-0.1.7-adaptation.md](docs/plans/2026-09-27-agent-teams-dsh-0.1.7-adaptation.md)(含实施偏差与已知限制)。
|
||||
|
||||
### v0.20.0(开发线,**从未发布**)
|
||||
|
||||
> 🚫 **这一版没有发布到 npm**(npm 上 `latest` 仍是 v0.19.1):它原本是 0.1.6-alpha.2 线的正式版,开发完成后被 0.21 线直接取代,所以下面这些变更实际随 **v0.21.1** 一起发布。原本的定位:仅支持 **DSH 0.1.6-alpha.2+**(peer 下限 `^0.1.6-alpha.2`,CI 钉 `@deepseek-ai/dsh@0.1.6-alpha.2`)。**这是一次破坏性变更版**:0.1.5-rc.* 用户请固定 `dsh-better-sidebar@0.19.1`。适配记录见 [docs/plans/2026-09-21-dsh-0.1.6-alpha.2-adaptation.md](docs/plans/2026-09-21-dsh-0.1.6-alpha.2-adaptation.md)。
|
||||
|
||||
- 🖥️ **终端交给 DSH 内置**:DSH 0.1.6 自带右列终端(`ui-sidebar-terminal`),所以插件删掉了整套自研终端——`pty-manager` / `agent-pty` / `pty-deps` / 8 个 `terminal_*` 工具 / xterm 视图与字体链接 / 跨会话固定终端,以及 `node-pty` 依赖、它的 `allowBuilds` 放行与安装脚本的 `-Repair` 模式。**注意**:模型因而失去跨调用持久的终端(只剩一次性 `bash` / `pwsh`);上游 `@deepseek-ai/dsh-tool-terminal` 未被内置 bundle 挂载,需要时请自行在 profile 里启用。
|
||||
- 🌐 **浏览器视图让给内置**:插件删掉 `BrowserView` / 沙箱状态条 / 嵌入性探测(含宿主 `browser.probe` 路由)与两个只配置自家 iframe 的设置项;**保留**聊天与界面的外链接管(按协议分流是宿主没有的能力),目标改为 DSH 内置的 `browser` tab 类型。
|
||||
- 🧩 **产物行交回宿主**:DSH 0.1.6 把 `conversation.chat.turnTail` 从 chain 改成 list(上游有意让多个插件**追加**而非互相替换),插件原来的接管只能与内置产物卡重复,因此整体删除;点击行为不变(内置走宿主 `openFile` → 本插件编辑器)。代价是失去轮尾那一个「在文件树中显示」入口(树内右键仍在)。
|
||||
- 🐛 **修复两个静默破坏**:`SidebarRightGuideEntry.id` 变成必填后,缺 id 会让**整个原生承载面静默空掉**(抛在 `ctx.inject` 回调里被吞);`turnTail` 改 list 后原注册直接抛错、产物行失效。两处都已修好并加测试守护,同时补了注册失败的上报口。
|
||||
- 🎨 **空白面板卡片对齐内置卡风格**:`.paneCard` 改用 DSH 指南胶囊那套配方(0.5px l4 描边 / 24px 圆角 / layer-1 填充 / 56px 下限 / 14×20 内边距),并加测试守护其几何、令牌化配色,以及不复制上游那套**未定义**的 `--dsw-alias-bg-l1/-l2` 拼写。
|
||||
- 📐 **基线**:`@deepseek-ai/dsh-*` 全部钉 `0.1.6-alpha.2`,`dsh-code-runtime` 整包消失已移除,`diff` / `simple-icons` 作为 primitives 的新裸 import 提升进 devDependencies;`ui-primitives` 本版三处破坏(`IconSendOutline16` 下线、`TerminalBlockLabels.noExitCode` 新增、`ConnectionIndicator.reconnectLabel` 移除)同步适配。
|
||||
|
||||
### v0.19.1
|
||||
|
||||
> 📌 **正式版**(npm `latest`,无 prerelease 后缀):钉版推进到 **DSH 0.1.5-rc.2**(npm `next`),**peer 下限仍是 `^0.1.5-rc.1`**——rc.2 的上游 delta 里没有任何触及本插件的面(零 `packages/api|host|session|agent` 变更,真实代码改动只有消息反馈弹窗、产物卡片 CSS 与 `CodeFileIcon` 的 SVG 数据拆分),因此 rc.1 用户无需升级 DSH 即可用本版。DSH 0.1.5-alpha.2 用户继续用 **v0.19.0-alpha.1**;0.1.2-rc.1 稳定线继续用 **v0.18.1**。
|
||||
|
||||
- 🎯 **适配 DSH 0.1.5-rc.2**:devDependency 钉版、CI 挂载车道与 `SIDEBAR_SERVICE_VERSION` 同步到 rc.2;插件侧**零代码改动**(上游 delta 未触及本插件,逐文件核对见 [docs/plans/2026-09-10-dsh-0.1.5-rc.2-adaptation.md](docs/plans/2026-09-10-dsh-0.1.5-rc.2-adaptation.md)——300 个变更文件里绝大多数只是各包 `package.json` 的版本号单行)。
|
||||
- 🎨 **文件图标(#611)与内置 Tab 图标改为彩色**(#531 + #594 合并,实现按 rc.2 重做):
|
||||
- **文件/文件夹图标走 DSH 官方图形**:回退链末端是宿主 `ui-primitives` 的 `FileTypeIcon`(48 类官方全彩代码/配置图形 + markdown/图片/PDF/Office/视频/文件夹的类目色板),插件**不再自带扩展名表,也不再需要图标懒加载 chunk**——`#429` 那份 563 条彩色数据与 `lib/client-file-icons.js`(255 kB)连同 `fileIconTheme` 设置开关一并删除,彩色就是唯一形态(核心 bundle 因此只增 10 kB)。
|
||||
- **新增对外 `registerFileIcon` API**(能力 `'fileIcons'`):按扩展名(`exts`)、精确文件名(`names`)、目录名(`folderNames`)注册自己的图标,优先级降序、同级按注册序;**注意**:宿主分类器覆盖任意路径,所以注册 `exts: []` 的 catch-all 会接管所有未具体命中的行。
|
||||
- **内置 tab 图标彩色**:文件 / 文件变动 / 任务管理 / 侧边对话 / 终端 / 浏览器 六个类型与 diff 视图的 glyph 换成彩色版本(颜色全部来自 `--dsw-alias-*` 令牌,皮肤照旧全覆盖)。
|
||||
- **原生右侧栏的 tab 芯片也带图标**:宿主的 tab 定义没有 icon 字段,但 `sidebar.right.pane.tab.title` 槽就是芯片内容——插件在该槽渲染「图标 + 标题」(编辑器 tab 带路径时显示该文件的图标),glyph 为 `aria-hidden`,芯片可访问名不变。
|
||||
- 🛠 **CI 修复一:Windows lane 的真实超时**。`ci-windows` 在 2026-09-09/10 窗口内红了 8 次,其中 6 次是真起进程的用例撞上 vitest 默认 5000ms:`tests/agent-pty.spec.ts`(真起 PowerShell + ConPTY)与 `tests/install-powershell.spec.ts`(冷启 `powershell.exe` 实测 12.1s)现在各自声明 30s 预算,且 `vitest.config.ts` 的全局 `testTimeout` 从默认 5000ms 提到 **15s**(第一次真实 Windows 跑又在**第三个**文件上翻车:`tests/git.spec.ts:85` 耗时 9607ms——三个文件同一个根因,逐文件加超时是打地鼠);`waitForTranscript` 的内层轮询预算从 5000ms 降到 15s,**内层预算必须小于外层**(原先是同一个 5000ms,结构性必然超时)。`ci-windows` 的 `Test` 改跑 `pnpm test:windows`(`--maxWorkers=2`),在 2 核 runner 上不再让真起进程的 spec 互相抢占。
|
||||
- 🛠 **CI 修复二:挂载车道的 npm 安装**。`plugin-mount` 的 `npm install -g @deepseek-ai/dsh@<ver>` 曾 4 次失败(2 次 `ETARGET`、2 次 `JavaScript heap out of memory` exit 134):钉版自身的传递依赖是浮动 `^` 范围,上游**分阶段发布**预发布版时(rc.2 于 09-10 的 14:43–14:57 逐包上线)npm 会组出 rc.1/rc.2 混合 peer 图(3062 条 ERESOLVE)。现在钉一个**已完整发布**的 rc.2(修 ETARGET)并加 `NODE_OPTIONS=--max-old-space-size=4096`(修 OOM)。中途试过 `--legacy-peer-deps`,被真实 CI 否掉:它跳过的正是全局安装必须提供的 peer,`dsh-app-boot` 在 boot 时 require 的 `@deepseek-ai/cordis-plugin-group` 是 peer 而非 dependency,加了它 CLI 直接 `ERR_MODULE_NOT_FOUND`。
|
||||
|
||||
### v0.19.0
|
||||
|
||||
> 📌 **正式版**(npm `latest`,无 prerelease 后缀):本版仅支持 **DSH 0.1.5-rc.1+**(peer 下限 `^0.1.5-rc.1`,CI 钉 `@deepseek-ai/dsh@0.1.5-rc.1`)。DSH 0.1.5-alpha.2 用户请继续用 **v0.19.0-alpha.1**(npm `alpha` 标签仍指向它);0.1.2-rc.1 稳定线继续用 **v0.18.1**。
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 📝 **新建标签页列表恢复可选说明**(#613):DSH 0.1.5-rc.1 让 `SidebarRightGuideEntry.description` 回归(可选),插件随之恢复 `TabDescriptor.description`,六个内置类型各写回一条说明(原生指南的 文件 / 文件变动 / 任务管理 / 侧边对话 / 终端 / 浏览器 六行都带上它),`guideDesc*` 词条回到 20 份词典。**宿主的原生指南只在列出的条目 ≤ 4 条时渲染说明**(更长的列表是整列丢弃,不是截断),而插件默认贡献 6 个 guide 条目——因此默认组合下说明不渲染,只有在插件设置页关掉足够多的 tab 类型、把 guide 压到 ≤ 4 条时才会出现。未声明说明的条目仍是「图标 + 标题」单行(插件不补通用兜底句)。
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 无。rc.1 相对 alpha.2 的 delta 很小(373 个变更文件,绝大多数是上游各包版本号、原生右侧栏预览 UI 打磨与测试快照),除上述说明字段回归(并附带上游 `files` 类型改用自己的彩色文件夹图标作指南字形)外,没有需要插件适配的变更。
|
||||
|
||||
**🧰 CI 与内部**
|
||||
|
||||
- 基线推进到 **DSH 0.1.5-rc.1+**(#613):peer 下限、devDependency 钉版、CI 挂载车道与 `dsh.plugin.json` 的 `engines.dsh` 同步(rc.1 在 npm 上同时是 `latest` 与 `next`)。
|
||||
- 明确未变、不必再核:全局主面板模型(`main` 槽 / `sidebar.panellist` / `ctx.layout` / 根级 `rightbar` + `rightbar.session`,插件仍不接入)、文件地址语法(`packages/util/workspace-path` 只动了版本号)、原生 tab 体宿主契约(`.paneBody` 仍是有确定高度的块级滚动容器)、core / agent / session / subagent 宿主 API 与 `ui-primitives` 导出面(仅 CodeBlock 渲染变化)。
|
||||
- `@deepseek-ai/dsh-client-ui-primitives@0.1.5-rc.1` 仍不声明 `dependencies` 而 bundle 仍裸 import `anser` / `shiki` / `@shikijs/langs/*` / `mdast-util-*` / `micromark-*` / `katex`——上一版提升进 devDependencies 的那组包因此保留,不得回退。
|
||||
- 真机验证(DSH 0.1.5-rc.1 + 插件 0.19.0):门禁 `typecheck` / `lint` / `check:consumer-types` 全绿,单测 **124 files · 1296 passed · 9 skipped**,`pnpm peers check` 干净;挂载冒烟对真实 rc.1 **7 passed**(含 tab 体填充断言,以及新增的「指南 ≤4 条时说明才渲染」断言);本地 3080 实测:guide 六行仍是「图标 + 标题」(6 > 4,说明按上游规则不渲染;上游把胶囊 `min-height` 从 48px 调到 56px),文件树点击 `AGENTS.md` 落到插件编辑器(CodeMirror 就绪),sidechat 输入框贴底(宿主盒 962px == 面板体 962px,composer 底边距 8px),底部工作台与中心列左右边完全重合,`pageerror` 0(控制台仅有第三方 `dsh-tauri-worktree` 的 `/api/dsh-worktree/attach` 500,与本次改动无关)。
|
||||
|
||||
### v0.19.0-alpha.1
|
||||
|
||||
> 🧪 **alpha 通道**(npm dist-tag `alpha`,安装 `dsh-better-sidebar@latest`):本版仅支持 **DSH 0.1.5-alpha.2+**(peer 下限 `^0.1.5-alpha.2`,CI 钉 `@deepseek-ai/dsh@0.1.5-alpha.2`)。0.1.5-alpha.1 请继续用 **v0.19.0-alpha.0**;0.1.2-rc.1 稳定线用 **v0.18.1**(npm `latest`)。
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🪟 **每个 tab 体都填满面板**(#609):原生右侧栏的 tab 体宿主是「有确定高度的块级滚动容器」而非 flex 容器,此前插件各 tab 的根只写 `flex: 1`,在块容器里塌成内容高度——侧边对话的输入框因此贴不到面板底(转录一长就被推出可视区)。现在 native 适配层统一给每个 tab 体包一层 `height: 100%` 的列 flex 宿主,插件全部 tab(含第三方 `registerTab` 注册的 descriptor)恢复与底部工作台一致的填满语义。
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🧭 **跟随 DSH 0.1.5-alpha.2 的文件地址语法**:`fileAddressFor` 一律产出 session 作用域地址、绝对路径保留前导 `/`;`parseFileAddress` 改为前缀解析并忽略 `?`/`#` 后缀。
|
||||
- 🪟 **底部工作台的中心列定位跟随 alpha.2 全局面板改动**:`conversation` 槽改为根级 `main` keyed 槽下的 `main.conversation`,定位器改认新 key 并跳过 `display: contents` 槽宿主(alpha.1 的旧 key 仍兼容)。
|
||||
|
||||
**🧰 CI 与内部**
|
||||
|
||||
- 基线推进到 DSH 0.1.5-alpha.2(#609):peer 下限、22 个 devDependency 钉版、CI 挂载车道与 `dsh.plugin.json` engines 同步;`pnpm peers check` 干净(按 §3-9 补提 `dsh-session-persistence` 传递 peer)。
|
||||
- **移除 `TabDescriptor.description`**:alpha.2 的原生指南条目不再渲染第二行(改为「图标+标题」胶囊),该字段与 6 个 `guideDesc*` 词条(20 份词典)一并下线;新建标签页的默认页改由注册表选(恰好 1 个指南条目则直接打开它)。
|
||||
|
||||
### v0.19.0-alpha.0
|
||||
|
||||
> 🧪 **alpha 通道**(npm dist-tag `alpha`,安装 `dsh-better-sidebar@latest`):本版仅支持 **DSH 0.1.5-alpha.1+**(peer 下限 `^0.1.5-alpha.1`,CI 钉 `@deepseek-ai/dsh@0.1.5-alpha.1`)。0.1.2-rc.1 稳定线请继续用 **v0.18.1**(npm `latest`)。
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🖥️ **接入 DSH 原生右侧栏**(#604):右列改为 DSH 自己的右侧栏——插件的 7 个 tab 类型全部注册成原生 tab 类型 + 原生 tab 体;聊天里的文件打开统一走 `ctx.sidebarRight.openResource(dsh-resource://file/…)`;`editor` 类型以 `extension` 优先级认领文件资源(压过内置文本预览)并接管内置「文件」页 kind(注销即复位);跨会话打开在目标会话未上屏时排队重放。
|
||||
- 🧩 **退役插件自绘右侧面板与自由窗口**(#605):右列归 DSH 后,插件只保留底部工作台(单分栏树、随会话持久化),开合按钮注册进 DSH 会话头 utilities 槽;浮窗 API(`floats` / `floatTab` / `dockFloat` / `raiseFloat` / 右键「移动到自由窗口」)、`features` 里的 `'floatWindows'`,以及 `openByDefault` / `defaultWidthPercent` / `changesDiffFloat` 三个设置项一并删除(旧持久化文档里的 `floats` 字段被忽略,不影响加载)。
|
||||
- 🔗 **适配 DSH 0.1.5 宿主契约**(#603):`assistant/chunk` 事件删除 → 实时增量改由 `agent/assistant-stream` 帧折叠(侧边对话转录的 `live` 字段);`sessionPersistence.inspect` 删除 → 冷会话读取改走 `open(id,'read')`;会话头 `version` 用 `SESSION_FORMAT_VERSION`。
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 侧边对话转录 / `jobs.output` 回放 / fork 继承等 8 处会话事件读取跟随 0.1.5 契约;自定义种子补齐 fork 标记对,避免继承父会话未领取的 inbox 输入。
|
||||
|
||||
**🧰 CI 与内部**
|
||||
|
||||
- 真机挂载冒烟门禁钉 0.1.5-alpha.1,e2e 增加「展开原生栏 → 经引导页逐个打开插件 tab 类型」的巡检;typecheck / lint / 单测 / 挂载车道全绿。
|
||||
|
||||
### v0.19.0(未发布)
|
||||
|
||||
- 🎨 **可选彩色图标主题**:设置页「文件 → 文件图标」可在**内置单色**与**彩色品牌图标**之间切换——彩色主题含 563 条规则(218 扩展名 + 197 精确文件名 + 148 目录名,如 `.tsx → React`、`package.json → npm`、`node_modules` 着色),数据在**懒加载 chunk**(`lib/client-file-icons.js`)里,只有选中时才下载,默认关闭时启动零开销。数据源自 [#429](https://github.com/omdsh-dev/DSH-better-sidebar/pull/429)(@fenter)。
|
||||
- 🎨 **文件图标多样化 + 对外图标注册 API([file-icons.tsx](./src/client/file-icons.tsx))**:文件树与编辑器文件 tab 不再是单一 `VscFile`——markdown / 图片媒体 / PDF / JSON / 40+ 代码扩展 / 配置 / 数据库 / lock / 压缩包各有专属 glyph(VSCodicons 单色 `currentColor`,遵循皮肤契约),未知扩展回退通用图标。`ctx.betterSidebar` 新增 `registerFileIcon`(`features` 含 `'fileIcons'`):按扩展名 / 精确文件名(`names`)/ 目录名(`folderNames`)注册自定义图标(彩色 ReactNode 亦可,颜色责任在注册方),`exts: []` 为全局默认(只兜内置 glyph 没认领的扩展,不吞掉内置多样性),保留扩展名 `'folder'` / `'folder-open'` 可换目录行图标;`fileIcon` / `folderIcon` 为权威解析器(完整回退链 + 逐工厂崩溃隔离),注册/注销即时生效。接入示例见[外部插件指南 §7](./docs/external-plugin-guide.md)。
|
||||
|
||||
### v0.18.1
|
||||
|
||||
> 📌 **正式版**(npm `latest`):DSH 基线不变(**0.1.2-rc.1+**,peer 下限 `^0.1.2-rc.1`)——本版是 v0.18.0 之后的增量发布:变更面板预览能力增强、文件树可写,以及五项修复。
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 📄 **变更面板操作预览增强**(#499):`.md` 阅读模式(含 mermaid 渲染)、`.html` 与 `.pdf` 内嵌渲染预览;diff 语法高亮扩展到 mjs/cjs/mts/cts、CSS/SCSS/Less、HTML/XML/SVG/Vue、GraphQL、JSONC/JSON5;新增**密钥脱敏**层(预览默认开启,面板头部可切换)
|
||||
- 🗂️ **文件树重命名 / 删除**(#550):行内重命名 + 确认式删除,右键菜单减重与子菜单视口钳制
|
||||
- 🧩 **插件目录名与 shell 预设文案词典化**(#535):跟随宿主语言
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🔀 **git diff 折叠上下文真实展开**(#576,修复 #577):折叠行此前显示「n 行…点击展开」却点不动(`-U3` 裁剪使 gap 段没有行文本);现按需经 `git.show` 拉取两侧完整内容切片填充,带加载 / 失败降级三态与请求去重;顺带修复该路由的 `rev:path` 寻址(此前恒返空)
|
||||
- 💬 **侧边对话种子不再继承父会话未领取的 inbox 消息**(#562):补 fork 标记对,消除「上下文很长时侧边对话先把之前的 User 消息发出去」的幽灵消息
|
||||
- 🖼️ **Markdown 分栏渲染器内的本地图片**(#569):改写为可访问 URL,不再 404
|
||||
|
||||
**🧰 CI 与内部**
|
||||
|
||||
- ESLint flat config 接入 CI 与 Makefile(#536)、Makefile 命令面规范化(#526)、e2e 脚本加固(#527)、共享组件测试工具收敛样板(#524)
|
||||
- 重构:Sidebar.tsx 按关注点拆分(#542)、四处轮询习语收敛到 `use-polling`(#541)、删除 rc.7 宿主的 `__DSH_MODULES__` 回退路径(#540)、One Dark/Light 语法色板单源化(#534)、重复实现收敛与死代码清理(#525)
|
||||
|
||||
### v0.18.0
|
||||
|
||||
> 📌 **正式版**(npm `latest`):本版仅支持 **DSH 0.1.2-rc.1+**(peer 下限 `^0.1.2-rc.1`);不再支持 0.1.0-rc.8 ~ 0.1.1-rc.2——DSH stable 用户请固定安装 `dsh-better-sidebar@0.17.1`,停留在 0.1.2-alpha.x 的宿主继续用 `dsh-better-sidebar@latest`(v0.18.0-alpha.0)。
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🌿 **「文件变动」统一 tab**(#475):Git 视角(真 diff / 历史 / 暂存·提交·还原 / worktree·子仓库选择)与本轮文件视角(模型读/写/编辑实时追踪)双视角合一;统一 diff 渲染(改蓝配对 + 行内字符级高亮 + 语法着色 + 上下文折叠)、底部可拖拽预览面板、一键展开独立 diff tab
|
||||
- 💬 **侧边对话渲染升级**(#486):主对话级 Blocks 结构、turn 用量尾标、断线重连横幅
|
||||
- ⚙️ **工作区路径围栏开关**(#458):新增 `workspaceFence` 声明式设置键,工作区外路径 403 时错误面一键关闭并指引
|
||||
|
||||
**⚡ 性能**
|
||||
|
||||
- 🚀 **核心包 -45%**(#489):19 个非中英词典 chunk 懒加载、渲染稳定化(转录行复用 / tree Sets / 批量 drag)、启动与轮询开销削减(单次 settings fetch、每 tick 单 git 进程);新增 perf 测量 lane;顺带修复底栏拖拽把面板宽度泄漏进宿主布局、原生左栏突跳的 bug
|
||||
- 📉 会话列重复 DOM 查询削减(#456)
|
||||
|
||||
**🐛 修复(节选)**
|
||||
|
||||
- ✏️ 编辑器 / Markdown:SSH 远程链接客户端打开(#522)、预览/编辑切换保持阅读位置(#467)、预览隐藏 YAML frontmatter(#394)、TOC 外点关闭与层级修复(#461)、@-引用保留 basename(#417)
|
||||
- 💻 终端 / 平台:Windows 自定义 shell 解析(#503)、resize 失败容错(#428)、字体解析兜底等宽(#366)、WSL 会话 Linux 绝对路径(#455)、Windows Explorer reveal 保留选中(#508)
|
||||
- 🗂️ 布局 / 状态 / 文件树 / 对话:桌面 shell 布局与侧卡片共存(#398)、窄屏自动激活不强制抽屉(#373)、自由窗口 id 恢复冲突(#385)、窗口聚焦自动刷新文件树(#469)、引用提示固定行尾(#509)、划选弹窗关闭与草稿插入锚定(#427)、折叠态开关组对齐(#361)、旧引擎滚动跳变兼容(#448)、旧版 Git worktree 列表(#454)
|
||||
|
||||
**🧰 CI 与内部**
|
||||
|
||||
- Windows CI 车道(#520)、Makefile 命令面规范化(#526)、e2e 脚本加固 + 聚合双挂载回归(#527)、共享组件测试工具收敛样板(#524)、重复实现收敛与死代码清理(#525)
|
||||
|
||||
**🌐 生态收录**
|
||||
|
||||
- 新收录 10+ 插件:dsh-better-sidebar-icons(#441)、dsh-sidenote(#451,原 dsh-sidechat #470)、dsh-github-workbench(#410)、dsh-bilingual-reader(#379)、dsh-server-deck(#413)、dsh-md-export(#405)、dsh-code-nav(#404)、dsh-suhuang-scroll(#392)、dsh-better-overleaf(#370)等(均含 18+ 语言 i18n 补齐)
|
||||
|
||||
<details>
|
||||
<summary><b>历史版本(v0.12.0 – v0.15.2)</b></summary>
|
||||
|
||||
### v0.19.0-alpha.0(0.1.2-alpha.5 适配,未发布,内容并入 v0.18.0)
|
||||
|
||||
> 🧪 **alpha 通道**:本版仅支持 **DSH 0.1.2-alpha.x**(peer 下限 `^0.1.2-alpha.5`,npm dist-tag `alpha`)。该版本号当时未单独发布,内容已并入 **v0.18.0** 正式版;v0.19.0-alpha.0 这个号后来被 0.1.5 适配线复用(见上)。
|
||||
|
||||
- 🔗 **适配 DSH 0.1.2-alpha.5(npm 已发布,`alpha` dist-tag)**:CI 挂载门禁钉版、`dsh.plugin.json` engines 下限与 `@deepseek-ai/*` peer / devDependencies 基线升至 0.1.2-alpha.5(真机挂载冒烟 14/14 验证)。`dsh-client-locale` 上游停在 0.1.2-alpha.3 未发新版,其 peer 下限 / devDep 保持并天然兼容 alpha.5 运行时(`pnpm peers check` 零失配,无需新增提升传递 peer)。代码适配了 alpha.4 的兼容性标记改动——`Session.events` 属性移除,迁移到按需读 API `snapshotEvents()`(sidechat 转录 live 读、fork 继承、`jobs.output` 回放、subagent 活跃度共 8 处),新建线程 meta 中宿主已删的 `seedLength` 一并移除;alpha.4 其余变化(双向 `send_message`、自定义模型发现复用 Profile 请求头、`SessionSeq`/`SessionLogOffset` 强类型)与 alpha.5(升级启动修复)经核实不触及本插件其余表面。
|
||||
|
||||
### v0.18.1-alpha.0
|
||||
|
||||
> 🧪 **alpha 通道**:本版仅支持 **DSH 0.1.2-alpha.x**(peer 下限 `^0.1.2-alpha.3`,npm dist-tag `alpha`,安装 `dsh-better-sidebar@latest`)。该版本号未单独发布,内容已并入 **v0.18.0** 正式版。
|
||||
|
||||
- 🔗 **适配 DSH 0.1.2-alpha.3(npm 已发布,`alpha` dist-tag)**:CI 挂载门禁钉版、`dsh.plugin.json` engines 下限与 `@deepseek-ai/*` peer / devDependencies 基线升至 0.1.2-alpha.3(真机挂载冒烟 14/14 验证)。逐点核查了 alpha.2 → alpha.3 全部 117 个 commit:插件依赖的宿主契约(token 鉴权、斜杠 RPC、`MarkdownText` labels、`sidechat.events` 所依赖的事件流与持久化 API、`SettingsNamespaceInput`、`SUBAGENT_DESCRIPTOR_VERSION`(仍为 3)、`dsh-client-store`、profile 加载器、node-pty 钉版)均无变化,无需代码适配;alpha.3 的破坏性改动(`BeginSubmissionInput.mode` 必填、subagent 错误码改名 `attachment-invalid`、SQLite 持久化后端移除、投影 change feed 收紧为 identity-gated)经核实均不触及本插件。
|
||||
|
||||
### v0.18.0-alpha.0
|
||||
|
||||
> 🧪 **alpha 通道**:本版仅支持 **DSH 0.1.2-alpha.x**(peer 下限 `^0.1.2-alpha.2`,npm dist-tag `alpha`,安装 `dsh-better-sidebar@latest`);不再支持 0.1.0-rc.8 ~ 0.1.1-rc.2——stable DSH 用户请用 v0.17.1(npm `latest`)。
|
||||
|
||||
- 🔗 **适配 DSH 0.1.2-alpha.2(npm 已发布,`alpha` dist-tag)**:CI 挂载门禁钉版与 `@deepseek-ai/*` devDependencies 基线升至 0.1.2-alpha.2(真机挂载冒烟 14/14 验证)。适配点:`dsh-settings` 移除运行时导出 `settingsNamespace`(命名空间改为编译期校验,宿主侧直接传常量);`dsh-subagent` 描述符版本 2→3(由宿主包盖章,测试断言跟随 `SUBAGENT_DESCRIPTOR_VERSION` 常量);`SessionEvent.ignorable` 恢复与 Remote 网关 `RemoteError` 封装经核实对本插件无破坏。
|
||||
- 🐛 **修复 DSH 0.1.2-alpha.1+ 上侧边对话转录空白**:转录轮询此前仍走 alpha.1 已移除的 `ctx.connection.api`(错误被静默吞掉,tab 永远渲染空转录),现改由插件自有 `sidechat.events` 路由供给(活线程读内存事件日志、冷线程读会话持久化,`afterSeq` 增量拉取,[sidechat-routes.ts](./src/sidechat-routes.ts))。
|
||||
- 🧹 **删除对 0.1.1-rc.x 及更早的兼容层**:e2e 宿主 RPC 从点分/斜杠双方言收敛为斜杠单方言(token URL 必选,[host-protocol.ts](./tests/e2e/host-protocol.ts));`MarkdownText` labels 收敛为嵌套单形状([markdown-labels.tsx](./src/client/markdown-labels.tsx),不再双 prop 名);peerDependencies / devDependencies / `dsh.client.inject` / chunk externals 白名单四处同步清除已消亡的 `@deepseek-ai/dsh-client-runtime`。
|
||||
|
||||
### v0.17.1
|
||||
|
||||
- 🔗 **DSH 0.1.2-alpha.1 适配(双版本兼容)**:DSH 0.1.2-alpha.1 的 Remote gateway、一次性 token 浏览器鉴权与 `MarkdownText` labels 契约变更已全量适配,插件在 0.1.0-rc.8 ~ 0.1.1-rc.2 与 0.1.2-alpha.1 上一致工作(后者经 GitHub tag 源码构建的真机挂载冒烟 14/14 验证;alpha.1 至今未发布 npm,CI 钉版已在 v0.18.0-alpha.0 升至 npm 发布的 0.1.2-alpha.2)。要点:`MarkdownText` 四个渲染点统一改走双形状 labels helper([markdown-labels.tsx](./src/client/markdown-labels.tsx)),修复 alpha.1 上 markdown/mermaid 预览的 `reading 'code'` 崩溃;e2e 冒烟双协议化(token URL 换 cookie、`/api` 斜杠端点 + 按参数名包装 args,[tests/e2e/host-protocol.ts](./tests/e2e/host-protocol.ts));移除已在 0.1.2-alpha.1 消亡的 `@deepseek-ai/dsh-client-runtime` peer
|
||||
|
||||
### v0.16.1
|
||||
|
||||
自 v0.16.0 以来的全部更改:
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🧊 **Git 面板卡死 + 重启死循环**([#376](https://github.com/omdsh-dev/DSH-better-sidebar/pull/376),修复 [#369](https://github.com/omdsh-dev/DSH-better-sidebar/issues/369)):开启「源代码管理」面板可能整页冻结、重启后自动恢复冻结状态且无法退出——三层无上限操作叠加所致,现已全部设界:**① status 截断**——`git status --untracked-files=all` 响应上限 2000 条(超限置 `truncated`,面板显示截断提示,对齐 `fs.read` 截断语义;worktree 变更计数同步有界),海量未跟踪文件不再冻结浏览器主线程;**② 仓库发现限界**——cwd 非 Git 仓库(如家目录)时不再对每个可见子目录串行无界探测:探测超时 30s→5s、子目录探测上限 200 个、并发请求共享同一次扫描并按 60s TTL 缓存,家目录不再引发 `git rev-parse` 进程风暴;**③ 重置逃生通道**——带 `?dsh-sidebar-reset` 打开页面即丢弃持久化布局(含共享宽度)从默认布局启动,即使原页面已卡死也能自救,移除参数后恢复持久化;`statusTruncated` 文案同步全部 19 个词典
|
||||
|
||||
### v0.16.0
|
||||
|
||||
自 v0.15.2 以来的全部更改:
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🪟 **自由窗口**([#354](https://github.com/omdsh-dev/DSH-better-sidebar/pull/354)):把标签栏的任意 tab(内置或插件注册)**拖到主会话区域**——会话列出现虚线提示浮层,松开即成为悬浮窗口(默认 390×780,手机竖屏比例,创建时按视口钳制后居中于松点);窗口支持头部拖动移动、右下角 SE 缩放(≥320×200)、点击任意处置顶、头部右键「回到侧边栏 / 关闭」、X 走 `closeTab` 正常关闭生命周期(释放终端等);拖到侧边栏 pane 上时该 pane 高亮、松开即**停靠**合并回该 pane;`floats` 随会话持久化(刷新原样恢复,宽容 sanitize + 几何钳入视口);服务语义:`features` 新增 `'floatWindows'`——`openTab` 的 dedupe/id 聚焦命中浮动 tab = **置顶窗口**(不重复开、不展开面板),`closeTab` / `activateTab` 对浮窗正常关窗 / 置顶并照常触发回调,浮窗内 tab `visible` 恒 true,agent 终端 reconcile 覆盖浮窗;tab 内容复用常规渲染、插件 tab 与 pane 完全同契约;附带文件二级页面 8px 网格间距规整([设计文档](docs/plans/2026-08-23-free-window-design.md))
|
||||
- 📂 **模型主动打开(`sidebar_open` 工具)**([#353](https://github.com/omdsh-dev/DSH-better-sidebar/pull/353)):侧边栏新增全局设置 `agentOpenTools`(**默认关闭**),开启后向模型注入**一个**工具——模型可在调用方会话的侧边栏打开本地**文件**(editor tab,按 path 去重)、**文件夹**(全窗树窗口,以该目录为根,`meta.dir`)与 **HTTP(S) 网页**(browser tab,URL 预填);关闭设置即注销工具并清空未投递队列,已打开 tab 保留;非激活会话的打开排队、下次可见时重放(`/sidebar/ws/agent-opens` 推送,同一 trust fence);无新增公共 API、不改变 `BetterSidebarService`([设计文档](docs/plans/2026-08-23-agent-open-tools-design.md))
|
||||
- 📝 **Markdown README 级内嵌 HTML + 目录大纲(TOC)**([#360](https://github.com/omdsh-dev/DSH-better-sidebar/pull/360)):Markdown 预览现在真实渲染**块级内嵌 HTML**——徽章墙 `<div align=center>`、`<details>` 折叠块内嵌 markdown、表格单元格 `<br/>`/`<sub>`/`<img>`、`<video>`/`<picture>` 全部经 DOMPurify 白名单消毒(`<script>` 等活性内容剥除、`<a>` 强制 `_blank rel=noopener`),本地媒体 src 重写为会话媒体路由;≥3 标题出现浮动**目录大纲**按钮,点击平滑滚动并自动展开折叠 `<details>`,HTML 段内标题同样收录;渲染器仍是宿主 `MarkdownText`(shiki / KaTeX / GFM 保留),纯 markdown(零 HTML)文档走原路径零回归([设计文档](docs/plans/2026-08-24-markdown-html-toc-design.md))
|
||||
- 🌏 **第三语言覆盖(19 语言)**([#339](https://github.com/omdsh-dev/DSH-better-sidebar/pull/339)):接入可选 peer `@huanlin/dsh-plugin-better-locale`——ja / de / fr / pt / ko / ar / hi / id / tr / vi / th / ru / it / nl / sv / pl / zh-HK / zh-TW / zh-MO 全量词典(每种约 340 keys);覆盖**借用 DSH 英文槽位**(DSH active=en 时生效,zh 下完全惰性、界面不混语言);19 语言词典同时注册进 better-locale,外部 `ctx.locale.lookup('betterSidebar', key)` 调用者同样可拿覆盖文本;未安装时 `ctx.get('betterLocale')` 为 undefined、整段 no-op,zh/en 行为不变
|
||||
- 🌿 **Git 多仓库选择 + linked worktree 变更发现**([#326](https://github.com/omdsh-dev/DSH-better-sidebar/pull/326) [#285](https://github.com/omdsh-dev/DSH-better-sidebar/pull/285)):会话 cwd 是工作区容器(非 Git 仓库)时自动发现直接子仓库并显示**仓库选择器**——status / 分支 / 历史 / diff / 暂存 / 提交 / 还原 / cherry-pick / 文件打开全部按所选仓库线程化;linked worktree 的变更发现与按工作树操作(含延迟分页响应的事务一致性),并拒绝过期 / 可修剪的 worktree 命令目标、对单库存取失败降级
|
||||
- 🖥️ **浏览器本地回环允许清单**([#365](https://github.com/omdsh-dev/DSH-better-sidebar/pull/365)):新增侧边卡设置 `browserAllowedLoopback`(逗号分隔 host 或 host:port;裸 host 匹配任意端口、带有端口精确匹配)——显式信任的本地开发服务器(如 Vite)可导航,并额外获得 iframe `allow-same-origin` 令牌(模块 / HMR / fetch 管线需要真实 origin,否则白屏);页面相对 GUI 与其他站点仍是跨源;服务端 `browser.probe` 镜像同一允许清单,本地服务器不再被误拒
|
||||
- 📝 **编辑器 Vue + 28 种 legacy 语言语法高亮**([#202](https://github.com/omdsh-dev/DSH-better-sidebar/pull/202)):`.vue` 映射 `@codemirror/lang-vue`(template / script / style 按 `lang` 属性分派、`<style lang="scss">` 预处理器);零新依赖用 legacy-modes 补齐 scss/sass/less/stylus/ruby/lua/perl/r/dart/scala/groovy/powershell/diff/protobuf/cmake/pug/tcl/haskell/clojure/erlang/julia/pascal/vb/vhdl/stex/objectivecpp;语言工厂抛错降级纯文本(console.warn),不再炸编辑器;`.v` / `.m` 跨语言歧义故意不映射
|
||||
- 🔄 **编辑器预览刷新三件套**([#215](https://github.com/omdsh-dev/DSH-better-sidebar/pull/215) [#228](https://github.com/omdsh-dev/DSH-better-sidebar/pull/228),修复 [#167](https://github.com/omdsh-dev/DSH-better-sidebar/issues/167)):文本预览新增**手动刷新**按钮;编辑保存后切回预览自动重载(dirty 时抑制,草稿不丢);预览模式下保存成功边沿自动重载;移除自动轮询与 `fs.stat` 版本端点(后台 API 零流量)
|
||||
- 🖼️ **Markdown 本地 / 相对图片**([#292](https://github.com/omdsh-dev/DSH-better-sidebar/pull/292)):``、`/cwd/img.png` 与引用式 `[id]: url` 目标重写为 `/sidebar/file` 媒体 URL(会话 cwd 边界不变)——预览不再只显示 alt 文本
|
||||
- ➕ **推荐插件目录新增 ego-browser**([#340](https://github.com/omdsh-dev/DSH-better-sidebar/pull/340)):`@dsh-external/ego-browser` Agent 浏览器 Tab(会话侧边栏自动注册本机浏览器页,无 better-sidebar 时回退浮动浮窗);描述词典 19 语言补全([#371](https://github.com/omdsh-dev/DSH-better-sidebar/pull/371))
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🛒 **DSH 市场受管安装兼容**([#338](https://github.com/omdsh-dev/DSH-better-sidebar/pull/338)):移除 `peerDependencies` 里的公开版 `cordis`(市场预览硬拒依赖字段出现 `cordis`,optional 无效)——npm 包满足 [dsh-community-market 安装规范](https://github.com/anywhere-labs/deepseek-harness-desktop/blob/master/dsh-community-market/docs/install-and-uninstall.zh.md),dshfind / 1024Store 目录里的条目重新获得 `repository_backlink` 验证目标,可直接从 Desktop 市场受管安装
|
||||
- 🔤 **类型基底迁移到 `@deepseek-ai/cordis`**([#338](https://github.com/omdsh-dev/DSH-better-sidebar/pull/338)):`Context` = 真实 vendored cordis Context 与结构化服务面的**交集**,`ctx.betterSidebar` 类型合并改挂 `@deepseek-ai/cordis`,公开版 cordis 不再被依赖。**消费者迁移**:`import type { Context } from 'cordis'` 改为 `import type { Context } from '@deepseek-ai/cordis'`(`import type {} from 'dsh-better-sidebar'` 的类型合并方式不变);未使用该导入的插件无影响
|
||||
- 🧩 **插件树内 `ctx.betterSidebar` 读取全面修复**([#357](https://github.com/omdsh-dev/DSH-better-sidebar/pull/357),修复 [#356](https://github.com/omdsh-dev/DSH-better-sidebar/issues/356)):npm 安装的 DSH 0.1.1-rc.x(web bundle)下侧边栏页面每次加载即崩(`cannot get property "betterSidebar" without inject`)——26 处内部直读 `ctx.betterSidebar` 改走 `ctx.get('betterSidebar')`(root reflect store 解析,不受 fiber 链影响);外部消费者 `inject: ['betterSidebar'] + ctx.betterSidebar` 契约不变
|
||||
- 🔐 **文件 API 会话工作区边界**([#345](https://github.com/omdsh-dev/DSH-better-sidebar/pull/345),修复 [#328](https://github.com/omdsh-dev/DSH-better-sidebar/issues/328)):`fs.tree / fs.read / fs.write` 的 workspace 越界访问修复;媒体、HTML 预览与上传统一 real-path 符号链接校验;新增绝对路径 / 符号链接 / 上传 / 嵌套 Git 会话回归测试
|
||||
- 🪟 **面板宿主层级与视口裁剪**([#330](https://github.com/omdsh-dev/DSH-better-sidebar/pull/330) [#278](https://github.com/omdsh-dev/DSH-better-sidebar/pull/278),修复 [#277](https://github.com/omdsh-dev/DSH-better-sidebar/issues/277)):面板宿主层 z-index 40→25——低于 DSH cordis 动态插件面板 30,工作台不再遮挡 cordis 清单 / 审批面(AppFrame 20 之上、100+ 浮层之下);宿主 `overflow: hidden` 裁剪视口边缘,收起的面板不再把文档撑出双向滚动(实测 `scrollWidth` 2289→1672 / `scrollHeight` 1280→1032,任意皮肤)
|
||||
- 📐 **布局推挤加固**([#310](https://github.com/omdsh-dev/DSH-better-sidebar/pull/310) [#130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/130) [#180](https://github.com/omdsh-dev/DSH-better-sidebar/pull/180)):对话列补 `min-height: 0` + `overflow: hidden` + `overflow-wrap: anywhere`(长不可断 URL / OAuth 链接不再把 composer 与左侧设置按钮挤出视口);layout-push effect 拆「仅设置 + 仅卸载移除」并按 `panelOpen` 门控宽度 push——右栏关闭时拖底部高度不再挤压对话区、松手瞬间不再整页右铺再回弹;`useLayoutEffect` 消除跨 paint 全宽闪帧;松手 flush 最终帧 + `centerRect.right` 同步提交;底部高度按 `viewportHeight - PANEL_MIN` 封顶;拖拽手柄拖动中不再高亮
|
||||
- 📱 **移动端无会话状态说明 + 1px 溢出修复**([#254](https://github.com/omdsh-dev/DSH-better-sidebar/pull/254)):无会话时开关改用 `aria-disabled` 保持不可执行语义、同时允许触摸 / 键盘聚焦显示「选择一个会话以使用侧边栏」提示;panel 改 `border-box`——移动端 `100vw` 含左边框,不再产生 1px 横向溢出
|
||||
- 📏 **侧边栏宽度跨会话共享**([#36](https://github.com/omdsh-dev/DSH-better-sidebar/pull/36)):面板宽度是布局偏好而非会话内容——「最后一次拖拽胜出」写入全局 `dsh-sidebar:v1:width`,缓存会话切换与新建会话即时跟随;无全局键(首次运行 / 旧会话)时行为逐字节不变
|
||||
- 🧹 **会话删除立即关闭该会话终端**([#130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/130)):新增 `PtyManager.closeSession()` + 订阅 DSH `session/disposed`——删除会话不再等 30s 重连宽限到期(agent 终端由 agent 生命周期管理,不受影响)
|
||||
- 🔍 **文件名搜索跳过噪声目录**([#342](https://github.com/omdsh-dev/DSH-better-sidebar/pull/342)):`node_modules` / `.pnpm-store` / `.yarn` / `.turbo` / `.next` / `dist` / `build` / `coverage` 等黑名单(小写不敏感,`.git` 仍跳)——超大依赖树不再耗尽 10 万访问预算提前 `truncated`,`docs/` 等后序目录里的真实文件能搜到;不引入 `.gitignore` 语义,保持「文件名查找」
|
||||
- 📝 **mermaid 全局错误渲染抑制**([#341](https://github.com/omdsh-dev/DSH-better-sidebar/pull/341)):开启 `suppressErrorRendering`——非法图表不再把大错误 SVG 注入 `document.body`;组件级错误回退与源码展示保留
|
||||
- 🖥️ **终端 Nerd Font 图标字体回退**([#190](https://github.com/omdsh-dev/DSH-better-sidebar/pull/190)):starship / powerlevel10k 提示符的补充平面 PUA 图标(Nerd Fonts v3 Material 图标集)不再显示豆腐块——`withIconFontFallbacks()` 为胜出的基础字体追加 Nerd Font 图标族(插入首个通用族之前、按族名去重、过滤 CSS 全局关键字、不列彩色 emoji 字体)
|
||||
- 🌐 **HTML 预览 UTF-8 声明**([#193](https://github.com/omdsh-dev/DSH-better-sidebar/pull/193),修复 [#170](https://github.com/omdsh-dev/DSH-better-sidebar/issues/170)):`/sidebar/html` 响应带 `charset=utf-8`(无 `<meta charset>` 的中文片段不再乱码),保留原始文件字节
|
||||
- 🧪 **trust-fence Origin 改按 hostname 比较**([#182](https://github.com/omdsh-dev/DSH-better-sidebar/pull/182)):Edge 151 把非默认端口 loopback 页面的 Origin 序列化为无端口形式——`http://127.0.0.1` 对 `Host: 127.0.0.1:3080` 不再 403(对齐 DSH 官方网关栅栏);不同 hostname / opaque null origin 仍拒绝
|
||||
- 🪟 **「在文件夹中显示」改为资源管理器揭示**([#94](https://github.com/omdsh-dev/DSH-better-sidebar/pull/94)):不再把目录当文件开进编辑器(`"..." is a directory`)——`revealInExplorer` 切到资源管理器 tab、面板折叠时自动展开、展开父目录并高亮滚动到本轮产出文件;产物行数据改读引擎 Turn deliverable(与 ui-deliverables 同源)
|
||||
- 🖱️ **面板拖动布局闪烁**([#180](https://github.com/omdsh-dev/DSH-better-sidebar/pull/180)):右侧栏关闭时拖底部高度不再左移挤压对话区;松手瞬间不再整体右铺再回弹
|
||||
- 🖥️ **PowerShell 安装脚本修复**([#47](https://github.com/omdsh-dev/DSH-better-sidebar/pull/47)):远程入口统一为「下载脚本 → 移除 UTF-8 BOM → 内存执行」,`-Version` / `-DryRun` 参数在 Windows PowerShell 5.1 下恢复生效(BOM 解析不再吃掉首行 `param(...)`);安装前校验 `pnpm --version`(主版本 <10 时明确报错并以退出码 1 结束,不再写一半 profile)
|
||||
- 🔄 **浏览器嵌入探测 GET 兜底**([#69](https://github.com/omdsh-dev/DSH-better-sidebar/pull/69)):HEAD 响应同时缺 CSP 与 X-Frame-Options 时回退 GET 重试一次——阿里云百炼等只在 GET 回头发嵌入策略的站点不再显示误导性「拒绝连接请求」,而是正确显示「该站点拒绝嵌入」面板 + 「在浏览器中打开」
|
||||
- 🔧 **git 源安装修复 `unrun` devDependency**([#336](https://github.com/omdsh-dev/DSH-better-sidebar/pull/336)):tsdown 0.22 经 `unrun` 加载配置而 pnpm 11 不自动装 peer——git-hosted 安装的 `prepare` 不再报 `Failed to import module "unrun"`(npm tarball 不受影响)
|
||||
- 🍃 **`ctx.effect` 严格化顺手修了 4 处**:拦截注册失败时 effect 体返回 `undefined` 改为 no-op disposer(vendored cordis 的 effect 契约要求返回 disposer,返回 `undefined` 属非法形状)
|
||||
|
||||
### v0.15.2
|
||||
|
||||
自 v0.15.1 以来的全部更改:
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🗂️ **文件树「在应用中打开」子菜单**([#334](https://github.com/omdsh-dev/DSH-better-sidebar/pull/334)):文件树右键菜单新增「在应用中打开 >」子菜单——内置打开方式(资源管理器显示/选中、VS Code、Cursor、Zed),每行右侧图钉可固定为右键菜单顶层直达项(再点取消);配置可选 SSH host 后 VSCode 系条目改用 `vscode-remote/ssh-remote+<host>/<path>` 协议打开,本地专用条目自动隐藏;支持自定义编辑器(名称 + URL 模板 `{path}` + 是否 VSCode 系,配置入口在 Files 卡片齿轮弹窗)。打开动作经新宿主路由 `POST /sidebar/api/open.external`(argv 数组 spawn,无 shell 注入)([设计文档](docs/plans/2026-08-22-open-with-menu-design.md))
|
||||
- 📑 **Tab 右键菜单**([#331](https://github.com/omdsh-dev/DSH-better-sidebar/pull/331)):页签右键提供「关闭 / 关闭其他页签 / 关闭左侧页签 / 关闭右侧页签」,作用范围为当前 pane(标签组),无可关对象时置灰;仅打开菜单、不切换激活页签;批量关闭逐条走既有 `onClose` 路径,生命周期完整
|
||||
- 📄 **Diff 文件默认折叠**([#270](https://github.com/omdsh-dev/DSH-better-sidebar/pull/270)):改动文件头部改为可访问的展开/折叠控件;识别出的源文件默认展开,测试 / 文档 / 生成文件 / lockfile 与未知类型默认折叠;保留现有 500 行上限
|
||||
- 📖 **README 更新**:特性巡礼改为表格展示(每行两张图,节省空间);社区补全微信群 / QQ 群二维码([#325](https://github.com/omdsh-dev/DSH-better-sidebar/pull/325),QQ 群 577011007)
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🪟 **空分栏清理**([#268](https://github.com/omdsh-dev/DSH-better-sidebar/pull/268)):持久化的 split pane 在临时 diff tab 被清理后遗留全尺寸空分栏——`sanitizeState` 现在同时修剪空的 split leaf,并修复修剪后的失效激活 pane 指针;整个工作台为空时保留唯一空 pane
|
||||
- 🖥️ **Windows 下隐藏 Git 子进程窗口**([#301](https://github.com/omdsh-dev/DSH-better-sidebar/pull/301),关闭 [#124](https://github.com/omdsh-dev/DSH-better-sidebar/issues/124)):`runGit()` 统一加 `windowsHide: true`,仓库状态轮询与操作不再闪现控制台窗口(其他平台行为不变)
|
||||
- 📁 **未跟踪文件夹内文件差异**([#242](https://github.com/omdsh-dev/DSH-better-sidebar/pull/242)):`git status` 从 `--untracked-files=normal` 切换为 `--untracked-files=all`——新文件夹内每个文件独立成行、可正常加载差异(修正 `fs.read` 报 "is a directory",与 VSCode 默认行为一致)
|
||||
- ⚡ **开关/拖拽每帧 React 重渲染消除**(关闭 [#315](https://github.com/omdsh-dev/DSH-better-sidebar/issues/315)):centerRect 改 ref + 底栏 DOM 直写(零 React 渲染);TabContent memo(显式比较器);新增 frame-batcher 对 Divider/dock 拖拽按帧合并;拖拽期跳过无意义 locate。4x CPU 节流 A/B:开关 >17ms 帧 collapse 19→6 / expand 24→4~6,p95 21ms→15ms;拖拽不变(非回归)
|
||||
|
||||
### v0.15.1
|
||||
|
||||
自 v0.15.0 以来的全部更改:
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 💬 **侧边对话 Codex 风格转录重构**([#314](https://github.com/omdsh-dev/DSH-better-sidebar/pull/314)):转录改为**折叠行**——工具调用 / 思考 / 上下文注入统一为安静的单行 chrome(chevron + 标签 + 单行参数摘要,展开为 hairline 缩进正文,无卡片无填充),流式标签与创建 shimmer(shimmer = 生成中)、失败工具 danger、`prefers-reduced-motion` 停帧;**首条问题不再被边界提示吞掉**——上下文注入与首问拆分交付(边界 + 快照经 `agent.inject` 排队、问题唤醒驱动),转录把注入映射为可折叠注入行、真实用户消息(**含首问**)渲染为用户气泡,旧线程的首问同样拆分为独立气泡
|
||||
- 📖 **README 重写**:功能导览(逐特性实机截图)、用户视角 DSH 兼容徽章、简化安装流程(`add` → `approve-builds` → `add`、node-pty 安全构建、粘贴到 DSH 安装提示)、插件生态 28+ 与分类折叠展示
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🖥️ **终端跨会话切换保活**([#323](https://github.com/omdsh-dev/DSH-better-sidebar/pull/323)):切到其他会话不再被当作瞬时掉线——客户端卸载时发送 `park` 控制帧,主机跳过 30s 重连宽限倒计时;切回会话(`open()` 取消 parked)或显式关闭恢复正常生命周期;agent 终端保持无限期存活
|
||||
- 📂 **文件树上传遮罩不再拦截 Tab 拖拽**([#317](https://github.com/omdsh-dev/DSH-better-sidebar/pull/317)):拖拽 Tab(重排 / 跨 pane split)经过资源管理器时不再弹上传遮罩、不吞事件——统一按 `dataTransfer.types` 含 `Files` 门控(与面板宿主 shield 一致),Tab 正常落下;OS 文件拖拽行为不变
|
||||
- 💬 **子代理自动展开去抖**([#314](https://github.com/omdsh-dev/DSH-better-sidebar/pull/314)):Side Chat 线程创建不再误弹任务页——0→N 触发 500ms 重臂并对实时快照按原基线重评估,标题过滤器识别线程后才放行;真实子代理依然自动激活任务页(宽屏展开侧边栏,窄屏只准备 Tab、不强制展开抽屉)
|
||||
|
||||
### v0.15.0
|
||||
|
||||
自 v0.14.0 以来的全部更改:
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 💬 **侧边对话(beta) Tab**([#286](https://github.com/omdsh-dev/DSH-better-sidebar/pull/286)):Codex 风格的侧边线程,**每个对话一个独立 Tab**——子会话继承主会话完整上下文(已完成回合 + 未回答消息 + 进行中回合的 assistant 输出与工具调用,以「interrupted」冻结标记诚实继承);同组合创建(同 preset / provider / model)复用前缀输入缓存;线程对主会话列表不可见、零子代理目录噪音;线程内可持续追问(重启后自动冷恢复);一键「保存为新会话」提升为顶层会话([设计文档](docs/plans/2026-08-20-sidechat-tab-design.md))
|
||||
- 📤 **文件窗口上传**([#239](https://github.com/omdsh-dev/DSH-better-sidebar/pull/239)):头部「上传文件 / 上传文件夹」按钮 + 拖放上传(拖到树区 = 工作区根,目录行 = 进该目录,文件行 = 进其所在目录,对齐 VSCode);上传时全屏模糊进度弹层(文件级进度 + 取消 / Esc);上传中按钮禁用、成功后文件树自动刷新
|
||||
- 🧩 **桌面兼容四选项**([#284](https://github.com/omdsh-dev/DSH-better-sidebar/pull/284)):位置兼容模式改为**主行下拉**——**自动检测**(默认,保守:仅使用标准的 Window Controls Overlay 几何,32/36px 等各壳差异自动跟随、最大化/还原实时更新,网页环境零修改)/ **DSH官方Web**(显式零适配)/ **壳兼容方案**(内置预设,手动启用;只收录 issue/PR 中出现过且 100+ star 的壳,命中环境带「已检测」提示)/ **自定义方案**(自定义 CSS + 下移距离)。旧版本已有兼容配置的用户自动落到自定义方案;交互控件统一退出桌面拖拽区(`no-drag`);底栏推挤锚点复合选择器双保险(`[data-pane]` 与 `:has(> [data-slot])`)
|
||||
- 🎛️ **设置页 UI/UX 现代化**([#300](https://github.com/omdsh-dev/DSH-better-sidebar/pull/300)):侧边卡片二级设置入口改为卡片底部「功能设置」设置条(替代右下角隐形齿轮,可发现性提升);协调双色启用态(brand 激活强调 + success 绿勾选徽标);全部颜色仍为 `--dsw-alias-*` 令牌派生,皮肤体系自动跟随
|
||||
- ➕ **推荐插件目录新增**:`dsh-docs-panel` 全局文档面板([#230](https://github.com/omdsh-dev/DSH-better-sidebar/pull/230))、`dsh-flowglass`([#261](https://github.com/omdsh-dev/DSH-better-sidebar/pull/261))、`dsh-git-forge` 与 `dsh-ssh-tunnel`([#204](https://github.com/omdsh-dev/DSH-better-sidebar/pull/204))、`dsh-turn-review`([#102](https://github.com/omdsh-dev/DSH-better-sidebar/pull/102))
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- ⚡ **子代理页实时预览批量接口**([#298](https://github.com/omdsh-dev/DSH-better-sidebar/pull/298)):旧实现每个 running 子代理独立轮询 `subagents.history`,host 侧每次触发全量子代理枚举形成 O(N²) 放大、多子代理并发时页面卡顿——改为单个批量接口 `subagents.live`(一次枚举整棵子代理树)+ 客户端单轮询、单在途请求;展示逻辑与文案不变
|
||||
- 🖱️ **拖拽中断 / 快速释放不再回滚**([#249](https://github.com/omdsh-dev/DSH-better-sidebar/pull/249),关闭 [#247](https://github.com/omdsh-dev/DSH-better-sidebar/issues/247) [#248](https://github.com/omdsh-dev/DSH-better-sidebar/issues/248)):中断 / 快速释放提交最后已知位置;HMR 后中心列重定位兜底(修复热更新后底栏空白)
|
||||
- 📐 **推挤变量挂载期持续有效**([#259](https://github.com/omdsh-dev/DSH-better-sidebar/pull/259),修复 [#258](https://github.com/omdsh-dev/DSH-better-sidebar/issues/258)):拖拽松手后底边栏不再闪全宽
|
||||
- 🔧 **适配 DSH 0.1.1-rc.1 / rc.2(@next)**([#297](https://github.com/omdsh-dev/DSH-better-sidebar/pull/297) [#305](https://github.com/omdsh-dev/DSH-better-sidebar/pull/305)):无代码逻辑改动
|
||||
- 🔒 **上传链路安全加固**([#239](https://github.com/omdsh-dev/DSH-better-sidebar/pull/239)):`relativePath` 空段 / 绝对路径显式拒绝;临时文件唯一命名(并发上传互不干扰、崩溃不阻塞);写流错误监听(磁盘失败不崩溃进程);客户端错误码与服务端统一、413 本地化
|
||||
- 🔐 **文件 API workspace 边界加固**([#328](https://github.com/omdsh-dev/DSH-better-sidebar/issues/328)):`fs.tree/read/write`、媒体、HTML 预览和上传统一按真实路径限制在会话 workspace 内,拒绝越界绝对路径与外链符号链接
|
||||
|
||||
### v0.14.0
|
||||
|
||||
> ⚠️ 本版起需要 DSH ≥ 0.1.0-rc.8。自 v0.13.1 以来的全部更改:
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🖼️ **统一面板宿主注入重构**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):面板/开关簇迁入 `[data-dsh-panel-host]` 固定含块层(`fixed inset-0 z-40`),免疫桌面套壳中间层 transform 对 fixed 含块的劫持;挂载自检(页面级 transform → `data-dsh-panel-host-degraded` 降级同步,按未修正几何判定、祖先变换消失才退出);推挤锚点改 `#root [data-dsh-frame] > [data-pane="conversation"]` + `#root` calc 宽度防桌面壳加性溢出;chunk 激活重验证(HEAD+ETag 保留未变 chunk,5s 超时兜底 fail-open);`visualViewport` 键盘 inset + `env(safe-area-inset-*)` 移动端适配
|
||||
- 📂 **文件打开方式默认独立**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):`editorExplorer` 默认从「合并」改为「独立」——新会话树点击 / 打开文件按路径**新开**文件 tab,无路径窗口即纯资源管理器;合并模式保留为可选手动开启
|
||||
- 🖥️ **终端 shell / shellArgs 设置页可配**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):终端卡齿轮二级页面新增「Shell 路径」「Shell 参数」两行配置(此前只能通过 `cordis.patch.yml` 配置)——设置页写入后对**之后打开的** UI 终端与模型终端(`terminal_create`)即时生效;留空保持 yaml → `$SHELL` / 登录 shell / `powershell.exe` 的既有解析顺序
|
||||
- 🏷️ **设置页版本徽标**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):侧边卡片设置页顶部新增 `DSH-better-sidebar v0.14.0` 身份徽标(版本与服务实例同步,由测试守护)
|
||||
- 🔍 **添加插件目录搜索 / 分组 / 独立滚动**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):为插件生态增长做准备——目录列表顶部加实时搜索(按名称 / id / 描述过滤),条目支持可选 `category` 分组渲染,列表独立滚动(弹窗不再随条目数无限增长)
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🧩 **rc.8 模块系统迁移**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):rc.8 不再暴露 `window.__DSH_MODULES__` 页面全局(改由 `ctx.modules` 服务提供),懒加载 chunk 的外部依赖解析全面失效——client 注入 `modules` 服务 + 插件自有全局共享给 chunk 副本(终端 / 编辑器 / Mermaid 恢复正常按需加载)
|
||||
- 🧩 **chunk 重验证屏障健壮性**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):HEAD 重验证加 5s 超时兜底(路由挂起时 fail-open 重取,屏障不再可能无限期阻塞懒加载);`resetChunks` 清挂起的重验证屏障
|
||||
- 🖱️ **拖拽健壮性**([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)):快速释放(浏览器合并 / 丢失 pointermove 突发)时提交最后已知拖动位置而非回退;`pointercancel` / 捕获丢失中断同样保留拖动结果;提交后立即重测中心列(消除底栏宽度中间帧抖动);HMR 重激活后中心列重定位兜底(`<html>` 样式观察 + 底栏打开重测),修复热更新后底栏空白 / 输入框位移
|
||||
|
||||
### v0.13.1
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 📊 **Markdown 预览安全渲染 Mermaid 图表**([#164](https://github.com/omdsh-dev/DSH-better-sidebar/pull/164)):预览的 md 含 mermaid fence 时按需下发 `client-mermaid.js` chunk(~7MB,无 mermaid 文件零加载);纵深防御渲染——`securityLevel: 'strict'` + `htmlLabels: false`(节点文字走真实 SVG `<text>`)+ SVG 注入前二次清洗(删 `foreignObject`/`script`/外来 HTML 元素、剥 `@*`/`on*`/`href` 属性);点击图表在弹窗中放大(滚轮以鼠标为中心缩放、拖拽平移、工具栏与快捷键),深浅色跟随重渲、解析失败回退原码
|
||||
- 🖥️ **终端 shell 与 shellArgs 可配置**([#125](https://github.com/omdsh-dev/DSH-better-sidebar/pull/125)):`cordis.patch.yml` 的 `better-sidebar.config` 可指定 `shell` / `shellArgs`(`shellArgs` 非空时完全替换默认参数;未配置维持自动解析 `$SHELL` / 登录 shell / `powershell.exe` 原行为),UI 终端与 agent 终端(`terminal_create`)同时生效;终端 tab 标题改用 shell 名(bash / zsh / powershell),内部标识改 UUID,同 shell 可开多个终端
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🔗 **聚合双挂载自动退让**([#200](https://github.com/omdsh-dev/DSH-better-sidebar/pull/200)):聚合包(如 dsh-web-ui-all)以独立条目 id 挂载同包时,`cordis.patch.yml` 的守卫表达式自动禁用自身 `better-sidebar` 行,不再重复注册 `/sidebar/api` 导致 `duplicate prefix route` 整个插件树启动失败(`dsh web` 崩溃);独立安装行为不变
|
||||
- 🔧 **适配 DSH 0.1.0-rc.7**([#207](https://github.com/omdsh-dev/DSH-better-sidebar/pull/207),修复 [#206](https://github.com/omdsh-dev/DSH-better-sidebar/issues/206)):修复 DSH 主框架升至 rc.7 后选模型 / 发消息报 `agent-presets: refusing to compose an unscoped context` 的问题
|
||||
|
||||
### v0.13.0
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 📁 **文件窗口与资源管理器二合一**([#151](https://github.com/omdsh-dev/DSH-better-sidebar/pull/151)):新 `editorExplorer` 设置(编辑器卡齿轮)——文件 tab 增加路径输入框头部 + 可开关的右侧停靠文件树(每 tab 记忆展开/宽度,左缘拖拽调宽 160~480px,全局文件名搜索走 host `fs.search` 路由,预算封顶并跳过 `.git` / 符号链接目录);独立模式(默认)树点击 / 输入框 Enter **按路径新开**文件 tab,合并模式**原地切换**当前 tab;新会话默认 seed 空文件窗口(`Files`)替代 explorer tab,无路径窗口在独立模式为纯资源管理器、合并模式为带 chrome 的空文件窗口;树右键提供「在新 Tab 中打开」「在侧边打开」(split)
|
||||
- 🎛️ **声明式设置 select 行**([#151](https://github.com/omdsh-dev/DSH-better-sidebar/pull/151)):设置项新增 `type: 'select'`(`options` 支持 value/title/desc/icon,`multi` 多选存数组);带图标的选项渲染大图标选项卡、收起态同样显示图标;`editorExplorer` 改为图标化下拉(合并 / 独立);能力清单新增 `settingSelect`
|
||||
- 🔀 **与 dsh-web-ui 家族右侧面板互斥**([#181](https://github.com/omdsh-dev/DSH-better-sidebar/pull/181)):读取 `aionui-panel` 设置命名空间的提供方选择——当选择「使用 aionui-panel」时,整个 better-sidebar(右侧栏 / 底部面板 / 浮动入口 / 各类接管)不再挂载;选择 DSH-better-sidebar(或未安装 aionui)时正常。设置页保存后实时生效(settings-document 推送),无需刷新
|
||||
|
||||
### v0.12.3
|
||||
|
||||
**✨ 新功能**
|
||||
|
||||
- 🎨 **皮肤兼容(令牌驱动)**:全面消费 DSH 设计令牌,与 dsh-web-ui 皮肤中心 10 款皮肤兼容,换肤自动跟随;终端/编辑器表面在透明/半透明玻璃值下回退不透明底色,文字不叠在皮肤背景上([#110](https://github.com/omdsh-dev/DSH-better-sidebar/pull/110),修复 #106 #105 #90 #60,附带 #52 #57 #92)
|
||||
- 🗂️ **统一路径处理**:UNC 路径 / 软链接分类(目录软链接可展开、失效链接标红)、HTML 路由平台守卫([#134](https://github.com/omdsh-dev/DSH-better-sidebar/pull/134),#65 #67 #43 #79 #115)
|
||||
- 🖥️ **终端 shell 可配置**:设置项自定义 shell,Windows 自动探测 pwsh([#95](https://github.com/omdsh-dev/DSH-better-sidebar/pull/95))
|
||||
- 📝 **编辑器新增语言**:C# / Kotlin / Swift 语法高亮([#120](https://github.com/omdsh-dev/DSH-better-sidebar/pull/120))
|
||||
- 🧭 **设置页导航图标**:设置页导航图标与布局优化([#114](https://github.com/omdsh-dev/DSH-better-sidebar/pull/114))
|
||||
- ➕ **推荐插件目录新增**:`dsh-git-remotes`——Git 远程 Tab(分支/上游/ahead-behind、fetch 可 prune、ff-only pull、确认后才 push,不替换内置暂存/提交)([#91](https://github.com/omdsh-dev/DSH-better-sidebar/pull/91));`dsh-video-preview`——视频内联预览(.mp4/.webm/.mov/.mkv/.avi 等,自带 /video 宿主路由支持 HTTP Range 206 拖进度条,不受 20MB mediaLimit 限制)([#126](https://github.com/omdsh-dev/DSH-better-sidebar/pull/126))
|
||||
|
||||
**🐛 修复**
|
||||
|
||||
- 🔧 **xterm 依赖迁移**:弃用的 xterm 迁移至 `@xterm/xterm`(Closes [#122](https://github.com/omdsh-dev/DSH-better-sidebar/issues/122),[#128](https://github.com/omdsh-dev/DSH-better-sidebar/pull/128))
|
||||
- 📝 **Markdown 编辑器**:选区转对话弹窗恢复可用([#24](https://github.com/omdsh-dev/DSH-better-sidebar/pull/24))
|
||||
- 🖼️ **Markdown 预览支持本地/相对路径图片**:预览 `.md` 时把指向本地文件的图片目标(相对/绝对路径、引用式 `[id]: url`)重写为 `/sidebar/file` 媒体 URL 并显示(此前仅绝对 http(s) 图片能渲染,相对路径只显示 alt 文本)
|
||||
- 🐛 **node-pty 加载失败不再拖垮 server**([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)):宿主半改为懒加载 node-pty,缺失时插件照常挂载,终端以修复提示横幅(可复制命令 + 重试按钮)呈现,agent 终端工具自动跳过
|
||||
- 🧪 测试工程:单元测试拆分(#141)+ smoke 偶发失败修复
|
||||
|
||||
</details>
|
||||
+473
@@ -35,3 +35,476 @@
|
||||
|
||||
- 🛡 **A detached session's cwd now comes from its stored workspace address instead of decoding the whole session log.** `sessionQuery.observeSession(..., { projectionMode: 'all' })` decodes the entire zstd artifact and hydrates every projection to answer with one `workingDirectory` string. The real startup fan-out never went through the 0.28.1 `cwdOf()` single-flight (which only covers `/sidebar/api`): the fs-watch socket sends **one frame per watched directory**, and `/sidebar/file|html` resolve cwd per resource, `/sidebar/upload|write` per call — so a 39 MB session was fully decoded dozens of times inside 130–180 ms (the 44-read OOM on 0.28.0 and the 36 reads reported against 0.28.1 are the same path, not a broken dedupe). The cold cwd now uses `sessionPersistence.stat` — a **header-only** read (first zstd frame) with a process-level memo and same-session in-flight sharing — and `activeWorktreeRootOf` returns that address for detached sessions. Once the host attaches the session, the committed `working_directory` and linked-worktree following resume as before.
|
||||
- Cost: until the session is attached, the sidebar roots at the original project rather than the agent's last directory/worktree; the next 5 s poll corrects it after attach.
|
||||
- 📏 **Measured (40,157,518-byte session, rebuilt locally)**: 12 `session.cwd` + 36 bypass-entry calls concurrently → **1 header read, 0 full reads, 3 ms, +0.3 MB RSS**; the same artifact on the pre-fix build (`43db17f`) with 6 concurrent bypass calls → 6 full reads, +1002 MB peak RSS (≈6.0 GB extrapolated for 36, matching the 6.2 GB incident peak). One full read costs 467 ms / +501.6 MB. Method and limits: [record](docs/plans/2026-10-27-workspace-cwd-over-cold-reads.md) §5.2.
|
||||
- 🧪 `tests/smoke.spec.ts` rewrote that group of 8 cases. Rationale and trade-offs: [record](docs/plans/2026-10-27-workspace-cwd-over-cold-reads.md).
|
||||
|
||||
### v0.28.1
|
||||
|
||||
- **Concurrent single-flight for cold cwd reads (OOM fix)**: after a full restart every session is detached, and the shared cwd resolution behind all twelve `/sidebar/*` routes ran one host observation per call (a full log read plus decode; a 39 MB session × 44 concurrent requests ≈ 1.7 GB → OOM). `cwdOf()` now shares one resolution between concurrent requests for the same session + client cwd hint; there is no TTL (the host already caches completed cold reads by persistence revision), and the hint stays in the key so different hints never leak across each other. Two new `tests/smoke.spec.ts` cases pin "12 concurrent → 1 cold read" and "different hints do not merge".
|
||||
- **Side Chat** ([#1035](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1035), [#1044](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1044), @NolanHo): local images and deliveries render in the transcript, and a model switch that rewrites the system prompt now trims the seed at the latest summarizing compaction instead of carrying the pre-compaction history into a new thread.
|
||||
- **No more silent wrong-file writes**: tab reconciliation now reaches tabs opened in **background sessions**, and a worktree session resolves chat links against **one address base**. Renaming or deleting an open file no longer re-creates the old path on the next save, and a relative link inside a linked worktree no longer silently opens a same-named file from another checkout ([#915](https://github.com/omdsh-dev/DSH-better-sidebar/issues/915), [#947](https://github.com/omdsh-dev/DSH-better-sidebar/issues/947), [#950](https://github.com/omdsh-dev/DSH-better-sidebar/issues/950), [#952](https://github.com/omdsh-dev/DSH-better-sidebar/issues/952)).
|
||||
- **Host crash guard for pathological git output**: the bounded `runGit` reader now latches after the byte cap, destroys both stdio streams and kills the process tree, and budgets stderr too. A pathological worktree can no longer take the whole host down with `RangeError: Invalid string length` ([#999](https://github.com/omdsh-dev/DSH-better-sidebar/pull/999)).
|
||||
- **Git page**: histories with more than 1,000 branches load again ([#1013](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1013)). **Tags now decorate commits, rows and details** — lightweight and annotated, with their own inventory budget and pagination fingerprint, without consuming the branch limit ([#983](https://github.com/omdsh-dev/DSH-better-sidebar/issues/983)).
|
||||
- **Editor**: saving after an mtime-only change (a `touch`, `git checkout` or formatter rewrite of identical content) no longer deadlocks on `fs-conflict`; “Reload from disk” adopts the fresh baseline in place and keeps the draft ([#1059](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1059)). The reading position survives tab re-seating ([#965](https://github.com/omdsh-dev/DSH-better-sidebar/pull/965)). “Add to conversation” now lands as a compact reference chip and never flattens earlier chips ([#1002](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1002), [#1052](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1052)).
|
||||
- **Markdown links**: local destinations normalize Windows backslashes, so `C:\ws\_analysis\report.md` opens instead of a bare ENOENT ([#1037](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1037)).
|
||||
- **Sidebar**: the bottom-workbench toggle stays visible while the right panel is open ([#989](https://github.com/omdsh-dev/DSH-better-sidebar/issues/989)); the macOS dock fallback avoids the window controls instead of pinning itself to the top-left corner ([#992](https://github.com/omdsh-dev/DSH-better-sidebar/issues/992)); a content-stable tab scope ends needless full-file re-reads ([#1057](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1057)); closing a side-chat tab archives its session instead of leaving a copy behind ([#942](https://github.com/omdsh-dev/DSH-better-sidebar/issues/942)).
|
||||
- **Package**: export the `dsh-better-sidebar/icon` subpath so other packages can resolve `icon.svg` through `exports` ([#1016](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1016)).
|
||||
|
||||
**Community contributions**: @lhh010 (#999), @wang-kaopu (#1018, #1020), @yanzhaohui1999 (#929, #956, #1012, #1002), @finley08 (#965), @UNscientific-9 (#1052, #1057), @mvanhorn (#981), @z11y11w (#1055), @WinterXMQ (#1053), @NolanHo (#1035, #1044).
|
||||
|
||||
### v0.28.0
|
||||
|
||||
- **Stable plugin support moves to DSH 0.2.1-rc.1+**: all 13 DSH peer floors are `^0.2.1-rc.1`; development dependencies, CI and installers pin the exact RC baseline. No runtime compatibility layer or feature implementation changes are introduced.
|
||||
- **Retain the published alpha's functionality**: the upstream alpha.5 → rc.1 full source-tree diff contains 355 files, all `package.json`, with no source changes. This release updates versions, dependency declarations and documentation only. Companion versions are Cordis peer `^4.0.5` / dev `4.0.5`, group `1.0.5`, schemastery `~3.18.5`, and unchanged include `1.0.10`.
|
||||
- **Move to npm `latest`**: v0.28.0 will take over the plugin's `latest` tag through the existing stable-version workflow; no workflow change is needed. **DSH's own `latest` still points to 0.2.0-rc.2 and cannot run this release**: pin plugin **v0.26.1** on that host. DSH 0.2.1-alpha.5 users pin **v0.28.0-alpha.0**; earlier support-line guidance is unchanged. The user explicitly accepted the independent tags' compatibility risk.
|
||||
- **Fresh RC validation**: see the [DSH 0.2.1-rc.1 adaptation record](docs/plans/2026-10-17-dsh-0.2.1-rc.1-adaptation.md). Incomplete checks remain pending; test counts from the alpha release below are not reused as RC evidence.
|
||||
|
||||
### v0.28.0-alpha.0 (prerelease)
|
||||
|
||||
- **Support moves to DSH 0.2.1-alpha.5+**: 13 DSH peers use `^0.2.1-alpha.5`; development dependencies, CI and installers pin the exact baseline. DSH 0.2.0-rc.2 users should pin npm-published **v0.26.1** (v0.27.0 has not been published). Install this alpha explicitly as `dsh-better-sidebar@0.28.0-alpha.0`, not `latest`.
|
||||
- **Native Connection admission**: HTTP/WS routes delegate to `ctx.connection.requestRejection(req)`, without the removed `webRuntime` service or plugin-owned trust exceptions.
|
||||
- **Runtime invariants integration removed**: upstream removed `@deepseek-ai/dsh-invariants` and `/invariant` subpaths; the plugin removes its companion, types and package entry. Compaction seed coverage retains the public surface fold and seed validator.
|
||||
- **Current working directory**: files, Git, terminals and new side chats follow session `working_directory`; live reads use workingDirectory, cold reads use sessionQuery all projections with lease disposal. Linked worktrees stay base-keyed; each new sidechat seed ends with a current-cwd stamp.
|
||||
- **Companion API / dependencies**: supply `TerminalBlockLabels.commandLine(line)` in both consumers and synchronize all 21 dictionaries; update Cordis `4.0.5`, schemastery `~3.18.5-alpha.2`, group `1.0.5-alpha.2` and include `1.0.10`, without a direct loader pin or overrides. Alpha.5 prefers package `engines.dsh` for compatibility; this plugin leaves it absent and retains its 13 DSH peers.
|
||||
- **Validation record**: [release integration validation](docs/plans/2026-10-17-alpha-release-validation.md) records 221 files / 2681 passing tests in single-worker mode, real alpha.5 mounting, and all three Context integration variants. The [initial adaptation record](docs/plans/2026-10-16-dsh-0.2.1-alpha.5-adaptation.md) preserves earlier adaptation evidence.
|
||||
- **Git Graph fills the available height**: remove the `min(60vh, 460px)` cap and use the space between the changes area and the fixed footer. The graph adapts when the diff preview opens or the window resizes; long histories scroll within the graph, while large pending-change lists retain outer-page scrolling rather than stretching the whole page.
|
||||
- **Optional dsh-context integration**: when the Context sidebar entry is available, provide diagnostic shortcuts in agent details, background-job output windows and the session header. Background jobs target only their explicit real owner, without changing the session semantics of output observation or stop commands. Cross-session navigation selects the target before opening Context and reuses an existing tab in another pane; further user navigation cancels the jump, with a 10-second maximum wait. Hide the entries when dsh-context is absent, disabled or exposing only session tabs. Do not modify context, resume agents or change dsh-context preferences; all entries share one optional Cordis-scoped adapter with no idle polling.
|
||||
|
||||
### v0.27.0
|
||||
|
||||
- **One Git page with Source Control and a read-only commit graph**: collapsible Changes and Graph sections, independent Merge / Staged / Changes groups, commit-message drafts, and a persistent branch/sync footer. The bounded graph reader supports branch filtering, lane connections, reference badges, hover details and commit inspection without checking out branches or changing refs. The shared preview keeps three tabs: Commit details / Content / Diff. Based on [#944](https://github.com/omdsh-dev/DSH-better-sidebar/pull/944) by @hairyf and [#969](https://github.com/omdsh-dev/DSH-better-sidebar/pull/969) by @vlln; the official lens tabs from [#939](https://github.com/omdsh-dev/DSH-better-sidebar/pull/939) by @hairyf remain, with no third graph lens.
|
||||
- **The page is now named Git** in all 21 dictionaries ([#968](https://github.com/omdsh-dev/DSH-better-sidebar/pull/968), @vlln). Staged and unstaged line counts remain separate for partially staged files ([#909](https://github.com/omdsh-dev/DSH-better-sidebar/pull/909), @UNscientific-9). Fixed an integration regression where selecting a change row moved it outside its group and drew a stray border; real-host browser coverage now checks all three groups at two desktop widths.
|
||||
- **Repository discovery and ownership handling**: bounded BFS discovers nested independent repositories even when the workspace root is a repository ([#607](https://github.com/omdsh-dev/DSH-better-sidebar/pull/607), @iasiv5). A dubious-ownership failure retries only the named repository for that command, without writing Git configuration or trusting `*` ([#827](https://github.com/omdsh-dev/DSH-better-sidebar/pull/827), @yanzhaohui1999).
|
||||
- **Session file operations**: resolve paths from the session cwd ([#886](https://github.com/omdsh-dev/DSH-better-sidebar/pull/886)) and include PTC file calls ([#921](https://github.com/omdsh-dev/DSH-better-sidebar/pull/921)), both by @wang-kaopu; show one operation per row in reverse chronological order ([#940](https://github.com/omdsh-dev/DSH-better-sidebar/pull/940), @hairyf). Explicit cursors and long polling avoid repeatedly replaying an unchanged event window ([#885](https://github.com/omdsh-dev/DSH-better-sidebar/pull/885), @wang-kaopu).
|
||||
- **Side Chat seeds from the latest summarizing compaction**, instead of copying the full parent log, while preserving the required event structure ([#964](https://github.com/omdsh-dev/DSH-better-sidebar/pull/964), @NolanHo).
|
||||
- **Validation**: parsed CSS selection guards, mounted Git layout/graph regressions, and isolated scroll-retention fixtures. DSH support remains **0.2.0-rc.2+**; no host compatibility-layer changes are included.
|
||||
|
||||
### v0.26.1
|
||||
|
||||
- ⚡ **Steady-state cost fix — the "it was fine on 0.24, then it got slow" regression** (community reports: the sidebar turns laggy after being open for a long time in the foreground, and DSH turns laggy after many conversation turns; restarting DSH clears it for a while). An artifact-level A/B puts the dividing line at **v0.25.0**, and v0.26.0's git-polling fix never touched the mechanisms below. Full method and every measurement: [docs/plans/2026-10-15-perf-steady-state.md](docs/plans/2026-10-15-perf-steady-state.md).
|
||||
- **The two 500 ms timers introduced in v0.25 are now visibility-gated** (measured 0.5 → 9.7 ms per tick, up to ~3,500 forced-layout reads per second, and they ran **whether or not anything was visible**): the host right-panel open state is now one module-level shared poller (refcounted; the timer is destroyed while the page is hidden and the value is re-read on show), and the blank-session fallback entry only builds its realign timer while it **actually renders** (the interval used to be registered before the component's early returns, so it ran while rendering `null`), with the retreat walk capped at 100 steps. Same batch: the `settings-nav-icon` body observer is rAF-coalesced and lost `characterData` (it fired for every streamed token in the main conversation), `use-center-column`'s 1.5 s safety net is armed only while no column is cached, and `session-phase` stops fetching while hidden and never re-renders on an unchanged answer.
|
||||
- **Per-tab work became per-session work**: `use-session-root` is now a refcounted per-session store — one 5 s timer, alive only while at least one **visible** subscriber holds it, paused while the page is hidden and refreshed immediately on show/focus/un-park. Native tab bodies pass their real `visible`; the file tree's directory watch and the side-chat push are gated the same way. **Previously every visited tab permanently added "one `git rev-parse` subprocess plus a 4,000-event rescan every 5 s"** — that resolver sits behind 12 `/sidebar/*` routes and measured 9.6–44.7 ms per cache miss.
|
||||
- **`keepMounted` keeps its semantics but is now bounded** (switching away still preserves scroll, drafts and expansion state): the git-status slot registry releases and prunes, the per-session ops stream is LRU-bounded while keeping its cursor (a parked tab still folds the write it missed), and `bySession` / `previewScrollMemory` / `commitDrafts` / `pendingAnchors` are all bounded. The client no longer re-copies the whole session-state map on every store notify, and the 1 s jobs clock no longer rebuilds the whole row list every tick.
|
||||
- **Host side**: the cwd resolver gained in-flight dedupe and a 15 s TTL (against a 5 s client poll, the old 3 s TTL meant every poll missed), the two whole-repo `--numstat` diffs now carry a pathspec (zero diff processes on a repo with a large unignored tree) plus an 8 MiB output cap, the single-layer `fs.tree` route got a probe gate and the fold probe is capped, cold side-chat threads are memoised, the agent-open queue is capped, and plugin teardown now closes accepted WebSocket connections.
|
||||
- 📊 Measured in the real mount lane (4 visited tabs, 15 s idle window): live 500 ms timers **3 → 1**, live 5 s timers **5 → 0**, `session.cwd` requests **15 → 0**, `elementsFromPoint` hit tests **1,620 → 0**, forced layouts **5,190 → 30**. Per-tick CPU in a Chromium microbenchmark: **0.02–0.32 ms → 0.001 ms** (up to 9.7 ms in the worst crowded case).
|
||||
- 🧪 New `tests/steady-state.spec.tsx` cross-module gate (no recurring timer while nothing is visible, no layout reads, no requests, one poller per session) plus an explicit inventory of every client `setInterval` site, and a `steady-state` metric with two hard assertions in the perf lane.
|
||||
|
||||
### v0.26.0
|
||||
|
||||
- ⚡ **git status polling no longer drags the UI down** (follow-up to [#212](https://github.com/omdsh-dev/DSH-better-sidebar/issues/212)): one fetch is `git status --untracked-files=all` plus two whole-repo `--numstat` diffs — four processes — and on a repository with a large UNIGNORED tree (a nested `node_modules`, a package-manager store) that measured **59,631 entries / 9.24 MB / 0.131 s**, with the 2,000-entry cap only applied AFTER the whole output had been produced and parsed. Three changes together:
|
||||
- **the editor's gutter no longer owns the poll** — it passed the feature switch where the tab's visibility belongs, and that parameter is what starts the timer; with native tabs kept mounted, opening any file kept the scan running every 2.5 s for the rest of the page's life. It now reads the shared answer and refreshes only on a file switch or a save, and holds no subscription at all while its tab is parked.
|
||||
- **the baseline is 30 s, with automatic back-off** — a round trip over 750 ms / 2 s / 5 s drops the slot to 60 s / 180 s / no automatic timer, a fast answer climbs straight back, and event-driven refreshes (stage, commit, discard, save, manual refresh) stay immediate.
|
||||
- **idle polls notify nobody** — the store's version counter is the `useSyncExternalStore` snapshot, so bumping it on every tick re-rendered every consumer once per cadence even when nothing had changed.
|
||||
- Linked-checkout inventory counts now use a single cheap command instead of a full `status()` per checkout; an untracked DIRECTORY counts as one entry there (it used to expand to every file, and the number was silently capped anyway).
|
||||
- 🚀 Plus everything else in v0.26.0: fully streamed transfers with the three deployment caps removed, a read-only paged preview for very large files, a fourth built-in viewer for `.jsonl` / `.ndjson`, Side Chat live push + visible queue + per-thread model selection, multiple bottom-workbench terminal tabs, the rebuilt Tasks panel, native-right-sidebar rename/delete reconciliation, and several silent data fixes. See the [Chinese CHANGELOG](./CHANGELOG.md#v0260) for the full list.
|
||||
|
||||
- **Oversized-file preview is now append-on-scroll, the way VS Code's log view works**: the first cut used explicit previous/next paging (each new page REPLACED the current one). Now reaching the bottom pulls the next window and keeps everything already read — line numbers continue across page boundaries, and "load all" is simply append-until-EOF. The walk has to be sequential: each page's `offset` IS the previous response's `nextOffset`. The too-large notice grew a "load all" button (showing byte progress while it works, disabled once EOF is reached).
|
||||
|
||||
Its companion **row ceiling** (`MAX_PREVIEW_ROWS = 50_000`) is the one thing VS Code does not need and this does: its `TextModel` and view are virtualized, so a gigabyte in the model still means a small DOM; this renders real elements. At the ceiling the preview stops and points at the download — a visible cap beats a frozen tab, and it sits far above any log a person reads in a side panel (the 6 MB reference log is ~35k records). The ceiling lives in the reading hook rather than the view's own RENDERED row count, because while `loadAll` walks pages in an `await` loop React has not re-rendered: deciding from a stale number overshoots by several pages. The new spec caught exactly that — the worker OOMs in ten seconds.
|
||||
|
||||
|
||||
> Upload, download, the HTML preview and archive packing all stream now, and there is no size limit left anywhere. The three deployment limit keys `readLimit` / `mediaLimit` / `uploadLimit` are gone with them (a retired key left in an old profile is silently ignored as an unknown field — no migration needed); `listLimit` stays.
|
||||
|
||||
- **Downloads have no 20 MB cap and the host's memory no longer grows with the file**: `/sidebar/file` and `/sidebar/html` went from "`readFile` the whole thing → `res.end(buffer)`" to `createReadStream` + `pipeline`. The load-bearing detail is WHEN the header is written — the stream's `open` event is awaited first, so an unreadable file (ENOENT/EACCES/directory) still produces the plugin's JSON error envelope instead of a 200 with an empty body; a failure after that point (the file changed under us, the peer went away) destroys the socket. `writeJson` gained a `headersSent` guard so a route's catch block cannot throw `ERR_HTTP_HEADERS_SENT` on a committed response and turn a truncated download into a crashed request. See `tests/file-stream-route.spec.ts` (a real 21 MiB `node:http` transfer, a mid-stream abort, an unreadable path).
|
||||
|
||||
- **Upload's two 128 MB gates are gone**: upload was already streamed end to end (`for await (chunk of req)` → temp file → atomic rename); what stood in the way was the client's `MAX_UPLOAD_BYTES` pre-check and the host's per-chunk `limit` check. The streaming core, the failure cleanup and the "never leaves a partial target or temp file" guarantee are untouched.
|
||||
|
||||
- **Packing is the system's job now, not a ZIP writer of ours**: the hand-written 300-line encoder (`src/zip.ts`, with its `ZIP_MAX_BYTES` / `ZIP_MAX_ENTRIES`) is deleted in favour of probing and running the system `zip` (always with `-y` — without it Info-ZIP FOLLOWS symlinks and an `a -> .` loop recurses forever) or `tar` (Windows 10 1803+ ships `bsdtar` and no `zip`). The tool's stdout goes straight into an OS temp file, never into memory, and the download streams it out before the file is deleted. `archive.status` lost its per-entry `done/total` (a child process reports none) and shrank to `{ state, bytes }`; with neither tool installed `archive.build` answers the new wire code `unavailable` and the UI shows an actionable sentence. The client download went back to a plain `<a download>` link — a Blob would hold the whole archive in the tab's memory and undo the host-side change.
|
||||
|
||||
- **Saving no longer has a 1 MiB wall**: `fs.write` rode the JSON API, whose request body is capped at 1 MiB, so a file the editor could open could not be written back. Saving moved to the raw `POST /sidebar/write` route (the document IS the request body); the encoding and line-ending restore (#523 / #871) is carried over unchanged and still pinned by `tests/fs-write-route.spec.ts`, now with a case far past the old ceiling.
|
||||
|
||||
- **Oversized files get a read-only PAGED preview instead of a truncated editor**: `fs.read` went from "whole file or a truncated prefix" to three outcomes (`text` / `binary` / **`too-large`**). Above the editable threshold (5 MiB) a text file is no longer handed over as half a document — it answers `too-large` with a 4 KiB sniff head, and the client renders a paged read-only preview (a monospace line list, the log-viewer shape) with a download escape hatch. Oversized BINARIES are unaffected (the media path is the same as before). `FileViewerProps.truncated` and the `truncation` copy key are both deleted — "half a document that looks editable" is itself the defect #732 was about. The new `fs.readPage` pages by byte window, trimmed back to the last line break so a page is a whole number of lines; a single over-long line is returned as-is rather than as an empty page (otherwise "next" would sit on an offset that never advances).
|
||||
|
||||
- **`.jsonl` / `.ndjson` are supported**: they had no highlighting at all (`lang.ts` had no mapping), and mapping them to `json()` is not free — `@lezer/json` accepts ONE top-level value, so a 400-record file parses into **402 error nodes** (measured). There is now a hand-written per-line JSON tokenizer (one line at a time, no cross-line state, an unterminated string marked outright) behind a fourth built-in viewer, `jsonl`: the PREVIEW is one collapsible card per record (collapsed to a one-line summary, expanding into the host's `JsonTree`) and the EDITOR is the same saveable CodeMirror, behind the preview/edit toggle. Line references (`a.jsonl#L131`) still flip to the editor and land on the line.
|
||||
|
||||
- **Fixed an invisible error marker**: `tags.invalid` was `#ffffff` in BOTH schemes — white on white in the light theme. It is the token a JSON/JSONL syntax error lands on, and the reader is supposed to be able to see what did not parse; it is now a red wavy underline.
|
||||
|
||||
- **A `stat` failure is a 400 now, not a 500**: the two byte routes let the raw rejection escape as an "internal" 500, which reads as a plugin fault. An unreadable user path is a 400.
|
||||
|
||||
- **Paged-read encoding consistency (a regression only a real file would surface)**: the first implementation locked the encoding page 1 sniffed, so a "long ASCII prefix + GBK body" file decided UTF-8 from its first page and decoded the GBK tail into mojibake — while a whole-file read had always decoded it correctly. Only WIDE encodings are locked now (UTF-16/UTF-32 is a property of the file; a page that happens to hold no NUL bytes cannot re-litigate it) while byte-oriented encodings are sniffed per page (a pure-ASCII page decodes identically either way). That is safe because pages are line-aligned: `0x0A` can be neither a UTF-8 continuation byte nor a GBK trail byte. Both directions are pinned in `tests/fs-read-page.spec.ts`.
|
||||
|
||||
- New guards: `tests/file-stream-route.spec.ts`, `tests/fs-read-page.spec.ts`, `tests/jsonl.spec.ts`, `tests/jsonl-language.spec.ts`, `tests/archive-tools.spec.ts`, `tests/archive.spec.ts`, `tests/editor-large-file.spec.tsx`. `tests/zip.spec.ts` was rewritten as `tests/archive.spec.ts` alongside the writer it tested; the single real-binary case self-probes and skips when neither tool is installed (so the Windows CI runner without `zip` does not go red).
|
||||
|
||||
- Design notes, the comparison against VS Code Web (including the correction that **VS Code does not paginate** — its model is threshold + confirmation + turning tokenization off) and the record of implementation deviations live in [docs/plans/2026-10-11-streaming-transfer-jsonl-preview.md](docs/plans/2026-10-11-streaming-transfer-jsonl-preview.md).
|
||||
|
||||
### v0.25.0
|
||||
|
||||
> 📦 **Support line moved: DSH `0.2.0-rc.2+` only** (peer floor `^0.2.0-rc.2`). npm's `latest` for DSH is exactly 0.2.0-rc.2 now, and this release pins it. **Hosts on 0.2.0-rc.1 or older (including the 0.1.7 line) should pin v0.24.1** — `^0.2.0-rc.2` evaluates false against rc.1, so the host's startup compatibility preflight disables the whole row silently. Declaration and pin change only: zero runtime changes.
|
||||
>
|
||||
> 🙏 Carries work from several contributors (listed in merge order in the [Chinese CHANGELOG](./CHANGELOG.md#v0250)). This English file was not updated for v0.25.0 at the time.
|
||||
|
||||
### v0.24.1
|
||||
|
||||
> 🎁 **This release carries everything since v0.22.1** (the Files/Changes UI-UX rebuild and performance work of v0.23.0, the DSH 0.2.0-rc.1 support-line move of v0.24.0, and the fixes below).
|
||||
>
|
||||
> 🐞 **Fix release** for the file tree rebuilding itself on every interaction. (1) The native surface (`sync()` in `src/client/native/index.ts`) treated the `files` takeover as a surplus registration — it is keyed by KIND and never appears in `wanted`, so **every session-state write** disposed and re-created it. Replacing a slot registration replaces the host's slot entry, which **unmounts and remounts the whole plugin tab body** (folder toggles, tab switches, bottom-workbench drags all trigger it): the explorer lost its level cache, scroll position and directory watcher, then re-listed the entire visible tree via `fs.trees([root, ...expanded])`. (2) The live-refresh path (`retryDir` in `FileTree.tsx`) **deleted a level from the cache** before refetching, so its rows were replaced by a placeholder and rebuilt (a build, a formatter or the model's own bash made entire folders blink).
|
||||
|
||||
- 🧪 Discriminating evidence: a new real-host lane `tests/e2e/zz-expand-refresh.e2e.ts` (a toggle asks only for the toggled level, the tab body survives, rows never drop to zero; reverting either fix turns it red) plus two jsdom guards (reverting the surface fix: `registered` 6 → 12 with every `disposed` entry being `dsh-better-sidebar:files`; the other asserts stale rows stay on screen during a re-list)
|
||||
- 📉 Measured after the fix (40-child directory): the toggle's `fs.trees` payload goes from `[root, big]` (the empty-cache signature) to **`[big]`**, new WebSockets 1 → **0**, removed rows 45 → **0**, and an external write goes from "remove 40, add 40" to **one added row**
|
||||
- 🔧 `src/fs-watch.ts` / `use-dir-watch.ts` / `TreePanel.tsx` / `tab-adapter.tsx` untouched (`fs.watch` does not emit on creation — measured and ruled out)
|
||||
|
||||
### v0.24.0
|
||||
|
||||
> 📦 **Support line moved**: DSH **0.2.0-rc.1+** only (peer floor `^0.2.0-rc.1`, CI pins `@deepseek-ai/dsh@0.2.0-rc.1`). **The 0.1.7 line (including npm `latest` = 0.1.7-rc.2) should pin v0.22.1 (the last published release on the 0.1.7 line)** — the 0.2.0 host's startup compatibility preflight evaluates `semver.satisfies(hostVersion, peerRange, {includePrerelease:true})`, and a caret never spans a minor bump (measured: `^0.1.7-rc.1` vs `0.2.0-rc.1` is **false**, so the whole row is disabled silently). This version therefore keeps no 0.1.7 compatibility branch.
|
||||
|
||||
- 📦 **Baseline lifted to `0.2.0-rc.1`**: 14 DSH peers and 27 `@deepseek-ai/*` devDependencies move together; `dsh.plugin.json`'s `engines.dsh` follows; the mount lane (`scripts/e2e-common.sh`) and CI pins follow.
|
||||
- 🔍 **Measured before adapting (purely additive, hence no runtime change)**: across the 19 host packages this plugin consumes, **zero value exports were removed**; the only type-surface changes are `dsh-client-ui-primitives` (optional props on `DisclosureRow` / `TextShimmer` / `Tooltip`, overlay top inset), `dsh-session` (new `ToolCallRecovery`) and `dsh-api-remotes` (a new product-analytics remote); session format stays **v4** (no migration package), `SUBAGENT_DESCRIPTOR_VERSION` stays **3**, `dsh/lib/bin.js` (`dsh plugin` / `dsh web` / the ready line / `--version`) and the `dsh-client-modules` runtime are **byte-identical**, the web profile's client inject list is unchanged, and `ui-primitives`' bare imports are identical (no new test-time dependency).
|
||||
- 🧩 **Host web-profile composition changes, checked though unrelated**: desktop-only `product-analytics` / `desktop-product-telemetry` rows are added (disabled on the web profile); the already-disabled `time-context` / `schedule` / `ui-schedule` rows move into the optional `dsh-experimental-schedule-bundle`. The mount assertion "the host owns exactly one tab entry (terminal) and browser is absent" is unaffected.
|
||||
- 🧪 **Tests and rules**: the peer-shape assertion in `tests/market-manifest.spec.ts` now pins the current baseline tuple and records the "a caret never spans a minor bump" lesson (compatible with §3.4 item 12's "includePrerelease is more permissive" note — that permissiveness only holds inside one minor line).
|
||||
- ⚠️ **Only residue**: the optional `@huanlin/dsh-plugin-better-locale` integration (imported by no source file or test; detected structurally at runtime) pins `^0.1.0-rc.8`, and even its newest 0.4.3 pins `^0.1.5-rc.2` — both fail the 0.2.0 preflight, so `pnpm peers check` reports its 5 unmet peers. That is upstream not having adapted to 0.2.0, unrelated to this plugin's own 14 peers.
|
||||
### v0.23.0
|
||||
|
||||
> 🧭 **Development-line version (never published to npm; its content ships with v0.24.1)**: the Files and Changes pages rebuilt end to end, plus a round of performance and interaction polish. The Files page gains **Ctrl/Cmd and Shift multi-select** (VS Code semantics), a batch action bar, **Git change coloring** (VS Code's add/modify/delete/conflict tones, directories get a summary dot), **new-folder creation**, reworked drag-and-drop upload, and **"Zip and download" on a multi-selection** — archiving became a host-side task with progress (`archive.build` / `archive.status`, per-entry callbacks, 4 concurrent builds, 5-minute TTL, sessionId-bound). "Open with" now keeps **both sources side by side**: the local associated apps the host detects (file manager / VS Code / Cursor / Zed / custom editors, SSH remotes included) plus the plugin's own targets, with a setting (`openWithPluginTargets`) to force coexistence; the context menu was restructured (only default actions at level one, the app list moves into a submenu). The Changes page is **rebuilt as a hierarchy tree** with both the Git view (working tree / staged / history) and the Agent view (per-session edits), and directory rows stage/unstage. Interaction and performance: `/sidebar/api/fs.tree` measured **22.8ms → 3.8ms** (10k entries: one `readdir`, rows built only up to the cap, lowercase-comparison sort, 1.5s directory-level cache invalidated by writes and `fs-watch`), a new batch route `fs.trees` (mount/refresh goes from N+1 requests to one), opening the context menu no longer re-lists directories, and rows no longer re-render with every git poll. Also fixed: "Open to the Side" did nothing (it only wrote into the collapsed bottom workbench; it now routes by surface to the host's `openResource(preferNewPane)` and really splits).
|
||||
|
||||
- ⚠️ **Behavior change (security-relevant)**: the **workspace path fence was removed** — the plugin's fs routes (tree/read/write/rename/remove/mkdir/media/HTML/upload/archive) no longer enforce containment and can read or write any path the host user can reach (OS permissions are the only limit); the `workspaceFence` setting and its notice row are gone.
|
||||
- 🧩 Reusable global components and shared stores were extracted (`IconButton` / `Chip` / `SectionHeader` / `Notice` / `ConfirmDialog` / `StatusBadge` plus a shared git-status store) under the skin contract (`tests/theme.spec.ts`); the ZIP writer is our own (no third-party dependency) and a non-latin1 download name no longer 500s (RFC 5987).
|
||||
- 🐞 Also fixed: the tree's expansion was reset when a file preview was closed and the tree came back (the native surface kept the expansion set per tab; it is now projected from **per-session state**).
|
||||
|
||||
### v0.22.1
|
||||
|
||||
> 📦 **Stable release** (npm `latest`): DSH **0.1.7-rc.1+** only (peer floor `^0.1.7-rc.1`, CI pins `@deepseek-ai/dsh@0.1.7-rc.1`) — the support line is **unchanged**, so 0.21.1 / 0.22.0 users can upgrade straight away; **hosts on DSH 0.1.6-alpha.2 or earlier still pin v0.19.1**. A patch release: both defects reproduced reliably on a real host while the unit suite stayed **green**.
|
||||
|
||||
- 🐛 **The `files` takeover's tab-type id could be orphaned → `native register files error: … already registered` spam plus the Files window falling back to the host's empty state until a page refresh** (community issues #770 / #771 / #766). The chain was confirmed verbatim from the desktop shell's own log (`desktop.frontdesk.log`, 2026-09-27 15:51:39.338): during an in-page client entry replacement (plugin-market update, Plugins page disable→enable, HMR rebundle) the plugin's teardown unregisters each built-in descriptor one by one → `service.notify()` (synchronous, inline) drives `sync()` on an **already inactive** plugin context; the drop loop released the `files` takeover — which is **not a descriptor** — and re-created it **in the same pass**: `tabs.register` lives on the **host** context (still alive) so it took the id anyway, while the `ctx.slots.inject` right after it threw `cannot create effect on inactive context`, `live.set(FILES_KIND, …)` never ran and the disposer was lost — the id became **unregistrable for the rest of the page's life**. Fix (community PR #777, @yanzhaohui1999): ① the drop loop **skips `FILES_KIND`** — the takeover lives and dies by the editor type's `wantsFiles/hasFiles` switch and the seat disposer; ② **any registration that fails after the host took the id releases that type and the slots already installed**, leaving only a failure the next notification retries; ③ teardown / drop loops release entry by entry, so one throwing release no longer aborts the rest.
|
||||
- 🐛 **macOS desktop: window drag worked once and then stopped, and the double-click-title zoom was gone** (issue #772). The plugin host is a direct `body` child, so the shell's `html[data-platform=darwin] body > :not(#root) { -webkit-app-region: no-drag }` (an id-bearing selector — only `!important` wins) applied to it, and app-region **ignores `pointer-events`** — the viewport-sized panel layer cancelled every `[data-window-drag]` strip beneath it. Fix (community PR #773 merged; #786 completed it): `[data-dsh-better-sidebar]`, `[data-dsh-panel-host]` (with `> *` staying `no-drag`) and the zoom modal `.mermaidModal` opt out with the **neutral** `-webkit-app-region: initial !important` — `initial` computes to `none`, which does **not** subtract from the drag region, whereas the literal keyword `none` is not neutral (it computes to `no-drag`). Interactive popups (`.selectionPopup`, `FloatingWindow`, `AnchoredPopover`) deliberately do **not** get `initial`, or a press would start a window drag instead (the #103/#111 regression).
|
||||
- ✅ **Guards**: `tests/native-registration.spec.ts` pins both invariants to the registry's **event log** (4/4 red on the unfixed code, and "a failed registration can still be retried" is no longer a non-discriminating assertion); slot failures are keyed by `name::key` so `registerSlots`' partial-release path is actually exercised; a **deployment-level regression gate** `tests/e2e/native-reload.e2e.ts` was added (`utimesSync` the installed `lib/client.js` → in-page entry replacement → assert no `native register … error`, no diagnostic strip, the Files takeover usable again; red on 3 consecutive runs against npm 0.22.0, green on 3 consecutive runs of the fixed build (it is ONE case, run repeatedly)). The drag contract is shape-pinned by `tests/panel-host-css.spec.ts` on Linux `pnpm test` (there is no macOS runner) and value-pinned by a real cascade probe in the mount lane that reads computed styles against the shell's own rules (both the panel host and the zoom modal red the unfixed artifact).
|
||||
- 📐 **Baseline unchanged**: `@deepseek-ai/dsh-*` still pinned to `0.1.7-rc.1`, peer floor `^0.1.7-rc.1`; no public API, contract, dictionary or chunk changes. Incident write-up (and why #766's "absorb" approach was rejected): [docs/plans/2026-09-28-native-files-takeover-reload-leak.md](./docs/plans/2026-09-28-native-files-takeover-reload-leak.md).
|
||||
- 🧪 **Verification**: `pnpm test` 122 files / 1293 passed / 9 skipped; `pnpm test:mount` and `DSH_CMD=… pnpm test:mount:aggregate` green; the packed bundle carries `app-region:initial!important` twice and `no-drag` twice.
|
||||
|
||||
### v0.22.0
|
||||
|
||||
> 📦 **Stable release** (npm `latest`): DSH **0.1.7-rc.1+** only (peer floor `^0.1.7-rc.1`, CI pins `@deepseek-ai/dsh@0.1.7-rc.1`) — the support line is unchanged, so v0.21.1 users can upgrade straight away. **Hosts on DSH 0.1.6-alpha.2 or earlier still pin v0.19.1.** The headline is the Tasks page rebuilt from a "subagent topology" into a **workflow graph**, then polished over several rounds of real-host feedback; along the way DSH 0.1.7 deleted the Agent Teams Remote methods, so both the team and background-job data planes were rewritten.
|
||||
|
||||
- 🧩 **The Tasks page is now a workflow graph (the primary view)**: the session tree renders as layered nodes joined by bezier edges — drag to pan, wheel-zoom to the cursor, fit to the content box (double-click the background to refit), and a control cluster bottom-right (graph/tree toggle + fold switch + zoom + fit). The classic **indented tree is kept** (keyboard-navigable); both modes share one view model, so fold state and team enrichment never drift apart, and the default view is a setting.
|
||||
- 🃏 **Two-segment node cards**: the top segment is the kind badge (main agent / subagent / teammate / workflow / completed aggregate) + phase badge + name + meta line; the bottom bar is the state dot + state word + **the same merged activity line the main agent shows** (concurrent tools grouped by category, counted, with the running call's detail — the wording comes straight from the host's `chat` namespace) + a fold chevron on finished nodes. A running bar is swept left-to-right across its **whole** width (1.5 s, token gradient, disabled under `prefers-reduced-motion`). Cards are 8px-rounded, hierarchy is carried by a faint top-segment tint only, and the session you are on wears a heavier accent border.
|
||||
- 🔀 **Workflow runs enter the graph**: the host folds `tool-workflow/*` session events into runs (the same events the official workflow-run panel folds); a run hangs under its origin agent, its member agents are re-parented below it and boxed per phase with matching phase badges. Members with no catalog row are synthesized from the run's own data, so a finished run still shows who took part.
|
||||
- 🗂 **Folding is split into two groups that say what they hold**: `✓ N completed` (finished work plus failures, with failures called out as `N failed`) and `N idle` (teammates that finished a turn and can be called back at any moment) are **two separate rows**. The **manual chevron always works** (no threshold); the **automatic** rule only sweeps idle members once there are 3 or more of them — one or two waiting members are the team's working set, and their cards are where a task line shows up. An aggregate's name line reads "first two names + `+N`", and clicking it expands everything.
|
||||
- 🪟 **Two persistent floating windows** (extracted into a reusable `FloatingWindow`): background-job output, and the shared task's detail/edit surface — draggable, resizable from every edge, with a self-scrolling body, dismissed only by its close button or Escape (an outside click, a blur or the anchor leaving the viewport never closes them). The task window hands its spare height to the description (or the multi-line editor), so enlarging it gives the content more room rather than leaving a gap, and the action row is pinned to the footer so a long description cannot push it out of sight.
|
||||
- 👥 **Agent Teams board (experimental layer)**: team members enrich their matching nodes and an always-visible strip lists the roster and shared tasks; the task state machine follows the host (pending → claim → in progress → complete → reopen) with reassign / edit / two-step delete, and a stale CAS revision gets its own notice ("changed elsewhere — refreshed"). **Member activity is overlaid from `subagents.live`'s `running` flag** rather than guessed on the client.
|
||||
- 🔄 **Background jobs now read the host's client service**: DSH 0.1.7's web profile mounts a client-side `ctx.jobs` (a pushed roster plus a non-consuming output stream and `kill`), so the plugin deleted its own `jobs.list` / `jobs.output` / `jobs.kill` routes and the event-replay mirror — and never touches the model's `job_output` cursor at all (the host turned that constraint into a capability). Output streams in a persistent floating window with tail-follow, and the drawer auto-collapses once a tree has 8 or more agents.
|
||||
- 🛠 **Two data planes rewritten for DSH 0.1.7**: ① team reads — upstream deleted the three `agentTeams.remoteView`-style Remote methods, so the plugin reads the Lead Session's **`agentTeam` Session projection** instead (the same snapshot `subagentCatalog` comes from, push-based), deleting the `teams.view` route and its 5-second poll; the write path keeps two routes (`createTask` / `updateTask`) whose rejections moved from a result union to a thrown `TeamError`, with `TEAM_TASK_STALE_REVISION` mapped to a 409 `team-conflict`. ② background jobs — see above. **The bug this fixed in the wild**: on 0.1.7 the team strip never rendered at all (the route answered `remoteView is not a function`, and the page degraded silently).
|
||||
- 🐛 **Four defects caught on a real host** (every one of them green in unit tests): the per-node fold button did nothing because it answered to the **automatic** rule's guards (non-member + leaf) while the button is a **manual** trigger — the two triggers now have their own guards; an **idle** card never drew a fold chevron at all (its render condition was hard-coded to done/error) — "not executing" now qualifies; claiming a task flipped its tag to **blocked** because `ready` only means "queued with every blocker done, clear to claim" and is false for every non-pending task — the rule is now the single `taskBlocked` / `taskStatusLabel` / `taskTone` / `taskDotState` pair; and "complete" on a queued task always failed (the host state machine demands a claim first), so the action row now follows the state.
|
||||
- 🎨 **Narrow panes and mobile settings**: type scale, row heights and spacing were re-tuned for the native right sidebar's narrow width (content-box centering, zoom clamping, pan bounds, phase-frame colours, thicker edge stubs, a recomputed card height budget); the settings page gained a **Mobile** group — on a narrow viewport (≤768px) the Tasks page no longer auto-opens and it defaults to the tree view.
|
||||
- 📐 **Baseline**: the DSH pin and support line are **unchanged** (0.1.7-rc.1, peer `^0.1.7-rc.1`). New copy keys (including `teamTaskClaim` / `tasksFoldIdle` / `taskWindowCreate` / `tasksStateProvisioning`) across all 20 dictionaries; design docs: [docs/plans/2026-09-14-tasks-graph-workflow-teams-design.md](docs/plans/2026-09-14-tasks-graph-workflow-teams-design.md), [2026-09-27-tasks-graph-polish.md](docs/plans/2026-09-27-tasks-graph-polish.md), [2026-09-27-floating-window-mobile-settings.md](docs/plans/2026-09-27-floating-window-mobile-settings.md), [2026-09-27-agent-teams-dsh-0.1.7-adaptation.md](docs/plans/2026-09-27-agent-teams-dsh-0.1.7-adaptation.md) (implementation deviations and known limits included).
|
||||
|
||||
### v0.20.0 (dev line, **never published**)
|
||||
|
||||
> 🚫 **This version never reached npm** (npm `latest` is still v0.19.1): it was meant to be the stable release on the 0.1.6-alpha.2 line, but the 0.21 line replaced it before release, so everything below actually shipped in **v0.21.1**. Its original positioning: supports **DSH 0.1.6-alpha.2+** only (peer floor `^0.1.6-alpha.2`, CI pins `@deepseek-ai/dsh@0.1.6-alpha.2`). **This is a breaking-change release**: hosts on 0.1.5-rc.* should pin `dsh-better-sidebar@0.19.1`. See [docs/plans/2026-09-21-dsh-0.1.6-alpha.2-adaptation.md](docs/plans/2026-09-21-dsh-0.1.6-alpha.2-adaptation.md) for the adaptation record.
|
||||
|
||||
- 🖥️ **Terminal handed to DSH's built-in**: DSH 0.1.6 ships its own right-column terminal (`ui-sidebar-terminal`), so the plugin deleted its whole terminal stack — `pty-manager` / `agent-pty` / `pty-deps` / the 8 `terminal_*` tools / the xterm view and font-linking / cross-session terminal pinning — along with the `node-pty` dependency, its `allowBuilds` grant and the installer's `-Repair` mode. **Note**: the model therefore loses a cross-call persistent terminal (only one-shot `bash` / `pwsh` remain); the upstream `@deepseek-ai/dsh-tool-terminal` is not mounted by any shipped bundle, so enable it yourself in the profile when you need it.
|
||||
- 🌐 **Browser view handed to the built-in**: the plugin deleted `BrowserView` / the sandbox status bar / the embeddability probe (including the host's `browser.probe` route) and the two settings that only configured its own iframe; it **keeps** the external-link takeover in the chat and UI (protocol-based routing is the capability the host does not have), now targeting DSH's built-in `browser` tab type.
|
||||
- 🧩 **The produced-files row goes back to the host**: DSH 0.1.6 turned `conversation.chat.turnTail` from a chain into a list (upstream deliberately lets several plugins **append** rather than replace each other), so the plugin's takeover could only duplicate the built-in deliverables card and was removed wholesale; click behaviour is unchanged (the built-in goes through the host's `openFile` → this plugin's editor). The cost is the one "reveal in the file tree" entry at the turn tail (the in-tree context menu remains).
|
||||
- 🐛 **Two silent breakages fixed**: once `SidebarRightGuideEntry.id` became required, a missing id left the **whole native surface silently empty** (the throw happens inside an `ctx.inject` callback and is swallowed); once `turnTail` became a list the old registration threw outright and the row died. Both are fixed and guarded by tests, with a registration-failure reporting hook added alongside.
|
||||
- 🎨 **The empty-pane card now matches the built-in card recipe**: `.paneCard` adopts DSH's guide-capsule recipe (0.5px l4 border / 24px radius / layer-1 fill / 56px minimum / 14×20 padding), with tests guarding its geometry, its tokenized colours, and that it does not copy upstream's **undefined** `--dsw-alias-bg-l1/-l2` spellings.
|
||||
- 📐 **Baseline**: every `@deepseek-ai/dsh-*` package is pinned to `0.1.6-alpha.2`, the vanished `dsh-code-runtime` package is removed, `diff` / `simple-icons` are hoisted into devDependencies as primitives' new bare imports, and `ui-primitives`' three breakages this release (`IconSendOutline16` gone, `TerminalBlockLabels.noExitCode` added, `ConnectionIndicator.reconnectLabel` removed) are adapted.
|
||||
|
||||
### v0.19.1
|
||||
|
||||
> 📌 **Stable release** (npm `latest`, no prerelease suffix): the pinned baseline moves to **DSH 0.1.5-rc.2** (npm `next`) while the **peer floor stays `^0.1.5-rc.1`** — nothing in the rc.2 upstream delta touches this plugin (zero changes under `packages/api|host|session|agent`; the only real code edits are the message-feedback dialog, deliverables card CSS and the `CodeFileIcon` SVG data split), so rc.1 hosts need no DSH upgrade to run this version. Hosts on DSH 0.1.5-alpha.2 stay on **v0.19.0-alpha.1**; the 0.1.2-rc.1 stable line keeps using **v0.18.1**.
|
||||
|
||||
- 🎯 **Adapted to DSH 0.1.5-rc.2**: devDependency pins, the CI mount lane and `SIDEBAR_SERVICE_VERSION` all move to rc.2; there is **no plugin-side code change** (the upstream delta does not touch this plugin — file-by-file audit in [docs/plans/2026-09-10-dsh-0.1.5-rc.2-adaptation.md](docs/plans/2026-09-10-dsh-0.1.5-rc.2-adaptation.md): the vast majority of the 300 changed files are single-line `version` bumps).
|
||||
- 🎨 **File icons (#611) and the built-in tab glyphs are now colored** (#531 + #594 merged, implementation redone for rc.2):
|
||||
- **Files and folders use DSH's own artwork**: the fallback link is the host's `FileTypeIcon` from `ui-primitives` (48 full-color official code/config glyphs plus the category-colored sheets for markdown, images, PDF, Office, video and folders), so the plugin **ships no extension table and needs no icon chunk** — #429's 563-entry color dataset and `lib/client-file-icons.js` (255 kB) are gone, along with the `fileIconTheme` switch. Color is simply the behaviour now, and the core bundle grew by 10 kB.
|
||||
- **New public `registerFileIcon` API** (capability `'fileIcons'`): register your own glyphs by extension (`exts`), exact file name (`names`) or directory name (`folderNames`), ranked by priority then registration order. **Caveat**: the host classifier covers every path, so a catch-all (`exts: []`) claims every row the specific rules miss.
|
||||
- **Colored built-in tab glyphs**: Files / Changes / Tasks / Side chat / Terminal / Browser and the diff view all get a colored glyph, painted from `--dsw-alias-*` tokens so every skin still applies.
|
||||
- **The native right Sidebar's tab chips carry a glyph too**: the host's tab definition has no icon field, but the `sidebar.right.pane.tab.title` slot *is* the chip's content — the plugin renders `[glyph][title]` there (an editor tab with a path shows that file's icon). The glyph is `aria-hidden`, so the chip's accessible name is unchanged.
|
||||
- 🛠 **CI fix 1: real Windows-lane timeouts**. `ci-windows` went red eight times in the 2026-09-09/10 window; six of those were process-spawning cases hitting vitest's 5000 ms default: `tests/agent-pty.spec.ts` (real PowerShell + ConPTY per terminal) and `tests/install-powershell.spec.ts` (a cold `powershell.exe` start measured 12.1 s) now declare a 30 s budget each, vitest.config.ts raises the global `testTimeout` from its 5000 ms default to **15 s** (the first real Windows run then lost a *third* file to the same default — `tests/git.spec.ts:85` at 9607 ms; three files, one cause, so per-file patches were whack-a-mole), and `waitForTranscript`'s inner poll budget dropped from 5000 ms to 15 s — **the inner budget must sit below the outer one** (they used to be the same 5000 ms, a structurally guaranteed timeout). `ci-windows`'s `Test` step now runs `pnpm test:windows` (`--maxWorkers=2`) so the process-spawning specs stop starving each other on a 2-core runner.
|
||||
- 🛠 **CI fix 2: the mount lane's npm install**. `plugin-mount`'s `npm install -g @deepseek-ai/dsh@<ver>` failed four times (two `ETARGET`, two `JavaScript heap out of memory` / exit 134): the pinned version declares its transitives as floating `^` ranges, so while upstream publishes a prerelease in stages (rc.2 appeared package by package between 14:43 and 14:57 UTC on 09-10) npm resolved a mixed rc.1/rc.2 peer graph (3062 ERESOLVE lines). The lane now pins an **already-complete** rc.2 (fixes ETARGET) and passes `NODE_OPTIONS=--max-old-space-size=4096` (fixes the OOM). `--legacy-peer-deps` was tried on the way and rejected by real CI: it skips exactly the peers a global install must supply, and `@deepseek-ai/cordis-plugin-group` — required at boot by `dsh-app-boot` — is a peer rather than a dependency, so the CLI died with `ERR_MODULE_NOT_FOUND`.
|
||||
|
||||
### v0.19.0
|
||||
|
||||
> 📌 **Stable release** (npm `latest`, no prerelease suffix): supports **DSH 0.1.5-rc.1+** only (peer floor `^0.1.5-rc.1`, CI pins `@deepseek-ai/dsh@0.1.5-rc.1`). Hosts on DSH 0.1.5-alpha.2 should stay on **v0.19.0-alpha.1** (the npm `alpha` tag still points there); the 0.1.2-rc.1 stable line keeps using **v0.18.1**.
|
||||
|
||||
**✨ New**
|
||||
|
||||
- 📝 **The new-tab list gets an optional description back**: DSH 0.1.5-rc.1 restored `SidebarRightGuideEntry.description` (optional), so the plugin restores `TabDescriptor.description` — each of the six built-in types declares a line again (all six guide rows — Files / Changes / Tasks / Side chat / Terminal / Browser — carry one), and the `guideDesc*` keys return to all 20 dictionaries. **The host's native guide renders descriptions only while the listed entries are ≤ 4** (a longer list drops every description rather than truncating), and the plugin contributes six guide entries by default — so in the default composition no description is rendered; they appear once the reader disables enough tab types (per-type switches live on the plugin's settings page) to bring the guide down to four entries or fewer. An entry that declares none stays a single icon + title line (the plugin ships no generic fallback sentence). (#613)
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- None. The rc.1 delta over alpha.2 is small (373 changed files, overwhelmingly upstream package version bumps, native-sidebar preview UI polish, and test snapshots); apart from the restored description field (plus upstream's `files` type now using its own coloured folder glyph as the guide glyph) nothing needed adapting.
|
||||
|
||||
**🧰 CI & internals**
|
||||
|
||||
- Baseline moved to **DSH 0.1.5-rc.1+** (#613): peer floor, devDependency pins, the CI mount lane, and `dsh.plugin.json`'s `engines.dsh` all follow (rc.1 is both the `latest` and `next` dist-tag on npm).
|
||||
- Explicitly unchanged, no need to re-check: the global main-panel model (the `main` slot / `sidebar.panellist` / `ctx.layout` / root-scoped `rightbar` + `rightbar.session`, still not adopted), the file address grammar (`packages/util/workspace-path` only had its version bumped), the native tab-body host contract (`.paneBody` is still a block scroller with a definite height), the core / agent / session / subagent host APIs, and the `ui-primitives` export surface (only CodeBlock rendering changed).
|
||||
- `@deepseek-ai/dsh-client-ui-primitives@0.1.5-rc.1` still declares no `dependencies` while its bundle still bare-imports `anser` / `shiki` / `@shikijs/langs/*` / `mdast-util-*` / `micromark-*` / `katex` — the third-party devDependencies hoisted in the previous release therefore stay, and must not be reverted.
|
||||
- Real-host verification (DSH 0.1.5-rc.1 + plugin 0.19.0): `typecheck` / `lint` / `check:consumer-types` green; unit suite **124 files · 1296 passed · 9 skipped**; `pnpm peers check` clean; the mount smoke lane against real rc.1 **7 passed** (including the tab-body fill assertion and the new "descriptions render only at ≤4 guide entries" assertion); on the local 3080 instance the guide still shows six icon+title capsules (6 > 4, so upstream renders no descriptions — upstream also raised the capsule `min-height` from 48px to 56px), clicking `AGENTS.md` in the file tree lands in the plugin editor (CodeMirror mounted), the side-chat composer sits on the pane floor (host box 962px == pane body 962px, composer 8px off the bottom), the bottom workbench's edges coincide with the centre column, and `pageerror` is 0 (the only console noise is the third-party `dsh-tauri-worktree` `/api/dsh-worktree/attach` 500, unrelated to this change).
|
||||
|
||||
### v0.19.0-alpha.1
|
||||
|
||||
> 🧪 **alpha channel** (npm dist-tag `alpha`, install `dsh-better-sidebar@latest`): supports **DSH 0.1.5-alpha.2+** only (peer floor `^0.1.5-alpha.2`, CI pins `@deepseek-ai/dsh@0.1.5-alpha.2`). Stay on **v0.19.0-alpha.0** for 0.1.5-alpha.1; the 0.1.2-rc.1 stable line keeps using **v0.18.1** (npm `latest`).
|
||||
|
||||
**✨ New**
|
||||
|
||||
- 🪟 **Every tab body now fills its pane** (#609): the native sidebar's tab-body host is a block scroller with a definite height, not a flex container, and the plugin's tab roots declared only `flex: 1` — so they collapsed to content height and the side-chat composer sat right after the transcript instead of at the pane bottom (a long transcript pushed it out of view). The native adapter now wraps every tab body in a `height: 100%` column flex host, restoring the same fill semantics the bottom workbench has for all plugin tabs, third-party `registerTab` descriptors included.
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🧭 **File address grammar follows DSH 0.1.5-alpha.2**: `fileAddressFor` always produces a session-scoped address and absolute paths keep their leading `/`; `parseFileAddress` is prefix-based and ignores `?`/`#` suffixes.
|
||||
- 🪟 **Center-column anchor follows alpha.2's global panels**: the `conversation` slot became `main.conversation` under the root-scoped keyed `main` slot, so the locator now resolves the new key and skips `display: contents` slot hosts (alpha.1's old key still works).
|
||||
|
||||
**🧰 CI & internals**
|
||||
|
||||
- Baseline moved to DSH 0.1.5-alpha.2 (#609): peer floor, 22 devDependency pins, the CI mount lane, and `dsh.plugin.json` engines all follow; `pnpm peers check` is clean (hoisted the `dsh-session-persistence` transitive peer per §3-9).
|
||||
- **`TabDescriptor.description` removed**: alpha.2's native guide entries no longer render a second line (they are icon + title capsules), so the field and the six `guideDesc*` keys (20 dictionaries) are gone; a new pane's default page is now selected from the registry (exactly one guide entry opens that page directly).
|
||||
|
||||
### v0.19.0-alpha.0
|
||||
|
||||
> 🧪 **alpha channel** (npm dist-tag `alpha`, install `dsh-better-sidebar@latest`): supports **DSH 0.1.5-alpha.1+** only (peer floor `^0.1.5-alpha.1`, CI pins `@deepseek-ai/dsh@0.1.5-alpha.1`). The 0.1.2-rc.1 stable line keeps using **v0.18.1** (npm `latest`).
|
||||
|
||||
**✨ New**
|
||||
|
||||
- 🖥️ **DSH's native right sidebar** (#604): the right column is now DSH's own sidebar — all seven plugin tab types register as native tab types with native tab bodies; every file open from the chat goes through `ctx.sidebarRight.openResource(dsh-resource://file/…)`; the `editor` type claims file resources at `extension` priority (outranking the built-in text preview) and takes over the built-in Files page kind (restored on unregister); cross-session opens queue until the target session is on screen.
|
||||
- 🧩 **Own right panel and free windows retired** (#605): with the right column handed back to DSH, the plugin keeps only its bottom workbench (single split tree, per-session persistence) and registers its toggle into DSH's session-header utilities slot; the float API (`floats` / `floatTab` / `dockFloat` / `raiseFloat` / the "Move to Free Window" menu entry), the `'floatWindows'` feature string, and the `openByDefault` / `defaultWidthPercent` / `changesDiffFloat` settings are gone (a persisted `floats` field is ignored, so old documents still load).
|
||||
- 🔗 **DSH 0.1.5 host contracts** (#603): the `assistant/chunk` event is gone — live deltas now fold from `agent/assistant-stream` frames (the side chat transcript's `live` field); `sessionPersistence.inspect` is gone — cold reads go through `open(id,'read')`; session headers use `SESSION_FORMAT_VERSION`.
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- Eight session-event read sites follow the 0.1.5 contracts (side-chat transcript, `jobs.output` replay, fork inheritance); custom seeds now carry the fork marker pair, so they no longer inherit the parent's unclaimed inbox input.
|
||||
|
||||
**🧰 CI & internals**
|
||||
|
||||
- The real-host mount smoke lane pins 0.1.5-alpha.1 and sweeps the native sidebar's guide page to open every plugin tab type; typecheck / lint / unit tests / mount lane all green.
|
||||
|
||||
### v0.18.1
|
||||
|
||||
> 📌 **Stable release** (npm `latest`): the DSH baseline is unchanged (**0.1.2-rc.1+**, peer floor `^0.1.2-rc.1`) — this is the incremental cut after v0.18.0: richer op previews in the changes panel, a writable file tree, and five fixes.
|
||||
|
||||
**✨ Features**
|
||||
|
||||
- 📄 **Op-preview upgrades in the changes panel** (#499): markdown reading mode with mermaid fences, plus inline `.html` and `.pdf` render previews; diff syntax highlighting extended to mjs/cjs/mts/cts, CSS/SCSS/Less, HTML/XML/SVG/Vue, GraphQL, JSONC/JSON5; new **secret redaction** layer (on by default for previews, toggleable in the pane header)
|
||||
- 🗂️ **File-tree rename / delete** (#550): inline rename plus confirmed delete, slimmer context menus and viewport-clamped submenus
|
||||
- 🧩 **Plugin catalog names and shell preset text localized** (#535): they now follow the host language
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🔀 **Git diff gap folds really expand** (#576, fixes #577): the fold row promised "n lines… click to expand" but did nothing (`-U3` leaves gap segments without row text); the hidden rows now load on demand through `git.show`, sliced from both sides' contents, with loading / failure states and request deduplication — plus a fix to that route's `rev:path` addressing (it always returned empty before)
|
||||
- 💬 **Side-chat seeds no longer inherit the parent's unclaimed inbox messages** (#562): the seed carries the fork markers, so the "side chat sends earlier User messages first on long contexts" ghost message is gone
|
||||
- 🖼️ **Local images in the split markdown renderer** (#569): rewritten to reachable URLs instead of 404ing
|
||||
|
||||
**🧰 CI and internals**
|
||||
|
||||
- ESLint flat config wired into CI and the Makefile (#536), Makefile command surface (#526), hardened e2e scripts (#527), shared component-test utilities (#524)
|
||||
- Refactors: Sidebar.tsx split by concern (#542), four polling idioms converged onto `use-polling` (#541), rc.7 `__DSH_MODULES__` fallback removed (#540), One Dark/Light syntax palettes single-sourced (#534), duplicated implementations converged and dead code removed (#525)
|
||||
|
||||
### v0.18.0
|
||||
|
||||
> 📌 **Stable release** (npm `latest`): this release targets **DSH 0.1.2-rc.1+ only** (peer floor `^0.1.2-rc.1`); 0.1.0-rc.8 ~ 0.1.1-rc.2 are not supported — stable-DSH users should stay pinned to `dsh-better-sidebar@0.17.1`, hosts on 0.1.2-alpha.x keep `dsh-better-sidebar@latest` (v0.18.0-alpha.0).
|
||||
|
||||
All changes since v0.17.1 (the two intermediate version numbers v0.18.1-alpha.0 / v0.19.0-alpha.0 were never published; their content is folded into this release):
|
||||
|
||||
**🔗 Host track graduation**
|
||||
|
||||
- **Onto the DSH 0.1.2 line and graduating to stable**: v0.18.0-alpha.0 dropped the 0.1.1-rc.x compatibility layer and fixed blank Side Chat transcripts on alpha.1+ (#472); the baseline then climbed through alpha.3 (#497) and alpha.5 (#516, `Session.events` → `snapshotEvents()`); the chat file-open funnel moved to `remote.session.openWorkspacePath` (#494) and the "Show in folder" reveal scroll was scoped to the tree body (#453). This release pins the baseline to **DSH 0.1.2-rc.1** (zero source delta vs alpha.5 — a pure version bump; `dsh-client-locale` resumed publishing, everything aligned to rc.1; real-host mount smoke 14/14 in CI)
|
||||
|
||||
**✨ Features**
|
||||
|
||||
- 🌿 **Unified "Changes" tab** (#475): one tab, two lenses — Git (real diff / history / stage·commit·revert / worktree & child-repo selection) and This Session (live tracking of every file the model reads / writes / edits); a unified diff renderer (mod pairing + intra-line character highlights + syntax coloring + context folding), a draggable bottom preview pane, and one-click expansion into a dedicated diff tab
|
||||
- 💬 **Side Chat rendering upgrade** (#486): main-conversation-grade Blocks structure, per-turn usage tails, reconnect banner
|
||||
- ⚙️ **Workspace path fence toggle** (#458): a new `workspaceFence` declarative settings key with a one-click off affordance and guidance on 403 error surfaces
|
||||
|
||||
**⚡ Performance**
|
||||
|
||||
- 🚀 **Core bundle -45%** (#489): 19 non-zh/en dictionary chunks lazy-loaded, render stabilization (transcript row reuse / tree Sets / batched drags), startup & polling cost cuts (single settings fetch, one git process per tick); a new perf measurement lane; also fixes the bottom-pane drag leaking panel width into the host layout and jumping the native left sidebar
|
||||
- 📉 Fewer repeated center-column DOM queries (#456)
|
||||
|
||||
**🐛 Fixes (selection)**
|
||||
|
||||
- ✏️ Editor / Markdown: SSH remote editor links open on the client (#522), reading position kept across preview/edit switches (#467), YAML frontmatter hidden in preview (#394), TOC dismiss-on-outside-click + popover z-index (#461), file basename kept in @-reference links (#417)
|
||||
- 💻 Terminal / platform: Windows custom shell executables resolve (#503), transient resize failures contained (#428), monospace fallback for unresolvable fonts (#366), Linux absolute paths in WSL workspaces (#455), Windows Explorer reveal selection preserved (#508)
|
||||
- 🗂️ Layout / state / file tree / chat: desktop shell layout coexists with the side card (#398), no forced mobile drawer on auto-activation (#373), restored free-window id conflicts (#385), tree auto-refresh on window focus (#469), reference affordance pinned to row tail (#509), selection-popup dismissal + caret-anchored draft insert (#427), collapsed toggle cluster aligned (#361), old-engine scroll-jump compat (#448), worktree listing on older Git (#454)
|
||||
|
||||
**🧰 CI & internals**
|
||||
|
||||
- Windows CI lane (#520), Makefile command surface (#526), e2e script hardening + aggregate double-mount regression (#527), shared component test utils deduplicating boilerplate (#524), duplicate-implementation convergence + dead code removal (#525)
|
||||
|
||||
**🌐 Ecosystem**
|
||||
|
||||
- 10+ new curated plugins: dsh-better-sidebar-icons (#441), dsh-sidenote (#451, formerly dsh-sidechat #470), dsh-github-workbench (#410), dsh-bilingual-reader (#379), dsh-server-deck (#413), dsh-md-export (#405), dsh-code-nav (#404), dsh-suhuang-scroll (#392), dsh-better-overleaf (#370), and more (each with 18+ language i18n coverage)
|
||||
|
||||
### v0.19.0-alpha.0 (0.1.2-alpha.5 adaptation, unpublished, folded into v0.18.0)
|
||||
|
||||
> 🧪 **Alpha track**: this release targeted **DSH 0.1.2-alpha.x only** (peer floor `^0.1.2-alpha.5`, npm dist-tag `alpha`). This number was never published separately — its content shipped in the **v0.18.0** stable release, and the same number was later reused for the 0.1.5 adaptation line (see above).
|
||||
|
||||
- 🔗 **Adapted to DSH 0.1.2-alpha.5 (published to npm, `alpha` dist-tag)**: the CI mount gate's pin, the `dsh.plugin.json` engines floor, and the `@deepseek-ai/*` peer / devDependencies baseline moved up to 0.1.2-alpha.5 (verified by a real-host mount smoke 14/14). `dsh-client-locale` has no alpha.5 upstream (newest is 0.1.2-alpha.3), so its peer floor / devDep pin trail the baseline and already accept the alpha.5 runtime (`pnpm peers check` reports zero mismatches — no new transitive peers to hoist). The code adapts to alpha.4's compatibility-flagged change — the `Session.events` property was removed, migrated to the on-demand `snapshotEvents()` API (8 sites: sidechat transcript live reads, fork inheritance, `jobs.output` replay, subagent activity), and the `seedLength` meta field the host dropped was removed from thread creation; alpha.4's remaining changes (bidirectional `send_message`, custom-model discovery reusing Profile headers, `SessionSeq`/`SessionLogOffset` strong typing) and alpha.5's upgrade-startup fix were verified not to touch any other plugin surface.
|
||||
|
||||
### v0.18.1-alpha.0
|
||||
|
||||
> 🧪 **Alpha track**: this release targets **DSH 0.1.2-alpha.x only** (peer floor `^0.1.2-alpha.3`, npm dist-tag `alpha`, install `dsh-better-sidebar@latest`). This version number was never published separately; its content is folded into the **v0.18.0** stable release.
|
||||
|
||||
- 🔗 **Adapted to DSH 0.1.2-alpha.3 (published to npm, `alpha` dist-tag)**: the CI mount gate's pin, the `dsh.plugin.json` engines floor, and the `@deepseek-ai/*` peer / devDependencies baseline moved up to 0.1.2-alpha.3 (verified by a real-host mount smoke 14/14). All 117 commits between alpha.2 and alpha.3 were audited point by point: every host contract this plugin relies on (token auth, slash RPC, `MarkdownText` labels, the event-stream and persistence APIs behind `sidechat.events`, `SettingsNamespaceInput`, `SUBAGENT_DESCRIPTOR_VERSION` (still 3), `dsh-client-store`, the profile loader, the node-pty pin) is unchanged, so no code adaptation was needed; alpha.3's breaking changes (the required `BeginSubmissionInput.mode`, the renamed `attachment-invalid` subagent error, the removed SQLite persistence backend, the identity-gated projection change feed) were all verified not to touch this plugin.
|
||||
|
||||
### v0.18.0-alpha.0
|
||||
|
||||
> 🧪 **Alpha track**: this release targets **DSH 0.1.2-alpha.x only** (peer floor `^0.1.2-alpha.2`, npm dist-tag `alpha`, install `dsh-better-sidebar@latest`); 0.1.0-rc.8 ~ 0.1.1-rc.2 are no longer supported — stable-DSH users should stay on v0.17.1 (npm `latest`).
|
||||
|
||||
- 🔗 **Adapted to DSH 0.1.2-alpha.2 (published to npm, `alpha` dist-tag)**: the CI mount gate's pin and the `@deepseek-ai/*` devDependencies baseline moved up to it (verified by a real-host mount smoke 14/14). Adaptation points: `dsh-settings` dropped the runtime `settingsNamespace` export (namespaces are now validated at compile time — the host passes the constant directly); the `dsh-subagent` descriptor version went 2→3 (stamped by the host package; the test assertion follows the `SUBAGENT_DESCRIPTOR_VERSION` constant); the restored `SessionEvent.ignorable` and the Remote gateway's unified `RemoteError` wrapping were verified to not affect this plugin.
|
||||
- 🐛 **Fixed blank Side Chat transcripts on DSH 0.1.2-alpha.1+**: transcript polling still called the `ctx.connection.api` face removed in alpha.1 (the error was silently swallowed, so the tab rendered an empty transcript forever). Transcripts now come from the plugin's own `sidechat.events` route (live threads read the in-memory event log, cold threads read session persistence, with `afterSeq` delta pulls, [sidechat-routes.ts](./src/sidechat-routes.ts)).
|
||||
- 🧹 **Dropped the pre-alpha (0.1.1-rc.x and older) compatibility layer**: the e2e host RPC collapsed from the dot/slash dual dialect to slash-only (token URL required, [host-protocol.ts](./tests/e2e/host-protocol.ts)); `MarkdownText` labels collapsed to the nested single shape ([markdown-labels.tsx](./src/client/markdown-labels.tsx), no more dual prop names); peerDependencies / devDependencies / `dsh.client.inject` / the chunk externals allowlist all dropped the defunct `@deepseek-ai/dsh-client-runtime` (four synchronized spots).
|
||||
|
||||
### v0.17.1
|
||||
|
||||
- 🔗 **DSH 0.1.2-alpha.1 adaptation (dual-version compatible)**: fully adapted to DSH 0.1.2-alpha.1's Remote gateway, one-time-token browser authentication, and the `MarkdownText` labels contract change — the plugin works identically on 0.1.0-rc.8 ~ 0.1.1-rc.2 and 0.1.2-alpha.1 (the latter verified by a real-host mount smoke 14/14 against a source build of the GitHub tag; alpha.1 was never published to npm, and the CI pin moved to the npm-published 0.1.2-alpha.2 in v0.18.0-alpha.0). Highlights: all four `MarkdownText` render sites now go through the dual-shape labels helper ([markdown-labels.tsx](./src/client/markdown-labels.tsx)), fixing the `reading 'code'` crash in markdown/mermaid previews on alpha.1; the e2e mount smoke speaks both wire dialects (token-URL cookie exchange, slash `/api` endpoints with parameter-named args, [tests/e2e/host-protocol.ts](./tests/e2e/host-protocol.ts)); dropped the `@deepseek-ai/dsh-client-runtime` peer removed upstream in 0.1.2-alpha.1
|
||||
|
||||
### v0.16.1
|
||||
|
||||
All changes since v0.16.0:
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🧊 **Git panel freeze + restart loop** ([#376](https://github.com/omdsh-dev/DSH-better-sidebar/pull/376), fixes [#369](https://github.com/omdsh-dev/DSH-better-sidebar/issues/369)): opening the Source Control panel could freeze the whole page, and the frozen layout restored itself after every reload with no way out — three unbounded layers compounding, now all bounded: **① status truncation** — the `git status --untracked-files=all` response is capped at 2,000 entries (capped results carry `truncated` and the panel shows a notice, mirroring `fs.read`'s truncation semantics; worktree change counts inherit the bound), so a huge untracked set can no longer freeze the browser main thread; **② bounded repository discovery** — a non-repository cwd (e.g. the home directory) no longer probes every visible child directory serially without limit: probe timeout 30s→5s, at most 200 probed directories, concurrent requests share one in-flight scan plus a 60s TTL cache, ending the `git rev-parse` spawn storm under `~`; **③ reset escape hatch** — loading with `?dsh-sidebar-reset` drops the persisted layout (shared width included) and starts from the default, breaking the loop even when the page is already hung; persisting resumes once the param is gone; `statusTruncated` copy synced across all 19 dictionaries
|
||||
|
||||
### v0.16.0
|
||||
|
||||
All changes since v0.15.2:
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 🪟 **Free windows** ([#354](https://github.com/omdsh-dev/DSH-better-sidebar/pull/354)): drag any tab (built-in or plugin-registered) out of the tab bar **onto the main conversation area** — a dashed drop hint marks the landing zone and release turns it into a floating window (default 390×780, phone-portrait ratio, clamped to the viewport and centered at the drop point). Windows can be moved by dragging the header, resized from the SE corner (≥320×200), raised to the top by clicking anywhere, sent back with the header context menu ("Back to sidebar" / "Close"), and closed with X through the normal `closeTab` lifecycle (pty release etc.). Dragging over a sidebar pane highlights it and releasing **docks** the window back into that pane. `floats` persist per session (restored as-is after refresh, lenient sanitize + geometry clamping). Service semantics: `features` gains `'floatWindows'` — `openTab`'s dedupe/id focus on a floating tab **raises its window** (no duplicate open, no panel expansion), `closeTab` / `activateTab` work on floating tabs and still fire their lifecycle callbacks, `visible` is always true inside a float, and agent-terminal reconcile covers floating windows. Tab content reuses the regular render path; plugin tabs are fully supported. Also ships the 8px-grid spacing cleanup of file sub-pages ([design](docs/plans/2026-08-23-free-window-design.md))
|
||||
- 📂 **Model-driven sidebar opens (`sidebar_open` tool)** ([#353](https://github.com/omdsh-dev/DSH-better-sidebar/pull/353)): a new global setting `agentOpenTools` (**off by default**) injects **one** tool letting the model open local **files** (editor tab, deduped by path), **folders** (full-window tree rooted there, `meta.dir`) and **HTTP(S) pages** (browser tab, URL prefilled) in the caller's sidebar. Turning the setting off unregisters the tool and clears the undelivered queue; already-open tabs stay. Opens targeting non-active sessions queue and replay when visible (`/sidebar/ws/agent-opens` push, same trust fence). No new public API and no new `/sidebar/api` routes ([design](docs/plans/2026-08-23-agent-open-tools-design.md))
|
||||
- 📝 **README-level inline HTML + table of contents (TOC) in Markdown previews** ([#360](https://github.com/omdsh-dev/DSH-better-sidebar/pull/360)): previews now genuinely render **block-level inline HTML** — badge walls `<div align=center>`, `<details>` blocks nesting markdown, `<br/>`/`<sub>`/`<img>` inside table cells, `<video>`/`<picture>` — all sanitized through a DOMPurify allowlist (`<script>` and other active content stripped, `<a>` forced `_blank rel=noopener`), with local media `src` rewritten to the session media route. With ≥3 headings a floating **TOC** button appears: smooth scroll, auto-expanding folded `<details>` ancestors, collecting headings from HTML segments too. The renderer is still the host `MarkdownText` (shiki / KaTeX / GFM preserved); pure-markdown documents take the original path with zero regression ([design](docs/plans/2026-08-24-markdown-html-toc-design.md))
|
||||
- 🌏 **Third-language coverage (19 languages)** ([#339](https://github.com/omdsh-dev/DSH-better-sidebar/pull/339)): optional peer `@huanlin/dsh-plugin-better-locale` adds full dictionaries for ja / de / fr / pt / ko / ar / hi / id / tr / vi / th / ru / it / nl / sv / pl / zh-HK / zh-TW / zh-MO (~340 keys each). Coverage **borrows the DSH English slot**: it is active only while DSH's active locale is `en` and is completely inert under `zh` (no mixed-language UI). The 19 dictionaries are also registered into better-locale so external `ctx.locale.lookup('betterSidebar', key)` callers get the override text. Without better-locale installed `ctx.get('betterLocale')` is undefined and the whole block is a no-op — zh/en behavior is unchanged
|
||||
- 🌿 **Multi-repository Git selection + linked-worktree discovery** ([#326](https://github.com/omdsh-dev/DSH-better-sidebar/pull/326) [#285](https://github.com/omdsh-dev/DSH-better-sidebar/pull/285)): when the session cwd is a workspace container rather than a Git repository, the Git panel discovers direct child repositories and shows a **repository selector** — status / branch / history / diff / stage / commit / revert / cherry-pick / file opening are all threaded through the selected repository. Linked-worktree change discovery and per-worktree git operations are transactionally bound to the selected checkout (including delayed pagination responses), stale/prunable worktree targets are rejected, and individual inventory failures degrade safely
|
||||
- 🖥️ **Browser loopback allowlist** ([#365](https://github.com/omdsh-dev/DSH-better-sidebar/pull/365)): a new side-card setting `browserAllowedLoopback` (comma-separated host or host:port entries; bare hosts match every port, host:port matches exactly) lets the sidebar browser navigate to explicitly trusted local addresses. Allowlisted loopback pages additionally get the `allow-same-origin` iframe sandbox token — local dev servers (Vite etc.) need a real origin for their module/HMR/fetch pipeline and would otherwise render blank. The page stays cross-origin to the GUI and to every other site; the server-side `browser.probe` route mirrors the same allowlist
|
||||
- 📝 **Vue + 28 legacy languages in the editor** ([#202](https://github.com/omdsh-dev/DSH-better-sidebar/pull/202)): `.vue` maps to `@codemirror/lang-vue` (template / script / style dispatch on the `lang` attribute, `<style lang="scss">` preprocessors); zero new dependencies bring scss/sass/less/stylus/ruby/lua/perl/r/dart/scala/groovy/powershell/diff/protobuf/cmake/pug/tcl/haskell/clojure/erlang/julia/pascal/vb/vhdl/stex/objectivecpp via legacy-modes. A throwing language factory degrades to plain text (console.warn) instead of breaking the editor; ambiguous `.v` / `.m` extensions stay unmapped on purpose
|
||||
- 🔄 **Editor preview refresh trio** ([#215](https://github.com/omdsh-dev/DSH-better-sidebar/pull/215) [#228](https://github.com/omdsh-dev/DSH-better-sidebar/pull/228), fixes [#167](https://github.com/omdsh-dev/DSH-better-sidebar/issues/167)): a **manual refresh** button for text previews; switching back to preview after an edit-save auto-reloads (suppressed while dirty so drafts survive); a successful save while in preview mode reloads on the saved edge. Automatic polling and the `fs.stat` version endpoint are gone (zero background API traffic)
|
||||
- 🖼️ **Local / relative images in Markdown** ([#292](https://github.com/omdsh-dev/DSH-better-sidebar/pull/292)): ``, `/cwd/img.png` and reference-style `[id]: url` destinations are rewritten to `/sidebar/file` media URLs (still bounded by the session cwd) — previews no longer show just the alt text
|
||||
- ➕ **New recommended-catalog entry: ego-browser** ([#340](https://github.com/omdsh-dev/DSH-better-sidebar/pull/340)): `@dsh-external/ego-browser` Agent browser tab (registers a sidebar page automatically when better-sidebar is present, falls back to a floating bubble otherwise); description dictionary completed across 19 languages ([#371](https://github.com/omdsh-dev/DSH-better-sidebar/pull/371))
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🛒 **DSH marketplace managed-install compatibility** ([#338](https://github.com/omdsh-dev/DSH-better-sidebar/pull/338)): the public `cordis` entry was removed from `peerDependencies` (the market preview hard-rejects `cordis` in any dependency field — optional does not help), so the npm package satisfies the [dsh-community-market install rules](https://github.com/anywhere-labs/deepseek-harness-desktop/blob/master/dsh-community-market/docs/install-and-uninstall.zh.md) — catalog sources (dshfind / 1024Store) can re-issue the `repository_backlink` verified target and the plugin becomes installable through the Desktop market
|
||||
- 🔤 **Type base migrated to `@deepseek-ai/cordis`** ([#338](https://github.com/omdsh-dev/DSH-better-sidebar/pull/338)): the declaration surface (`src/context-types.ts`) no longer depends on or restates the public `cordis` — `Context` is now an **intersection** of the real vendored cordis Context with the structural service faces, and the `ctx.betterSidebar` type merge lives on `@deepseek-ai/cordis`. **Consumer migration**: change `import type { Context } from 'cordis'` to `import type { Context } from '@deepseek-ai/cordis'` (the `import type {} from 'dsh-better-sidebar'` merge path is unchanged); plugins that never used that import are unaffected
|
||||
- 🧩 **All internal `ctx.betterSidebar` reads fixed** ([#357](https://github.com/omdsh-dev/DSH-better-sidebar/pull/357), fixes [#356](https://github.com/omdsh-dev/DSH-better-sidebar/issues/356)): on npm-installed DSH 0.1.1-rc.x (web bundle) the sidebar died on every page load (`cannot get property "betterSidebar" without inject`) — the 26 internal direct reads now go through `ctx.get('betterSidebar')` (root reflect-store resolution, immune to the fiber chain); external consumers keep `inject: ['betterSidebar'] + ctx.betterSidebar`
|
||||
- 🔐 **Session-workspace boundary for file APIs** ([#345](https://github.com/omdsh-dev/DSH-better-sidebar/pull/345), fixes [#328](https://github.com/omdsh-dev/DSH-better-sidebar/issues/328)): fixed `fs.tree / fs.read / fs.write` workspace escapes; media, HTML preview and uploads share real-path symlink validation; regression tests for absolute paths, symlinks, uploads and nested Git sessions
|
||||
- 🪟 **Panel-host layering and viewport clipping** ([#330](https://github.com/omdsh-dev/DSH-better-sidebar/pull/330) [#278](https://github.com/omdsh-dev/DSH-better-sidebar/pull/278), fixes [#277](https://github.com/omdsh-dev/DSH-better-sidebar/issues/277)): panel host z-index 40→25 — below the DSH cordis dynamic-plugin layer (30), so the workbench no longer covers cordis inventory/approval surfaces (still above AppFrame's 20 and below the 100+ float stack); `overflow: hidden` on the host clips at the viewport edge, so collapsed panels no longer stretch the document into bidirectional scrolling (measured `scrollWidth` 2289→1672 / `scrollHeight` 1280→1032, any skin)
|
||||
- 📐 **Layout-push hardening** ([#310](https://github.com/omdsh-dev/DSH-better-sidebar/pull/310) [#130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/130) [#180](https://github.com/omdsh-dev/DSH-better-sidebar/pull/180)): conversation column gets `min-height: 0` + `overflow: hidden` + `overflow-wrap: anywhere` (long unbreakable URLs / OAuth links no longer push the composer and left-rail Settings out of the viewport); the layout-push effect is split into "set only" + "remove only on unmount" and the width push is gated on `panelOpen` — dragging the bottom height with the right panel closed no longer squeezes the conversation, and release no longer flashes full-width; `useLayoutEffect` removes cross-paint full-width frames; all three drags flush the final frame and sync `centerRect.right` before committing; bottom height caps at `viewportHeight - PANEL_MIN`; drag handles no longer highlight mid-drag
|
||||
- 📱 **Mobile: unavailable-sidebar clarity + 1px overflow** ([#254](https://github.com/omdsh-dev/DSH-better-sidebar/pull/254)): with no session the toggle uses `aria-disabled` — keeping the non-executable semantics while allowing touch/keyboard focus so the "select a session to use the sidebar" tooltip is reachable; the panel uses `border-box` so mobile `100vw` includes the left border and no longer causes 1px horizontal overflow
|
||||
- 📏 **Side-card width shared across sessions** ([#36](https://github.com/omdsh-dev/DSH-better-sidebar/pull/36)): panel width is a layout preference, not session content — "last drag wins" writes the global `dsh-sidebar:v1:width` key that fresh and cached session switches adopt; without a global key (first run / pre-existing sessions) behavior is byte-for-byte unchanged
|
||||
- 🧹 **Terminals close immediately on session delete** ([#130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/130)): new `PtyManager.closeSession()` subscribing to DSH's `session/disposed` — deleted sessions no longer wait for the 30s reconnect grace to release their terminals (agent terminals are agent-lifecycle-owned and untouched)
|
||||
- 🔍 **Filename search skips noise directories** ([#342](https://github.com/omdsh-dev/DSH-better-sidebar/pull/342)): `node_modules` / `.pnpm-store` / `.yarn` / `.turbo` / `.next` / `dist` / `build` / `coverage` etc. (case-insensitive, `.git` still skipped) — huge dependency trees no longer burn the 100k visit budget and return `truncated` early, so real files in later directories (`docs/`) are found; no `.gitignore` semantics, still filename lookup
|
||||
- 📝 **Mermaid global error rendering suppressed** ([#341](https://github.com/omdsh-dev/DSH-better-sidebar/pull/341)): `suppressErrorRendering` enabled — invalid diagrams no longer inject a large error SVG into `document.body`; the component-level error fallback and source display remain
|
||||
- 🖥️ **Terminal Nerd Font icon fallback** ([#190](https://github.com/omdsh-dev/DSH-better-sidebar/pull/190)): supplementary-plane PUA icons in starship / powerlevel10k prompts (Nerd Fonts v3 Material icon set) no longer render as tofu — `withIconFontFallbacks()` appends Nerd Font icon families to the winning base font (before the first generic family, deduped by family name, CSS global keywords filtered, no color-emoji fonts)
|
||||
- 🌐 **HTML preview declares UTF-8** ([#193](https://github.com/omdsh-dev/DSH-better-sidebar/pull/193), fixes [#170](https://github.com/omdsh-dev/DSH-better-sidebar/issues/170)): `/sidebar/html` responses carry `charset=utf-8` (Chinese fragments without `<meta charset>` no longer mojibake); original file bytes preserved
|
||||
- 🧪 **trust-fence Origin compared by hostname** ([#182](https://github.com/omdsh-dev/DSH-better-sidebar/pull/182)): some Chromium builds (Edge 151) serialize the Origin of non-default-port loopback pages without the port — `http://127.0.0.1` against `Host: 127.0.0.1:3080` no longer 403s (mirrors DSH's official gateway fence); different hostnames and opaque null origins are still rejected
|
||||
- 🪟 **"Show in folder" now reveals in the explorer** ([#94](https://github.com/omdsh-dev/DSH-better-sidebar/pull/94)): the folder-reveal gesture no longer opens the directory as a file in the editor (`"..." is a directory`) — `revealInExplorer` switches to the explorer tab, auto-expands a collapsed panel, expands the parent folder and highlights/scrolls to the produced file; the produced-files selector now reads the engine's Turn deliverables (same source as ui-deliverables)
|
||||
- 🖱️ **Panel-drag layout flash fixed** ([#180](https://github.com/omdsh-dev/DSH-better-sidebar/pull/180)): dragging the bottom height with the right panel closed no longer shifts the conversation left; release no longer flashes full-width before snapping back
|
||||
- 🖥️ **PowerShell installer fixes** ([#47](https://github.com/omdsh-dev/DSH-better-sidebar/pull/47)): the remote entry is now "download the script → strip the UTF-8 BOM → run it in memory", so `-Version` / `-DryRun` work again under Windows PowerShell 5.1 (the BOM no longer eats the leading `param(...)`); `pnpm --version` is checked before touching the profile (major <10 fails with a clear error and exit code 1)
|
||||
- 🔄 **Browser embed probing GET fallback** ([#69](https://github.com/omdsh-dev/DSH-better-sidebar/pull/69)): when a HEAD response omits both `Content-Security-Policy` and `X-Frame-Options`, probe retries once with GET — sites like Alibaba Bailian that only advertise their embed policy on GET no longer show a misleading "refused to connect"; they get the friendly "site refuses embedding" panel with an "open in browser" button
|
||||
- 🔧 **git-source installs fixed via `unrun` devDependency** ([#336](https://github.com/omdsh-dev/DSH-better-sidebar/pull/336)): tsdown 0.22 loads its config through `unrun` and pnpm 11 does not auto-install peer deps — git-hosted `prepare` no longer fails with `Failed to import module "unrun"` (npm tarballs unaffected)
|
||||
- 🍃 **Strict `ctx.effect` also fixed 4 latent sites**: interception / IME-guard effect bodies returned `undefined` on failure instead of a disposer (invalid shape under the vendored cordis effect contract) — now a no-op disposer
|
||||
|
||||
<details>
|
||||
<summary><b>Older releases (v0.12.0 – v0.15.2)</b></summary>
|
||||
|
||||
### v0.15.2
|
||||
|
||||
All changes since v0.15.1:
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 🗂️ **"Open in app" submenu in the file tree** ([#334](https://github.com/omdsh-dev/DSH-better-sidebar/pull/334)): the file-tree context menu gains an "Open in app >" submenu — built-in openers (reveal/select in file manager, VS Code, Cursor, Zed), each with a pin button that promotes it to a top-level context-menu item (click again to unpin); with an optional SSH host configured, VSCode-family entries switch to the `vscode-remote/ssh-remote+<host>/<path>` protocol and local-only entries hide automatically; custom editors supported (name + URL template with `{path}` + "VSCode-family" flag, configured in the Files card gear popup). Open actions go through the new host route `POST /sidebar/api/open.external` (argv-array spawn, no shell injection) ([design](docs/plans/2026-08-22-open-with-menu-design.md))
|
||||
- 📑 **Tab context menu** ([#331](https://github.com/omdsh-dev/DSH-better-sidebar/pull/331)): right-clicking a tab offers **Close / Close others / Close to the left / Close to the right**, scoped to the current pane (tab group); items grey out when there is nothing to close; the menu only opens — it never switches the active tab; bulk closes go through the existing per-tab `onClose` path so lifecycle callbacks, pty release and agent-terminal shutdown all stay intact
|
||||
- 📄 **Diff files collapsed by default** ([#270](https://github.com/omdsh-dev/DSH-better-sidebar/pull/270)): each changed-file header is now an accessible expand/collapse control; recognized source files expand by default while tests, docs, generated files, lockfiles and unknown types stay collapsed; the existing 500-row cap for expanded content is preserved
|
||||
- 📖 **README update**: feature tour converted to a table (two screenshots per row, saves space); community section now shows the WeChat group and QQ group QR codes ([#325](https://github.com/omdsh-dev/DSH-better-sidebar/pull/325), QQ group 577011007)
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🪟 **Prune empty restored panes** ([#268](https://github.com/omdsh-dev/DSH-better-sidebar/pull/268)): persisted split panes left empty when ephemeral diff tabs were dropped no longer survive as full-size blanks — `sanitizeState` now also prunes the empty split leaf and repairs the stale active-pane pointer; a fully empty workbench keeps its single empty pane
|
||||
- 🖥️ **Hide spawned git windows on Windows** ([#301](https://github.com/omdsh-dev/DSH-better-sidebar/pull/301), fixes [#124](https://github.com/omdsh-dev/DSH-better-sidebar/issues/124)): the shared `runGit()` spawn options now set `windowsHide: true`, so repo-status polling and git actions no longer flash console windows on Windows (no behavior change on other platforms)
|
||||
- 📁 **Untracked files inside new folders** ([#242](https://github.com/omdsh-dev/DSH-better-sidebar/pull/242)): `git status` switched from `--untracked-files=normal` to `--untracked-files=all` — each file inside a new folder now shows as its own row and its diff can be loaded (no more `fs.read` "is a directory" error), matching VSCode's default behavior
|
||||
- ⚡ **Per-frame React re-renders eliminated for toggles/drags** (closes [#315](https://github.com/omdsh-dev/DSH-better-sidebar/issues/315)): `centerRect` moved to a ref with direct DOM writes to the bottom bar (zero React renders); `TabContent` memoized with an explicit comparator; a new frame-batcher coalesces Divider/dock drags per frame; meaningless locate passes skipped during drags. 4x CPU-throttled A/B: >17ms frames on toggle collapse 19→6 / expand 24→4~6, p95 21ms→15ms; drags unchanged (non-regression)
|
||||
|
||||
### v0.15.1
|
||||
|
||||
All changes since v0.15.0:
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 💬 **Codex-style transcript rework for Side Chat** ([#314](https://github.com/omdsh-dev/DSH-better-sidebar/pull/314)): transcript rows became **collapsible** — tool calls, thinking and context injections share one quiet single-line chrome (chevron + label + one-line argument summary) that expands into an indented body on a hairline thread, no cards or fills; streaming labels and a creating hero shimmer (shimmer = generating), failed tools go danger, `prefers-reduced-motion` stills every loop; **the first question is no longer swallowed by the boundary prompt** — context injection and first contact are delivered as separate events (boundary + parked snapshot ride `agent.inject`, the question wakes the driver), so the transcript maps injections onto a collapsible injection row while genuine user messages — the first one included — render as user bubbles; legacy threads' first message is split out into its own bubble too
|
||||
- 📖 **README rewrite**: feature tour (real UI screenshots per feature), user-facing DSH compatibility badges, simplified install (`add` → `approve-builds` → `add`, node-pty-safe build, paste-to-DSH install prompt), 28+ plugin ecosystem with per-category collapsed listings
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🖥️ **Terminal pty stays alive across conversation switches** ([#323](https://github.com/omdsh-dev/DSH-better-sidebar/pull/323)): switching sessions is no longer treated as a transient drop — the client sends a `park` control frame on unmount and the host skips the 30s reconnect-grace countdown; switching back (`open()` cancels parked) or explicitly closing the tab resumes the normal lifecycle; agent terminals keep their indefinite lifetime
|
||||
- 📂 **File-tree upload overlay no longer intercepts Tab drags** ([#317](https://github.com/omdsh-dev/DSH-better-sidebar/pull/317)): dragging tabs (reorder / cross-pane split) across the explorer no longer shows the upload overlay or swallows the event — gated on `dataTransfer.types` containing `Files` (consistent with the panel-host shield), so tabs land normally; OS file drags behave as before
|
||||
- 💬 **Subagent auto-open debounced** ([#314](https://github.com/omdsh-dev/DSH-better-sidebar/pull/314)): Side Chat thread creation no longer pops the task page — the 0→N trigger rearms for 500ms and re-evaluates the original baseline against the live snapshot, by which time the title filter recognizes the thread; genuine subagents still auto-activate the Tasks page (wide viewports expand the sidebar, while narrow viewports prepare the tab without forcing the drawer open)
|
||||
|
||||
### v0.15.0
|
||||
|
||||
All changes since v0.14.0:
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 💬 **Side Chat (beta) tab** ([#286](https://github.com/omdsh-dev/DSH-better-sidebar/pull/286)): Codex-style side threads, **one independent tab per conversation** — the child inherits the parent's full context (completed turns + pending messages + the in-progress turn's assistant output and tool activity, honestly frozen with an "interrupted" marker); created with an identical composition (same preset / provider / model) so the first request reuses the parent's input prefix cache; threads stay invisible in the main session list with zero subagent-catalog noise; follow-ups survive DSH restarts (auto cold-resume); one-click "Save as new session" promotes the thread to a top-level session ([design](docs/plans/2026-08-20-sidechat-tab-design.md))
|
||||
- 📤 **Upload into the files window** ([#239](https://github.com/omdsh-dev/DSH-better-sidebar/pull/239)): header "upload file / upload folder" buttons plus drag-drop (drop on the tree body = workspace root, on a directory row = that directory, on a file row = its parent directory, VSCode semantics); full-window blurred progress overlay while uploading (per-file progress + cancel / Esc); buttons disabled while busy, tree refreshes after the upload settles
|
||||
- 🧩 **Desktop compatibility in four options** ([#284](https://github.com/omdsh-dev/DSH-better-sidebar/pull/284)): "Position compatibility mode" is now a main-row dropdown — **Auto-detect** (default, conservative: only the standard Window Controls Overlay geometry contributes; real 32/36px caption-overlay heights per shell, live on maximize/restore; zero modification on plain web) / **DSH official web** (explicitly no adaptation) / **Shell preset** (built-in, opt-in; only shells that appeared in this repo's issues/PRs with 100+ stars, "detected" badge when the environment matches) / **Custom** (free-form CSS + shift distance). Documents that already carried compatibility values migrate to the custom scheme; interactive chrome opts out of desktop drag regions (`no-drag`); the bottom-push anchor is a composite selector (`[data-pane]` and `:has(> [data-slot])`)
|
||||
- 🎛️ **Settings page UI/UX modernization** ([#300](https://github.com/omdsh-dev/DSH-better-sidebar/pull/300)): the side-card secondary-settings entry is now a full-width "Feature settings" strip at the card bottom (replacing the invisible corner gear — much easier to discover); coordinated two-tone enabled state (brand activation accent + success-green check badge); every color is still `--dsw-alias-*` token-derived so skins follow automatically
|
||||
- ➕ **New entries in the recommended-plugin catalog**: `dsh-docs-panel` (global docs, [#230](https://github.com/omdsh-dev/DSH-better-sidebar/pull/230)), `dsh-flowglass` ([#261](https://github.com/omdsh-dev/DSH-better-sidebar/pull/261)), `dsh-git-forge` and `dsh-ssh-tunnel` ([#204](https://github.com/omdsh-dev/DSH-better-sidebar/pull/204)), `dsh-turn-review` ([#102](https://github.com/omdsh-dev/DSH-better-sidebar/pull/102))
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- ⚡ **Batched live preview for the subagent page** ([#298](https://github.com/omdsh-dev/DSH-better-sidebar/pull/298)): the old implementation polled `subagents.history` per running subagent, each poll triggering a full host-side enumeration — an O(N²) amplification that stalled the page with many concurrent subagents; now a single batch route `subagents.live` (one enumeration of the whole tree) plus one client poller with a single in-flight request; display logic and copy unchanged
|
||||
- 🖱️ **Interrupted / fast-release drags no longer roll back** ([#249](https://github.com/omdsh-dev/DSH-better-sidebar/pull/249), closes [#247](https://github.com/omdsh-dev/DSH-better-sidebar/issues/247) [#248](https://github.com/omdsh-dev/DSH-better-sidebar/issues/248)): interrupted or fast-released drags commit the last known position; HMR re-activation re-locates the center column (fixes the blank bottom panel after a hot reload)
|
||||
- 📐 **Push variables stay effective while mounted** ([#259](https://github.com/omdsh-dev/DSH-better-sidebar/pull/259), fixes [#258](https://github.com/omdsh-dev/DSH-better-sidebar/issues/258)): the bottom panel no longer flashes full-width after a drag is released
|
||||
- 🔐 **Workspace boundary hardening for file APIs** ([#328](https://github.com/omdsh-dev/DSH-better-sidebar/issues/328)): `fs.tree/read/write`, media, HTML preview, and uploads now share real-path containment checks that reject outside absolute paths and symlink escapes
|
||||
- 🔧 **Adapted to DSH 0.1.1-rc.1 / rc.2 (@next)** ([#297](https://github.com/omdsh-dev/DSH-better-sidebar/pull/297) [#305](https://github.com/omdsh-dev/DSH-better-sidebar/pull/305)): no code changes needed
|
||||
- 🔒 **Upload-chain hardening** ([#239](https://github.com/omdsh-dev/DSH-better-sidebar/pull/239)): empty and absolute `relativePath` segments are refused outright; uniquely named temp files (concurrent uploads stay independent, crashed processes never block later uploads); write-stream error listeners (a failing disk can no longer crash the host); client error codes unified with the wire (`too-large`), 413s localized
|
||||
|
||||
### v0.14.0
|
||||
|
||||
> ⚠️ This release requires DSH ≥ 0.1.0-rc.8. All changes since v0.13.1:
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 🖼️ **Unified panel-host injection refactor** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): panels/toggle clusters moved into a `[data-dsh-panel-host]` fixed containing block (`fixed inset-0 z-40`), immune to desktop-shell intermediate transforms hijacking `fixed`; mount self-check (page-level transform → `data-dsh-panel-host-degraded` degraded sync, judged on uncorrected geometry, exits only when the ancestor transform is gone); push anchor switched to `#root [data-dsh-frame] > [data-pane="conversation"]` + `#root` calc width against desktop-shell additive overflow; chunk revalidation on activation (HEAD+ETag keeps unchanged chunks, 5s timeout fails open); `visualViewport` keyboard inset + `env(safe-area-inset-*)` mobile adaptation
|
||||
- 📂 **Separate file windows by default** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): `editorExplorer` now defaults to **separate** — tree clicks / file opens create a new tab per path and the path-less window is a pure file manager; merged mode stays available as an opt-in
|
||||
- 🖥️ **Terminal shell / shellArgs configurable from the settings page** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): the terminal card's gear popup gains "Shell path" and "Shell arguments" rows (previously yaml-only via `cordis.patch.yml`) — saved values take effect immediately for terminals opened afterwards (UI terminals and model `terminal_create` alike); empty keeps the existing yaml → `$SHELL` / login shell / `powershell.exe` resolution order
|
||||
- 🏷️ **Version badge on the settings page** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): the side-card settings section now opens with a `DSH-better-sidebar v0.14.0` identity badge (version synced with the service instance, test-guarded)
|
||||
- 🔍 **Add-plugin catalog: search / grouping / independent scroll** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): built for a growing plugin ecosystem — a live search box (filters by name / id / description), optional `category` grouping for entries, and an independently scrolling list (the modal no longer grows unbounded with catalog size)
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🧩 **rc.8 module-system migration** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): rc.8 no longer exposes the `window.__DSH_MODULES__` page global (it moved to the `ctx.modules` service), which broke every lazy chunk's externals resolution — the client now injects the `modules` service and shares it with chunk-bundle copies through a plugin-owned global (terminal / editor / Mermaid on-demand loading restored)
|
||||
- 🧩 **Chunk revalidation barrier hardening** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): HEAD revalidation gains a 5s timeout (fails open on a stuck route so the barrier can never wedge lazy loads); `resetChunks` clears a pending revalidation barrier
|
||||
- 🖱️ **Drag robustness** ([#232](https://github.com/omdsh-dev/DSH-better-sidebar/pull/232)): fast releases (browsers merge/lose pointermove bursts) commit the last known dragged position instead of rolling back; `pointercancel` / lost-capture interruptions keep the drag result too; the center column is re-measured right after commit (no mid-frame bottom-panel width jump); HMR re-activation re-locates the center column via an `<html>` style observer plus a retry when the bottom panel opens (fixes the blank bottom panel / shifted input bar after a hot reload)
|
||||
|
||||
### v0.13.1
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 📊 **Safe Mermaid rendering in the Markdown preview** ([#164](https://github.com/omdsh-dev/DSH-better-sidebar/pull/164)): when a previewed md file contains mermaid fences, a `client-mermaid.js` chunk (~7MB) is served on demand (zero load without mermaid); defense-in-depth rendering — `securityLevel: 'strict'` + `htmlLabels: false` (node labels use real SVG `<text>`) + a second sanitize pass before SVG injection (foreignObject/script/foreign HTML elements removed, `@*`/`on*`/`href` attributes stripped); click a diagram to zoom in a modal overlay (wheel zoom centered on the cursor, drag pan, toolbar & shortcuts), re-renders with light/dark theme, falls back to the raw code block on parse failure
|
||||
- 🖥️ **Configurable terminal shell & shellArgs** ([#125](https://github.com/omdsh-dev/DSH-better-sidebar/pull/125)): `cordis.patch.yml` `better-sidebar.config` can set `shell` / `shellArgs` (a non-empty `shellArgs` fully replaces the defaults; unset keeps the previous auto-resolution of `$SHELL` / login shell / `powershell.exe`), applied to both UI terminals and agent terminals (`terminal_create`); terminal tab titles now show the shell name (bash/zsh/powershell) and internal tab ids use UUIDs so the same shell can open multiple terminals
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🔗 **Aggregate double-mount auto-yield** ([#200](https://github.com/omdsh-dev/DSH-better-sidebar/pull/200)): when an aggregate package (e.g. dsh-web-ui-all) mounts the same package under its own entry id, the guard expression in `cordis.patch.yml` disables the plugin's own `better-sidebar` row so `/sidebar/api` is no longer registered twice (`duplicate prefix route` crashing the whole plugin tree / `dsh web`); standalone installs behave as before
|
||||
- 🔧 **Adapted to DSH 0.1.0-rc.7** ([#207](https://github.com/omdsh-dev/DSH-better-sidebar/pull/207), fixes [#206](https://github.com/omdsh-dev/DSH-better-sidebar/issues/206)): fixes the `agent-presets: refusing to compose an unscoped context` error when picking a model / sending a message after DSH moved to rc.7
|
||||
|
||||
### v0.13.0
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 📁 **Files window merged with the explorer** ([#151](https://github.com/omdsh-dev/DSH-better-sidebar/pull/151)): new `editorExplorer` setting (editor card gear) — file tabs gain a path-input header plus a toggleable right-docked file tree (per-tab open/width memory, drag-resize 160–480px from the left edge, global filename search via the host `fs.search` route with a hard budget, skipping `.git` and symlink dirs); in separate mode (default) tree clicks / Enter in the path input open each file **in its own new tab**, merged mode switches the current tab **in place**; fresh sessions seed an empty Files window instead of the explorer tab, and a path-less window is a bare file manager in separate mode / a chrome'd empty file window in merged mode; the tree context menu offers "Open in new tab" and "Open to the side" (split)
|
||||
- 🎛️ **Select rows for declarative settings** ([#151](https://github.com/omdsh-dev/DSH-better-sidebar/pull/151)): settings rows gain `type: 'select'` (`options` with value/title/desc/icon, `multi` stores the picked values as an array); options with icons render big-icon option cards and keep the icon in the closed anchor; `editorExplorer` became an iconed select (merged vs separate); the capability list gained `settingSelect`
|
||||
- 🔀 **Mutual exclusion with the dsh-web-ui family right panel** ([#181](https://github.com/omdsh-dev/DSH-better-sidebar/pull/181)): reads the `aionui-panel` settings namespace's provider choice — when "Use aionui-panel" is selected, the whole better-sidebar (right sidebar / bottom panel / floating entry / all takeovers) does not mount; with DSH-better-sidebar (or no aionui installed) it behaves as before. Takes effect live after a settings save (settings-document push), no reload needed
|
||||
|
||||
### v0.12.3
|
||||
|
||||
**✨ New features**
|
||||
|
||||
- 🎨 **Skin compatibility (token-driven)**: fully consumes DSH design tokens and follows the dsh-web-ui skin center's 10 skins automatically; terminal/editor surfaces fall back to opaque backgrounds under transparent/translucent-glass token values so text never scrolls over the skin art ([#110](https://github.com/omdsh-dev/DSH-better-sidebar/pull/110), fixes #106 #105 #90 #60, also #52 #57 #92)
|
||||
- 🗂️ **Unified path handling**: UNC / symlink classification (directory symlinks expandable, broken links highlighted) + HTML-route platform guards ([#134](https://github.com/omdsh-dev/DSH-better-sidebar/pull/134), #65 #67 #43 #79 #115)
|
||||
- 🖥️ **Configurable terminal shell**: custom shell setting with Windows pwsh auto-probe ([#95](https://github.com/omdsh-dev/DSH-better-sidebar/pull/95))
|
||||
- 📝 **Editor languages**: C# / Kotlin / Swift syntax highlighting ([#120](https://github.com/omdsh-dev/DSH-better-sidebar/pull/120))
|
||||
- 🧭 **Settings nav icon**: settings-page navigation icon and layout polish ([#114](https://github.com/omdsh-dev/DSH-better-sidebar/pull/114))
|
||||
- ➕ **Recommended-plugin catalog**: added `dsh-git-remotes` — Git Remotes tab (branches/upstream/ahead-behind, fetch with prune, ff-only pull, confirm-before-push; does not replace the built-in stage/commit tab) ([#91](https://github.com/omdsh-dev/DSH-better-sidebar/pull/91)); and `dsh-video-preview` — inline video preview (.mp4/.webm/.mov/.mkv/.avi etc.) backed by a /video host route with HTTP Range (206) scrubbing, not capped by the 20MB mediaLimit ([#126](https://github.com/omdsh-dev/DSH-better-sidebar/pull/126))
|
||||
|
||||
**🐛 Fixes**
|
||||
|
||||
- 🔧 **xterm migration**: deprecated xterm dependency migrated to `@xterm/xterm` (Closes [#122](https://github.com/omdsh-dev/DSH-better-sidebar/issues/122), [#128](https://github.com/omdsh-dev/DSH-better-sidebar/pull/128))
|
||||
- 📝 **Markdown editor**: selection-to-conversation popup restored ([#24](https://github.com/omdsh-dev/DSH-better-sidebar/pull/24))
|
||||
- 🖼️ **Markdown preview renders local/relative images**: image destinations that point at local files (relative/absolute paths, reference-style `[id]: url`) are rewritten to `/sidebar/file` media URLs and displayed in the preview (previously only absolute http(s) images rendered; relative paths showed just the alt text)
|
||||
- 🐛 **node-pty load failure no longer crashes the server** ([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)): the host half now lazy-loads node-pty — when it is missing the plugin still mounts, the terminal shows a repair banner (copyable command + Retry button), and agent terminal tools are skipped
|
||||
- 🧪 Test engineering: unit spec split (#141) + flaky smoke cleanup fix
|
||||
|
||||
</details>
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Changelog completeness spec: both changelogs are shipped documents (the
|
||||
* Chinese one is also the source for GitHub Releases), so a merge that drops
|
||||
* history is a release regression. The 2026-10-29 mermaid merge (`04c6cb8`)
|
||||
* cut both files down to their top sections and nothing in CI noticed.
|
||||
*
|
||||
* Guards the invariants that would have caught it:
|
||||
* - both files still carry the oldest release,
|
||||
* - neither file has been reduced below the historical release floor,
|
||||
* - the English file never lists a release the Chinese (authoritative) file
|
||||
* lacks — it may lag in wording, not in which releases exist.
|
||||
*/
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const ROOT = resolve(fileURLToPath(new URL('..', import.meta.url)))
|
||||
|
||||
/** The oldest release both files must keep. */
|
||||
const OLDEST_RELEASE = 'v0.12.3'
|
||||
|
||||
/** The historical floor: 33 distinct releases carried when this guard landed. */
|
||||
const MIN_RELEASES = 30
|
||||
|
||||
/** Release headings look like `### v1.2.3` / `### v1.2.3-alpha.0`; prose suffixes are ignored. */
|
||||
const RELEASE_HEADING = /^### (v\d+\.\d+\.\d+(?:-[0-9A-Za-z.]+)?)/gm
|
||||
|
||||
function releases(file: string): string[] {
|
||||
const text = readFileSync(resolve(ROOT, file), 'utf8')
|
||||
return [...text.matchAll(RELEASE_HEADING)].map(match => match[1]!)
|
||||
}
|
||||
|
||||
describe('changelog integrity', () => {
|
||||
const zh = releases('CHANGELOG.md')
|
||||
const en = releases('CHANGELOG_EN.md')
|
||||
|
||||
it('keeps the full release history in both files', () => {
|
||||
for (const [file, list] of [['CHANGELOG.md', zh], ['CHANGELOG_EN.md', en]] as const) {
|
||||
expect(list, `${file} has no release headings`).not.toHaveLength(0)
|
||||
expect(list, `${file} lost its oldest release`).toContain(OLDEST_RELEASE)
|
||||
expect(new Set(list).size, `${file} dropped below the historical release floor`)
|
||||
.toBeGreaterThanOrEqual(MIN_RELEASES)
|
||||
}
|
||||
})
|
||||
|
||||
it('never lists an English release the Chinese file lacks', () => {
|
||||
const known = new Set(zh)
|
||||
expect(en.filter(release => !known.has(release))).toEqual([])
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user