Skip to content

Display the wsl node in FolderPicker and FileSavePicker dialog navigation#6326

Merged
DinahK-2SO merged 8 commits intomainfrom
user/DinahK-2SO/display_wsl_node_in_filedialog_navigation
Apr 1, 2026
Merged

Display the wsl node in FolderPicker and FileSavePicker dialog navigation#6326
DinahK-2SO merged 8 commits intomainfrom
user/DinahK-2SO/display_wsl_node_in_filedialog_navigation

Conversation

@DinahK-2SO
Copy link
Copy Markdown
Contributor

@DinahK-2SO DinahK-2SO commented Mar 23, 2026

Problem

The WSL navigation node (\\wsl.localhost) is hidden in the navigation pane of FolderPicker and FileSavePicker dialogs due to undocumented behavior in the Windows Common Item Dialog. FileOpenPicker is unaffected.

Fix

PickerCommon::WslNodeRevealer - a per-dialog IFileDialogEvents handler - is registered before Show(). On the first OnFolderChange it:

  1. Walks IServiceProvider -> SID_STopLevelBrowser -> IShellBrowser -> INameSpaceTreeControl.
  2. Resolves the WSL root shell item (\\wsl.localhost, falling back to \\wsl$).
  3. Polls (10 ms, up to 1 s) for navigation-pane root nodes to load; when the WSL node is found among their children, calls INameSpaceTreeControl::SetItemState to reveal it.

Changes

  • PickerCommon.h / PickerCommon.cpp : Added WslNodeRevealer with per-instance state. PollTimerProc is a static trampoline (required by TIMERPROC) that delegates to RevealWslNodeWhenReady; all other methods are non-static.
  • FileSavePicker.cpp : Register WslNodeRevealer in PickSaveFileAsync.
  • FolderPicker.cpp : Register WslNodeRevealer in PickSingleFolderAsync and PickMultipleFoldersAsync.

After Fix

  • FolderPicker:
    after-fix-folderpicker
  • FileSavePicker:
    after-fix-savepicker

Before Fix

  • FolderPicker:
    before-fix-folderpicker
  • FileSavePicker:
    before-fix-savepicker

@DinahK-2SO DinahK-2SO changed the title Display the wsl node. Display the wsl node in FolderPicker and FileSavePicker dialog navigation Mar 23, 2026
@DinahK-2SO DinahK-2SO marked this pull request as draft March 23, 2026 05:46
@DinahK-2SO DinahK-2SO marked this pull request as ready for review March 25, 2026 18:02
@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread dev/Interop/StoragePickers/PickerCommon.cpp
Comment thread dev/Interop/StoragePickers/PickerCommon.h Outdated
@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread dev/Interop/StoragePickers/PickerCommon.cpp
@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO DinahK-2SO enabled auto-merge (squash) April 1, 2026 03:06
@DinahK-2SO DinahK-2SO merged commit 27a8089 into main Apr 1, 2026
49 checks passed
@DinahK-2SO DinahK-2SO deleted the user/DinahK-2SO/display_wsl_node_in_filedialog_navigation branch April 1, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants