Repository navigation
feat: 输入框变化统计可点击,直接打开 Git 面板的工作区差异 - #34
Merged
KannaKuron merged 1 commit intoNov 13, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
输入框工具条上的 Git 胶囊会显示彩色的变化统计(截图里的
±43 +43 ↓4),但只有仓库名 / 分支两颗 pill 可点,这组统计一直是纯展示。看到有未提交改动却想直接看差异,还得自己去开面板、找文件、双击。改动
±N/+N −N整组变成一个按钮。点它就是一次「显示差异」——打开 Git 面板(有 dsh-better-sidebar 时用它的右栏 Git 页签,缺省走原生sidebarRight),把面板切到该仓库,并直接给出第一个未提交文件的差异。复用的是左栏动作条「显示差异」同一条showWorkingDiff()接受路径,不新增 diff 逻辑。{ sessionId, repoRoot }停在模块级请求里并唤醒已挂载的面板;面板在自己的下一次可见窗口消费:仓库不同先pickRepo()搬过去,等该仓库的 summary 到位再跑 diff。请求 10 秒未被消费即丢弃(不会在很久以后突然弹面板),其他会话不会吃掉这条请求。diff.sidebar.unavailable说明原因;可点状态下 tooltip 保留原来的变更明细并追加action.showDiff。action.showDiff/diff.sidebar.unavailable都是既有键),21 门词典不需要动。## Unreleased,版本号留给维护者发版时决定。验证
npm test153/153(新增:reveal store 的会话隔离 / 一次性消费 / TTL 过期 / 可见座位优先;按钮接线、tooltip、CSS 指针态、面板消费路径断言)。node --check src/client.js;scripts/ssr-check.mjs4 项全绿。±1 +43,tooltip 带Show diff,按钮可点;betterSidebar.openTab({ type: 'dsh-ide-git:panel', target: 'right' }, { sessionId });diff { path: 'src/a.js', staged: false },diff 面板渲染+2 / −1;disabled,tooltip 说明No right sidebar is available。layout-probe/ 真实浏览器点击;合并前麻烦你在隔离实例里点一下确认位置与视觉。