mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 12:11:09 +01:00
async-cpp-changes
8829 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
43c89141a4 |
fix(HttpClient): take Uri by value in request() to prevent dangling reference
The coroutine suspends at co_await, so a const-ref to a temporary Uri would dangle. Take by value like the download() overloads already do. |
||
|
|
f2f17eb0f0 |
fix(ZoomIt): replace utils::async_task with wil::task in CaptureScreenshotAsync
The include for async_task.h was removed but the type usage remained. Change utils::async_task<T> to wil::task<T> and add wil/coroutine.h to pch. |
||
|
|
13cc6fd13e |
Update src/modules/ZoomIt/ZoomIt/Zoomit.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
eedc6ceccc |
Replace custom utils::async_task with wil::task
- Delete src/common/utils/async_task.h (custom coroutine type) - Use wil::task<T> from wil/coroutine.h (WIL already a dependency) - wil::task provides WaitOnAddress-based .get(), co_await support, COM error preservation, and apartment awareness - Add #include <wil/coroutine.h> to pch.h files (updating, runner) - Update callers to std::move(task).get() (wil::task::get is &&-qualified) - Remove AsyncTask.Tests.cpp (no need to test third-party wil::task) |
||
|
|
3b53810727 |
fix(async_task): fix use-after-free race and add unit tests
Fix a race condition in final_awaiter::await_suspend where p.ready.release() allows the .get() caller to destroy the coroutine frame while await_suspend is still accessing p.continuation. Fix by saving continuation to a local variable before releasing the semaphore. Add 13 unit tests covering: - Immediate co_return with .get() (int, string, zero, negative) - Exception propagation from coroutine body - Delayed completion on a background thread (via thread_delay_awaitable) - co_await chaining (async_task awaiting async_task, both immediate and delayed) - Move-only return types - Move construction and move assignment of async_task - .get() called from a worker thread - Multiple independent tasks Tests use a pure C++20 thread_delay_awaitable instead of WinRT resume_after to avoid WinRT apartment dependencies in the test DLL. |
||
|
|
b1f933c0b3 |
fix(updating): revert accidental filename pattern change and improve async_task
- Revert INSTALLER_FILENAME_PATTERN_USER back to 'powertoysusersetup' (was accidentally changed to 'powertoyssetup-user' which would break installer asset matching on GitHub releases) - Replace busy-wait spin loop in async_task::get() with std::binary_semaphore for efficient blocking - Add operator co_await() so async_task can be awaited by other coroutines, not just consumed synchronously via .get() - Add trailing newline to updating.h |
||
|
|
876b03595f |
refactor: address review comments - use async_task<T>, fix deref-before-check, fix coroutine param lifetimes
Address all 5 Copilot review comments on PR #45522: 1. updating.h/cpp: Replace IAsyncAction + out-parameter pattern with new utils::async_task<T> that supports co_return of arbitrary (non-WinRT) types. IAsyncOperation<T> cannot be used because github_version_result and std::optional<fs::path> are not WinRT-projected types. 2. PowerToys.Update.cpp: Fix undefined behavior where *new_version_info was dereferenced before checking if the expected had a value. Now checks !new_version_info first. 3. Zoomit.cpp: Same IAsyncAction -> async_task<com_ptr<ID3D11Texture2D>> conversion, eliminating the fragile out-parameter pattern. 4. HttpClient.h download(): Change dstFilePath and progressUpdateCallback from const reference to value parameters to prevent dangling references after coroutine suspension. 5. HttpClient.h: Add missing #include <string> (was transitively included via <future> which was removed). |
||
|
|
2f829a0a15 |
docs: add IAsyncAction out-parameter contract comments and fix trailing newline
Address PR review findings: - Add documentation comments explaining the caller contract for IAsyncAction functions that use out-parameter references (updating.h, Zoomit.cpp) - Fix missing trailing newline in installer.h |
||
|
|
ac1a551605 |
refactor(updating): make get_github_version_info_async and download_new_version_async true coroutines
Both functions now return IAsyncAction and use co_await internally instead of blocking with .get(). Output is returned via reference parameters since std::expected and std::optional<path> are not WinRT-projectable types. Sync callers block at the call site with .get(), while future async callers can co_await these functions directly. |
||
|
|
9194bae1ee | refactor(updating): use WinRT async types | ||
|
|
8f57522228 | refactor(updating): update async methods to use std::expected and co_await | ||
|
|
7578c77877 | refactor(updating): replace std::future with IAsyncOperation for async methods | ||
|
|
64ac14faa6 | build(modules): remove /await option from multiple project files | ||
|
|
1a396dfd85 | build(updating): add WinRT coroutine support and adjust output directories | ||
|
|
740dbf5699 |
build(common): update project references to use $(RepoRoot) for paths (#44639)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Update project references across multiple projects to utilize `$(RepoRoot)` for paths, ensuring consistency and improving maintainability. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: N/A - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This change affects the following projects: - `src/common/ManagedCsWin32/ManagedCsWin32.csproj` - `src/common/Common.Search/Common.Search.csproj` - `src/common/AllExperiments/AllExperiments.csproj` - `src/modules/peek/Peek.Common/Peek.Common.csproj` - `src/common/UITestAutomation/UITestAutomation.csproj` - `src/common/GPOWrapperProjection/GPOWrapperProjection.csproj` - `src/modules/powerrename/PowerRenameUITest/PowerRename.UITests.csproj` - `src/common/LanguageModelProvider/LanguageModelProvider.csproj` - `src/modules/Hosts/Hosts.Tests/HostsEditor.UnitTests.csproj` - `tools/StylesReportTool/StylesReportTool.vcxproj` - `src/common/interop/interop-tests/Common.Interop.UnitTests.csproj` - `tools/MonitorReportTool/MonitorReportTool.vcxproj` - `src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj` - `src/modules/peek/Peek.FilePreviewer/Peek.FilePreviewer.csproj` - `src/settings-ui/Settings.UI.Controls/Settings.UI.Controls.csproj` - `src/common/Themes/Themes.vcxproj` - `src/common/COMUtils/COMUtils.vcxproj` - `src/modules/cmdpal/Tests/Microsoft.CmdPal.UITests/Microsoft.CmdPal.UITests.csproj` - `src/modules/imageresizer/tests/ImageResizer.UnitTests.csproj` The changes were validated by running existing unit tests, which all passed successfully. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Executed all unit tests related to the modified projects, confirming that all tests passed without issues. ``` |
||
|
|
914f2281c3 |
feat(advancedpaste): add auto-copy selection for custom action hotkeys (#44767)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Boosting productivity #2x. Customer mentioned with Custom Action (Shortcut trigger) "We should not need to do two keyboard actions to finish this awesome AI data transformation, instead, just single shortcut should do copy + advanced paste." This pull request introduces a new feature to the Advanced Paste module that allows users to automatically copy the current selection when triggering a custom action hotkey. The changes include backend logic for sending the copy command, updates to configuration and settings management, and UI additions to expose this option to users. ### Feature Addition: Auto-Copy Selection for Custom Action Hotkeys * Added a new boolean setting, `AutoCopySelectionForCustomActionHotkey`, to both the backend (`dllmain.cpp`, `AdvancedPasteProperties.cs`) and the settings UI, allowing users to enable or disable automatic copying of the current selection when a custom action hotkey is pressed. [[1]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dR63) [[2]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dR106) [[3]](diffhunk://#diff-7f5d34989db7593fa4969a79cf97f709d210c157343d474650d5df4b9bf18114R31) [[4]](diffhunk://#diff-7f5d34989db7593fa4969a79cf97f709d210c157343d474650d5df4b9bf18114R83-R85) [[5]](diffhunk://#diff-09c575763019d9108b85a2e7b87a3bb6ed23a835970bf511b1a6bbe9a9f53835R174-R178) [[6]](diffhunk://#diff-0f8bf95882c074d687f6c4f2673cf9c8b1a904b117c11f75d0c892d809f3cd42R558-R570) ### Backend Logic and Integration * Implemented the `send_copy_selection()` and `try_send_copy_message()` methods in `dllmain.cpp` to send a WM_COPY message or simulate a Ctrl+C keystroke, ensuring the selected content is copied before executing the custom action. * Integrated the new setting into the hotkey handler logic so that when a custom action hotkey is pressed and the setting is enabled, the copy operation is triggered before running the custom action. ### Configuration and State Management * Updated serialization/deserialization and property synchronization logic to support the new setting, ensuring its value is correctly loaded, saved, and reflected in the UI and runtime behavior. [[1]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dR353-R357) [[2]](diffhunk://#diff-0f8bf95882c074d687f6c4f2673cf9c8b1a904b117c11f75d0c892d809f3cd42R1235-R1240) ### UI and Localization * Added a new checkbox to the Advanced Paste settings page in XAML to allow users to toggle the auto-copy feature. * Provided localized strings for the new setting, including header and description, in the resource file for user clarity. ### Refactoring for Hotkey Logic * Refactored hotkey handling code to correctly calculate indices for additional and custom actions, supporting the new auto-copy logic and improving code clarity. [[1]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dR918-R936) [[2]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dL871) [[3]](diffhunk://#diff-3866eb99ffe4453e0d03248e11d3560f7f15f4b982e323519d45e282f0fe898dL884) |
||
|
|
1fc0dfc28d |
[PowerDisplay] Prevent from WinuiEx crash (#45449)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This pull request updates how the `IsShownInSwitchers` property is set for the PowerDisplay windows, moving from XAML-based configuration to explicit runtime setting in the code-behind. This improves compatibility and error handling, especially in scenarios where the property may not be supported or could throw exceptions. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
ab47d54463 |
Fix WinuiEx crash issue (#45443)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Fixes a crash related to `IsShownInSwitchers` when explorer.exe is not running. The property has been removed from XAML and is now set in the C# backend with added exception handling to improve stability. No changes were made for projects where the property is set to true, as they are not affected. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: vanzue <vanzue@outlook.com> |
||
|
|
753689309e |
CmdPal: Fix alias UI clearing when toggling Direct/Indirect combobox (#45381)
## Summary of the Pull Request This PR fixes the settings UI for the top-level command alias. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist https://github.com/user-attachments/assets/0d1e1392-0293-4482-97cb-e8e8c0ed0dd5 - [x] Closes: #41301 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
2be4c4eb46 |
Fix CursorWrap "Automatically activate on utility startup" setting not persisting (#45210)
## Summary of the Pull Request Fixes #45185 - CursorWrap "Automatically activate on utility startup" setting cannot be disabled, and prevents spurious activation on startup. ## PR Checklist - [x] Closes: #45185 - [x] **Communication:** Issue was reported by community; fix follows established patterns from MousePointerCrosshairs - [x] **Tests:** Manual validation performed by contributor (video available) - [x] **Localization:** No new user-facing strings added - [ ] **Dev docs:** N/A - bug fix only - [ ] **New binaries:** N/A - no new binaries - [ ] **Documentation updated:** N/A - bug fix only ## Detailed Description of the Pull Request / Additional comments ### Problem Users reported that disabling the "Automatically activate on utility startup" setting for CursorWrap does not work - the mouse hook always starts automatically regardless of the setting value. ### Root Causes 1. **`dllmain.cpp` `enable()` method**: `StartMouseHook()` was always called unconditionally, ignoring `m_autoActivate`. 2. **`MouseUtilsViewModel.cs` `IsCursorWrapEnabled` setter**: enabling CursorWrap forced `AutoActivate = true`, overriding the user's preference. 3. **Startup edge case**: the trigger event could remain signaled from a previous session, immediately toggling CursorWrap on startup even when AutoActivate is off. ### Solution 1. **`src/modules/MouseUtils/CursorWrap/dllmain.cpp`**: only start the mouse hook if `m_autoActivate` is true. 2. **`src/settings-ui/Settings.UI/ViewModels/MouseUtilsViewModel.cs`**: remove the line that forced `AutoActivate = true` when enabling CursorWrap. 3. **`src/modules/MouseUtils/CursorWrap/dllmain.cpp`**: reset the trigger event on enable to avoid immediate activation on startup. ### Pattern Reference This fix follows the same pattern used by **MousePointerCrosshairs** module which has a similar `AutoActivate` setting that works correctly. ## Validation Steps Performed ### Build - `tools\build\build.ps1 -Platform x64 -Configuration Debug` ### Manual validation (contributor) #### Test Case 1: AutoActivate = false (should NOT auto-start mouse hook) 1. Open PowerToys Settings → Mouse Utilities → Cursor Wrap 2. Enable Cursor Wrap 3. **Disable** "Automatically activate on utility startup" 4. Close PowerToys completely (right-click tray icon → Exit) 5. Restart PowerToys 6. **Expected Result**: CursorWrap module is loaded but mouse hook is NOT active - cursor does NOT wrap at screen edges 7. Press activation hotkey (default: `Win+Alt+U`) 8. **Expected Result**: Mouse hook activates, cursor now wraps at screen edges 9. **Actual Result**: ✅ Works as expected #### Test Case 2: AutoActivate = true (should auto-start mouse hook) 1. Open PowerToys Settings → Mouse Utilities → Cursor Wrap 2. Enable Cursor Wrap 3. **Enable** "Automatically activate on utility startup" 4. Close PowerToys completely 5. Restart PowerToys 6. **Expected Result**: Mouse hook is immediately active, cursor wraps at screen edges without pressing hotkey 7. **Actual Result**: ✅ Works as expected #### Test Case 3: Setting persistence after restart 1. Set AutoActivate = false, restart PowerToys 2. Open Settings and verify AutoActivate is still false 3. Set AutoActivate = true, restart PowerToys 4. Open Settings and verify AutoActivate is still true 5. **Actual Result**: ✅ Setting persists correctly #### Test Case 4: Hotkey toggle works correctly 1. With AutoActivate = false, restart PowerToys 2. Press hotkey → cursor should start wrapping 3. Press hotkey again → cursor should stop wrapping 4. **Actual Result**: ✅ Hotkey toggle works correctly --- **Note**: Video demonstration available from contributor. |
||
|
|
731532fdd8 |
Add option to disable CursorWrap when on a single monitor. (#45303)
## Summary of the Pull Request CursorWrap wraps on the outer edge of monitors, if a user is swapping between a laptop and docked laptop with external monitors the user might want to only enable wrapping when connected to external monitors, and disable when only on the laptop. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #45198 - [ ] Closes: #45154 - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments Currently CursorWrap will wrap around the horizontal/vertical edges of monitors, if the user has more than one monitor the outer edges are used as wrap targets, if the user only has one monitor (perhaps a laptop) wrapping might be temporarily disabled until additional external monitors are added (such as being plugged into a dock or using a USB-C monitor). The new option will disable wrapping if only a single monitor is detected, monitor detection is dynamic. ## Validation Steps Performed Validated on a Surface Laptop 7 Pro (Intel) with a USB-C External Monitor. --------- Co-authored-by: Niels Laute <niels.laute@live.nl> |
||
|
|
bde2055f26 |
Fix pipeline build issue when using wasdk 2.0 exp (#45390)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This pull request updates project configuration for two modules by changing how the Windows App SDK is included. Specifically, it switches both modules from using a self-contained Windows App SDK deployment to a framework-dependent deployment. This means the applications will now rely on the system-installed Windows App SDK rather than bundling it with the app. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
3336c134dd |
[PowerDisplay] Add custom vcp code name map and fix some bugs (#45355)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request 1. Fix quick access not working bug 2. Add custom value mapping 3. Fix some vcp slider visibility bug demo for custom vcp value name mapping: <img width="1399" height="744" alt="image" src="https://github.com/user-attachments/assets/517e4dbb-409a-4e43-b15a-d0d31e59ce49" /> <img width="1379" height="337" alt="image" src="https://github.com/user-attachments/assets/18f6f389-089c-4441-ad9f-5c45cac53814" /> <img width="521" height="1152" alt="image" src="https://github.com/user-attachments/assets/27b5f796-66fa-4781-b16f-4770bebf3504" /> <img width="295" height="808" alt="image" src="https://github.com/user-attachments/assets/54eaf5b9-5d54-4531-a40b-de3113122715" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng <yuleng@microsoft.com> |
||
|
|
4c0926d7b7 |
Doc: Add a dev guideline to make sure codes builds and verified before open a pr (#45419)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Making sure the codes builds and verified before submitting a pr. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
d9a1c35132 |
Fix Advanced Paste settings page crash issue (#45207)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This pull request refactors the `AdvancedPasteAdditionalActions` class to use private backing fields and custom property accessors for its action properties. This change allows for better control over property initialization and ensures that the properties always have valid, non-null default values. **Refactoring for property initialization and null safety:** * Introduced private backing fields (`_imageToText`, `_pasteAsFile`, `_transcode`) for the `ImageToText`, `PasteAsFile`, and `Transcode` properties in `AdvancedPasteAdditionalActions`, replacing auto-properties. * Updated the property accessors for `ImageToText`, `PasteAsFile`, and `Transcode` to use the new backing fields and ensure that a new default instance is assigned if a null value is provided during initialization. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45189 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
0259e31d20 |
Fix contrast issue (#45367)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [X] Closes: #42261 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
266908c62a |
[ImageResizer] Fix Image Resizer not working after upgrade on Windows 10 (#45184)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Fixes an issue where Image Resizer stops working after upgrading PowerToys on Windows 10 - Root cause: the PackageIdentityMSIX (sparse app) was not being properly cleaned up during upgrade ## Problem Previous versions of PowerToys installed the sparse app on Windows 10. The current version only installs it on Windows 11+ (build >= 22000). During upgrade on Windows 10: 1. The `NOT UPGRADINGPRODUCTCODE` condition prevented the uninstall action from running 2. The Windows 11 version check prevented the new sparse app from being installed 3. Result: the old sparse app remained on the system, causing Image Resizer to malfunction ## Fix Changed the `UninstallPackageIdentityMSIX` condition from: Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL") to: Installed AND (REMOVE="ALL") This ensures the old sparse app is properly cleaned up during upgrades, which is also consistent with other similar cleanup <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45178 #45280 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Install PowerToys version 0.96.1 on Windows 10. 2. Upgrade to version 0.97.1. 3. Run Get-AppxPackage -Name "*Sparse*" in PowerShell to check whether a Sparse App package is present. |
||
|
|
6f87e947ff |
ZoomIt: close the virtual microphone on stop (#45386)
This is not a leak per se, but closing the virtual microphone when recording stops is a good thing to do. Also bump ZoomIt's version to 10.1. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This is a code quality addition, not a real bug per se - ZoomIt holds one reference to a virtual microphone stream, thus causing the notification area (system tray) microphone symbol always show ZoomIt as "recording" even after stopping a screen recording in ZoomIt. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments It's sufficient to just notice that: - Audio recording still works. - The notification area / system tray microphone notification is active while screen recording. - That notification disappears after stopping the ZoomIt screen capture session. - <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
70d84fcb88 |
chore(claude): add symlinks for Claude Code support to GitHub configs (#45204)
## Summary of the Pull Request Adds Claude Code support by creating symbolic links under `.claude/` that point to existing GitHub Copilot configuration files in `.github/`. This enables Claude Code to use the same AI contributor guidance, agents, prompts, instructions, and skills without duplicating content. ## Detailed Description of the Pull Request / Additional comments This PR creates a `.claude/` directory with symbolic links mapping Claude Code's expected paths to existing GitHub Copilot configurations: | Claude Code Path | → | GitHub Copilot Source | |------------------|---|----------------------| | `.claude/CLAUDE.md` | → | `.github/copilot-instructions.md` | | `.claude/agents/` | → | `.github/agents/` | | `.claude/commands/` | → | `.github/prompts/` | | `.claude/rules/` | → | `.github/instructions/` | | `.claude/skills/` | → | `.github/skills/` | **Key benefits:** - Single source of truth — edits to `.github/` files automatically apply to Claude Code - Directory symlinks ensure new files (agents, prompts, skills) are picked up without updating the mapping - `.gitattributes` updated with `symlink` hint for `.claude/**` **Windows users cloning this repo need:** - Developer Mode enabled, OR admin privileges - `git config --global core.symlinks true` before cloning ## Validation Steps Performed - [x] Verified symlinks resolve correctly on Windows (`Get-ChildItem .claude` shows targets) - [x] Confirmed content is readable through symlinks (`Get-Content .claude\CLAUDE.md`) - [x] Verified Git indexes files as symlinks (mode `120000` in `git ls-files -s`) - [x] Confirmed symlink targets stored with forward slashes for cross-platform compatibility - [x] No automated tests required — changes are config/symlinks only with no runtime impact |
||
|
|
8d9de117b9 |
Adds a video trim dialog to ZoomIt (#45334)
## Summary of the Pull Request Adds a video trim dialog to ZoomIt ## PR Checklist Closes 45333 ## Validation Steps Performed Manual validation --------- Co-authored-by: Mark Russinovich <markruss@ntdev.microsoft.com> Co-authored-by: foxmsft <foxmsft@hotmail.com> |
||
|
|
42a7213644 |
CmdPal: Supress warning CsWinRT1028 for DeleteObjectSafeHandle (#45324)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds a local suppression for warning CsWinRT1028: Class should be marked partial for source generated class `DeleteObjectSafeHandle`. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Related to: #42574 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
27ba536872 |
UT: Add ut to protect common utils codes (#45290)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request As title <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Tests should be picked up and run and pass |
||
|
|
18efa0559c |
Introduce new utility PowerDisplay to control your monitor settings (#42642)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Introduce a new PowerToys' module PowerDisplay to let user can control their monitor settings without touching monitor's button. Support feature list: Common: 1. Profiles support 2. Integration with LightSwitch (auto switch profile when theme change) 3. TrayIcon 4. Save and restore settings when startup 5. Shortcut 6. Rotation 7. GPO support 8. Auto re-discovery monitor when plugging and unplugging monitors. 9. Identify Monitors 10. Quick profile switch Especially for DDC/CI monitor: 1. Brightness 2. Contrast 3. Volume 4. Color temperature (preset profile) 5. Input source 6. Power State (poweroff) Design doc: https://github.com/microsoft/PowerToys/blob/yuleng/display/pr/3/doc/devdocs/modules/powerdisplay/design.md AOT compatibility: I designed this module for AOT from the start, so I'm pretty sure at least 95% of it is AOT compatible. But unfortunately, PowerToys still have a AOT blocker to block this module publish with AOT. Currently PowerToys will check the .net file version (file version not lib version) to avoid crash. So, all modules should reference Common.UI or add UseWPF to avoid overwrite the .net file with different version (which may cause crash). Todo: - [ ] BugBash - [ ] Icon - [ ] IdentifyWindow UI improvement Demo Main UI: <img width="546" height="671" alt="image" src="https://github.com/user-attachments/assets/b0ad9ac5-8000-4365-a192-ab8c2d66d4f1" /> Input Source: <img width="536" height="674" alt="image" src="https://github.com/user-attachments/assets/80f9ccd7-4f8c-4201-b177-cc86c5bcc9e3" /> Settings UI: <img width="1581" height="1191" alt="image" src="https://github.com/user-attachments/assets/6a82e4bb-8f96-4f28-abf9-d7c45e1c8ef7" /> <img width="1525" height="1146" alt="image" src="https://github.com/user-attachments/assets/aae81e65-08fd-453a-bf52-02a74f2fdea0" /> Closes: #42942 #42678 #41117 #38109 #35564 #34932 #28500 #1052 #18149 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #1052 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng <yuleng@microsoft.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: moooyo <lengyuchn@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
b3e7c9d227 |
[Light Switch] Fix Light Switch start up logic (#45304)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Title <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: https://github.com/microsoft/PowerToys/issues/45291 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Before, there was a function that initialized some variables about the current system state that were later used to check against if that state needed to change in a different function. That caused from some issues because I was reusing the function for a double purpose. Now the `SyncInitialThemeState()` function in the State Manager will sync those initial variables and apply the correct theme if needed. I also removed an unnecessary parameter from `onTick` <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Manual testing |
||
|
|
49cc504d94 |
CmdPal: Improve fuzzy matcher Unicode and emoji robustness (#45275)
## Summary of the Pull Request Add comprehensive unit tests for emoji, ZWJ sequences, skin tone modifiers, and UTF-16 edge cases (unpaired surrogates, combining marks, random garbage). Update matcher logic to skip normalization of lone surrogates, preventing errors with malformed Unicode. Expand comparison test data to cover emoji scenarios. Adds regression guards for diacritic handling and surrogate processing. Fixes #45246 introduced in #44809. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45246 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
18c6d6b0f3 |
CmdPal: Improve loading of application icons (uwp and jumbo icons) - part 2 (#44973)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR improves icons for app items: - Refactors icon detection and selection from the AppX manifest out of `UWPApplication` - Prefer *unplated* UWP app logos so icons no longer appear smaller than expected - Adds an icon loader based on `IShellItemImageFactory` to correctly load large icons - Jumbo icons loaded from shortcuts are now crisp - Jumbo icons loaded from shortcuts are no longer scaled down - Refactors detail loading in `AppListItem` to prevent potential deadlocks - Makes PWA icons more crisp - Fixes fallback item (now it gets used not only when the icon is null, but also when it's empty). <table> <thead> <tr> <th></th> <th>Old</th> <th>New</th> </tr> </thead> <tr> <td>1</td> <td> <img width="830" height="495" alt="image" src="https://github.com/user-attachments/assets/bc9875bd-6a8b-4a3d-88e1-07a655a5a5cd" /> </td> <td> <img width="750" height="533" alt="image" src="https://github.com/user-attachments/assets/a82ed464-b925-4d0c-95c4-6c04859e886e" /> </td> </tr> <tr> <td>2</td> <td> <img width="814" height="233" alt="image" src="https://github.com/user-attachments/assets/d560d3c0-ffc5-4178-a610-4e3b3c7107c8" /> </td> <td> <img width="760" height="299" alt="image" src="https://github.com/user-attachments/assets/f29c825e-324f-46f1-b6bb-6edcf286fc9a" /> </td> </tr> <tr> <td>3</td> <td> <img width="813" height="262" alt="image" src="https://github.com/user-attachments/assets/d94f724d-ec26-48c8-bb8a-1b10f6a0f7eb" /> </td> <td> <img width="762" height="260" alt="image" src="https://github.com/user-attachments/assets/76c5debb-baac-417e-8aba-9cec198e742c" /> </td> </tr> <tr> <td>4</td> <td> <img width="819" height="250" alt="image" src="https://github.com/user-attachments/assets/5f16d714-56d8-42f2-ad8b-1c2be6570e5c" /> </td> <td> <img width="747" height="244" alt="image" src="https://github.com/user-attachments/assets/485c72cf-ef39-4c05-afdd-877f0a47f51a" /> </td> </tr> <tr> <td>5</td> <td> <img width="815" height="327" alt="image" src="https://github.com/user-attachments/assets/4108e36a-5950-43c9-bdff-6a9f58dadcf6" /> </td> <td> <img width="762" height="272" alt="image" src="https://github.com/user-attachments/assets/804a3159-a165-4a48-87f6-15849f5f4516" /> </td> </tr> <tr> <td>6</td> <td> <img width="809" height="257" alt="image" src="https://github.com/user-attachments/assets/93ad8241-1d75-415f-b08c-4161c0905e41" /> </td> <td> <img width="756" height="231" alt="image" src="https://github.com/user-attachments/assets/a0c9bb44-7151-438d-a811-82d5e2080f44" /> </td> </tr> <tr> <td></td> <td> </td> <td> </td> </tr> </table> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #44970 - [x] Closes: #43320 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
4d1f92199c |
CmdPal: Make Indexer great again - part 1 - hotfix (#44729)
## Summary of the Pull Request This PR introduces a rough hotfix for several indexer-related issues. - Premise: patch what we can in-place and fix the core later (reworking `SeachEngine` and `SearchQuery` is slightly trickier). This patch also removes some dead code for future refactor. - Adds search cancellation to the File Search page and the indexer fallback. - Prevents older searches from overwriting newer model state and reduces wasted work. - Stops reusing the search engine; creates a new instance per search to avoid synchronization issues. - That `SeachEngine` and `SearchQuery` are not multi-threading friendly. - Removes search priming to simplify the code and improve performance. - Since `SearchQuery` cancels and re-primes on every search, priming provides little benefit and can hide extra work (for example, cancellation triggering re-priming). - Fixes the indexer fallback subject line not updating when there is more than one match. - It previously kept the old value, which was confusing. - ~Shows the number of matched files in the fallback result.~ - Fetching total number of rows was reverted, performance was not stable :( - Optimizes the indexer fallback by reducing the number of items processed but not used. - Only fetches the item(s) needed for the fallback itself—no extra work on the hot path. - Stops reusing the fallback result when navigating to the File Search page to show more results. This requires querying again, but it simplifies the flow and keeps components isolated. - Fixes the English mnemonic keyword `kind` being hardcoded in the search page filter. Windows Search uses localized mnemonic keyword names, so this PR replaces it with canonical keyword `System.Kind` that is universaly recognized. - Adds extra diagnostics to `SearchQuery` and makes logging more precise. - DataPackage for the IndexerListItem now defers including of storage items - boost performance and we avoid touching the item until its needed. - IndexerPage with a prepopulated query will delay loading until the items are actually enumerated (to avoid populating from fallback hot path) and it no longer takes external SearchEngine. It just recreates everything. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Related to: #44728 - [x] Closes: #44731 - [x] Closes: #44732 - [x] Closes: #44743 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
dca532cf4b |
CmdPal: Icon cache (#44538)
## Summary of the Pull Request This PR implements actual cache in IconCacheService and adds some fixes on top for free. The good - `IconCacheService` now caches decoded icons - Ensures that UI thread is not starved by loading icons by limiting number of threads that can load icons at any given time - `IconCacheService` decodes bitmaps directly to the required size to reduce memory usage - `IconBox` now reacts to theme, DPI scale, and size changes immediately - Introduced `AdaptiveCache` with time-based decay to improve icon reuse - Updated `IconCacheProvider` and `IconCacheService` to handle multiple icon sizes and scale-aware caching - Added priority-based decoding in `IconCacheService` for more responsive loading - Extended `IconPathConverter` to support target icon sizes - Switched hero images in `ShellPage` to use the jumbo icon cache - Made `MainWindow` title bar logic resilient to a null `XamlRoot` - Fixed Tag icon positioning - Removes custom `TypedEventHandlerExtensions` in favor of `CommunityToolkit.WinUI.Deferred`. The bad - Since IconData lacks a unique identity, when it includes a stream, it relies on simple reference equality, acknowledging that it might not be stable. We might cache some obsolete garbage because of this, but it is fast and better than nothing at all. Yet another task for the future me. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: - [ ] Closes: #38284 - [ ] Related to: #44407 - [ ] Related to: https://github.com/zadjii-msft/PowerToys/issues/333 - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
b5991642f8 |
CmdPal: Add trailing backslash to OutDir in Microsoft.Terminal.UI project file (#45250)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Ensures the OutDir path in Microsoft.Terminal.UI.vcxproj ends with a backslash, making it explicit as a directory, and fixes warning MSB8004. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
84b39a9edc |
[Light Switch] Changed the rules surrounding the max/min value of the Offset field (#45125)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR introduces new logic that dictates the max and min value for the `Offset` field that the user can change when using Sunrise to Sunset mode. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #44959 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments The new logic is as follows: - The sunrise offset cannot go into the previous day and cannot overlap the current sunset transition time - The sunset offset cannot overlap the last sunrise time and cannot overlap into the next day. These values are dynamic and update when the VM updates with new times. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Manual testing |
||
|
|
67d96b0a13 |
PowerToys extension: Bundle localization files into installer (#45194)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #45171 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed <img width="925" height="612" alt="image" src="https://github.com/user-attachments/assets/214ead95-504a-4e48-bc25-138323d973f9" /> |
||
|
|
c5d4f992c1 |
Workspace: Fix an overlay issue for workspace snapshot draw (#45183)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Root cause: Workspaces uses DPI-unaware coordinates (via GetDpiUnawareScreens() which runs in a temporary DPI-unaware thread) to store/match window positions across different DPI settings. However, WorkspacesEditor itself uses PerMonitorV2 DPI awareness for UI clarity. When assigning these DPI-unaware coordinates directly to WPF window properties, WPF automatically scaled them again based on current DPI, causing incorrect overlay positioning. Fix: Use SetWindowPositionDpiUnaware() to bypass WPF's automatic DPI scaling by temporarily switching to DPI-unaware context when calling Win32 SetWindowPos. Fix #45174 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #45174 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Verified in local build vs production build, and the problem fixed in local build. |
||
|
|
11b406feee |
Build: Fix release pipeline and local build failure (#45211)
## Summary of the Pull Request Release pipeline is keeping failed, and local build failed at ut. This pull request introduces changes to improve how test projects are handled during release builds, ensuring that test code is not compiled or analyzed when not needed - in doing release build, to - succeed the execution and reduce built time. And, to upgrade from VS17 to VS18 in cmdpal sdk build, this is to keep consistency with all other build step <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Local build & release pipeline build should all pass: Local build: <img width="1815" height="281" alt="image" src="https://github.com/user-attachments/assets/f350cf3f-b856-432d-97f3-e392d38ef7fa" /> Release pipeline is working too: <img width="1195" height="163" alt="image" src="https://github.com/user-attachments/assets/ce58de38-f0fb-45ad-9d70-2b8eb1c4db60" /> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
256af8f6e0 |
Spellcheck: Add missing words and sort expect.txt (#45251)
## PR Checklist This PR adds missing words to the spell checker dictionary. - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
87c65f9eec |
docs(paste): add AI preview credit documentation (#45236)
docs(paste): add AI preview credit documentation ```markdown ## Summary of the Pull Request Adds documentation clarifying that the "Show preview" setting for Paste with AI does not consume additional AI credits. The preview displays the same AI response that was already generated from a single API call, cached locally. ## PR Checklist - [x] Closes: #32950 - [x] **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 - N/A (documentation only) - [ ] **Localization:** All end-user-facing strings can be localized - N/A (dev docs only) - [x] **Dev docs:** Added/updated - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments This PR addresses the question raised in issue #32950 about whether enabling preview for Paste with AI costs extra AI quota. Changes to `doc/devdocs/modules/advancedpaste.md`: - Added new "Paste with AI Preview" section explaining: - The `ShowCustomPreview` setting behavior - Confirmation that preview does **not** consume additional AI credits - The implementation flow showing a single API call with local caching - Reference to `OptionsViewModel.cs` lines 702-717 - Added settings documentation table for `ShowCustomPreview` Fixes #32950 ## Validation Steps Performed - Verified documentation renders correctly in Markdown preview - Confirmed technical accuracy by referencing `OptionsViewModel.cs` implementation ``` --------- Co-authored-by: yeelam-gordon <yeelam-gordon@users.noreply.github.com> |
||
|
|
971c7e9fba |
docs(settings-ui): update Advanced Paste OOBE description for AI features (#45233)
## Summary of the Pull Request Updates the Advanced Paste OOBE (Out-of-Box Experience) description to accurately reflect that AI features no longer require specifically an OpenAI API key. The new text clarifies: - Changed "markdown" to "Markdown" and "json" to "JSON" for proper casing - Replaced "100% opt-in and requires an Open AI key" with "opt-in AI feature that can use an online or local language model endpoint" This fixes the outdated description that still referenced OpenAI as the only option. ## PR Checklist - [x] Closes: #44044 - [x] **Communication:** Documentation/string fix, no core contributor discussion needed - [ ] **Tests:** N/A - string-only change - [x] **Localization:** The updated string is in the localizable Resources.resw file - [ ] **Dev docs:** N/A - [ ] **New binaries:** N/A - [ ] **Documentation updated:** N/A ## Detailed Description of the Pull Request / Additional comments The change updates \src/settings-ui/Settings.UI/Strings/en-us/Resources.resw\ to fix the \Oobe_AdvancedPaste.Description\ string that incorrectly stated AI features require an OpenAI key. ## Validation Steps Performed - Verified the string change is valid XML - Confirmed the updated description accurately reflects current Advanced Paste AI capabilities |
||
|
|
055c3011cc |
Documentation walking through important steps for writing a New PowerToy (#44242)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This new document serves as a handy guide, packed with key details and helpful tips to keep in mind when creating a new PowerToy. |
||
|
|
2f7fc91956 |
Fix OOBE pages Launch buttons remain clickable when modules are disabled (#44736)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Fixes the issue where Launch/Open buttons on OOBE (Welcome to PowerToys) pages remain clickable even when the corresponding module is disabled. Added enabled state checks to the following OOBE pages: - **OobeColorPicker** - checks `ModuleType.ColorPicker` - **OobeEnvironmentVariables** - checks `ModuleType.EnvironmentVariables` - **OobeHosts** - checks `ModuleType.Hosts` - **OobeRun** - checks `ModuleType.PowerLauncher` - **OobeRegistryPreview** - checks `ModuleType.RegistryPreview` - **OobeShortcutGuide** - checks `ModuleType.ShortcutGuide` <img width="1538" height="239" alt="image" src="https://github.com/user-attachments/assets/da20628e-9c82-4619-8a5c-4b75a22b6901" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #44737 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
6d4f56cd83 |
Always on top: Add transparent support for on topped window (#44815)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Transparency support (best-effort) > Not every window can be made transparent. Transparency is applied on a best-effort basis and depends on how the target app/window is built and rendered. ## When it may not work * Windows with special rendering pipelines (e.g., certain hardware-accelerated / compositor-managed surfaces). * Some tool/popup/owned windows where the foreground window isn’t the actual surface being drawn. ## How it works (high-level) * Resolve the best target window (preferring the top-level/root window over transient children). * Apply Windows’ standard layered-window alpha mechanism (per-window opacity) to adjust transparency. * When unpinned, Restore the original opacity/state when possible. If transparency doesn’t change, it means the window doesn’t support this mechanism in its current configuration. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [X] Closes: #43278 #42929 #28773 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed https://github.com/user-attachments/assets/c97a87f2-3126-4e19-990f-8c684dbeb631 <img width="1119" height="426" alt="image" src="https://github.com/user-attachments/assets/547671ee-81d3-4c94-8199-bf0c4b1b7760" /> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
4986915dae |
CmdPal: Batch ViewModel property change notifications (#44545)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR introduces batching for property change notifications emitted by Command Palette view models. It also adds a secondary notification path that is guaranteed to execute on a background thread. - Introduces **`BatchUpdateManager`**, which batches `INotifyPropertyChanged` events from view models and replays them in a coordinated way. - Slightly reduces UI thread contention and allows related UI updates to be applied together, reducing visual "tearing" in list items (when title, subtitle and icon are updated separately with slight delay). Batching won't mitigate all occurences, but its good enough and works auto-magically. - Adds a complementary background notification event that: - Is guaranteed to run on a background thread. - Fires before UI-thread notifications. - Allows consumers to attach handlers without blocking COM out-of-proc objects. - Updates `TopLevelViewModel` to subscribe to the background property change event instead of the UI-thread one. - This avoids unintentionally shifting work onto the UI thread and re-triggering expensive operations there. - Previously, because `TopLevelViewModel` wraps another view model and our view models raise `INPC` on the UI thread by default, its handler was executing on the UI thread and re-raising the event as `IListItem.PropertyChanged`, causing `FetchProperty` methods to run on the UI thread again. - Ideally, `TopLevelViewModel` should be reworked to address this more cleanly, but that turned out to be a non-trivial change. This PR applies a targeted mitigation in the meantime. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |