Skip to content

fix(windows): improve Git diff viewing and history pagination - #103

Merged
1lck merged 7 commits into
1lck:preview/0.3.0from
soarhill:fix/windows-git-history-pagination
Aug 16, 2026
Merged

1lck merged 7 commits into
1lck:preview/0.3.0from
soarhill:fix/windows-git-history-pagination

Conversation

@soarhill

@soarhill soarhill commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • paginate Windows Git history with cumulative snapshots and the shared Core hasMore state
  • default the Windows diff viewer to a persistent IDEA-style split layout
  • preserve Core-aligned old/new rows so unchanged replacements stay neutral and semantic line counts stay accurate
  • resolve repositories from file paths before requesting diffs
  • route Source Control files and diffs to the main editor pane even when the terminal pane is active

Root cause

The Windows client passed pathspecs and pagination parameters that did not match the shared Core contract. Split diffs were then reconstructed from independent vertical lines, which made unchanged paired lines appear as one deletion plus one addition. Source Control buffers could also be created in the active bottom pane, leaving them invisible while the Terminal tab was selected.

User impact

Windows users can page through Git history reliably, click changed files to open them in the editor, and review additions and deletions in an IDEA-style side-by-side view with accurate semantic counters.

Validation

  • bun test — 28 tests passed
  • bun run typecheck
  • targeted vp lint
  • git diff --check
  • native Windows cold-start verification for opening and switching staged file diffs

Screenshots

Addition

Windows split diff showing an added line

Deletion

Windows split diff showing a removed line

- translate git_diff_file and git_status_diff_stats filePath into the
  git.diff pathspecs contract instead of the unrelated paths field, and
  fall back to ["."] so whole-tree stat requests are not rejected
- derive diff stat staged flags from the request instead of hardcoding
  false, and fetch staged and unstaged stats so both groups show counts
- open diffs in split view like the macOS reference product and IDEA
  instead of a hardcoded unified default
- persist the unified/split preference in a zustand store so the choice
  survives reopening diffs and restarting the app
@soarhill
soarhill marked this pull request as ready for review August 16, 2026 03:51
@soarhill
soarhill requested a review from 1lck as a code owner August 16, 2026 03:51
@1lck
1lck merged commit c5c30d4 into 1lck:preview/0.3.0 Aug 16, 2026
7 checks passed
xiaoyumuxi added a commit that referenced this pull request Nov 18, 2026
#104 已 squash 合入 Core main,固定版本从分支提交 f7b2e48 换成 main
545ca11。main 上 #104 之下还有 #103(设置导航删除 limit 与溢出行),
桌面端从未发送 limit、也不读溢出行,不受影响。f7b2e48 与 545ca11 的
Rust 代码相同,只差文档和 view-results fixture 的文字坐标,桌面测试
不检查该坐标;文档补充在 Lithe-IDEA/Lithe-core-rust#105。
xiaoyumuxi added a commit that referenced this pull request Nov 19, 2026
* feat(desktop): 用 Viva 原生绘制插件视图:宿主控件、树、画布与设置区域(#2181)

插件后端的视图函数返回 UI 树和画布场景 JSON,桌面端用 Viva 原生绘制,
不嵌网页。工具窗口里的插件视图和设置页里的 settingRegions 共用同一个渲染器。

- 新增 internal/pluginview:节点、宿主控件、树、画布(矩形、路径、文字、
  图片、分组、渐变、缩放平移)、颜色令牌、宿主图标、包内 PNG 加载和视图会话。
- 新增 internal/core/plugin_view.go 与 pluginservice/hostview.go,接 Core
  的视图函数与事件;删除旧的 plugin_native 路径。
- 设置窗口呈现插件设置区域(关键词进入搜索),工具窗口呈现插件视图;
  视图失败走 app.notification.operation_failed 并写日志。
- 修复会话竞态、工具窗口图标、viewSettings 日志、嵌套树高度和
  visual_capture_test 旧签名。
- Viva 尚不支持的画布能力(自定义虚线、路径多色标渐变、整层透明度、
  圆角裁剪、捏合缩放)按契约降级,在 #2182 跟进。
- PINNED_CORE_REVISION 固定到 Core #104 的 f7b2e48;Agent Note 移到
  implemented,旧的声明式原生 UI Note 归档,更新功能矩阵、API 计划和 i18n。

* test(desktop): 插件设置区域视觉测试改用固定偏好目录,补插件视图截图

* build(desktop): Core 固定版本换成 main 545ca11(#104 已合入)

#104 已 squash 合入 Core main,固定版本从分支提交 f7b2e48 换成 main
545ca11。main 上 #104 之下还有 #103(设置导航删除 limit 与溢出行),
桌面端从未发送 limit、也不读溢出行,不受影响。f7b2e48 与 545ca11 的
Rust 代码相同,只差文档和 view-results fixture 的文字坐标,桌面测试
不检查该坐标;文档补充在 Lithe-IDEA/Lithe-core-rust#105。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants