feat: add directory creation from FileTree context menu#333
Merged
Conversation
Add "Add Directory" option to the context menu when right-clicking directories in the file browser. Users can create new subdirectories with names restricted to alphanumeric characters, hyphens, and underscores to maintain vault structure consistency. Changes: - Add create_directory/directory_created WebSocket message schemas - Add createDirectory function with name validation and security checks - Create reusable InputDialog component for text input with validation - Add FolderPlus icon and menu option to FileTree context menu - Wire up BrowseMode to refresh directory listing after creation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adds test coverage for: - InputDialog component (32 tests covering rendering, accessibility, validation, user interactions) - FileTree "Add Directory" functionality (11 tests covering context menu, dialog, validation) - BrowseMode directory_created message handling (3 tests for WebSocket integration) - browser-handlers handleCreateDirectory (10 tests covering success, error codes, no vault) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
InputDialogcomponent for text input with validationcreateDirectoryfunction with name validation (alphanumeric, hyphens, underscores only)create_directoryanddirectory_createdTest plan
./git-hooks/pre-commit.sh)createDirectoryfunction (14 tests)Closes #328
🤖 Generated with Claude Code