Open copied-file diffs in an external diff tool - #58
Merged
Merged
Conversation
Replace the in-app inline diff for .worktreeinclude copied files with a hand-off to an external diff/merge tool. Clicking a copied-file chip (detail pane) or row (the browser) opens its main↔worktree pair in the chosen tool. - Add a pure DiffTool catalog (Araxis Merge, Kaleidoscope, Beyond Compare, VS Code, FileMerge) with launch-argument assembly, unit-tested to 100%. - Add DiffToolLauncher to detect installed tools and run the process. - Add a reusable DiffToolMenu picker in the Copied files header, the "View all" browser header, and Settings → General; the selection persists via @AppStorage("diffToolID") and falls back to the first installed tool. - Remove the in-app UnifiedDiffView and the apply-to-main / copy-to-worktree actions; CopiedFile.classify / CopiedFileDiffer.compare stay for the chip status and +N −N counts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every copied file now hands off to the external diff tool, identical ones included — the tool just shows no differences. Removes the status-based isClickable gate (chips/rows are always buttons) and keeps isChanged only for the dimmed styling, the changed-count, and the "Changed only" filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The picker was added to GeneralSettingsView, which only renders inside the legacy SettingsView window — never opened (showOrCreateSettingsWindow is dead code) — so it never showed. Move it to SettingsSheetContent's General tab (the live in-app settings sheet, opened via isShowingSettings) as the top row, and revert the dead-code addition. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Replaces the in-app inline diff for
.worktreeincludecopied files with a hand-off to an external diff/merge tool. Clicking a copied-file chip (detail pane) or row (the "View all" browser) opens that file'smain↔worktreepair in the user's chosen tool, selected from a picker shown in three places and remembered as a persisted default.Implements the Claude Design prototype (
Oh My Worktree.html/diff-concepts.jsx), which lands the copied-file diff experience on external hand-off (App.jsx: "Hand a copied file off to the chosen external diff tool (no in-app diff).").What changed
DiffTool— pure, table-driven catalog of five tools (Araxis Merge, Kaleidoscope, Beyond Compare, VS Code, FileMerge) with launch-argument assembly and installed/effective resolution. Unit-tested to 100%.DiffToolLauncher— detects installed tools (CLI/bundle probe) and launches the process on the file pair. Coverage-excluded, likeExternalToolLauncher.DiffToolMenu— reusable picker in the Copied files detail header, the View all browser header, and Settings → General. Not-installed tools are disabled with a "Not installed" hint; the selection persists via@AppStorage("diffToolID")and falls back to the first installed tool.identical) hands off to the diff tool (it just shows no differences). The status-basedisClickablegate was removed;isChangednow only drives the dimmed styling, the changed-count, and the "Changed only" filter.UnifiedDiffViewand the apply-to-main / copy-to-worktree actions (fromCopiedFileDiffer, the view model,ContentView, and the confirm alert).CopiedFile.classify/CopiedFileDiffer.comparestay — chips still show status and+N −Ncounts.Design + plan:
docs/superpowers/specs/2026-06-18-copied-file-diff-tool-handoff-design.md,docs/superpowers/plans/2026-06-18-copied-file-diff-tool-handoff.md.Test Plan
swiftlint lint— cleanDiffToolTests)scripts/coverage.sh— strict 100% gate passes (DiffTool.swiftat 100%;CopiedFile.swift/CopiedFileDiffer.swiftstill 100% after the removals)🤖 Generated with Claude Code