-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Settings Flyout improvement #43840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings Flyout improvement #43840
Conversation
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
|
What is the memory consumption for the tray quick access menu? |
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
Only about 5MB if not activated |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
feaeae2 to
01aa491
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces a new Quick Access feature to PowerToys by refactoring the existing Settings flyout into a separate, dedicated host process. The changes include:
- Creating a new
QuickAccess.UIWinUI3 application to replace the embedded flyout in Settings.UI - Adding a new
Settings.UI.Controlsshared library for common UI components - Implementing
QuickAccessHostin the runner to manage the Quick Access process lifecycle - Adding Quick Access enable/disable toggle and hotkey configuration in General Settings
- Refactoring Settings.UI to remove flyout-related code and integrate with the new shared controls
Key Changes
- New Quick Access host process: Separate WinUI3 app with IPC communication, event-based show/hide, and memory optimization
- Settings UI refactoring: Removed embedded flyout, added Quick Access settings, integrated shared controls library
- Runner enhancements: Process management, hotkey registration, IPC coordination for Quick Access
Reviewed changes
Copilot reviewed 89 out of 89 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/settings-ui/QuickAccess.UI/** |
New Quick Access standalone application with viewmodels, services, and XAML UI |
src/settings-ui/Settings.UI.Controls/** |
New shared controls library (QuickAccess components, ModuleList, Card primitives) |
src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs |
Added Quick Access enable toggle and hotkey settings with file watching |
src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs |
Integrated QuickAccessViewModel and added settings change handlers |
src/settings-ui/Settings.UI/ViewModels/ShortcutConflictViewModel.cs |
Fixed IPC message format for GeneralSettings, added conflict refresh |
src/settings-ui/Settings.UI.Library/SettingsRepository1.cs` |
Added file watching and SettingsChanged event for reactive updates |
src/settings-ui/Settings.UI.Library/GeneralSettings.cs |
Added Quick Access properties and implemented IHotkeyConfig |
src/settings-ui/Settings.UI.Library/Helpers/ModuleHelper.cs |
Moved/refactored module utility methods to shared library |
src/runner/quick_access_host.* |
New Quick Access host process management (launch, IPC, lifecycle) |
src/runner/tray_icon.* |
Updated to call QuickAccessHost instead of opening flyout window |
src/runner/general_settings.* |
Added Quick Access settings handling and hotkey management |
src/runner/settings_window.* |
Removed flyout launch arguments and simplified IPC |
src/common/SettingsAPI/settings_objects.h |
Added default constructor for HotkeyObject |
src/common/ManagedCommon/ModuleType.cs |
Added GeneralSettings as a module type |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 89 out of 89 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (3)
src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs:1
- Changed from
GetSettingsOrDefaulttoGetSettingswhich will throw if the file doesn't exist. This could cause the reload to fail when settings files are temporarily missing during writes. Consider wrapping in try-catch or usingGetSettingsOrDefault.
src/settings-ui/Settings.UI.Library/SettingsRepository`1.cs:1 - Hard-coded retry count (5) and delay (100ms) make assumptions about file write duration. Consider making these configurable constants or using exponential backoff for more robust file access.
src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs:1 - The virtual
GetDispatcherQueuemethod enables testing but lacks test coverage. Add unit tests that verify the settings change handler works correctly with a mock dispatcher.
| auto hotkey_equals = [](const PowerToysSettings::HotkeyObject& a, const PowerToysSettings::HotkeyObject& b) { | ||
| return a.get_code() == b.get_code() && | ||
| a.get_modifiers() == b.get_modifiers(); | ||
| }; |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lambda hotkey_equals is defined inline within apply_general_settings. Consider extracting this to a named function or static helper method for better reusability and testability.
| // const std::wstring settings_string{ get_all_settings().Stringify().c_str() }; | ||
| // { | ||
| // std::unique_lock lock{ ipc_mutex }; | ||
| // if (current_settings_ipc) | ||
| // current_settings_ipc->send(settings_string); | ||
| // } |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented-out code should be removed rather than left in place. If this functionality might be needed later, consider documenting why it was removed in a commit message or code comment.
| // const std::wstring settings_string{ get_all_settings().Stringify().c_str() }; | |
| // { | |
| // std::unique_lock lock{ ipc_mutex }; | |
| // if (current_settings_ipc) | |
| // current_settings_ipc->send(settings_string); | |
| // } |
|
|
||
| if (quick_access_process) | ||
| { | ||
| const DWORD wait_result = WaitForSingleObject(quick_access_process.get(), 2000); |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number 2000 (2 second timeout) should be extracted to a named constant for clarity and easier maintenance.
| var token = _trimCts.Token; | ||
|
|
||
| // Delay the trim to avoid aggressive GC during quick toggles | ||
| Task.Delay(2000, token).ContinueWith( |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number 2000 (2 second delay) should be extracted to a named constant for clarity and easier maintenance.
|
The improved speed is great but it pops up bottom right of the main monitor, and there appears to be no way to change that. If you have your taskbar vertically orientated (because it takes less screen space on a landscape monitor), you're clicking on an icon bottom left only for the quick access icons to appear on the otherside of the screen, nullifying the decreased pop up time because you're spending longer moving your cursor and attention much further. Presumably there are other configurations that would suffer similarly - top of the screen, taskbar on a second screen etc. I'd guess the best fix would add an option to choose the monitor/corner you want it to appear in. |
Summary of the Pull Request
This pull request introduces the new Quick Access feature to PowerToys by integrating its host process management into the runner and system tray. The changes add the Quick Access host implementation, update project and build files to include it, and modify the runner and tray icon logic to launch and interact with the Quick Access UI.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed