docs: record the contributor batch, rc3 evidence and release dependency slim-down (#1115 #1130 #882 #1191)

This commit is contained in:
Menghuan1918 committed 2026-11-16 00:49:08 +08:00
1 parent 0441249314
commit 5575ee29b9
8 files changed
+103 -3

No files matched your search

+6
View File
@@ -10,6 +10,12 @@
- 💬 **侧边对话页面模式可配置**(贡献者 PR [#1115](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1115) @pennxiang):默认仍是「共用一页」——再次打开聚焦同一个页签,并回到本会话最近的侧边对话;在「设置 → 侧边卡片 → 侧边对话」的齿轮里可切换「每个对话独立页」。独立模式下每个线程一个原生 occurrence,按 `(sessionId, contentId)` 精确恢复,跨原生栏与底部工作台按 threadId 去重;关闭原生页签会归档并释放该线程,创建过程中关闭页签不会留下孤儿线程。切换模式只影响之后的新打开,已开页签保持原样。
- 🧪 测试:`tests/sidechat-native-multiple.spec.ts`(独立页双开、精确恢复、跨载体去重、关闭/并发/存储边界、模式翻转重注册)、`tests/sidechat-view.spec.tsx`(共用页回退 + 独立页创建/归档)、`tests/builtins.spec.ts`(动态谓词默认 false)、`tests/sidechat-submit-key-pref.spec.tsx`(两个设置行并存);真实宿主 Chromium 覆盖共用页重复打开与独立页三线程刷新恢复。
- 🔗 **聊天里的完整绝对 Markdown 路径可点击**(贡献者 PR [#882](https://github.com/omdsh-dev/DSH-better-sidebar/pull/882) @wang-kaopu):每轮最后一条助手消息里,完整的绝对 `.md` / `.markdown` 内联代码路径可点击,并按当前会话的文件地址在原生侧栏打开;路径不存在时显示宿主文件读取错误。宿主已有的文件提及优先;`chatFileMentions.forClosing` 的第三个参数 `getFileTriggerProps` 原样转发,原有文件提及右键菜单与点击行为不变;卸载后旧链接不再打开新文件。
- 🧪 测试:`tests/chat-mentions.spec.tsx`(POSIX / Windows / UNC 路径判定、stock 优先、三参转发、服务晚到/释放/后装包装、MarkdownText 只认领可点击路径)。
- 📦 **发布包只安装运行时真正需要的依赖**([#1191](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1191)):`dependencies` 只保留 host 半真正 import 的 `ws` / `yaml`;已经打进 `lib/client*.js` 的 CodeMirror、mermaid、xterm、react-icons、dompurify、clsx、rxjs 等移入 `devDependencies`。安装不再多拉约 240 MB / 1.26 万个文件,插件实际运行时仍只有插件本体加 `ws` / `yaml`。`src` 与 `./src/*` 导出**保留**,不做破坏性删除。
- 🧪 守护:`tests/market-manifest.spec.ts` 同时校验仓库清单与 `pnpm pack` 后的发布清单,dependencies 必须恰好是 `ws` / `yaml`,且 `src` 仍在 `files` 里。
### v0.32.1
- 🧩 **适配 DSH 0.2.2-rc.2**:插件基线抬到 0.2.2 线的最新 RC,同时跟上这一版宿主的客户端契约与团队服务。
+6
View File
@@ -12,6 +12,12 @@
- 💬 **Side-chat page mode is configurable** (contributor PR [#1115](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1115) @pennxiang): the default remains **Shared page** — reopening focuses the same native page and returns to this session's most recent side chat. The side-chat card's gear in Settings → Side card can switch to **One page per thread**: each thread gets its own native occurrence, restored by `(sessionId, contentId)`, deduped across the native column and the bottom workbench by threadId, and archived/released when its native tab closes; closing a tab while its thread is still being created releases the orphan instead of rebinding it. Switching the mode only affects later opens; open tabs keep their identity.
- 🧪 `tests/sidechat-native-multiple.spec.ts` (two occurrences, exact restore, cross-carrier dedupe, close/concurrent/storage edges, mode-flip re-registration), `tests/sidechat-view.spec.tsx` (shared fallback + independent create/archive), `tests/builtins.spec.ts` (dynamic predicate defaults false), `tests/sidechat-submit-key-pref.spec.tsx` (both settings rows); the real-host Chromium lane covers repeated shared opens and three independent threads across reload.
- 🔗 **Complete absolute Markdown paths in chat are clickable** (contributor PR [#882](https://github.com/omdsh-dev/DSH-better-sidebar/pull/882) @wang-kaopu): a complete absolute `.md` / `.markdown` path in inline code in each turn's final assistant message opens through the current session's file address in the native sidebar; missing files show the host read error. Stock file mentions win first, and `chatFileMentions.forClosing` forwards its third `getFileTriggerProps` argument so the existing file-mention context menu and click behaviour are unchanged; after disposal an old link no longer opens a new file.
- 🧪 `tests/chat-mentions.spec.tsx` (POSIX / Windows / UNC classification, stock precedence, third-argument forwarding, late service/dispose/later-wrapper, MarkdownText claims only clickable paths).
- 📦 **The published package installs only its real runtime dependencies** ([#1191](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1191)): `dependencies` keeps only `ws` / `yaml`, which the host half actually imports. CodeMirror, mermaid, xterm, react-icons, dompurify, clsx, rxjs and the rest are already bundled into `lib/client*.js` and move to `devDependencies`, so a normal install no longer pulls roughly 240 MB / 12.6k unused files. `src` and the `./src/*` export stay published — this is not a breaking removal.
- 🧪 `tests/market-manifest.spec.ts` checks both the repo and the `pnpm pack` manifest: dependencies must be exactly `ws` / `yaml`, and `src` must stay in `files`.
### v0.32.1
- 🧩 **DSH 0.2.2-rc.2 support**: the plugin baseline moves to the newest 0.2.2 RC and follows that host's client contract and team service.
+3
View File
@@ -21,5 +21,8 @@ dsh-better-sidebar is built with the community. This file records the PR authors
| @stallenlu | Run git inside the WSL distribution for `\\wsl.localhost` workspaces | [#1135](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1135) |
| @majt415 / @lu.wang7 | External `fileActions` and editor-header `tabActions` | [#1137](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1137) |
| @gardenerHan | Declare `@deepseek-ai/schemastery` as a peer dependency | [#1156](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1156) |
| @pennxiang | Side-chat page mode: shared default plus independent per-thread native pages with exact bindings | [#1115](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1115) |
| @iasiv5 | Responsive multi-repo switcher with location labels | [#1130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1130) |
| @wang-kaopu | Clickable absolute Markdown paths in chat | [#882](https://github.com/omdsh-dev/DSH-better-sidebar/pull/882) |
Maintainer-authored work in the same cycle (issue implementations, fixes, integration and tests) is recorded in the changelog. Add a row here when integrating a contributor PR; the release note is the authoritative, versioned copy.
+1 -1
View File
@@ -24,7 +24,7 @@
|---|---|
| **🗂️ File Management**<br/>Lazy-loading tree, git status colors, live directory watch, global search, drag-and-drop upload, multi-select batch actions, dual-source "Open with" menu.<br/><img alt="File tree with git colors" src="./docs/screenshots/files-tree.png" /><br/><img alt="Context menu: Open with + Zip and download" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 Git**<br/>Source Control (Merge / Staged / Changes groups, message box with Generate, branch + sync footer) plus a this-session AI-changes lens, with a **read-only commit graph** (lanes, branch and tag badges, branch filter, commit details) in one tab.<br/><img alt="Git: changes and commit graph with tags" src="./docs/screenshots/changes-tree.png" /> |
| **📝 Editable Editor & Previews**<br/>An editable CodeMirror (the stock preview is read-only), Markdown + Mermaid + floating outline, sandboxed HTML preview, `.jsonl` record cards, paged preview for huge files, streaming transfers with no size caps.<br/><img alt="Markdown + Mermaid preview" src="https://github.com/user-attachments/assets/fe0e5182-55bb-45cc-b98b-a2877c2bdd38" /> | **🧩 Tasks**<br/>Live subagent topology (workflow graph / tree modes) + background task list: exit codes, live output, force-kill.<br/><img alt="Tasks: subagent topology" src="https://github.com/user-attachments/assets/dcd8ed2f-59fa-405b-937b-2d250f5034dd" /> |
| **💬 Side Chat (beta)**<br/>Codex-style side threads: inherit the full parent context and run independently, realtime push, visible & revocable queue, per-thread model selection, one-click promotion to a top-level session.<br/><img alt="Side Chat" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ Bottom Workbench**<br/>A self-drawn bottom panel that coexists with the native right sidebar: drag-to-split panes, multiple terminal tabs, per-session persisted layout.<br/><img alt="Dual workbench" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
| **💬 Side Chat (beta)**<br/>Codex-style side threads: inherit the full parent context and run independently, realtime push, visible & revocable queue, per-thread model selection, one-click promotion to a top-level session. One shared native page by default; switch to one page per thread in Settings.<br/><img alt="Side Chat" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ Bottom Workbench**<br/>A self-drawn bottom panel that coexists with the native right sidebar: drag-to-split panes, multiple terminal tabs, per-session persisted layout.<br/><img alt="Dual workbench" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
**Also**: 📂 the `sidebar_open` tool lets the model open the sidebar itself · ⚡ ~325KB core at startup, heavy chunks load on demand · 🌏 i18n follows DSH · 📱 narrow screens switch to a full-width drawer
+1 -1
View File
@@ -24,7 +24,7 @@
|---|---|
| **🗂️ 文件管理**<br/>懒加载目录树、Git 变更着色、实时 watch 刷新、全局搜索、拖拽上传、多选批量操作、「打开方式」双源菜单。<br/><img alt="文件树(Git 着色)" src="./docs/screenshots/files-tree.png" /><br/><img alt="右键菜单:打开方式 + 打包下载" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 Git**<br/>Source Control(Merge / Staged / Changes 三组、带 Generate 的消息框、分支与同步底栏)+ 本轮 AI 改动视角合一,并在同一页签内给出**只读提交图**(泳道、分支与 tag 徽章、分支筛选、提交详情)。<br/><img alt="Git:变更与带 tag 的提交图" src="./docs/screenshots/changes-tree.png" /> |
| **📝 可编辑编辑器与预览**<br/>可编辑的 CodeMirror(官方预览是只读)、Markdown + Mermaid + 浮动目录、HTML 沙箱预览、`.jsonl` 记录卡片、超大文件分页预览、传输无大小上限。<br/><img alt="Markdown + Mermaid 预览" src="https://github.com/user-attachments/assets/fe0e5182-55bb-45cc-b98b-a2877c2bdd38" /> | **🧩 任务管理**<br/>子代理拓扑实时预览(工作流图 / 树双模式)+ 后台任务清单:退出码、实时输出、强制终止。<br/><img alt="任务页:子代理拓扑" src="https://github.com/user-attachments/assets/dcd8ed2f-59fa-405b-937b-2d250f5034dd" /> |
| **💬 侧边对话(beta)**<br/>Codex 风格侧边线程:继承主会话完整上下文独立运行、实时推送、排队可见可撤回、每个线程独立选模型、一键提升为顶层会话。<br/><img alt="侧边对话" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ 底部工作台**<br/>自绘底部面板与原生右侧栏同时展开:拖拽分栏、多终端页签、按会话持久化布局。<br/><img alt="双工作台" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
| **💬 侧边对话(beta)**<br/>Codex 风格侧边线程:继承主会话完整上下文独立运行、实时推送、排队可见可撤回、每个线程独立选模型、一键提升为顶层会话。默认共用一个原生页签,可在设置中切换为每个对话独立页。<br/><img alt="侧边对话" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ 底部工作台**<br/>自绘底部面板与原生右侧栏同时展开:拖拽分栏、多终端页签、按会话持久化布局。<br/><img alt="双工作台" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
**还有**:📂 `sidebar_open` 工具让模型主动打开侧边栏 · ⚡ 启动只拉 ~325KB 核心、重依赖按需加载 · 🌏 多语言跟随 DSH · 📱 窄屏自动切换全宽抽屉
+8 -1
View File
@@ -69,7 +69,14 @@
逐项证据:[0.2.2-rc.2 适配记录](plans/2026-11-12-dsh-0.2.2-rc.2-adaptation.md)。
## 8. 适配记录索引
## 8. 0.2.2-rc.2 → 0.2.2-rc.3:已验证,无代码变化
- rc.3 与本插件消费面的源码差异只有 `@deepseek-ai/dsh-client-ui-primitives` 的 `src/icons/artwork.ts`(+1)与 `src/icons/index.tsx`(+6);其余是各包 `package.json` 版本、CI、桌面更新重启状态和无关的 DeepSeek 会话导入功能。`Menu` / `ui-sidebar-right` / `dsh-session` / `dsh-tools` / `dsh-agent` / `dsh-client-ui-*` 的 API 没有变化。
- 因此 `peerDependencies` 的 `^0.2.2-rc.2` 同时接受 rc.2 与 rc.3,`dsh.plugin.json#engines.dsh` 的 `>=0.2.2-rc.2` 也接受;**不新增任何运行时兼容代码**。
- 验证方式:在临时 worktree 把 devDependencies 的 30 条 DSH 包临时升到 `0.2.2-rc.3`(不提交),跑 `typecheck` / 全量 `test` / `build`,再用 rc.3 宿主跑真实挂载;dev 钉版与 CI 仍保持 rc.2 基线。
- 结论:当前构建服务 **0.2.2-rc.2 与 rc.3 两条 RC**;支持线表不变(`0.2.2-rc.2+`)。
## 9. 适配记录索引
- [0.2.2-rc.2](plans/2026-11-12-dsh-0.2.2-rc.2-adaptation.md)
- [0.2.2-rc.1](plans/2026-11-04-dsh-0.2.2-rc.1-adaptation.md)
+6
View File
@@ -59,3 +59,9 @@
- **桌面壳的 Cmd+Q 在页面之外**。macOS Desktop(`DSH Tauri.app`,内置 Electron 44.7.0)的主进程 `Contents/Resources/runtime/darwin-arm64/main.cjs` 订阅了 `app.on('before-quit')`:`preventDefault()` 后经 IPC 发 `app.exitRequested`,由壳自行完成退出;页面拿不到可取消的 quit 事件。壳内**没有** `will-prevent-unload` 处理(runtime 目录与壳可执行文件 grep 0 命中),因此若关闭最终走 `webContents.close()`,Electron 对 `beforeunload` 返回值的默认语义是**静默取消关闭**——这是 #1071「有脏草稿时 Cmd+Q 偶发退不掉、也没有确认框」的合理机制,但尚无 instrumentation 证据,不当作已证实根因。插件无法区分「被静默取消」与「页面成功拦截」,因此**不移除** `Sidebar.tsx` 的 `beforeunload`(浏览器刷新仍需要它);该 guard 现在会先 flush 草稿备份再拦截。
- **插件侧结论**:不伪造拦截,改为**降低损失**——`src/client/editor-draft-backup.ts` 在草稿变脏时按 1 s 节流写 `localStorage`(key = `sessionId::path`;单条 200k 字符、总计 600k 字符、最多 8 条、FIFO 淘汰),并在原生 `registerCloseHandler('editor')` 与 `beforeunload` 里立即 flush;重开同一文件由 `TextEditor` 提示恢复。保存成功、确认丢弃、确认刷新 / 就地换文件都会删除对应备份。
- **宿主若补上能力**:`will-prevent-unload` 对话框(Electron 主进程)或退出前可取消钩子,就能做真正的「保存 / 丢弃 / 取消」。届时在 `Sidebar.tsx` 的 `beforeunload` 与 `native/index.ts` 的关闭回调处接入 `confirmDiscardDraft`,再删掉这条降级路径。
## D. 0.2.2-rc.2 / rc.3 的两条客户端契约(2026-11-16)
- **`chatFileMentions.forClosing` 是可选的三参服务**(0.2.2 线由 `ui-deliverables` 提供):`(owner, sessionId, getFileTriggerProps?)`。任何包装必须把第三个参数原样转给 stock provider,否则宿主自己的文件提及会丢掉右键菜单;包装自己的匹配项也应把 `getFileTriggerProps(path)` 挂到 `contextMenuProps`。释放时只在 `service.forClosing === wrapped` 时恢复,且旧 resolver 的 `open` 要因 `active=false` 失效。宿主没有该服务(未组合 deliverables)时,插件不另造 provider,功能静默缺席。
- **sidechat 的原生 occurrence 身份**:宿主页面地址在 `multiple` 开启时是 `sidebar://sidechat/<uuid>`,共用页是固定的 `sidebar://sidechat`;宿主持久化布局与 contentId,但不持久化 navigation.params。插件只在多实例形态下按 `(sessionId, contentId)` 读写线程绑定;共用页继续用会话 last/newest 回退。原生 ×/菜单关闭经 `ctx.sidebarRight.registerCloseHandler('sidechat', ...)` 清理并归档该线程,组件卸载/刷新/插件卸载不归档;宿主该注册按 kind 唯一,重复注册会抛错,surface 释放时必须注销。
- **0.2.2-rc.3 与 rc.2 的差异仅在图标与包版本**:rc.3 的源码差异只有 `ui-primitives/src/icons/artwork.ts`(+1)与 `icons/index.tsx`(+6),另加无关的桌面更新/DeepSeek 会话导入改动;本插件消费的 Menu / sidebar-right / session / tools / agent / client-ui-* 均无 API 变化。因此 `^0.2.2-rc.2` 同时覆盖 rc.2 与 rc.3,不写运行时兼容层。
@@ -0,0 +1,72 @@
# 2026-11-16 contributor PR batch: side-chat mode, responsive repo switcher, chat paths, release deps
## Scope
- Integrate contributor PRs #1115 (independent native Side Chat tabs), #1130
(multi-repository picker) and #882 (absolute Markdown paths in chat).
- Fix #1191: the published package installs libraries that are already bundled
into `lib/client*.js`.
- Triage #1201 (file-tree right-click on desktop) without a speculative code
fix: the reporter could not be reproduced on macOS Web or Desktop, and the
proposed `contextual` explanation does not match the host Menu source.
## Product decisions
- **#1115 is opt-in.** The default remains one shared native page with the
session's last/newest thread reattach. Settings → Side card → Side chat →
Side-chat pages switches to one native page per thread. The switch affects
later opens only; existing tabs keep their identity. Occurrence bindings are
read/written only for `sidebar://sidechat/<uuid>` contentIds, so the shared
page cannot be captured by an old binding.
- **#1130 stays above Changes.** The switcher renders natural-width chips while
every location label fits, and one native select once it does not. A hidden
natural-width row makes the decision content-driven. Labels and the server
fallback stand-in are shared with the ⋯ → Repository submenu. No fixed
viewport breakpoint, no extra polling.
- **#882 forwards the host gesture.** DSH 0.2.2's
`chatFileMentions.forClosing(owner, sessionId, getFileTriggerProps?)` third
argument is forwarded to the stock provider; the added absolute-path match
also carries the host file context-menu binding.
- **#1191 keeps `src`.** Only bundled libraries move to devDependencies;
`./src/*` is an existing export surface and removing it would be a breaking
change.
## Host compatibility
- rc.2 → rc.3 source diff in the consumed packages is limited to
`ui-primitives` icons/artwork and package versions; no API changes. The
`^0.2.2-rc.2` peer floor already accepts rc.3, so both RCs are supported
without compatibility code. Verification uses a temporary rc.3 dev tree and
a real rc.3 mount; dev pins/CI stay on the rc.2 baseline.
- sidechat uses the host's stable per-occurrence `contentId`, `openTabs`
inventory and `registerCloseHandler`; the shared page keeps the host's
singleton identity.
## #1201 triage
The issue's proposed `Menu.contextual` / `isExternalTrigger` fix does not
explain a menu that never opens: in the rc.2 source, `contextual` controls
cursor positioning, right-click dismissal inside the popup, ARIA linkage and
icon-column alignment; `anchorPoint` already supplies the cursor position.
A diagnostic comment was posted asking for the DSH/plugin versions, OS/desktop
or Web, sidebar mode, console errors, whether a `[role="menu"]` node exists,
whether other host/plugin context menus work, and a read-only probe script.
## Verification
- [ ] `pnpm typecheck`
- [ ] `pnpm lint`
- [ ] full `pnpm test`
- [ ] `pnpm build` + `pnpm check:consumer-types`
- [ ] `pnpm pack` + temp install (only `ws` / `yaml`)
- [ ] real-host Chromium mount (shared + independent sidechat, guide/tabs)
- [ ] rc.3 temporary dev tree + real rc.3 mount
- [ ] CI on `dev`
## Links
- [#1115](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1115)
- [#1130](https://github.com/omdsh-dev/DSH-better-sidebar/pull/1130)
- [#882](https://github.com/omdsh-dev/DSH-better-sidebar/pull/882)
- [#1191](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1191)
- [#1201](https://github.com/omdsh-dev/DSH-better-sidebar/issues/1201)