Feature: Add Open With toolbar flyout#18581
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an “Open with” toolbar group that dynamically builds a flyout from the Windows shell Open With context menu for the currently selected file.
Changes:
- Introduces
OpenWithMenu(Win32/COM wrapper) to build/enumerate the shell “Open with” menu and invoke selections. - Updates the toolbar to populate an “Open with” flyout asynchronously and adds the group to the default toolbar layout.
- Extends CsWin32 inputs/guids to support
IDataObjectand Open With shell COM usage, plus small config/docs updates.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Files.App/Utils/Shell/OpenWithMenu.cs | New Win32/COM wrapper to construct and invoke the shell “Open with” menu. |
| src/Files.App/UserControls/Toolbar.xaml.cs | Adds async flyout population and binds menu items to OpenWithMenu.InvokeItem. |
| src/Files.App/Properties/launchSettings.json | Renames the launch profile. |
| src/Files.App/Data/Items/ToolbarSections.cs | Adds the “OpenWith” group to default toolbar sections. |
| src/Files.App/Data/Commands/Manager/CommandGroupManager.cs | Defines OpenWithCommandGroup metadata for the toolbar. |
| src/Files.App.CsWin32/NativeMethods.txt | Adds IDataObject to CsWin32 generation inputs. |
| src/Files.App.CsWin32/ManualGuid.cs | Adds GUIDs for IID_IDataObject, CLSID_OpenWithMenu, and BHID_DataObject. |
| CLAUDE.md | Adds a pointer file to agent guidelines. |
| AGENTS.md | Updates repository development guidelines. |
Comments suppressed due to low confidence (1)
CLAUDE.md:1
- As written,
CLAUDE.mdcontains only a bare filename, which isn’t very discoverable for humans/tools that expect markdown guidance. Consider making this an explicit reference (e.g., a short sentence or markdown link) so it’s clear the intent is to redirect toAGENTS.md.
# Files Development Guidelines
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@0x5bfa I tested the flyout and it works quite well. One issue I noticed is that for files with no supported applications, clicking 'Open with' displays an empty flyout. Are we able to disable the toolbar button for these files? |
Instead of disabling the button the drop down could be instead and then it opens the select prompt like it does in 4.1.3. That would also match how the context menu works |
|
@Josh65-2201 this PR introduces a new action group 'Open with...' that users can pin to the toolbar, it doesn't change the behavior of the existing 'Open with' action. |
|
Seem odd to have two, Is it not possible to have them combined or keep the |
Displaying 'Choose another app' when no options are available sounds like a good solution. |
|
Looks good. One more thing to consider is the behavior when multiple files are selected. Since the 'Choose another app' picker only supports a single file, we should disable when multiple files are selected. |
What if all the selected files are of the same or compatible types? Like a group of JPG and PNG images, all being openable in Photoshop or some other multi-document graphics package? |
The open file picker only supports a single file. It doesn't make a difference if all of the items are the same type. |
|
The context menu in the Explorer just hides that menu item. May want to disable this drop down. |

Resolved / Related Issues
Steps used to test these changes