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.
| [AlwaysVisibleContextId] = | ||
| [ | ||
| new(commandGroup: nameof(CommandGroups.NewItem), showLabel: true), | ||
| new(commandCode: ToolbarItemDescriptor.SeparatorCommandCode, showIcon: false), |
There was a problem hiding this comment.
Is there a reason the separator was removed?
|
@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? |
Resolved / Related Issues
Steps used to test these changes