feat: add rename file/directory option to FileTree context menu#338
Merged
feat: add rename file/directory option to FileTree context menu#338
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Add ability to rename files and directories from the FileTree context menu. When renaming, all references in markdown files are automatically updated to point to the new location. Features: - Rename option in context menu for both files and directories - File extensions are preserved automatically - Name validation (alphanumeric, hyphen, underscore only) - Automatic reference updating for wikilinks [[name]] and markdown links [text](path) - Directory renames update all references to files inside Changes: - Add RenameFileMessage/FileRenamedMessage schemas to protocol - Add renameFile() function to file-browser.ts - Add reference-updater.ts module for scanning and updating links - Add handleRenameFile handler and wire up in websocket-handler - Add Rename option to FileTree context menu with InputDialog - Handle file_renamed message in BrowseMode to refresh view Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds tests for: - handleRenameFile in browser-handlers.test.ts (13 test cases) - file_renamed message handling in BrowseMode.rename.test.tsx Tests cover success scenarios, error handling (file not found, file exists, path traversal, validation), and directory refresh after rename. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1393132 to
99d1ad1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[[name]]and markdown links[text](path)Closes #329
Test plan
.mdfiles are updated./git-hooks/pre-commit.shto verify all tests pass🤖 Generated with Claude Code