Skip to content

Add Compare Selected for two File Nodes - #350

Merged
joesobo merged 4 commits into
mainfrom
codex/compare-selected-files-229
Aug 7, 2026
Merged

Add Compare Selected for two File Nodes#350
joesobo merged 4 commits into
mainfrom
codex/compare-selected-files-229

Conversation

@joesobo

@joesobo joesobo commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • show Compare Selected only when the captured Context Selection contains exactly two File Nodes
  • handle the compare message with one extension-host action that runs VS Code's vscode.diff command
  • keep the action hidden for folders, Symbols, Relationships, mixed selections, and selections with any count other than two

Diff sides

Selection insertion order defines the diff sides. The first selected File Node opens on the left, and the second selected File Node opens on the right. Right-clicking either selected Node keeps that captured order.

Verification

  • focused Vitest: 78 tests passed
  • TURBO_FORCE=true pnpm --filter @codegraphy-dev/extension run typecheck with zero cached tasks and output from this worktree
  • focused ESLint on changed TypeScript and test files
  • React Doctor: 100/100, no issues
  • final PR diff: 17 files changed
  • fresh Extension Development Host run on VS Code 1.132.0: selected src/index.ts, then src/palette.ts; the action opened index.ts ↔ palette.ts in VS Code's diff editor

Visual proof

Two selected File Nodes and the available action:

compare-selected-menu.png

The resulting VS Code diff:

compare-selected-diff.png

Trello

Trello #229: Add Compare Selected context menu action for two file nodes

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codegraphy Skipped Skipped Aug 7, 2026 2:55pm

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 974b293

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@codegraphy-dev/extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joesobo
joesobo marked this pull request as ready for review August 6, 2026 17:45
@joesobo
joesobo marked this pull request as draft August 7, 2026 14:53
@joesobo
joesobo marked this pull request as ready for review August 7, 2026 15:52
@joesobo
joesobo merged commit f2030f3 into main Aug 7, 2026
38 checks passed
@joesobo
joesobo deleted the codex/compare-selected-files-229 branch August 7, 2026 15:53
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.

1 participant