From b5fec8d9a2a74ab5c9d250a0dbd8a76483b7dd0e Mon Sep 17 00:00:00 2001 From: Menghuan1918 Date: Fri, 16 Oct 2026 21:57:02 +0800 Subject: [PATCH] chore(release): prepare 0.27.0 Git page integration --- CHANGELOG.md | 6 ++++-- CHANGELOG_EN.md | 9 +++++++++ README.md | 15 +++++++-------- README_ZH.md | 15 +++++++-------- docs/external-plugin-guide.md | 2 +- dsh.plugin.json | 2 +- package.json | 2 +- src/client/service.ts | 2 +- 8 files changed, 31 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ed1b56e..a99e0824 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,17 @@ > 本文档收录 dsh-better-sidebar 的完整发布历史(最新版摘要见 [README](README_ZH.md);同步发布于 [GitHub Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases))。 -### Unreleased +### 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=`(不写配置文件、从不用 `*`,下一条命令重新面对守卫)。 - 🐞 **工作区根目录自身是仓库时,子目录里的独立仓库不再被藏起来**(贡献者 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(`` 内)文件调用可见**([#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)。三件均为 @wang-kaopu 的 PR。 +- 🐞 **「本轮文件」三处修正**:按**会话 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(`` 内)文件调用可见**([#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 diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index 0e4bfd53..2343f933 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -4,6 +4,15 @@ > > 📝 The Chinese [CHANGELOG](./CHANGELOG.md) is the authoritative, item-by-item record; this file carries the English summaries and has historically lagged behind it. Where the two disagree, the Chinese one is current. +### 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). diff --git a/README.md b/README.md index 952b4b3b..086dc0b8 100644 --- a/README.md +++ b/README.md @@ -89,19 +89,18 @@ If something fails, check the FAQ table in https://github.com/omdsh-dev/DSH-bett ## 🆕 Recent Updates +**v0.27.0** - full release history at [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG_EN.md) + +- **Git page rebuilt**: Source Control groups, a read-only commit graph with branch filtering, and a shared Commit details / Content / Diff pane +- **Accurate change tracking**: separate staged/unstaged counts, nested-repository discovery, session-relative paths, PTC file operations and long polling +- **Selection stays in place**: fixed the integration regression that displaced selected files and drew stray borders; added real-host layout coverage +- **Side Chat**: new child sessions seed from the latest summarizing compaction instead of copying the full parent log + **v0.26.1** — full release history at [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG_EN.md) - ⚡ **Fixed the steady-state cost behind "fine on 0.24, then it got slow"** (community reports: the sidebar turns laggy after being open a long time, DSH turns laggy after many turns, a restart clears it for a while; an artifact-level A/B puts the line at v0.25.0): both 500 ms timers are now visibility-gated (the host right-panel state is one shared module-level poller; the blank-session fallback only runs while it actually renders), the per-tab 5 s session-root poll became **one per session and only while visible**, the file-tree watch and side-chat push stop when parked, `keepMounted` keeps its semantics while every cache/registry is now bounded, and the host cwd resolver gained in-flight dedupe with a 3 s → 15 s TTL - 📊 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**, hit tests **1,620 → 0**, forced layouts **5,190 → 30** -**v0.26.0** — full release history at [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG_EN.md) - -- 🚀 **Streaming everywhere**: uploads / downloads / HTML preview / archiving have no size caps anymore; huge files open as a read-only paged preview -- 📄 New **`.jsonl` / `.ndjson` viewer**: collapsible record cards, editable and savable -- 💬 **Side Chat goes realtime**: pushed message delivery, visible queue with per-message revoke, per-thread model selection -- 🧩 **Tasks panel rebuilt**: expand by group, token usage & duration, canvas animations -- 🖥️ **Multiple terminal tabs** in the bottom workbench; ⚡ git status polling no longer stalls the UI (30s baseline, auto-backoff) - ## 🔌 Plugin Ecosystem `ctx.betterSidebar` offers two extension points to every plugin — `registerTab` / `registerFileViewer`; the built-in 6 tabs + 4 viewers use the very same API. The GitHub topic [`dsh-better-sidebar`](https://github.com/topics/dsh-better-sidebar) already lists **30+ ecosystem plugins**; the full integration guide is at **[docs/external-plugin-guide.md](./docs/external-plugin-guide.md)**. diff --git a/README_ZH.md b/README_ZH.md index 9260ac9f..98224840 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -89,19 +89,18 @@ dsh plugin --profile web add dsh-better-sidebar@latest ## 🆕 最近更新 +**v0.27.0** - 完整发布历史见 [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG.md) + +- **Git 页面重做**:Source Control 分组、支持分支筛选的只读提交图,以及共用的「提交详情 / 内容 / 差异」预览区 +- **变更追踪修正**:暂存和未暂存行数分离、嵌套仓库发现、按会话解析路径、PTC 文件操作可见与长轮询 +- **选中行不再错位**:修复整合时引入的文件行漂移和异常边框,新增真实挂载布局回归 +- **侧边对话**:从最近一次 summarizing compaction 构造子会话,不再全量复制父日志 + **v0.26.1** — 完整发布历史见 [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG.md) - ⚡ **修掉「0.24 没问题、之后越用越卡」的稳态开销**(社区反馈:侧栏在前台开久了卡、多轮对话后 DSH 卡、重启又暂时好;分界线经产物级 A/B 落在 v0.25.0):两个 500ms 表按可见性门控(右侧面板展开态改全模块一条共享表、空白会话兜底入口只在真的渲染时起表)、每 tab 的 5s 会话根轮询收敛成**每会话一条且只在可见时**、文件树 watch 与侧聊推送 parked 即停、`keepMounted` 保留语义但缓存与记账全部有界、宿主 cwd 解析加在飞去重且 TTL 3s→15s - 📊 真机实测(4 个访问过的页签、15s 空闲窗):活着的 500ms 表 **3→1**、5s 表 **5→0**、`session.cwd` 请求 **15→0**、命中测试 **1620→0**、强制布局 **5190→30** -**v0.26.0** — 完整发布历史见 [Releases](https://github.com/omdsh-dev/DSH-better-sidebar/releases) · [CHANGELOG](./CHANGELOG.md) - -- 🚀 **传输全面流式化**:上传 / 下载 / HTML 预览 / 打包再无大小上限;超大文件改为只读分页预览 -- 📄 新增 **`.jsonl` / `.ndjson` 预览**:逐条可折叠的记录卡片,可编辑保存 -- 💬 **侧边对话实时化**:消息推送到达、排队可见并可按条撤回、每个线程独立选模型 -- 🧩 **任务管理面板重构**:按组展开、Token 用量与耗时、画布动效 -- 🖥️ 底部工作台**多终端页签**;⚡ git 状态轮询不再拖慢界面(基线 30s,自动退档) - ## 🔌 插件生态 `ctx.betterSidebar` 向所有插件开放 `registerTab` / `registerFileViewer` 两个扩展点,内置 6 tab + 4 viewer 与第三方插件走同一套 API。GitHub topic [`dsh-better-sidebar`](https://github.com/topics/dsh-better-sidebar) 下已有 **30+ 生态插件**;完整接入文档见 **[docs/external-plugin-guide.md](./docs/external-plugin-guide.md)**。 diff --git a/docs/external-plugin-guide.md b/docs/external-plugin-guide.md index 0365a330..bf1fda6e 100644 --- a/docs/external-plugin-guide.md +++ b/docs/external-plugin-guide.md @@ -2,7 +2,7 @@ > 面向 **消费插件开发者**:如何让你的插件向 better-sidebar 注册新的侧边栏页面(tab)和文件类型预览器。 > -> 适用版本:**v0.4.0+**(`ctx.betterSidebar` 服务);声明式设置 **v0.4.1+**;text/number 设置行 **v0.11.0+**;badge/生命周期/定向打开/插件设置/版本探测 **v0.12.0+**;select 设置行(`settingSelect`)与外链认领(`urlTarget`)**v0.13.0+**;统一 `@deepseek-ai/cordis` 类型基底 **v0.15.2+**;路由前缀安全解析(`hostRouteUrl`)**v0.25.0+**。当前版本 **v0.24.0**(peer 下限 `^0.2.0-rc.2`,仅支持 DSH **0.2.0-rc.2+**;0.1.7 线请用 v0.23.0——caret 范围跨 minor 不成立,`^0.1.7-rc.1` 会被 0.2.0 宿主的启动预检静默禁用)。**v0.19.0 移除了自绘右侧面板与自由窗口**(见 §0、§11);**自 v0.20.0 开发线起**(**注意:0.20.0 从未发布到 npm,这些变更全部落在 v0.21.1**)插件**移除了自带的终端**(宿主 0.1.6 的 `ui-sidebar-terminal` 取代,见 §4.4)、**移除了终端固定(pin)**,并在 0.1.7 上**把浏览器视图与只读文件预览整体让给宿主**(`ui-sidebar-browser` / `ui-sidebar-documentpreview`,见 §4.4、§5.4)、**收敛了外链接管**(见 §4.1)、**重写了设置接入面**(`SettingsForms`,见 §8.2)、**给文件树加了实时刷新**(见 §10);同时**删除了轮尾产物行接管**(DSH 0.1.6 把 `conversation.chat.turnTail` 从 chain 改成只能追加的 list,替换语义不复存在)。 +> 适用版本:**v0.4.0+**(`ctx.betterSidebar` 服务);声明式设置 **v0.4.1+**;text/number 设置行 **v0.11.0+**;badge/生命周期/定向打开/插件设置/版本探测 **v0.12.0+**;select 设置行(`settingSelect`)与外链认领(`urlTarget`)**v0.13.0+**;统一 `@deepseek-ai/cordis` 类型基底 **v0.15.2+**;路由前缀安全解析(`hostRouteUrl`)**v0.25.0+**。当前版本 **v0.27.0**(peer 下限 `^0.2.0-rc.2`,仅支持 DSH **0.2.0-rc.2+**;0.2.0-rc.1 请用 v0.24.1,0.1.7 线请用 v0.22.1——caret 范围跨 minor 不成立,`^0.1.7-rc.1` 会被 0.2.0 宿主的启动预检静默禁用)。**v0.19.0 移除了自绘右侧面板与自由窗口**(见 §0、§11);**自 v0.20.0 开发线起**(**注意:0.20.0 从未发布到 npm,这些变更全部落在 v0.21.1**)插件**移除了自带的终端**(宿主 0.1.6 的 `ui-sidebar-terminal` 取代,见 §4.4)、**移除了终端固定(pin)**,并在 0.1.7 上**把浏览器视图与只读文件预览整体让给宿主**(`ui-sidebar-browser` / `ui-sidebar-documentpreview`,见 §4.4、§5.4)、**收敛了外链接管**(见 §4.1)、**重写了设置接入面**(`SettingsForms`,见 §8.2)、**给文件树加了实时刷新**(见 §10);同时**删除了轮尾产物行接管**(DSH 0.1.6 把 `conversation.chat.turnTail` 从 chain 改成只能追加的 list,替换语义不复存在)。 > 权威代码:`src/client/service.ts`(服务实现)、`src/client/builtins/`(内置 6 tab + 3 viewer 参考实现)、`lib/types/client/service.d.ts`(类型声明)。 > 仓库开发规则(硬约束 / CI / 发版)见 [AGENTS.md](../AGENTS.md)。 diff --git a/dsh.plugin.json b/dsh.plugin.json index 69e79f97..0f4dd61e 100644 --- a/dsh.plugin.json +++ b/dsh.plugin.json @@ -1,6 +1,6 @@ { "id": "dsh-external/dsh-better-sidebar", - "version": "0.26.1", + "version": "0.27.0", "main": "./lib/index.js", "description": "更好用的右侧边栏——文件树、编辑器、文件变动、任务和侧边对话都收在这一栏里,每个会话互不干扰。暴露服务供其他插件注册侧边栏页面与文件预览器", "engines": { diff --git a/package.json b/package.json index 1fae0e7e..ee5b30e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-better-sidebar", - "version": "0.26.1", + "version": "0.27.0", "description": "Better Sidebar for DSH — file tree, editor, changes, tasks and side chat in one column, separate for every conversation. Also exposes a service other plugins use to register sidebar tabs and file viewers.", "type": "module", "repository": { diff --git a/src/client/service.ts b/src/client/service.ts index 96fae0b4..fd87cc0a 100644 --- a/src/client/service.ts +++ b/src/client/service.ts @@ -819,7 +819,7 @@ export function matchUrlTarget(tabs: readonly TabDescriptor[], url: URL): TabDes * The plugin version this service instance reports. Keep in lockstep with * `package.json`'s version — `tests/service.spec.ts` asserts the pair. */ -export const SIDEBAR_SERVICE_VERSION = '0.26.1' +export const SIDEBAR_SERVICE_VERSION = '0.27.0' /** * Monotonic capability list consumers use to gate new API usage (features