Skip to content

Conversation

@imodeveloper
Copy link
Contributor

@imodeveloper imodeveloper commented Feb 4, 2026

Summary

  • add a "Show in Finder" option to the git file context menu
  • lazy-load the opener so macOS prompts only after the action is chosen
  • cover the menu item with a GitDiffPanel test

Motivation

Provide a fast jump from a changed file in the Git panel to its location in Finder.

Screenshot 2026-02-04 at 11 30 22

Testing

  • npm run test

@imodeveloper imodeveloper force-pushed the feature/git-show-in-finder branch 2 times, most recently from 5079999 to 1e2acf2 Compare February 4, 2026 09:14
@imodeveloper imodeveloper force-pushed the feature/git-show-in-finder branch from 1e2acf2 to 9fc86d4 Compare February 4, 2026 09:17
@imodeveloper imodeveloper marked this pull request as ready for review February 4, 2026 09:26
@Dimillian Dimillian changed the title Add Show in Finder to git file menu feat: add Show in Finder to git file menu Feb 4, 2026
@Dimillian Dimillian changed the title feat: add Show in Finder to git file menu feat: add show in Finder to git file menu Feb 4, 2026
@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9fc86d4c45

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1030 to +1033
const rawPath = targetPaths[0];
const absolutePath = resolvedRoot
? joinRootAndPath(resolvedRoot, rawPath)
: rawPath;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve relative git roots to absolute before reveal

When a user picks a git root inside the workspace, the app stores a relative path (e.g., subdir) in settings, so resolvedRoot here can be relative rather than absolute. In that case absolutePath becomes something like subdir/file, and revealItemInDir will run against a relative path (typically the app’s CWD), which can fail or reveal the wrong file. This shows up whenever the git root is a subfolder of the workspace. Consider resolving relative git roots against workspacePath before calling revealItemInDir.

Useful? React with 👍 / 👎.

@imodeveloper
Copy link
Contributor Author

Addressed the relative git root issue by resolving roots against workspacePath before reveal. Added a targeted test and ensured the context-menu test scopes to the current render to avoid stale rows.

@imodeveloper
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3d7fd17c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1053 to +1055
try {
if (!resolvedRoot && !absolutePath.startsWith("/")) {
pushErrorToast({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept Windows absolute paths when git root is empty

The guard !resolvedRoot && !absolutePath.startsWith("/") assumes absolute paths only start with /, so on Windows an absolute path like C:/repo/file (or a UNC path) will incorrectly trigger the "Select a git root first" error even though absolutePath is already absolute. This means the new menu item will fail in cases where the diff path is already absolute but gitRoot is unset, which is plausible for external diffs or non-standard roots. Consider using the existing isAbsolutePath helper (or similar) here so Windows absolute paths are accepted.

Useful? React with 👍 / 👎.

@Dimillian Dimillian merged commit 9f4d135 into Dimillian:main Feb 4, 2026
4 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.

2 participants