Skip to content

Simple file dialog: allow editing folder name on create-folder prompt#320390

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/simple-file-dialog-change-name
Draft

Simple file dialog: allow editing folder name on create-folder prompt#320390
Copilot wants to merge 2 commits into
mainfrom
copilot/simple-file-dialog-change-name

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

In the simple file dialog's "The folder X does not exist. Would you like to create it?" prompt, any keystroke would invisibly dismiss the prompt (via onDidChangeValuehide()), making it look like typing "did nothing".

Changes

  • yesNoPrompt: added allowEdit flag; return type changed from Promise<boolean> to Promise<URI | undefined> so callers can read back the (possibly edited) path. With allowEdit=true the auto-dismiss-on-change handler is not registered, and on cancel-after-edit the typed value is propagated back to filePickBox.value so edits aren't lost.
  • Open / create-folder path: invokes yesNoPrompt(uri, message, true). If the accepted URI differs from the original, the new value is pushed into the file picker and validation re-runs (re-prompting against the new name) rather than creating a folder at the edited path while the outer onDidAccept still resolves with the stale resolveValue.
  • Save-mode prompts (overwrite / create save destination): kept the previous cancel-on-edit semantics — adapted to the new signature via !!(await this.yesNoPrompt(...)). These flows have no path to re-validate an edited URI before saving, so silently changing them would risk saving at the wrong location.

Copilot AI requested review from Copilot and removed request for Copilot June 8, 2026 10:46
Copilot AI linked an issue Jun 8, 2026 that may be closed by this pull request
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 8, 2026 10:57
Copilot AI changed the title [WIP] Fix new folder naming in simple file dialog Simple file dialog: allow editing folder name on create-folder prompt Jun 8, 2026
Copilot AI requested a review from alexr00 June 8, 2026 10:58
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.

Simple file dialog - change the name when creating a new folder

2 participants