Skip to content

Restore file list when canceling folder creation in simple file dialog#320388

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-folder-creation-cancel
Draft

Restore file list when canceling folder creation in simple file dialog#320388
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-folder-creation-cancel

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 8, 2026

When opening a non-existent folder via the simple file dialog, the user is asked "Would you like to create it?". Canceling that prompt returned the user to the path input but with an empty file/folder list.

Root cause

QuickPick shares a single underlying UI list across instances. Showing the yes/no prompt replaces the list contents, and QuickPick.update() only re-pushes items to the UI when itemsUpdated is set — a flag toggled only by the items setter. Re-showing the original file picker therefore leaves the shared list empty.

Changes

  • In SimpleFileDialog.yesNoPrompt's onDidHide handler, after re-showing filePickBox, reassign its items to itself to flip itemsUpdated and force the UI list to repopulate.

Copilot AI requested review from Copilot and removed request for Copilot June 8, 2026 10:37
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:50
Copilot AI changed the title [WIP] Fix file list restoration after canceling folder creation Restore file list when canceling folder creation in simple file dialog Jun 8, 2026
Copilot AI requested a review from alexr00 June 8, 2026 10:50
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 - cancel the folder creation does not restore the file list

2 participants