-
Notifications
You must be signed in to change notification settings - Fork 30
🤖 feat: prompt to create folder when path doesn't exist #1175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When users type a non-existent path in the Add Project modal or the remote DirectoryPickerModal, they now see a 'Create Folder' button instead of just an error. Clicking it creates the folder (recursively like mkdir -p) and then either adds the project or navigates to the newly created directory. Changes: - Add general.createDirectory API endpoint - Detect 'path does not exist' errors in ProjectCreateModal - Detect ENOENT errors in DirectoryPickerModal - Show inline 'Create Folder' button when path doesn't exist --- _Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
- Use primary button style instead of outline for Create Folder - Show muted text for 'folder doesn't exist' instead of error red - Disable Add Project / Open buttons when Create Folder is offered
When the user types a path in the input field that differs from the currently displayed directory, clicking Open now validates that path first instead of selecting the old directory. If the typed path doesn't exist, shows the 'Create Folder' option.
0a5b5be to
4e9561f
Compare
|
@codex review |
There was a problem hiding this 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.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The void handleSelect() call was not awaited, causing the finally block to clear isCreating while the add-project request was still in flight. This re-enabled the button prematurely, allowing duplicate submissions. Now we await handleSelect() and remove the redundant finally block since handleSelect manages its own isCreating state.
The component stays mounted with isOpen toggled, so useState only runs on first mount. When reopening with a different initialPath, we now sync pathInput so users see their typed path (and get the create folder prompt if it doesn't exist).
When createDirectory fails, we need to reset isCreating so the UI doesn't get stuck in 'Adding...' mode. The error is now shown and the user can try again or cancel.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
When users type a non-existent path in the Add Project modal or the remote DirectoryPickerModal, they now see a 'Create Folder' button instead of just an error. Clicking it creates the folder (recursively like
mkdir -p) and then either adds the project or navigates to the newly created directory.Changes
general.createDirectoryAPI endpoint (recursive mkdir)Testing
~/new-project-folder)For remote directory picker:
Generated with
mux• Model:claude-sonnet-4-20250514• Thinking:none