Skip to content

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

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

fix(windows): improve Git diff viewing and history pagination#103
1lck merged 7 commits into
1lck:preview/0.3.0from
yangboxuan726:fix/windows-git-history-pagination

Conversation

@yangboxuan726

@yangboxuan726 yangboxuan726 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
@1lck
1lck merged commit c5c30d4 into 1lck:preview/0.3.0 Aug 16, 2026
7 checks passed
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