Skip to content

Sessions: open Choose Folder dialog at the parent of the current folder - #347472

Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
agents/fix-335652-choose-folder-parent
Draft

Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
agents/fix-335652-choose-folder-parent

Conversation

@alexdima

Copy link
Copy Markdown
Member

Fixes #335652

Problem

In the Agents window, the workspace picker's Open Folder... always opens the folder dialog in the home folder. When you want a sibling of the current folder, which is the common case when projects live side by side, you have to navigate all the way back down every time.

Change

WorkspacePicker._browseForLocalFolder now passes defaultUri to showOpenDialog: the parent of the currently selected folder, when that folder is a local (file:) folder. With no selection, or a non-local one, behavior is unchanged: the dialog picks its own default.

Demo

The same scenario on installed Insiders (top) and a dev build of this branch (bottom). It picks pr335652-projects/alpha in the workspace picker, then chooses Open Folder... again.

335652-before-after.png

  • Before (VS Code Insiders 1.146.0-insider, macOS arm64): the dialog starts at the home folder, and CF-03 fails.
  • After (--dev build of this branch): the dialog starts at …/pr335652-projects/ and lists alpha, beta and gamma. CF-03 passes.

How tested

  • node test/scenario/out/runScenario.js .build/vscode-playwright-mcp/pr/335652-parent.cjs (Insiders): failed at CF-03, as expected. The dialog opened at the home folder.
  • node test/scenario/out/runScenario.js --dev .build/vscode-playwright-mcp/pr/335652-parent.cjs (this branch): passed, 3/3 steps.
  • pnpm run eslint src/vs/workbench/contrib/sessions/browser/chat/sessionWorkspacePicker.ts: passed, no findings.

Before / after

Before

335652-before-insiders.mp4

After

335652-after-dev.mp4

🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).

Fixes #335652

🤖 Authored with GitHub Copilot on behalf of @alexdima.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the workspace picker’s folder-dialog starting-location change.

No open issues 🎉

What changed in this PR

Updates the Agents window workspace picker so Open Folder... starts at the current local folder’s parent, making sibling projects easier to select and addressing #335652.

Changes:

  • Passes the selected local folder’s parent as the folder dialog’s defaultUri.
  • Preserves the dialog’s default behavior when no folder is selected or the selection is non-local.
File Description
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionWorkspacePicker.ts Sets the folder dialog’s starting location from the current local selection.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

Choose Folder: Make parent folder of current folder the starting point

2 participants