Commit Graph

8502 Commits

Author SHA1 Message Date
Mike Griese
7fb2ff5119 CmdPal: init Details in a slow pass; add more winget logs (#41425)
Related to #41384

We should load the `IDetails` from a `IListItem` in the slow pass,
instead of immediately when we load the list of items.

see also #39215

Also adds a lot of logging on our side, which helped ID that it isn't
our fault that the winget APIs are returning slowly. That's tracked
upstream (somewhere)
2025-09-02 06:20:56 -05:00
Jiří Polášek
95b19739f6 CmdPal: Replace localized strings used as setting values in WebSearch extension with literals (#41331)
## Summary of the Pull Request

For WebSearch extension:

- Replaces localized string identifiers with invariant literal keys to
ensure stable and consistent setting values, avoiding issues when
switching cultures or if display strings change.
- Renames the `ShowHistory` property to `HistoryItemCount`.  
- Changes the type from `string` to `int` and centralizes parsing logic
in `SettingsManager`.
- Retains backward compatibility by preserving the legacy settings key
`"ShowHistory"` in `SettingsManager`.


<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #40547 
- [ ] **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:** none
- [x] **New binaries:** none
- [x] **Documentation updated:** none

<!-- 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
2025-09-02 06:16:54 -05:00
Jiří Polášek
c5c6a3658f CmdPal: Sync generated resource comment in with .resx value [nit] (#41476)
## Summary of the Pull Request

Only the .resx change (None → Unlimited) was previously committed,
leaving the generated strongly-typed resource class out of sync. Visual
Studio kept regenerating the designer with a comment change on every
run. This commit updates the comment in the generated file to match the
source value, eliminating the noisy diffs.

Ref: #40915

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-09-02 05:44:44 -05:00
Niels Laute
549d30892d [Hosts File Editor] Using TitleBar (#41416)
Using `TitleBar` instead of our custom XAML.

No visual changes:

<img width="779" height="301" alt="image"
src="https://github.com/user-attachments/assets/ada36442-d2f4-4859-8b6e-c5581ae34ad2"
/>


- [X] Closes: #41414
- [ ] **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
2025-09-02 07:02:43 +02:00
Niels Laute
566e35af1e [Registry Preview] Using TitleBar and AppWindow (#41418)
## Summary of the Pull Request
- Using TitleBar instead of custom XAML
- Using `AppWindow` (as part of WinUIEx)

<img width="1163" height="246" alt="image"
src="https://github.com/user-attachments/assets/65a65c3a-81b7-4afb-b046-57e081709e98"
/>


<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41414
- [ ] **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: Jay <65828559+Jay-o-Way@users.noreply.github.com>
2025-09-01 15:25:11 +02:00
Niels Laute
4ced93ce67 [Environment Variables] Using TitleBar (#41417)
Using `TitleBar` instead of our custom XAML.

No visual changes:

<img width="1254" height="216" alt="image"
src="https://github.com/user-attachments/assets/3e5bed64-3abe-421e-9345-59ad5228c134"
/>


- [X] Closes: #41414
- [ ] **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
2025-09-01 15:24:48 +02:00
Gordon Lam
05ae867ac8 Enable just build in any cmd or powershell simply (not necessary in Developer Command Prompt for VS 2022) (#41475)
This pull request refactors and modernizes the PowerToys build scripts
to provide a more robust, platform-aware, and user-friendly local build
experience. The changes introduce shared PowerShell helpers, add clear
documentation, improve Visual Studio environment detection, and unify
build logic across scripts. The new approach enables easier builds from
any folder, better error reporting, and automatic platform detection for
x64/arm64.

**Build system modernization and shared helpers:**

* Added new shared helper script `build-common.ps1` containing reusable
functions for MSBuild invocation, Visual Studio environment
initialization, project discovery, and platform auto-detection. This
script is now dot-sourced by all build scripts for consistent behavior.
* Refactored `build-essentials.ps1` and `build-installer.ps1` to use the
shared helpers, enabling automatic Visual Studio dev environment setup
and platform detection. Both scripts now work from any folder inside the
repo and provide improved logging and error handling.
[[1]](diffhunk://#diff-946ed85e16779fdbcfeb7de80f631eae2da0f7bd478e27e22621121b409dde88L1-R73)
[[2]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L55-R77)

**Improved build workflow and error reporting:**

* All build scripts now write detailed logs (full, errors, warnings,
binlog) next to the solution/project being built, with troubleshooting
guidance documented in the new guidelines.
[[1]](diffhunk://#diff-43764921d6c830dbb3a15fe875aebfbc46966ae5ff62f3179adb3ff046b47b9dR1-R284)
[[2]](diffhunk://#diff-283bc775aac55085b6a0a47e40b3cf619fff47e20a2f5537fd6dd342d19d2afdR1-R48)
* Command-line wrappers (`build.cmd`, `build-essentials.cmd`) added for
easy invocation from `cmd.exe`, forwarding all arguments to the
PowerShell scripts.
[[1]](diffhunk://#diff-4bf353f2a88f1378983e4e2f3a5555e69b6a6ccfbe004001c1ebfe99ca57903dR1-R5)
[[2]](diffhunk://#diff-48b3da077cd89d8ed6befe57a781bea813e6f9594bfcefbc320b20dea589c5abR1-R6)

**Documentation and usage guidance:**

* Introduced `BUILD-GUIDELINES.md` with clear instructions, usage
examples, and troubleshooting tips for all build scripts, including
platform overrides and log locations.

**Installer pipeline improvements:**

* The installer build pipeline (`build-installer.ps1`) now uses shared
helpers for platform detection and Visual Studio initialization, and
passes unified build arguments to all MSBuild invocations, improving
consistency and maintainability.
[[1]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L83-L126)
[[2]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L137-R113)
[[3]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L151-R128)
[[4]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L162-R142)

---

**References:**  

[[1]](diffhunk://#diff-43764921d6c830dbb3a15fe875aebfbc46966ae5ff62f3179adb3ff046b47b9dR1-R284)
[[2]](diffhunk://#diff-946ed85e16779fdbcfeb7de80f631eae2da0f7bd478e27e22621121b409dde88L1-R73)
[[3]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L55-R77)
[[4]](diffhunk://#diff-283bc775aac55085b6a0a47e40b3cf619fff47e20a2f5537fd6dd342d19d2afdR1-R48)
[[5]](diffhunk://#diff-4bf353f2a88f1378983e4e2f3a5555e69b6a6ccfbe004001c1ebfe99ca57903dR1-R5)
[[6]](diffhunk://#diff-48b3da077cd89d8ed6befe57a781bea813e6f9594bfcefbc320b20dea589c5abR1-R6)
[[7]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L83-L126)
[[8]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L137-R113)
[[9]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L151-R128)
[[10]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L162-R142)
2025-09-01 10:23:27 +08:00
Niels Laute
377d134d40 [File Locksmith] Using TitleBar (#41419)
## Summary of the Pull Request

Using TitleBar instead of our custom XAML.

No visual changes:
<img width="1205" height="288" alt="image"
src="https://github.com/user-attachments/assets/a41cf33d-7af7-4f4e-88e5-07cc1c47f09d"
/>

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [X] Closes: #41414
- [ ] **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
2025-08-29 20:47:36 +02:00
Niels Laute
be160d93f5 [Settings] String updates (#41420)
## Summary of the Pull Request
- A few strings (on the ZoomIt page) were not using sentence casing.
- Header for the modules card was not localized.

## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-08-29 20:35:36 +02:00
Michael Knauer
0c45799bb5 CmdPal: Add "Uninstall Application" command (#41302)
<!-- 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
Added the ability to uninstall UWP apps directly from the Command
Palette (similar to the current Windows Start menu). For Win32
applications, the Windows Settings uninstall page is opened.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
> Not existing
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
> I messaged this to @michaeljolley in his Twitch chat, and he said it
would be a cool feature. No further discussion has happened so far.
- [x] **Tests:** Added/updated and all pass
> No tests added, unsure which cases to cover
> A run of the existing tests for this Package passed 100%

- [x] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
> Not required
- [ ] **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
I added a new file, `Commands/UninstallApplicationCommand.cs`, which
implements the logic to uninstall applications directly from the Command
Palette. The command differentiates between UWP apps and Win32 programs.
All common error scenarios are properly handled and logged to ensure
reliability and traceability.

Additionally, in `Icons.cs`, I included the "Delete" icon from the
Windows Start menu to be displayed alongside the uninstall commands in
the Command List, providing a familiar visual cue for users.

The uninstall commands have been integrated into the appropriate classes
for both UWP and Win32 applications, making them fully accessible and
consistent across the Command Palette.
The command can be triggered using the shortcut Ctrl + Shift + Delete
for quick access.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Tested locally; currently, verification was limited to uninstalling a
UWP application, unsure of additional test scenarios.

*Note: This is my first PR draft, so apologies if I missed anything.*

---------

Co-authored-by: KnauerM <michael.knauer@rheinbahn.de>
2025-08-29 09:20:22 -05:00
Mike Griese
077af2c74b CmdPal: Bump version to 0.5 (#41442)
title
2025-08-29 08:37:12 -05:00
Gordon Lam
a0ac7efd2d Improve how to build the project in PowerToys easier (#41459)
This pull request refactors and standardizes the PowerToys build scripts
to improve maintainability, reusability, and platform detection. The
main changes are the introduction of a shared helper script
(`build-common.ps1`), migration of build logic in individual scripts to
use these helpers, and enhanced platform auto-detection. This makes the
build pipeline more robust and easier to use from any directory within
the repository.

As the result of our recent changes, use the following guidance when
working in the PowerToys repo:

1. Use `build-essentials.ps1` before any development in general
- Purpose: restore NuGet packages for the full solution and build a
small set of essential native projects (runner, settings). This is a
fast way to ensure native artifacts required for local development are
available.

2. Use `build.ps1` from any folder
- Purpose: lightweight local builder. It auto-discovers the target
platform (x64/arm64/x86) and builds projects it finds in the current
directory.
- Notes: you can pass additional MSBuild arguments positionally (e.g.
`./tools/build/build.ps1 '/p:CIBuild=true'`) — the script will forward
them to MSBuild.
   - Use `-RestoreOnly` to only restore packages for local projects.

3. Use `build-installer.ps1` to create a local installer (use with
caution)
- Purpose: runs the full pipeline that restores, builds the full
solution, signs packages, and builds the installer (MSI/bootstrapper).
- Caution: this script performs cleaning (git clean) and installer
packaging steps that may remove untracked files under `installer/`.

Additional notes
- Shared helpers live in `build-common.ps1` and are used by the other
scripts (`RunMSBuild`, `RestoreThenBuild`, `BuildProjectsInDirectory`,
platform auto-detection).

**Shared build logic and helper functions:**

* Added new `tools/build/build-common.ps1` file containing reusable
PowerShell functions for MSBuild invocation, solution/project restore
and build, platform detection, and project discovery. All build scripts
now dot-source this file for shared functionality.

**Refactoring of build scripts to use shared helpers:**

* Updated `tools/build/build-essentials.ps1` to use `build-common.ps1`
helpers, including auto-detection of repository root and platform, and
simplified project build logic.
* Created new `tools/build/build.ps1` for quick local builds, using
shared helpers and supporting extra MSBuild arguments and platform
auto-detection.
* Refactored `tools/build/build-installer.ps1` to remove duplicate build
logic, use shared helpers, and support platform auto-detection and
argument forwarding.
[[1]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L55-R74)
[[2]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L83-L126)

**Improved platform detection and argument handling:**

* All scripts now auto-detect the target platform if not specified,
using the new `Get-DefaultPlatform` helper. This supports x64, arm64,
and x86 hosts.
[[1]](diffhunk://#diff-43764921d6c830dbb3a15fe875aebfbc46966ae5ff62f3179adb3ff046b47b9dR1-R166)
[[2]](diffhunk://#diff-946ed85e16779fdbcfeb7de80f631eae2da0f7bd478e27e22621121b409dde88L1-R70)
[[3]](diffhunk://#diff-7a444242b2a6d9c642341bd2ef45f51ba5698ad7827e5136e85eb483863967a7R1-R88)
[[4]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L55-R74)

**Consistent MSBuild invocation and logging:**

* MSBuild calls now consistently use shared helpers, centralized
logging, and support passing extra arguments such as `/p:CIBuild=true`
and custom solution/project paths.
[[1]](diffhunk://#diff-43764921d6c830dbb3a15fe875aebfbc46966ae5ff62f3179adb3ff046b47b9dR1-R166)
[[2]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L137-R110)
[[3]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L151-R125)
[[4]](diffhunk://#diff-21888769485d767c43c0895fe315e6f6d7384da62f60ef917d8a61a610da10b9L162-R139)

**Project and solution build improvements:**

* Build scripts now discover and build projects in preferred order
(.sln, .csproj, .vcxproj), and support restoring packages only if
requested.
[[1]](diffhunk://#diff-43764921d6c830dbb3a15fe875aebfbc46966ae5ff62f3179adb3ff046b47b9dR1-R166)
[[2]](diffhunk://#diff-7a444242b2a6d9c642341bd2ef45f51ba5698ad7827e5136e85eb483863967a7R1-R88)

Let me know if you need a walkthrough of the new helper functions or how
to use the updated build scripts!
2025-08-29 16:23:52 +08:00
leileizhang
3882db4479 [UI tests] Add accessibility IDs to settings navigation items and fix part of FancyZones issues (#41458)
<!-- 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 adds automation-friendly identifiers to navigation and
toggle UI elements throughout the PowerToys Settings. The main goal is
to improve UI test reliability and maintainability by using stable
`AutomationId` and `x:Name` attributes instead of relying on visible
text. It also updates the UI tests to use these new identifiers.

These changes make the UI automation more robust against localization
and UI text changes, improving test reliability and maintainability.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-08-29 15:08:44 +08:00
Copilot
eb35b3a249 Fix grammatical error in Awake taskbar context menu: "1 hours" → "1 hour" (#41454)
This PR fixes a grammatical mistake in the PowerToys Awake taskbar
context menu where "1 hours" was displayed instead of the correct "1
hour".

## Problem
When right-clicking the Awake icon in the taskbar and hovering over
"Keep awake on interval", the menu incorrectly showed "1 hours" for the
one-hour option, which is grammatically incorrect in English.

![Before fix showing "1
hours"](https://github.com/user-attachments/assets/bd78b3b1-d076-4c84-8de0-bcd6d1ebefd8)

## Root Cause
The code always used the `AWAKE_HOURS` resource string (`"{0} hours"`)
regardless of the value, even when the count was 1. This resulted in
grammatically incorrect text like "1 hours".

## Solution
Added proper singular/plural handling by:

1. **Added new singular resources:**
   - `AWAKE_HOUR`: `"{0} hour"` for singular form
   - `AWAKE_MINUTE`: `"{0} minute"` for completeness and future-proofing

2. **Updated the logic in `Manager.cs`:**
- Modified `GetDefaultTrayOptions()` to use `AwakeHour` (singular) when
the value is 1
- Preserved existing behavior for all other values (30 minutes, 2 hours,
etc.)

3. **Generated corresponding code in `Resources.Designer.cs`** to expose
the new resource properties

## Impact
-  "1 hours" → "1 hour" (grammatically correct)
-  "2 hours" remains unchanged (still correct)
-  "30 minutes" behavior preserved
-  No breaking changes to existing functionality
-  Future-proofed for potential 1-minute custom intervals

The fix follows established patterns in the PowerToys codebase (similar
to `TimeRemainingConverter.cs` in ImageResizer) and makes minimal,
surgical changes to address only the reported issue.

Fixes #41220.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `i1qvsblobprodcus353.vsblob.vsassets.io`
> - Triggering command: `dotnet build
src/modules/awake/Awake/Awake.csproj` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/microsoft/PowerToys/settings/copilot/coding_agent)
(admins only)
>
> </details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
2025-08-29 13:36:46 +08:00
Jiří Polášek
5daec13bc4 CmdPal | Bug Report Tool: Allow collection of Command Palette events from Windows Event Logs by Bug Report Tool (#41400)
## Summary of the Pull Request

Adds `Microsoft.CmdPal.UI.exe` to the list of processes, so Bug Report
Tool can pick Applications Logs for it when generating its report.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41399
- [ ] **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
2025-08-28 12:48:30 -05:00
Kai Tao
ef6f4b2c3d Settings: Search fancy zone settings and swallow the ctrl+f event (#41437)
<!-- 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 primarily improves the maintainability and robustness
of the FancyZones settings UI by assigning unique `Name` attributes to
`SettingsCard` controls in the `FancyZonesPage.xaml` file. Additionally,
it enhances the logic for retrieving element UIDs and improves fallback
behavior for missing localizations. There is also a minor usability fix
in the shell page to prevent unintended navigation when focusing the
search box.

**FancyZones settings UI improvements:**

* Added unique `Name` attributes to all `tkcontrols:SettingsCard`
elements in `FancyZonesPage.xaml` to facilitate easier referencing and
future maintainability. This affects all relevant settings groups and
controls in the file.
[[1]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL73-R85)
[[2]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL109-R109)
[[3]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL121-R121)
[[4]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL167-R188)
[[5]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL202-R202)
[[6]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL251-R251)
[[7]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL265-R265)
[[8]](diffhunk://#diff-93623d4db1d295dde0ef793053c9db0d9f673d753b787ad12fd71b8e9e40a79fL280-R280)

**Element UID retrieval and localization:**

* Improved `GetElementUid` in `Program.cs` to fall back to the first
child's `x:Uid` if the element itself lacks one, increasing robustness
when parsing XAML.
* Updated `GetLocalizedSettingHeaderAndD` in `SearchIndexService.cs` to
provide a fallback for missing localizations by trying the
`"{elementUid}/Content"` resource key.

**Shell page usability:**

* Modified `CtrlF_Invoked` in `ShellPage.xaml.cs` to mark the event as
handled, preventing unintended navigation when the search box is focused
with Ctrl+F.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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


https://github.com/user-attachments/assets/9cf15605-1114-4c6d-923c-d05c2733a274
2025-08-28 11:18:58 +08:00
Michael Jolley
336cdaff9b CmdPal: Added settings for limiting apps on top level searches (#40915)
Closes #40062

Adds a setting to limit the number of apps returned on top level
searches.

Can limit to none, 1, 5, 10, or 20.


https://github.com/user-attachments/assets/de60111f-fb02-4db6-9ae9-2f636c171b5b
2025-08-27 10:52:39 -05:00
leileizhang
447118ab70 fix: Context menu registry entries are not cleaned up when disabled via GPO (#41411)
<!-- 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 fixes an issue where context menu runtime registration wasn't
properly cleaned up when GPO (Group Policy Object) policies disabled the
module. The problem occurred because the module constructor didn't
consider GPO policies when determining its initial enabled state.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41387 
- [ ] **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

This pull request refactors how context menu registration and
unregistration are handled across several PowerToys modules. The main
improvement is the introduction of a new `UpdateRegistration` helper
method in each module, which centralizes and simplifies the logic for
registering or unregistering context menus when the module is enabled or
disabled. This reduces code duplication and ensures consistent behavior.

**Context menu registration logic refactor:**

* Added a private `UpdateRegistration` method to each of the following
modules to handle context menu registration and unregistration based on
the enabled state:
  - `FileLocksmithModule` in `PowerToysModule.cpp`
  - `NewModule` in `powertoys_module.cpp`
  - `ImageResizerModule` in `dllmain.cpp`
  - `PowerRenameModule` in `dllmain.cpp`

* Replaced direct calls to registration/unregistration functions in
`enable`, `disable`, and `init_settings` methods with calls to the new
`UpdateRegistration` method in all affected modules, ensuring consistent
and centralized handling
[[1]](diffhunk://#diff-256ed936dafec1bf6ff17849b4797dd276f5b07bebe2e483bc1580c8f06e92d9L91-R122)
[[2]](diffhunk://#diff-256ed936dafec1bf6ff17849b4797dd276f5b07bebe2e483bc1580c8f06e92d9R155)
[[3]](diffhunk://#diff-4a3942d548f3daec02a833983ed9b2b69f75e2cd1b74a8ce1b874f3fd33fde55L101-R125)
[[4]](diffhunk://#diff-4a3942d548f3daec02a833983ed9b2b69f75e2cd1b74a8ce1b874f3fd33fde55L153-R177)
[[5]](diffhunk://#diff-0c0a89e812ff4625d165417da14f1c3f203e5ac7907555ae4fde122f3dddcf7aL115-L130)
[[6]](diffhunk://#diff-34581ec47c37b0d2e1d9b59696225c47342930694e732db06cbdf653ceb2c2d7L205-R234)
[[7]](diffhunk://#diff-34581ec47c37b0d2e1d9b59696225c47342930694e732db06cbdf653ceb2c2d7R334).

These changes improve maintainability and reduce the risk of
inconsistent registration behavior across modules.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 19:16:55 +08:00
Kai Tao
7455d63bb5 Settings: Settings search fixes (#41381)
<!-- 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
Fix 3 issues

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41369, #41374, #41380
- [ ] **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/0e0df9fb-5aca-4b26-9d53-e6ddc49cab04

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jiří Polášek <me@jiripolasek.com>
2025-08-27 14:51:36 +08:00
Niels Laute
bb6b36af3f Search UX improvements (#41386)
### Fixing visual glitch in the 'Show all results' template:

Before
<img width="588" height="103" alt="image"
src="https://github.com/user-attachments/assets/00da60ea-d0ab-4ffe-8f69-75be7e537d63"
/>

After
<img width="598" height="70" alt="image"
src="https://github.com/user-attachments/assets/dc859731-8783-494a-b561-ea6396ca69b3"
/>


### Displaying "Show results for * search term *" on search results page
Before
<img width="716" height="239" alt="image"
src="https://github.com/user-attachments/assets/a80e6e58-df88-47b2-85ab-c39cbdc88690"
/>

After
<img width="349" height="264" alt="image"
src="https://github.com/user-attachments/assets/99029ee6-94f7-4454-a443-640c22f9e6f3"
/>


### Using Accent Color for the search highlight for better visibility
and fixing a bug
Before

![highlight-bug](https://github.com/user-attachments/assets/2d4c0f5b-4030-4c10-a4ec-c7c5023034f0)


After


![fix-accent](https://github.com/user-attachments/assets/62a223a9-9360-4297-9127-5aaef82c162f)

---------

Co-authored-by: vanzue <vanzue@outlook.com>
2025-08-27 13:42:30 +08:00
Jiří Polášek
3ebf0f741a Settings UI: Fix spelling error and make spell checker happy (#41403)
## Summary of the Pull Request

- Renames `NavigatablePage` to `NavigablePage` to fix a spelling error.
- Reverts related entries in `exclude.txt` that triggered a forbidden
pattern error in the spell checker.
- The spell checker does not allow PascalCase words like
`NavigatablePage` in `exclude.txt` because of its automatic casing
rules.

 
Regression: #41285

---------

Co-authored-by: vanzue <vanzue@outlook.com>
2025-08-27 11:29:14 +08:00
Shawn Yuan
e8e1431e15 Fix localization issue for shortcut conflict window (#41378)
<!-- 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
Added localization for conflict message shown in shortcut conflict
window and shortcut dialog.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41373 
- [ ] **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

Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
2025-08-27 09:55:43 +08:00
Niels Laute
2d35fd8530 [Fix] Adding Toolkit's TitleBar manually (#41383)
Temp fix for a VS bug when building the `PowerToys.Settings` project. 

There seems to be something wrong with the Labs TitleBar package, so
following up with the team to get it resolved. Meanwhile, I've moved the
Toolkit's source code for TitleBar to Settings as a custom control.

Once the package is fixed we can revert this change.
2025-08-27 09:27:11 +08:00
Michael Jolley
13d950a40a Adding sort to DateTime extension results (#41389)
Closes #41385

Adds a sort to the DateTime extension results.

<img width="1001" height="602" alt="image"
src="https://github.com/user-attachments/assets/ccccae6a-c4a4-460f-a6d3-3325ecfc53da"
/>

<img width="992" height="606" alt="image"
src="https://github.com/user-attachments/assets/b8af51bd-cbd0-4341-ac46-0fb3e97ec2ac"
/>
2025-08-26 15:34:06 -05:00
Jiří Polášek
3eb8f96f3e CmdPal: Fix resource key name NavigationPaneClosed to match literal in code and prevent crash (#41361)
## Summary of the Pull Request

Corrects a mismatch between the resource key and the actual literal used
in code. The key was incorrectly named `NavigationPageOpened`; it now
correctly uses `NavigationPaneClosed`. Introduced in #41016.


## PR Checklist

- [x] Closes: #41362
- [ ] **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
2025-08-26 14:30:13 -05:00
Mike Griese
11218ea4d8 CmdPal: Make debugging extension load errors easier (#41251)
Turns out we didn't log all the HRESULTs for failing to load an
extension. This adds more logging.

It also adds a context command on the log command to make it easier to
get to the log files
2025-08-26 10:54:58 -05:00
PesBandi
8258f2ab6f [CmdPal] Eliminate CopyTextCommand duplicates (#41347)
## Summary of the Pull Request
Removes redundant CopyCommands and replaces their usage with
`CopyTextCommand` from the toolkit. This is actually recommend by the
[docs](https://learn.microsoft.com/en-us/windows/powertoys/command-palette/command-results#showtoast-command-result),
we should probably lead by example 😄
> Consider the CopyTextCommand in the helpers - this command will show a
toast with the text "Copied to clipboard", then dismiss the palette.

Only functionality change is that they now display *Copied to
clipboard!* after copying.
## PR Checklist

- [x] Closes: #41346
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** All pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** No need
- [x] **New binaries:** None
- [x] **Documentation updated:** No need
## Detailed Description of the Pull Request / Additional comments
Custom command names (e.g. *Copy path* instead of *Copy*) are preserved.
Strings put out of use have been deleted.
CopyCommands from the Registry and Clipboard plugins are left untouched,
as they contain special logic.
The error handling in `CopyPathCommand` from Apps was unnecessary, since
it's already taken care of by `ClipboardHelper`.
## Validation Steps Performed
Manual testing
2025-08-25 14:48:48 -05:00
Kai Tao
4ad951eb56 Setting search (#41285)
<!-- 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: #xxx
- [ ] **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
Localized search:
<img width="1576" height="480" alt="image"
src="https://github.com/user-attachments/assets/dd6e5e9f-419b-40b1-b796-f0799481ecfc"
/>


## AI summary
This pull request introduces infrastructure and code to support search
functionality for PowerToys settings, including a new search index
specification, a dedicated search library, and updates to the solution
configuration. The main changes are the addition of a spec describing
how settings should be indexed and navigated, the creation of a new
`Common.Search` project with a fuzz search implementation, and updates
to the solution file to include these new components.

**Settings Search Feature Implementation**

* Documentation:
* Added a detailed specification (`settings-search.md`) describing the
structure of PowerToys settings pages, how to index settings, navigation
logic, runtime search, result grouping, build-time indexing strategy,
and corner cases.

* New Search Library:
* Added the new `Common.Search` project to the solution, including its
project file and implementation of a fuzz search service
(`FuzzSearchService<T>`), match options, match results, and search
precision scoring.
[[1]](diffhunk://#diff-ddc06fa41e4e723e54181b0cb85cdd00f57f75725d51ceefa242d4d651a9a363R1-R8)
[[2]](diffhunk://#diff-1a2ca29fc33bcccf338a7843a040ca2c31ba821e8cab7064fab0dbb1224d454cR1-R39)
[[3]](diffhunk://#diff-242764d948b795f39653a84d9b6bfcdc52730100deab2e3a0995be95bb8e7868R1-R10)
[[4]](diffhunk://#diff-61e525491ed916ebd65dabb66dd4f5dc720320d7e295ef1e0bd6d506ea0f7df6R1-R67)
[[5]](diffhunk://#diff-a775f6de2e8d42982829b4161668f49dedbbd9dcbb05ce20003de7e62275c57aR1-R12)

* Solution Configuration:
* Updated `PowerToys.sln` to include `Common.Search` and
`Settings.UI.XamlIndexBuilder` projects, and configured their build
settings for various platforms and mapped project dependencies.
[[1]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R714-R716)
[[2]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R2704-R2727)
[[3]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R2889)
[[4]](diffhunk://#diff-ca837ce490070b91656ffffe31cbad8865ba9174e0f020231f77baf35ff3f811R3157-R3158)

**Spell-check Dictionary Updates**

* Added new terms related to navigation and settings UI components (such
as `Navigatable`, `NavigatablePage`, `settingscard`, `Tru`, `tweakable`)
to the spell-check dictionary to support the new search and indexing
features.
[[1]](diffhunk://#diff-5dcab162c1b233a49973ae010f2b88c7ec4844382abd705e6154685e62bd5c4dR1020-R1021)
[[2]](diffhunk://#diff-5dcab162c1b233a49973ae010f2b88c7ec4844382abd705e6154685e62bd5c4dR1498)
[[3]](diffhunk://#diff-5dcab162c1b233a49973ae010f2b88c7ec4844382abd705e6154685e62bd5c4dR1755-R1761)

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
Co-authored-by: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
2025-08-25 21:23:07 +08:00
Peiyao Zhao
64dc8e0f27 [Installer] Upgrade the installer from WiX3 to WiX5 (#40877)
<!-- 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
Background: The current PowerToys installer is built using Wix3, which
has now been deprecated. To improve security, service quality, and
community support, we’re upgrading the installer to Wix5.

Implementation:
Created Wix5-based projects(PowerToysSetupVext and
PowerToysSetupCustomActionsVNext) within the installer while retaining
the existing Wix3 project. Both versions are built to generate separate
installation packages. The Wix3-related code will be removed after
successful release testing confirms no issues.

Special case:
Wix5 has removed the property for 'ShowFilesInUse'. Now, whenever a file
is in use during installation, a FilesInUse pop-upwill automatically
appear asking for the next step. To ensure this doesn't interfere with
scenarios that require silent installation (e.g. Winget method), we’ve
handled it using the bafunction approach.



<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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: Jerry Xu <n.xu@outlook.com>
Co-authored-by: Kai Tao <69313318+vanzue@users.noreply.github.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com>
Co-authored-by: vanzue <vanzue@outlook.com>
2025-08-25 18:39:11 +08:00
leileizhang
102865543d Add Windows 10 context menu entry back on Windows 11 (#41351)
## Summary of the Pull Request
Ensure Windows 11 adds the registry entries for the old context menu so
that "Show more options"/classic menu always includes them.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-08-25 18:30:29 +08:00
Mike Griese
ef4e619350 CmdPal: Fix winget in release builds (#41183)
Seems as though that doing `.ToArray` on the `IIterable<>` things we get
back from the winget API were not trim-safe. I'm not entirely sure why.

But we're totally okay just manually iterating over these things. That
works like a charm.

Closes #41172

As a drive-by, I wrapped the line from #41025 in a try-catch. If that
doesn't fix it, hopefully it at least gives us more logging.
2025-08-25 14:56:15 +08:00
Mike Griese
7f3349b3f5 CmdPal: fix missing builtin icons (#41298)
It would seem that the way we absorb the icons for built-in extension
into our package relies on the _extension_ package including WASDK. I
don't fully understand why.

This PR adds a common `.props` file we can use for all extensions, to
make sure they include it.

regressed in #41261
Closes #41279
2025-08-25 09:50:32 +08:00
leileizhang
9c285856bf [UI tests] Add accessibility IDs to FancyZones to fix part UI tests (#41316)
<!-- 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
Not sure why some text changed — for example, this button was ‘Launch
layout editor’, but in the UI it now shows as ‘Open layout editor’, so
it can’t be found :
<img width="1159" height="87" alt="image"
src="https://github.com/user-attachments/assets/d407a8fc-2876-4a85-9637-14d5923493d2"
/>

But using accessibility IDs is always more reliable.



<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-08-23 11:20:18 +08:00
Tibère B.
d90575b8da feat(MouseWithoutBorders): Prevent Easy Mouse from moving to another machine when an application is running in fullscreen mode. (#39854)
<!-- 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 new feature to Easy Mouse, it is now possible to toggle a
setting that will prevent Easy Mouse to switch away from the host
machine when the foreground application is running in full screen mode,
requiring the user to first alt tab out of the application before
performing the switch, this also comes with a way to allow the switch on
specific apps.


![image](https://github.com/user-attachments/assets/e45bbfa7-89c9-4051-8f1a-f2ac2648a6ca)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:** #32197
- [x] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [x] **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)
- [x] **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: MicrosoftDocs/windows-dev-docs#5470

<!-- 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 PR changes the way Easy Mouse checks wherever it should move to
another machine, after checking that the corresponding setting is
enabled and that we are trying to move away from the host machine, it
will run a test using native WinAPI methods to get the foreground window
and check if it is running in full screen.

If it is, it will then check the name of the executable against a list
of ignored app configured by the user, if the executable is found in
that list, the switch will be allowed despite the application running in
full screen.

These new settings were moved along with the original Easy Mouse toggle
to a new "Easy Mouse" setting group to avoid cluttering the Keyboard
shortcuts group.

This feature will only work when used from the controller machine, as I
didn't find a way to easily check for running application on a remote
machine that didn't involved touching the sockets, I felt like such a
change would be out of scope for this issue.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

I had a hard time writing tests and didn't achieve anything meaningful
enough to be included, I may require some guidance on how to properly
write tests for this project.

I tested my changes by running my modified version of
MouseWithoutBorders on my machines, which I did for a few days now, It
allowed me to catch a few bugs, but it has been running smoothly
otherwise.

My changes didn't seemed to have caused any automated tests to fail.

It may require some additional testing for setups including more than
two machines.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2025-08-22 20:42:36 +08:00
Jessica Dene Earley-Cha
da36d410e3 move Automation Notification functionality to UIHelper, implement UIHelper in ListPage and SettingsWindow (#41016)
## Summary of the Pull Request
Fixed #41014 and it overlapped with #40761, so I made a UIHelper
patterning off of WinUI Gallery's
[UIHelpder](0576fb508a/WinUIGallery/Helpers/UIHelper.cs (L63))

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41014
- [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
- [ ] **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/011ee8c1-baaf-47fc-b8f8-ee489b01702b
2025-08-22 14:23:14 +08:00
Davide Giacometti
a50d548a07 [QuickAccent] Persist characters usage between runs (#37577)
<!-- 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

Persist characters usage between PowerToys/QuickAccent runs.

- [x] **Closes:** #26034
- [ ] **Communication:** I've discussed this with core contributors
already. If 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

- Persist the dictionaries used to determine the characters usage in a
JSON file
`%LOCALAPPDATA%\Microsoft\PowerToys\QuickAccent\UsageInfo.json`

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

Manually tested:

- JSON is saved when PowerToys is closed and the **Sort characters by
usage frequency** is on
- JSON is deleted when QuickAccent is called and **Sort characters by
usage frequency** is off
- JSON is read when QuickAccent is started and characters order is
applied from the previous run

---------

Co-authored-by: Gleb Khmyznikov <gleb.khmyznikov@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 14:22:15 +08:00
Dave Rayment
8c4a3a6944 [QuickAccent] Update Topmost logic to attempt to fix hybrid graphics issues (#41044)
An attempt to fix a Quick Accent issue affecting laptops with 'Optimus'
hybrid graphics modes, where the utility locks the machine into discrete
graphics mode permanently.

<!-- 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 changes the Topmost behaviour for Quick Accent from always true
to only being true when the selection window is displayed.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #34849 (NB: requires testing on laptop with hybrid
graphics)
- [ ] **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

Topmost was set to `true` for the main application window on start,
which persisted for the lifetime of the application. This PR change
removes that, and instead dynamically toggles Topmost for the selection
window as it is activated/deactivated. The assumption is that the
FluentWindow-derived window is retaining graphics resources and
presenting as an active GPU consumer because of the main application
window's Topmost status, even if the selection window is hidden.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

I've confirmed with manual tests that the existing QuickAccent
functionality appears to function identically with this change. However,
I do not own a laptop with a hybrid graphics capability, so am unable to
test whether this fixes the underlying problem. I will keep my fingers
crossed though 🤞😊

---------

Co-authored-by: Gleb Khmyznikov <gleb.khmyznikov@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 14:18:16 +08:00
Copilot
efc68bc0c9 Fix Spanish localization for Awake module name and all product name instances (#41252)
The Awake module name was being incorrectly translated to "Activo" in
Spanish localization, while it should remain as "Awake" (similar to how
"Text Extractor" remains untranslated).

**Issue:**
In the Spanish version of PowerToys Settings, the Awake module was
appearing as "Activo" instead of "Awake". This is inconsistent with
other module names like "Text Extractor" that remain in English.

**Root Cause:**
The localization system was translating strings that had generic
comments like "Product name: Navigation view item name for Awake".
Strings without comments or with specific "do not localize" comments are
preserved in their original language.

**Solution:**
Updated the resource file comments for all Awake-related strings to
include explicit localization prevention instructions:

1. Changed `Shell_Awake.Content` comment from "Product name: Navigation
view item name for Awake" to "Awake is a product name, do not localize"
2. Added "Awake is a product name, do not localize" comment to
`Awake.ModuleTitle` which previously had no comment
3. Added "Awake is a product name, do not localize" comment to OOBE (Out
of Box Experience) strings:
   - `Oobe_Awake.Description`
   - `Oobe_Awake_HowToUse.Text`
   - `Oobe_Awake_TipsAndTricks.Text`
4. Added "Awake is a product name, do not localize" comment to
`Awake_ModeSettingsCard.Description`

These changes follow the same pattern used by other PowerToys modules
(PowerRename, PowerToys Run, Shortcut Guide, etc.) to prevent
translation of product names across all user-facing contexts including
settings, navigation, and onboarding flows.

**Files Changed:**
- `src/settings-ui/Settings.UI/Strings/en-us/Resources.resw`

Fixes #41199.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2025-08-22 13:57:22 +08:00
Davide Giacometti
bf74bc43d4 [Always On Top] Wait cursor fix (#41091)
<!-- 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

This PR resolves an issue where the wait cursor was incorrectly
displayed when the mouse hovered over the Always On Top window border.

_0.92.1_

![before](https://github.com/user-attachments/assets/40640734-7b49-4e50-9415-f005c8689ea9)

_PR_

![after](https://github.com/user-attachments/assets/95c8bf51-7ded-44ae-934a-53c4adf8d9e6)

- [x] Closes: #17923
- [ ] **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
2025-08-22 13:55:18 +08:00
Reza
ca4d811fa1 Add shproj and projitems extensions to monaco_languages.json (#39246)
Both ".shproj" and ".projitems" are extensions using by Microsoft Visual
Studio for Shared Projects. The files are standard XML.

## Summary of the Pull Request

## PR Checklist

- [X] **Closes:** #39247
- [ ] **Communication:** I've discussed this with core contributors
already. If 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

This PR simply adds two new extensions to XML for Monaco preview. Both
extensions are known by Visual Studio.

## Validation Steps Performed

No automated test. Monaco has a configuration file that works like a
dictionary to define supported languages and their extensions. I added
the two extensions to this file for XML language.

---------

Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2025-08-22 13:02:26 +08:00
aaron-ni
e10b7bd83a Change PowerRename accelerator key from "W" to "E" (#39291)
## Summary of the Pull Request
In the Windows Explorer context menu, using "w" as the accelerator key
in Po"w"erRename conflicts with the Ne"w" command. This slows down
people who have to do things like create new folders frequently
(especially because muscle memory leads to PowerRename launching and
then having to be closed before going and creating the new folder with a
bunch of mouse clicks).

Changing the accelerator key to "e" - Pow"e"rRename - only conflicts
with "Refresh", which is less commonly used.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] **Closes:** #25873

---------

Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2025-08-22 13:02:00 +08:00
rovercoder
12537de422 [Quick Accent] Add Maltese language (#39473)
# **PR inspired by: #32862**

<!-- 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
Adds [Maltese latin alphabet
symbols](https://en.wikipedia.org/wiki/Maltese_language#Alphabet) (ċ, ġ,
ħ, ż), [grave accented
vowels](https://en.wikipedia.org/wiki/Grave_accent#Stress) (à, è, ì, ò,
ù) and the Euro (€) sign [Malta's currency] as a supported language into
Quick Accent.

![2025-05-15 22_04_53-PowerToys Settings-Quick
Accent-Maltese](https://github.com/user-attachments/assets/fb010b5e-abe3-4cf2-8191-f7ecf551d429)


![Quick-Accent-Maltese-Preview](https://github.com/user-attachments/assets/688588a2-34d5-4f3b-bd76-752d952ee7d8)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:** #39472
- [x] **Communication:** I've
[proposed](https://github.com/microsoft/PowerToys/issues/28769#issuecomment-2884852675)
to add this feature in the thread
- [x] **Tests:** No need
- [x] **Localization:** All end user facing strings can be localized
- [x] **Dev docs:** No need
- [x] **New binaries:** None
- [x] **Documentation updated:** No need

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Observing
2025-08-22 09:31:42 +08:00
Mike Griese
76f5fabaa3 CmdPal: Add the pdb's for .Extensions too (#41306)
* The _toolkit_ is AnyCPU.
* the extensions interface itself `Microsoft.CommandPalette.Extensions`
is c++, so it needs both ARM and x64

Technically I'm not sure there's anything of real value in just
`.Extensions`, since that project is just there to build the winmd (we
don't have any runtimeclasses), so not having the symbols for that
shouldn't be the end of the world
2025-08-21 19:32:18 -05:00
Nathan Gill
ea5f347a1a [Advanced Paste] Rephrase module description in settings (#37563)
<!-- 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
Rephrased the module description for Advanced Paste in settings to
simplify, and fix styling issues.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If 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
Rephrased the Advanced Paste module description shown in settings to
simplify, and fix styling issues.

**Existing**:

![image](https://github.com/user-attachments/assets/dabf6e78-fd22-45d3-8e12-d894c63feaef)

**Updated**:

![image](https://github.com/user-attachments/assets/c9ff0a11-0998-4604-8ed7-30ca3f95cd77)

This fixes issues including incorrect capitalisation on "markdown" and
"json", and also shortens the description to make it quicker to read, by
removing unnecessary detail.
2025-08-21 16:54:47 -05:00
Mike Griese
e842621036 CmdPal: Make it easier to add APIs in the future (#41056)
We learned a lot about adding interfaces in WinRT this week. I figured
I'd send a PR to write it all down.
2025-08-21 16:53:00 -05:00
Michael Jolley
56aa9acfb4 CmdPal: Ensuring alias changes are propagated to related TopLevelViewModels (#40970)
Closes #39709

- Only updating aliases when the alias has changed
- When an alias is used that is already in use, remove the alias from
the previous TopLevelViewModel
- Don't crash if the previous TopLevelViewModel doesn't exist (e.g. it
was uninstalled)
2025-08-21 06:09:00 -05:00
leileizhang
da572c6c40 [UI tests] Add accessibility IDs to Command Palette UI components for improved UI testing (#41295)
<!-- 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
Finding elements by name is often unstable; adding an accessibility ID
is more reliable for UI tests.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **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
2025-08-21 18:53:30 +08:00
Michael Jolley
69dc1d5e18 CmdPal: Filters for DynamicListPage? Yes, please. (#40783)
Closes: #40382

## To-do list

- [x] Add support for "single-select" filters to DynamicListPage
- [x] Filters can contain icons
- [x] Filter list can contain separators
- [x] Update Windows Services built-in extension to support filtering by
all, started, stopped, and pending services
- [x] Update SampleExtension dynamic list sample to filter.

## Example of filters in use

```C#
internal sealed partial class ServicesListPage : DynamicListPage
{
    public ServicesListPage()
    {
        Icon = Icons.ServicesIcon;
        Name = "Windows Services";

        var filters = new ServiceFilters();
        filters.PropChanged += Filters_PropChanged;
        Filters = filters;
    }

    private void Filters_PropChanged(object sender, IPropChangedEventArgs args) => RaiseItemsChanged();

    public override void UpdateSearchText(string oldSearch, string newSearch) => RaiseItemsChanged();

    public override IListItem[] GetItems()
    {
       // ServiceHelper.Search knows how to filter based on the CurrentFilterIds provided
        var items = ServiceHelper.Search(SearchText, Filters.CurrentFilterIds).ToArray();

        return items;
    }
}

public partial class ServiceFilters : Filters
{
    public ServiceFilters()
    {
        // This would be a default selection. Not providing this will cause the filter
        // control to display the "Filter" placeholder text.
        CurrentFilterIds = ["all"];
    }

    public override IFilterItem[] GetFilters()
    {
        return [
            new Filter() { Id = "all", Name = "All Services" },
            new Separator(),
            new Filter() { Id = "running", Name = "Running", Icon = Icons.GreenCircleIcon },
            new Filter() { Id = "stopped", Name = "Stopped", Icon = Icons.RedCircleIcon },
            new Filter() { Id = "paused", Name = "Paused", Icon = Icons.PauseIcon },
        ];
    }
}
```

## Current example of behavior


https://github.com/user-attachments/assets/2e325763-ad3a-4445-bbe2-a840df08d0b3

---------

Co-authored-by: Mike Griese <migrie@microsoft.com>
2025-08-21 05:40:09 -05:00
Yu Leng
1a798e03cd [CmdPal][UnitTests] Add/Migrate unit test for WebSearch and Shell extension (#41272)
<!-- 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: #41241 #41242
- [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: Yu Leng <yuleng@microsoft.com>
2025-08-21 05:24:20 -05:00
leileizhang
8cb2e4eaf7 refactor: Replace WiX-based registration with conditional runtime registration for Win10 context menu modules (#41275)
<!-- 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
WiX-based registration creates persistent Shell Extension entries that:
1. Load DLLs even when the module is disabled
2. Cause cross-OS version conflicts (Win11 loading Win10 extensions)

## Changes Made
1. Removed static Shell Extension registration from PowerToys installer
2. Modified modules to register Shell Extensions during Runner startup

### Modified Modules:
- **PowerRename** (`src/modules/powerrename/dll/dllmain.cpp`)
- **NewPlus**
(`src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp`)
- **ImageResizer** (`src/modules/imageresizer/dll/dllmain.cpp`)
- **FileLocksmith**
(`src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp`)

## Known Migration Issue
**Machine-level installer registry residue**: win10 with machine-level
installers may have residual Shell Extension registry entries that
persist with this change.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #40036
- [ ] **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

## AI Summary
This pull request refactors how shell extension registry keys are
managed during installation and uninstallation for several PowerToys
modules. The main change is moving registry key cleanup logic for
context menu shell extensions (ImageResizer, FileLocksmith, PowerRename,
NewPlus) from static installer definitions to new custom uninstall
actions, ensuring more reliable removal and future extensibility.

**Installer and Uninstall Refactoring**

* Added new custom actions (`CleanImageResizerRuntimeRegistryCA`,
`CleanFileLocksmithRuntimeRegistryCA`,
`CleanPowerRenameRuntimeRegistryCA`, `CleanNewPlusRuntimeRegistryCA`) to
programmatically clean up registry keys for each shell extension during
uninstall, implemented in `CustomAction.cpp` and exported in
`CustomAction.def`.
[[1]](diffhunk://#diff-c502a81cdf8afa7a38f0f462709abcdbdfcc44beaa6227a1e64a26566c7e8876R1156-R1262)
[[2]](diffhunk://#diff-f941d599be5fe41667eda00338af694c0f2e65709d497a66487402f13e408200R31-R34)
* Registered these custom actions in `Product.wxs` and ensured they run
before file removal during uninstall.
[[1]](diffhunk://#diff-668b4388b55bb934d7ceccbfdd172f69257c9c607ca19cb9752d4a4940b69886R179-R190)
[[2]](diffhunk://#diff-668b4388b55bb934d7ceccbfdd172f69257c9c607ca19cb9752d4a4940b69886R454-R482)

**Removal of Static Registry Key Definitions**

* Removed static registry key and component definitions for context menu
shell extensions from their respective installer `.wxs` files
(`FileLocksmith.wxs`, `ImageResizer.wxs`, `PowerRename.wxs`,
`NewPlus.wxs`), relying on custom actions for cleanup instead.
[[1]](diffhunk://#diff-7cf9797f8cb6609049763b3b830f6c4a7a02ba5705eb090f7e06fb9c270ca74fL17-L31)
[[2]](diffhunk://#diff-7cf9797f8cb6609049763b3b830f6c4a7a02ba5705eb090f7e06fb9c270ca74fL41)
[[3]](diffhunk://#diff-c6d00805ce9de0eb3f4d42874dccac17be62f36c35d57e8f863b928b5f955d3aL19-L83)
[[4]](diffhunk://#diff-c6d00805ce9de0eb3f4d42874dccac17be62f36c35d57e8f863b928b5f955d3aL93)
[[5]](diffhunk://#diff-d0d69eff3f2d7982679465972b7d3c46dd8006314fb28f0e3a2371e2d5ccedb0L21-L33)
[[6]](diffhunk://#diff-d0d69eff3f2d7982679465972b7d3c46dd8006314fb28f0e3a2371e2d5ccedb0L43)
[[7]](diffhunk://#diff-4fd109f66b896577cad2860a829617ca902b33551afaaa8840372035ade2d3f3L17-L32)
[[8]](diffhunk://#diff-4fd109f66b896577cad2860a829617ca902b33551afaaa8840372035ade2d3f3L42)

**Project File Update**

* Added `shell_ext_registration.h` to the solution file, possibly for
future shell extension registration logic.

These changes improve uninstall reliability and centralize registry
cleanup logic, making future maintenance and extension of shell
extension registration much simpler.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-21 18:10:30 +08:00