Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@

## [Unreleased]

### Added — Parity Recovery(Batch 5-12,IDEA 全量对齐)

> 基于「IDEA Git 功能复刻全量对齐」评审(用户截图反馈 Branches 空白/工具栏缺失),经 3 路代码审计确认「功能多数已实现但被视图 bug + 工具栏未浮现掩盖」,本批次先解除可见痛感再全量补齐。共新增 **13 个 engine 纯逻辑模块 + 21 个命令**,单测 64 → 166。

- **Branches 视图渲染修复(Batch5)**:`engine/ref/for-each-ref`(NUL 分隔 + upstream/HEAD/ahead-behind track)+ async getChildren + `repo.state.refs` 为空时 `git for-each-ref` CLI 兜底 + 首帧刷新(修复初始 `_onDidChange.fire` 早于订阅挂载而丢失的根因)。
- **工具栏 Action 组补齐 + 命令 bug(Batch5)**:Changes 加 fetch/pull/push/commit;Branches 加 fetch;Log 加 cherry-pick/revert/reset;cherry-pick/revert 成功后刷新;resetHead 重写(修 `HEAD~0` 致 mixed/keep 失效);branchDelete 加 `--merged` 检查;merge/rebase 加确认。
- **冲突兜底引导(Batch5)**:`engine/git-state/conflict-detector` + `adapter/conflict-ui`;merge/rebase/pull/cherry-pick/revert/stash-pop/unshelve 失败检测冲突弹「解决/中止」。
- **Branches 对齐 IDEA(Batch6)**:Favorites/Local/Remote/Tags 四段分组 + ahead/behind/upstream 展示 + `engine/ref/favorites`/`cleanup`(提取复用)+ toggleFavorite/checkoutAsNew/compareWithCurrent/tagCreate/tagDelete/tagCheckout。
- **交互式 Rebase webview 1:1 复刻(Batch7)**:补 reword/edit + 拖拽重排序;reword 经 `process.execPath` 跑 Node editor helper + state 文件非交互写入新 message(已功能性验证);`engine/rebase/todo`。
- **Log 提交详情面板 + 高级过滤(Batch8)**:commit 展开显示变更文件(`engine/log/commit-files`)+ 单文件 diff(commit^ vs commit)+ `engine/log/log-filter`(合并模式/日期/正则)+ per-commit 操作(resetToHere/createBranchFromCommit/createTagFromCommit/showContainingBranches)。
- **真实 SVG 提交拓扑图(Batch9)**:解析 `git log --graph` 字符粒度渲染(`*` 圆点可点击 / `|` 竖线 / `/ \` 斜线,多色 lane)+ 实时刷新 + 节点点击 QuickPick;`engine/log/graph-parser`。
- **Push/Update/Merge 对话框(Batch10)**:force/force-with-lease/push tags、pull --rebase/--no-rebase、merge ff-only/no-ff/squash + message;fetch --prune;`engine/commit/trailer`(Co-authored-by)。
- **自绘 3-way Merge Editor(Batch11)**:自实现 `engine/merge/diff3`(基于 LCS,双方同改动自动消解)+ WebviewPanel 三栏(OURS/RESULT 可编辑/THEIRS)+ Accept 按钮 + 写回 `git add`;handleGitConflict「解决冲突」直接调起。
- **Phase 4/5 收尾(Batch12)**:Stash 高级(keep-index/clear/branch)、Patch create/apply、Reflog 视图、编辑器内 Blame 行内注解(`engine/blame/blame-parser` + `adapter/editor/blame-annotation`)。

### 架构与质量
- 新增 engine 模块(零 vscode 依赖、可单测):`ref/{for-each-ref,favorites,cleanup}`、`rebase/todo`、`log/{log-filter,commit-files,graph-parser}`、`merge/diff3`、`commit/trailer`、`git-state/conflict-detector`、`blame/blame-parser`。
- 命令 56 → 77;单测 64 → 166(+21 文件);集成 3/3;lint/类型/构建全程 GREEN。
- 关键算法(reword helper / graph 解析 / diff3 / blame 解析)均做真实 git 数据功能性验证。
- git 底座:稳定 API 能做的用 `Repository.*`;缺口用 `GitRepositoryService.execGit`(复用 `api.git.path` 同一二进制)。

### 待补(后续)
- Commit webview 的 Co-authored-by / author 覆盖(`--author`)/ undo-last-commit 按钮 UI 接线(engine trailer 已就绪)。
- Partial 多文件选择 UX、行级 split chunks(IDEA "Include Selected Lines")。
- 目录/folder diff(虚拟文档)、Submodules 管理。
- M5 AI Agent(5 个接缝已预埋 Null 实现,本轮未启动)。



## [0.0.1-rc.2] - 2026-06-28 — 第二个预发布候选

包含 rc.1 后的全部 Parity Recovery(Batch 1-4 + Editor Inline Commit),大幅补齐 IDEA Git 功能复刻。
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ IntelliJ IDEA 的统一 Git 工具窗口(顶部 `Commit / Shelf / Stash` 标

## 已知限制

> 以下受 vscode.git 稳定 API 边界限制,暂不可用(详见 [实施状态 §3](./docs/milestones/implementation-status.md#3-api-限制汇总vscodegit-稳定-api-边界)):
> vscode.git 稳定 API 不含 cherry-pick / revert / reset / 分支重命名 / hunk 暂存 / stash list / graph topology / shelf / author 覆盖等;**这些均已通过 `GitRepositoryService.execGit`(复用 `api.git.path` 同一 git 二进制)的受控 CLI 通道实现**(Batch 5-12 全量对齐,详见 [CHANGELOG](./CHANGELOG.md) [Unreleased])。

- cherry-pick / revert(commit-level)/ reset / 分支重命名:稳定 API 无对应方法。
- 行级 / hunk 级 partial commit:`add` 仅整文件。
- 多 stash 列表枚举:API 无 `git stash list`(当前 apply/pop/drop 作用于 stash@{0})。
- Author 覆盖:`commit()` 的 `CommitOptions` 无 `author` 字段。
- 完整 Log 拓扑图(SVG 连线):作为 M3.x 增强。
当前仍待补:

- Commit 窗口的 Co-authored-by / Author 覆盖(`--author`)/ undo-last-commit **按钮 UI 接线**(engine `trailer` 已就绪,仅缺 webview 交互)。
- Partial 多文件选择 UX、行级 split chunks(IDEA "Include Selected Lines")。
- 目录 / folder diff(虚拟文档)、Submodules 管理。
- M5 AI Agent(5 个接缝已预埋 Null 实现,本轮未启动)。

详见[工程实施方案](./docs/architecture/engineering-plan.md)、[实施状态总览](./docs/milestones/implementation-status.md)与[知识索引](./.agents/knowledge-map.md)。

Expand Down
10 changes: 8 additions & 2 deletions docs/milestones/implementation-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

> Hyper Git VS Code 扩展的里程碑实施记录、API 限制发现、功能达成矩阵与 M5 AI 设计(留存)。
> 本文档随里程碑推进即时更新;调研与原始方案见 [工程实施方案](../architecture/engineering-plan.md) 与 [调研报告](../research/README.md)。
> 最后更新:2026-06-27(M0-M4 落地完成,准备 v0.0.1-rc.1)。
> 最后更新:2026-06-29(Parity Recovery Batch 5-12 全量对齐 IDEA 完成)。
>
> **⚠️ 重大更新(2026-06-29,Batch 5-12)**:经 IDEA Git 功能复刻评审,发现「功能多数已实现,但被 Branches 视图渲染 bug + 工具栏未浮现 + 命令 bug 掩盖」。本批 Recovery **先解除可见痛感,再全量补齐**:新增 13 个 engine 纯逻辑模块 + 21 个命令,单测 64 → 166、命令 56 → 77。**§3 所列 vscode.git 稳定 API 限制(cherry-pick/revert/reset/branch rename/hunk 暂存/stash list/graph topology/shelf/author 等)现均已通过 `GitRepositoryService.execGit`(复用 `api.git.path` 同一 git 二进制)受控 CLI 通道解决**。详见 [CHANGELOG](../../CHANGELOG.md) [Unreleased]。
> AI M5 暂不启动(5 个接缝保留 Null 实现,本轮专注 IDE 对齐)。

---

Expand All @@ -23,7 +26,10 @@
| M2 Commit 窗口 | 0.3.0 | [#4](https://github.com/ThreeFish-AI/hyper-git/pull/4) | Commit WebviewView(勾选+多行编辑器+Amend/signoff/skipHooks+CC 实时校验)、CommitPipeline(Checkin hook 链)、5 AI 接缝 Null 注入 | 集成:真实 git 提交闭环 |
| M0-M2 审查修复 | 0.3.1 | [#5](https://github.com/ThreeFish-AI/hyper-git/pull/5) | 11 类正确性修复(订阅泄漏/仓库选取/indexChanges/commit 语义/push 警告/linter 等)+ 16 项测试补齐 | 单测 45/45 + 集成 3/3 |
| M3 Log/Branches/Blame | 0.4.0 | [#6](https://github.com/ThreeFish-AI/hyper-git/pull/6) | Log TreeView(过滤+copy hash+Show History)、Branches TreeView(create/checkout/delete/merge/rebase)、Blame | 命令注册集成 |
| M4 Stash/Shelf | 0.5.0 | [#7](https://github.com/ThreeFish-AI/hyper-git/pull/7) | Stash 视图(log refNames 枚举)+ create/apply/pop/drop;Shelf MVP(stash 近似) | 命令注册集成 |
| M4 Stash/Shelf | 0.5.0 | [#7](https://github.com/ThreeFish-AI/hyper-git/pull/7) | Stash 视图(log refnames 枚举)+ create/apply/pop/drop;Shelf MVP(stash 近似) | 命令注册集成 |
| **Parity Recovery Batch 5-7** | — | commit `00b5ba7`/`2105445`/`9699ee9` | Branches 渲染修复 + 工具栏 Action 组 + 冲突兜底;Branches 对齐 IDEA(Favorites/Tags/ahead-behind);Rebase webview reword/edit/拖拽 1:1 复刻 | 单测 166/166 + 集成 3/3 |
| **Parity Recovery Batch 8-9** | — | commit `efd888c`/`ed01883` | Log 提交详情面板 + 高级过滤 + per-commit 操作;真实 SVG 提交拓扑图(解析 git --graph 字符粒度渲染 + 可点击 + 实时刷新) | 同上 |
| **Parity Recovery Batch 10-12** | — | commit `2274d8a`/`fcb6ffa`/`acdf53c` | Push/Update/Merge 对话框 + fetch prune + Co-authored-by trailer;自绘 3-way Merge Editor(自实现 diff3);Stash 高级 + Patch + Reflog + Blame 行内注解 | 同上 |

## 2. P0/P1 功能达成矩阵(对照 [IDEA 功能矩阵](../requirements/idea-feature-matrix.md))

Expand Down
Loading
Loading