Skip to content

feat: add copy path context menu option to file tree#67

Merged
ianphil merged 1 commit intomainfrom
squad/46-file-tree-copy-path
Feb 13, 2026
Merged

feat: add copy path context menu option to file tree#67
ianphil merged 1 commit intomainfrom
squad/46-file-tree-copy-path

Conversation

@ianphil
Copy link
Copy Markdown
Contributor

@ianphil ianphil commented Feb 13, 2026

Closes #46

Adds a right-click context menu to the file tree with a Copy Path option. Works for both files and folders.

Changes

  • FileTreeNode: Added optional onContextMenu prop that fires on right-click, passing the node's path upward
  • FileTree: Integrated useContextMenu hook to manage context menu state, renders a context menu overlay with a Copy Path button that writes the path to the clipboard via navigator.clipboard.writeText()
  • Icon: Added copy to the IconName union (uses VS Code codicon codicon-copy)
  • Tests: Added 2 new tests covering right-click copy path for files and folders

All 33 existing tests continue to pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ianphil ianphil merged commit 24e7297 into main Feb 13, 2026
1 check passed
@ianphil ianphil deleted the squad/46-file-tree-copy-path branch February 13, 2026 18:46
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.

File tree should have right click copy path option

1 participant