Skip to content

Conversation

@shuaiyuanxx
Copy link
Contributor

@shuaiyuanxx shuaiyuanxx commented Nov 24, 2025

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

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

image image image

Validation Steps Performed

shuaiyuanxx and others added 11 commits November 5, 2025 11:59
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: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shuai Yuan <shuai.yuan.zju@gmail.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>
@github-actions

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>
@github-actions

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>
@vanzue
Copy link
Contributor

vanzue commented Dec 2, 2025

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>
@shuaiyuanxx
Copy link
Contributor Author

shuaiyuanxx commented Dec 2, 2025

What is the memory consumption for the tray quick access menu?

Only about 5MB if not activated

Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
@shuaiyuanxx shuaiyuanxx marked this pull request as ready for review December 16, 2025 01:40
@shuaiyuanxx
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@shuaiyuanxx shuaiyuanxx force-pushed the shawn/quickAccessImprove branch from feaeae2 to 01aa491 Compare December 22, 2025 04:48
Copy link
Contributor

Copilot AI left a 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.UI WinUI3 application to replace the embedded flyout in Settings.UI
  • Adding a new Settings.UI.Controls shared library for common UI components
  • Implementing QuickAccessHost in 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
@shuaiyuanxx
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@shuaiyuanxx shuaiyuanxx merged commit 9086995 into main Jan 7, 2026
15 checks passed
@yeelam-gordon yeelam-gordon added this to the PowerToys 0.97 milestone Jan 12, 2026
@yeelam-gordon yeelam-gordon added the Product-Settings The standalone PowerToys Settings application label Jan 12, 2026
@yeelam-gordon yeelam-gordon requested a review from Copilot January 12, 2026 09:38
Copy link
Contributor

Copilot AI left a 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 GetSettingsOrDefault to GetSettings which 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 using GetSettingsOrDefault.
    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 GetDispatcherQueue method enables testing but lacks test coverage. Add unit tests that verify the settings change handler works correctly with a mock dispatcher.
Comment on lines +213 to +216
auto hotkey_equals = [](const PowerToysSettings::HotkeyObject& a, const PowerToysSettings::HotkeyObject& b) {
return a.get_code() == b.get_code() &&
a.get_modifiers() == b.get_modifiers();
};
Copy link

Copilot AI Jan 12, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +193 to +198
// 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);
// }
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
// 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 uses AI. Check for mistakes.

if (quick_access_process)
{
const DWORD wait_result = WaitForSingleObject(quick_access_process.get(), 2000);
Copy link

Copilot AI Jan 12, 2026

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.

Copilot uses AI. Check for mistakes.
var token = _trimCts.Token;

// Delay the trim to avoid aggressive GC during quick toggles
Task.Delay(2000, token).ContinueWith(
Copy link

Copilot AI Jan 12, 2026

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.

Copilot uses AI. Check for mistakes.
@mhasteley
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Settings The standalone PowerToys Settings application

7 participants