Repository navigation
Allow simple file dialog to create nested folders - #321355
Merged
Alex Ross (alexr00) merged 5 commits intoJul 15, 2026
Merged
Alex Ross (alexr00) merged 5 commits into
Alex Ross (alexr00) merged 5 commits into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Alex Ross (@alexr00)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves SimpleFileDialog open-validation by allowing folder creation prompts when the selected folder doesn’t exist but a writable ancestor does, and adds a browser test to validate nested folder creation behavior.
Changes:
- Update open-dialog validation to allow creating missing nested folders when an ancestor directory is writable.
- Add
canCreateFolder()helper to determine whether folder creation is possible by walking up the URI. - Add a new browser test covering nested folder creation from a folder-only open dialog.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/vs/workbench/services/dialogs/test/browser/simpleFileDialog.test.ts | Adds coverage for creating nested missing folders via the open dialog validation path. |
| src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts | Introduces ancestor-writability check (canCreateFolder) and uses it to decide whether to prompt for folder creation. |
Contributor
Author
|
@microsoft-github-policy-service agree |
Alex Ross (alexr00)
left a comment
Member
There was a problem hiding this comment.
Thank you for the PR!
Alex Ross (alexr00)
enabled auto-merge (squash)
July 15, 2026 10:03
Alex Ross (alexr00)
approved these changes
Jul 15, 2026
Christof Marti (chrmarti)
approved these changes
Jul 15, 2026
This was referenced Jul 24, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #320447
This updates the simple file dialog folder-only open flow to allow creating a nested missing folder path when the nearest existing ancestor is a writable directory. The actual creation still uses
fileService.createFolder, which already performs recursive mkdir.Validation now walks up the missing path, checking each missing basename before prompting to create the requested folder.
Verification:
PATH="/opt/homebrew/opt/node@24/bin:$PATH" npm run compile-clientfalse === true, then passed after the fixPATH="/opt/homebrew/opt/node@24/bin:$PATH" npm run test-browser-no-install -- --run src/vs/workbench/services/dialogs/test/browser/simpleFileDialog.test.ts --browser chromium-chromegit diff --check HEAD~1..HEAD