Compare-to-commit: native multi-diff file experience + commit-graph menu fixes#5
Merged
Conversation
…itor The multi-diff editor populates its `textDiffs` array asynchronously after the tab opens and does not always emit onDidChangeTabs, so waitForMultiDiffTab now polls until a multi-diff tab's entries are populated instead of settling for the first empty one. VSCode's multi-diff editor also appends its own " (N files)" count to the title we pass. The title assertion now verifies the label starts with our human-scannable comparison title AND ends with the changed-file count, which is strictly stronger than the previous exact-match and reflects exactly what the user sees. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
src/git/parsers.ts was committed un-formatted (its import line exceeded prettier's print width), so CI's `make fmt CHECK=1` (`prettier --check "src/**/*.ts" "*.json" "*.md"`) failed before tests ran. Apply prettier --write. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add pure unit tests (no vscode) for the two git subprocess modules using a recording GitRunner stand-in and a logger stub: - GitRepo.test.ts drives log/nameStatus/show/refs/revParse/currentBranch, asserting the exact argv handed to the runner (buildLogArgs ref + limit, buildNameStatusArgs commit/workingCopy/index shapes, showSpec sha:path vs :path), the empty-output → parseError path, the detached-HEAD → undefined path, and error passthrough. GitRepo.ts: 97.7/81.8 → 100/100. - GitRunner.test.ts covers the zero-exit ok path, the non-zero-exit error (stderr + exit code) and the spawn-failure branch. GitRunner.ts: 97.6/75 → 100/100. Total line coverage 95.18 → 95.39; ratchet the threshold 95 → 95.3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI lint (typed @typescript-eslint/no-unnecessary-condition) rejected the optional chains on array index reads in the new git unit tests. Rewrite GitRepo.test.ts to guard the single recorded call via `.at(0)` + assert, and assert whole-result equality; GitRunner.test.ts drops the unused log-event field. No coverage change (still 153 unit + 41 E2E, threshold 95.3). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MelbourneDeveloper
added a commit
that referenced
this pull request
May 30, 2026
…enu fixes (#5) ## What Replaces the file-picker QuickPick with VSCode's native multi-diff editor (`vscode.changes`) and fixes every commit-graph compare context-menu action. ### The multi-diff file experience - One persistent multi-diff tab lists **every changed file** (full path + inline diff); click any row to jump to that file's diff. - Uses the built-in `vscode.changes` command — **no custom view, sidebar, tree provider, or webview**. - **Zero UI duplication**: `FilePicker.ts`, `format/fileItem.ts`, `showStayOpenPick`, and the dead `numstat`/`parseNumstat`/`DiffStat`/`TAB` chain were deleted. ### Commit-graph menu fix - Real SCM history-item invocations pass the SourceControl provider (id `"git"`) **first**, then the history item. The old handlers read the first arg's `id` and fed the literal `"git"` to git (`fatal: ambiguous argument 'git'`). `historyItemShaFromArgs` now scans args for the real history item (the one with `parentIds`). ### Titles - Diff titles are human-scannable: `a1b2c3 ↔ Working Copy` (multi-diff) and `a1b2c3 ↔ Working Copy — a.txt` (single file). VSCode appends its own ` (N files)` count to the multi-diff title. ## Tests - **130 unit + 41 E2E passing, 0 failing.** - E2E drives every compare command end-to-end through real VSCode UI, including the real commit-graph provider-first argument shape, asserting title + left/right URIs per row. - Coverage **95.18%** (threshold 95). ## Verification `make ci` green locally (lint + test + build); release stamp dry-run passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ---------
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.
What
Replaces the file-picker QuickPick with VSCode's native multi-diff editor (
vscode.changes) and fixes every commit-graph compare context-menu action.The multi-diff file experience
vscode.changescommand — no custom view, sidebar, tree provider, or webview.FilePicker.ts,format/fileItem.ts,showStayOpenPick, and the deadnumstat/parseNumstat/DiffStat/TABchain were deleted.Commit-graph menu fix
"git") first, then the history item. The old handlers read the first arg'sidand fed the literal"git"to git (fatal: ambiguous argument 'git').historyItemShaFromArgsnow scans args for the real history item (the one withparentIds).Titles
a1b2c3 ↔ Working Copy(multi-diff) anda1b2c3 ↔ Working Copy — a.txt(single file). VSCode appends its own(N files)count to the multi-diff title.Tests
Verification
make cigreen locally (lint + test + build); release stamp dry-run passes.🤖 Generated with Claude Code