Skip to content

fix(windows): match compact IDEA diff layout - #110

Merged
1lck merged 21 commits into
1lck:preview/0.3.0from
yangboxuan726:codex/windows-compact-diff
Aug 16, 2026
Merged

fix(windows): match compact IDEA diff layout#110
1lck merged 21 commits into
1lck:preview/0.3.0from
yangboxuan726:codex/windows-compact-diff

Conversation

@yangboxuan726

@yangboxuan726 yangboxuan726 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render modified working-tree files as a compact IDEA/macOS-style two-pane diff, with the index on the left and the current version on the right
  • render added and deleted files in a full-width single-column diff
  • open untracked files in the diff surface and calculate their additions from real file content
  • add the file/status title, diff toolbar, version headers, hunk range header, line-number gutters, semantic rails, curved connectors, and direction markers
  • keep Source Control totals and per-file totals consistent (c.txt with three lines reports +3 -0)
  • keep ordinary Explorer file clicks routed to the main editor

Root cause

Untracked files were excluded from the working-tree diff loader and were opened through the normal file editor, so their content never contributed to diff statistics. When a synthetic patch was introduced, its raw_patch field selected the large raw-patch editor instead of the dedicated text diff renderer. The old split layout also advanced both panes on one shared row grid, creating placeholder rows instead of the compact IDEA-style flow.

Validation

  • bun test — 51 passed, 0 failed
  • bun run typecheck — passed
  • bun run lint -- ... — changed files passed; only existing unrelated repository warnings remain
  • git diff --check — passed
  • native Tauri Windows verification for both untracked added-file and tracked modified-file flows
  • temporary tracked-file fixture restored after capture; only the original untracked c.txt remains in the test repository

Screenshots

Added file — real +3 -0, single-column green diff

Native Windows added-file diff

Modified file — index left, current version right

Native Windows split diff

References and native implementation in one QA image

Reference versus native Windows comparison

yangboxuan726 and others added 21 commits August 16, 2026 14:40
…ispatcher

- translate git_merge and git_rebase into git.write with qualified
  refs/heads references, mirroring the checkout translations
- add git_integration_preflight, git_operation_state,
  git_operation_continue/abort/skip, and git_conflict_markers
  translations so the frontend can drive the shared core's conflict
  machinery
- map git.operationState responses into a UI-ready shape and collapse
  the no-operation case to null, matching the macOS model
- pass through integration preflight blocking paths and conflict
  marker paths for the upcoming banner and commit guard
- add git-integration-api with preflight-first merge/rebase that
  distinguishes conflict stops from real failures via operation state
- store operationState in the workspace git store and refresh it on
  every status pass so banner state stays true to the repository
- mirror the macOS banner: in-progress title, rebase step counters,
  conflict count, and Continue/Skip/Abort actions
- keep Continue disabled while conflicts remain and re-run resolution
  through the shared core, refreshing state after every attempt
- add a per-branch action menu with Merge into Current Branch and
  Rebase Current Branch onto This behind one confirmation each
- surface clean, conflict-stop, blocked-by-dirty, and failure outcomes
  with the shared core's preflight and operation state
- refuse to commit while the operation state still lists conflicted
  paths or staged files contain conflict markers, with the file names
  surfaced instead of Git's raw refusal
The action wrapper only stopped pointer-down propagation, so the click
that opened the menu also bubbled to the row's checkout handler, which
disabled the trigger and closed the menu instantly. Stop click
propagation like the retired delete button did.
…menu

Button wraps itself in a Tooltip component when given a tooltip prop,
so Base UI's render prop attached the menu trigger handlers to the
tooltip wrapper instead of the real button and clicks never opened the
menu. Pass only aria-label, like the working diff header trigger.
# Conflicts:
#	windows/tauri/src/features/git/hooks/use-git-data-controller.ts
@1lck
1lck marked this pull request as ready for review August 16, 2026 12:56
@1lck
1lck self-requested a review as a code owner August 16, 2026 12:56
@1lck
1lck merged commit efcc410 into 1lck:preview/0.3.0 Aug 16, 2026
6 checks passed
@yangboxuan726
yangboxuan726 deleted the codex/windows-compact-diff branch August 16, 2026 13:17
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