Skip to content

feat: add copy file name/path to git file menu#338

Merged
Dimillian merged 3 commits intoDimillian:mainfrom
imodeveloper:feature/git-copy-file-actions
Feb 6, 2026
Merged

feat: add copy file name/path to git file menu#338
Dimillian merged 3 commits intoDimillian:mainfrom
imodeveloper:feature/git-copy-file-actions

Conversation

@imodeveloper
Copy link
Copy Markdown
Contributor

@imodeveloper imodeveloper commented Feb 4, 2026

Summary

  • add "Copy file name" and "Copy file path" actions to the git file context menu
  • reuse the resolved root/path logic for absolute paths
  • cover the new menu actions with tests

Motivation

Quickly grab a file name or full path from the git changes list without leaving the app.

Screenshot 2026-02-05 at 09 20 54

Testing

  • npm run test
  • npm run tauri build (fails: bundle_dmg.sh)

@imodeveloper imodeveloper marked this pull request as ready for review February 5, 2026 07:23
@Dimillian
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@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: 8c105844c8

ℹ️ 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".

? joinRootAndPath(resolvedRoot, rawPath)
: rawPath;
const projectRelativePath =
workspacePath && resolvedRoot && resolvedRoot.startsWith(workspacePath)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize and bound-check workspace prefix before slicing

projectRelativePath is derived by checking resolvedRoot.startsWith(workspacePath) and then slicing by string length, which can misclassify roots that only share a textual prefix (for example /tmp/repo-tools vs /tmp/repo) and also fails on Windows when separators differ (C:\repo vs C:/repo). In these cases, "Copy file path" can produce incorrect values like -tools/src/file.ts or omit the expected subdirectory entirely, so this should use normalized path components and a directory-boundary check before trimming.

Useful? React with 👍 / 👎.

@Dimillian Dimillian merged commit f21bdc1 into Dimillian:main Feb 6, 2026
5 checks passed
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
zip700 pushed a commit to zip700/CodexMonitor that referenced this pull request Apr 3, 2026
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