Skip to content

Reveal in Finder for working-tree files - #92

Merged
danipen merged 2 commits into
mainfrom
file-reveal-in-finder
Sep 25, 2026
Merged

danipen merged 2 commits into
mainfrom
file-reveal-in-finder

Conversation

@danipen

@danipen danipen commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Until now, Reveal in Finder / Show in Explorer was only offered for the repository (right-click a repo in the repo switcher). This adds it to file context menus, but only where the file actually lives on disk.

Where it appears

  • Changes: every file menu (normal and conflicted), next to Open in Editor.
  • Search palette (Cmd/Ctrl+K file results): next to Open File.
  • A deleted change shows it disabled, since there's no file left to select.

Where it doesn't appear, on purpose

  • History, Graph and Stash file lists. Those show a file as it was in another commit, branch or stash, so the version on disk may differ or not exist at all.

How

  • New revealFile IPC (shared/ipc.ts → preload → main/ipc/integrate.ts) that calls shell.showItemInFolder. path.join converts git's POSIX-relative path to native separators so Explorer selects the file on Windows.
  • A shared common/revealFileItem.tsx builder reuses the platform-aware revealLabel, so the wording matches the repo menu. It has unit tests.

Verified in the app with Playwright: the menu shows up in Changes and the palette, it's disabled for a deleted file, and clicking it opens Finder on the file's folder. Lint, typecheck and tests pass.

🤖 Generated with Claude Code

…h palette

Lists of files from other commits, branches or stashes don't offer it: that
version needn't exist on disk. A deleted change shows it disabled.
@danipen
danipen merged commit 753bc50 into main Sep 25, 2026
9 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.

1 participant