Commit Graph

8109 Commits

Author SHA1 Message Date
leileizhang
6d29c3a2c9 [pipeline] feat: Implement flexible UI test pipeline with configurable build and execution modes (#40490)
<!-- 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:**
The current pipeline builds the entire solution and runs all UI tests
every time, which takes more than 2 hours to complete.

**Fix**
Make the PowerToys UI test pipeline provides flexible options for
building and testing:

### Pipeline Options

- **useLatestOfficialBuild**: When checked, downloads the latest
official PowerToys build and installs it for testing. This skips the
full solution build and only builds UI test projects.

- **useCurrentBranchBuild**: When checked along with
`useLatestOfficialBuild`, downloads the official build from the current
branch instead of main.

- **uiTestModules**: Specify which UI test modules to build and run.
Examples:
  - `UITests-FancyZones` - Only FancyZones UI tests
  - `MouseUtils.UITests` - Only MouseUtils UI tests
- `['UITests-FancyZones', 'MouseUtils.UITests']` - Multiple specific
modules
  - Leave empty to build and run all UI test modules

### Build Modes

1. **Official Build + Selective Testing** (`useLatestOfficialBuild =
true`)
   - Downloads and installs official PowerToys build
   - Builds only specified UI test projects
   - Runs specified UI tests against installed PowerToys
   - Controlled by `uiTestModules` parameter

2. **Full Build + Testing** (`useLatestOfficialBuild = false`)
   - Builds entire PowerToys solution
   - Builds UI test projects (all or specific based on `uiTestModules`)
   - Runs UI tests (all or specific based on `uiTestModules`)
   - Uses freshly built PowerToys for testing
  
<!-- 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
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2025-07-10 09:26:26 +08:00
Mike Griese
608eb1e034 CmdPal: Pull out VM bits from ShellPage.xaml.cs (#40479)
ref #40113

Moves a lot of the "model" logic out of `ShellPage.xaml.cs` into
`ShellViewModel`.

The LARGE majority of this code is copy-paste moving code. We're now
using a couple more messages to pass navigation between the VM and the
page. And a couple new messages for passing ETW events.
2025-07-09 18:49:21 -05:00
Niels Laute
f341aeb627 [UX] Improved formatting for release notes (#40320)
## Summary of the Pull Request

Before vs after:
![Screenshot 2025-07-01
130138](https://github.com/user-attachments/assets/f850298f-fe0b-43c1-9bae-eee712dec5e8)

## PR Checklist

- [x] **Closes:** #40319
- [ ] **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-07-09 16:19:15 -05:00
Mike Griese
ee764d5f56 cmdpal: Re-re-enable the clipboard history (#40471)
_⚠️ targets #40445_

This time, for real

This really really re-enables the clipboard history command. With the
foreground fixes from #40445, we can properly dismiss ourself to give FG
to the next app window. This actually lets us paste correctly.


I took the liberty of localizing the strings and fixing up the icons
while I was at it.

Closes #38344
2025-07-09 15:42:46 -05:00
Michael Jolley
100fca4468 CmdPal: Refactoring ContextMenu adding separators, IsCritical styling, and right-click context menus for list items (#40189)
Refactored ContextMenu into it's own control to allow displaying in
CommandBar and in response to right click on list items.

- Adds "critical" styling to context menu items flagged as `IsCritical`.
This will use the theme to style with correct color.
- Added `SeparatorContextItem` and modified `MoreCommands` to allow for
both `CommandContextItem`s and `SeparatorContextItem`s.
- Right clicking a list item with a context menu will open the context
menu at the position of the click and position the filter box at the top
of the context menu.


![image](https://github.com/user-attachments/assets/3bef6b04-28bb-4a17-b731-d9ed20c0566f)


![image](https://github.com/user-attachments/assets/37ed497c-6d98-4f04-8114-d9952127ca2e)


This PR covers:

- closes #38308
- closes #39211
- closes #38307
- closes #38261
2025-07-09 14:53:47 -05:00
Mike Griese
18b61ce9b7 CmdPal: Give FG back to the previous window (#40445)
this is a port of ce15032 onto main, for just the FG change.

When we cloak our window, we want to make sure to _manually_ give FG
back to another window. Because apparently cloaked windows can have FG.
beacause that makes sense 🤦

Closes #39638
supersedes #40431 

Co-authored-by: jiripolasek <me@jiripolasek.com>
2025-07-09 14:50:07 -05:00
Jiří Polášek
09c1575fa0 Ensure Command Palette main window remains hidden on taskbar Windows Explorer restarts (#40406)
## Summary of the Pull Request

Ensures the Command Palette main window stays hidden from the taskbar
after Windows Explorer restarts. Also updates how app switcher
visibility is managed to prevent unhandled exceptions and avoid startup
crashes when Explorer is not running or is not responsive.

## PR Checklist

- [x] Closes: #40334
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** no tests
- [x] **Localization:** nothing to localize
- [x] **Dev docs:** nothing to update
- [x] **New binaries:** no new binaries
- [x] **Documentation updated:** nothing to update

## Detailed Description of the Pull Request / Additional comments
- Settings on the main window are reapplied after the taskbar is
re-created (e.g., after Windows Explorer restarts), restoring visibility
settings for the app switcher and taskbar button.
- Defensive handling of the property AppWindow.IsShownInSwitchers
controlling appearance in system representations such as ALT+TAB and the
taskbar, to avoid errors when Windows Explorer is not running (see
https://github.com/microsoft/microsoft-ui-xaml/issues/8596).
- Prevents application startup failures when the Command Palette is
launched in environments without Windows Explorer.

## Validation Steps Performed
- Verified that the CmdPal main window taskbar button is not visible
after Explorer is restarted (without an attached debugger).
- Verified that CmdPal can be started when Explorer is not running.
- Verified that the CmdPal main window taskbar button is visible after
Explorer is restarted (if a debugger is attached to CmdPal).
2025-07-09 12:35:42 -05:00
Yu Leng
802bc3bd34 [UI automation test] Add basic tests case for powerrename module. (#40393)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
1. Add command args support in ui test core
2. Add command line parse logic in powerrename
3. Add some test cases.

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

- [ ] **Closes:** #xxx
- [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-07-09 14:32:40 +08:00
Jeremy Sinclair
c4922f1b30 [Deps] Update .NET packages from 9.0.6 to 9.0.7 (#40485)
<!-- 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
Updates .NET 9 Runtime / Library packages to the latest 9.0.7 servicing
release.

<!-- 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-07-09 09:16:52 +08:00
Josh Soref
bf16e10baf Updates for check-spelling v0.0.25 (#40386)
## Summary of the Pull Request

- #39572 updated check-spelling but ignored:
   > 🐣 Breaking Changes
[Code Scanning action requires a Code Scanning
Ruleset](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset)
If you use SARIF reporting, then instead of the workflow yielding an 
when it fails, it will rely on [github-advanced-security
🤖](https://github.com/apps/github-advanced-security) to report the
failure. You will need to adjust your checks for PRs.

This means that check-spelling hasn't been properly doing its job 😦.

I'm sorry, I should have pushed a thing to this repo earlier,...

Anyway, as with most refreshes, this comes with a number of fixes, some
are fixes for typos that snuck in before the 0.0.25 upgrade, some are
for things that snuck in after, some are based on new rules in
spell-check-this, and some are hand written patterns based on running
through this repository a few times.

About the 🐣 **breaking change**: someone needs to create a ruleset for
this repository (see [Code Scanning action requires a Code Scanning
Ruleset: Sample ruleset

](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset#sample-ruleset)).

The alternative to adding a ruleset is to change the condition to not
use sarif for this repository. In general, I think the github
integration from sarif is prettier/more helpful, so I think that it's
the better choice.

You can see an example of it working in:
- https://github.com/check-spelling-sandbox/PowerToys/pull/23

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2025-07-08 17:16:52 -05:00
Michael Jolley
f34735edeb Adding fallback command for Windows Settings extension (#40331)
Two changes:

- Added a new fallback command for Windows Settings extension. If only
one setting or one exact match for the query was found, display that
setting in the list and open that setting on <Enter>. If more than one
setting was found, display a message to open Windows Settings to see the
search results for your query.


![image](https://github.com/user-attachments/assets/bd5708a5-b1d5-466e-9c62-cd1cd7bb1f74)


![image](https://github.com/user-attachments/assets/98f4ac20-efe1-4782-8133-30afa17e3b7d)


![image](https://github.com/user-attachments/assets/e5da90e1-f89b-480c-bd26-214c68ac013a)

- Modified the titles/subtitles of the extension to pull from Resources
to aid in internationalization.

Closes: #38548 and possibly #40308
2025-07-08 10:05:02 -05:00
Niels Laute
c6cee94456 [CmdPal] UX tweaks (#40381)
Based on guidance from the design team, this PR introduces a bunch of
small UX tweaks:

- Standardizing body text on 14px (e.g. for the Adaptive Cards related
code).
- Left align all content in the details pane
- Brush tweaks to the hotkey / tags for better visibility


![image](https://github.com/user-attachments/assets/4d9bf699-29bb-42e0-af96-b9b72c34f259)


![image](https://github.com/user-attachments/assets/905a268b-2e29-408c-a301-10a98b5885f1)


![image](https://github.com/user-attachments/assets/b9050693-f4bb-4d74-8701-fb30b46698e0)


![image](https://github.com/user-attachments/assets/5f6f93a0-1d6e-4476-bad5-dc7a9e179e92)

Closes #38858
2025-07-07 10:31:56 -05:00
Gordon Lam
0323ebea58 Fix Random unitttest failure (#40390)
The test
`Win32ProgramRepositoryMustCallOnAppRenamedForLnkAppsWhenRenamedEventIsRaised`
was experiencing random failures due to object identity mismatches in
the repository's hash-based storage system.

## Root Cause

The test was manually creating `Win32Program` objects:

```csharp
Win32Program olditem = new Win32Program
{
    Name = "oldpath",
    ExecutableName = oldpath,
    FullPath = linkingTo,
};
```

However, the `DoOnAppRenamedAsync` method creates the `oldApp` object
for removal using a different approach for .lnk files:

```csharp
oldApp = new Win32Program() { 
    Name = Path.GetFileNameWithoutExtension(e.OldName), 
    ExecutableName = Path.GetFileName(e.OldName), 
    FullPath = newApp?.FullPath ?? oldPath 
};
```

Since the repository uses `GetHashCode()` (based on `Name`,
`ExecutableName`, and `FullPath`) to identify objects for removal, any
subtle differences in these properties would cause the `Remove()`
operation to fail, leading to test assertion failures.

## Fix

Changed the test to use `Win32Program.GetAppFromPath()` instead of
manual object creation:

```csharp
Win32Program olditem = Win32Program.GetAppFromPath(oldFullPath);
Win32Program newitem = Win32Program.GetAppFromPath(newFullPath);
```

This mirrors the approach used in the working
`Win32ProgramRepositoryMustCallOnAppRenamedForUrlAppsWhenRenamedEventIsRaised`
test and ensures that test objects are created using the same code path
as the production code, eliminating hash code mismatches.

## Why This Was Random

The test failure appeared random because it depended on subtle
differences in object creation that could vary based on timing, mock
setup, or other environmental factors. By using the same object creation
method as the production code, the test becomes deterministic.
2025-07-07 17:35:09 +08:00
Gordon Lam
bd132d9b40 Fix 6 UI Automation on FanzyZone given there is renamed in Setting UI. (#40434)
<!-- 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
It has renamed on the "Make dragged window transparent" => "Make the
dragged window transparent"

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
Kicked off UI automation pipeline

https://microsoft.visualstudio.com/Dart/_build/results?buildId=125833108&view=ms.vss-test-web.build-test-results-tab&runId=924788779&resultId=100072&paneView=debug
No more failure on FancyZone
2025-07-07 17:34:57 +08:00
leileizhang
69064fab99 Resolve spelling check noise (#40433)
<!-- 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
These appear in every PR

![image](https://github.com/user-attachments/assets/06bb02f1-d828-44c7-8c18-624d3e10def3)
Resolve all spelling issues that were generating excessive noise in PRs.

<!-- 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-07-07 13:08:48 +08:00
leileizhang
a64de74f3b [UI Tests] Fix incorrect Settings Page launch method in UI test framework (#40367)
<!-- 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
The UI test framework previously attempted to launch
PowerToys.Settings.exe directly.
However, this bypasses the PowerToys Runner, which is required for
proper interaction
and communication between runner.

### Fix
1. This change updates the launch mechanism to start PowerToys through
the Runner
with the appropriate argument ("--open-settings").
2. Prevents the Debug dialog from appearing in test runs

<!-- 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-07-07 12:58:49 +08:00
leileizhang
7772bfb777 Fix: File explorer preview didn't work with per-user installation (#40314)
<!-- 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 Bug started when the Win11 context menu integration was first
introduced by Image Resizer in version v0.60.0.

Move Image Resizer to the WinUI3Apps folder to fix file preview issue
when PowerToys is installed on a non-C:\Program Files.
This aligns with the current structure used by File Locksmith and
PowerRename, which are not WinUI 3 apps either, but are already located
there.

### Root Cause:
When registering an MSIX package, the Windows API adds certain user
permissions to the installation folders. Since Image Resizer was
previously placed under the main PowerToys directory, these permission
changes could prevent Explorer from loading its preview handler properly
in per-user scenarios.


![image](https://github.com/user-attachments/assets/a8626314-19ce-4e25-87d6-d5e74a015e68)

Interestingly, this issue only affects per-user installs, not
machine-wide installs (e.g., to Program Files), even though both
locations receive additional permissions. The exact reason is still
unclear and requires further investigation.

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

- [x] **Closes:** #24384 #29644 #32113 #34139 #37866 #40345
- [ ] **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-07-07 09:41:19 +08:00
Mike Griese
0f279002f8 Fix loading our app state (#40401)
Yea this is dumb. Cant have private setters when json deserializing.
closes #40399
2025-07-06 16:10:15 -05:00
leileizhang
0c425fd1d7 [Fix][CmdPal] CmdPal Apps extension is missing all Win32 applications (#40392)
<!-- 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
Calling `"CreateFile"` without an explicit `EntryPoint` fails because
kernel32.dll only exports `CreateFileA` and `CreateFileW`.

### Fix
Add EntryPoint = "CreateFileW"

### How to reproduce
The issue is reproducible when the PC is set to Chinese or another
non-English language.

![image](https://github.com/user-attachments/assets/2bdfd644-3ccf-4ad0-a470-2bd7de29049c)

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

- [x] **Closes:** #40389, #40340 #40388 #40378 #40341
- [ ] **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-07-04 16:18:18 +08:00
Kai Tao
03a9ac1ac7 [UI automation] workspaces ui automation (#39812)
<!-- 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 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


![image](https://github.com/user-attachments/assets/1be219be-1d06-432c-8acb-e3a2ba56d1b6)


https://microsoft.visualstudio.com/Dart/_build/results?buildId=125637396&view=results

---------

Signed-off-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
Co-authored-by: Jerry Xu <n.xu@outlook.com>
Co-authored-by: Zhaopeng Wang <zhaopengwang@microsoft.com>
Co-authored-by: Xiaofeng Wang (from Dev Box) <xiaofengwang@microsoft.com>
Co-authored-by: Mengyuan <162882040+chenmy77@users.noreply.github.com>
Co-authored-by: yaqingmi <miyaqing01@gmail.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Yaqing Mi (from Dev Box) <yaqingmi@microsoft.com>
Co-authored-by: XiaofengWang <709586527@qq.com>
Co-authored-by: zhaopeng wang <33367956+wang563681252@users.noreply.github.com>
Co-authored-by: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com>
Co-authored-by: RokyZevon <12629919+RokyZevon@users.noreply.github.com>
Co-authored-by: Yu Leng <42196638+moooyo@users.noreply.github.com>
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com>
Co-authored-by: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
Co-authored-by: ruslanlap <106077551+ruslanlap@users.noreply.github.com>
Co-authored-by: Muhammad Danish <mdanishkhdev@gmail.com>
Co-authored-by: Bennett Blodinger <benwa@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Ionuț Manța <ionut@janeasystems.com>
Co-authored-by: Hao Liu <liuhaobupt@163.com>
Co-authored-by: OlegHarchevkin <40352094+OlegKharchevkin@users.noreply.github.com>
Co-authored-by: dcog989 <89043002+dcog989@users.noreply.github.com>
Co-authored-by: PesBandi <127593627+PesBandi@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Typpi <20943337+Nick2bad4u@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
Co-authored-by: Abhyudit <64366765+bitmap4@users.noreply.github.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Ved Nig <vednig12@outlook.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Aung Khaing Khant <aungkhaingkhant.dev@gmail.com>
Co-authored-by: Aung Khaing Khant <aungkhaingkhant@advent-soft.com>
Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: Shawn Yuan <128874481+shuaiyuanxx@users.noreply.github.com>
Co-authored-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
Co-authored-by: cryolithic <cryolithic@gmail.com>
Co-authored-by: Lemonyte <49930425+lemonyte@users.noreply.github.com>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
Co-authored-by: Corey Hayward <72159232+CoreyHayward@users.noreply.github.com>
Co-authored-by: Jerry Xu <nxu@microsoft.com>
Co-authored-by: Shawn Yuan <shuaiyuan@microsoft.com>
Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2025-07-04 10:07:37 +08:00
Copilot
837d5ca543 Fix signing configuration: Remove 25 obsolete file references from ESRPSigning_core.json (#40241)
## Summary

This PR fixes the signing pipeline by removing 25 obsolete file
references from `ESRPSigning_core.json` that were causing "0 files out
of: 0 files" errors during the signing process. These references pointed
to files that are either no longer built or were never produced by the
current project structure.

## Root Cause Analysis

The signing configuration contained references to files that fall into
three categories:

1. **Static libraries incorrectly listed as DLLs** - Projects configured
as `StaticLibrary` don't produce `.dll` files
2. **Obsolete/non-existent projects** - References to projects that were
removed or renamed
3. **WinExe projects incorrectly listed as producing DLLs** - C#
projects with `OutputType=WinExe` only produce `.exe` files, not `.dll`
files

## Changes Made

### Static Libraries (3 files removed):
- `Notifications.dll` - notifications project is a StaticLibrary
- `os-detection.dll` - no corresponding project found
- `Telemetry.dll` - telemetry projects are StaticLibraries

### Obsolete Projects (3 files removed):
- `fancyzones.dll` - FancyZones now produces `PowerToys.FancyZones.exe`
- `Wox.dll` - only `Wox.Plugin.dll` and `Wox.Infrastructure.dll` exist
- Duplicate `PowerToys.ManagedTelemetry.dll` entry

### WinExe Projects (19 files removed):
**Preview/Thumbnail Handlers (11 files):**
All preview and thumbnail handler C# projects have `OutputType=WinExe`
and only produce `.exe` files:
- Removed `.dll` entries for: GcodePreviewHandler,
MarkdownPreviewHandler, MonacoPreviewHandler, PdfPreviewHandler,
QoiPreviewHandler, SvgPreviewHandler, GcodeThumbnailProvider,
PdfThumbnailProvider, QoiThumbnailProvider, StlThumbnailProvider,
SvgThumbnailProvider

**Application Modules (8 files):**
- `PowerToys.WorkspacesEditor.dll` and
`PowerToys.WorkspacesLauncherUI.dll`
- `PowerToys.Awake.dll` and `PowerToys.ImageResizer.dll` 
- `PowerToys.ColorPickerUI.dll` and `PowerToys.PowerOCR.dll`
- `PowerToys.PowerAccent.dll` and `PowerToys.PowerLauncher.dll`

## Verification

All removed entries were verified by:
1. Checking project files for `OutputType` and `ConfigurationType`
settings
2. Confirming `AssemblyName` and `TargetName` properties
3. Ensuring no actual built artifacts are affected

The signing process should now successfully find all expected files and
eliminate the "0 files out of: 0 files" pattern.

Fixes #40240.

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

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: vanzue <69313318+vanzue@users.noreply.github.com>
2025-07-04 09:50:22 +08:00
Kai Tao
2ff5adbdd4 [Settings] Complete the settings deeplink (#40376)
<!-- 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
Many settings page's deep link is not implemented, this PR complete them
and make them aligned with the settings page.

<!-- 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-07-04 09:41:19 +08:00
Niels Laute
faebd21a2d [Settings] String updates and minor UX tweaks (#40249)
## Summary of the Pull Request

- I asked Copilot nicely to rewrite some of our strings to be inline
with the Windows writing style guide and to be less verbose or provide a
better explaination.
- Since the Sound expander on the Always on Top page had a single
setting, turning that into a card.

Before:

![image](https://github.com/user-attachments/assets/04ec18f1-06a4-4185-ac50-655070dcf3fc)

After:

![image](https://github.com/user-attachments/assets/e5d62e00-5d0a-4a2d-9011-493232689f41)


Simplified UI + less XAML for diagnostics data:

Before:

![image](https://github.com/user-attachments/assets/c0b0468b-7587-4684-8fbf-bad856e4d30c)

After:

![image](https://github.com/user-attachments/assets/185f2ff8-a3b1-49bd-8617-24b2c5a454a2)



<!-- 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: Kai Tao <kaitao@microsoft.com>
2025-07-03 16:20:22 +02:00
Niels Laute
6412d5722e [UX] Settings - fix header position (#40160)
## Summary of the Pull Request
Due to a padding in the scrollviewer hosting the settingspage content,
the title drifts away upon resizing the settings window.
This PR fixes that issue by adding the (20px) padding to the maxwidth of
the header textblock.

Before:

![header](https://github.com/user-attachments/assets/6704a59d-843c-49a7-a109-e22e2cecccfe)

After:

![header2](https://github.com/user-attachments/assets/c9b0aa46-fcab-43ac-be87-ea423d810606)



## PR Checklist

- [x] **Closes:** #40159
- [ ] **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-07-03 04:33:56 -05:00
leileizhang
9f68b37bbd [Fuzzing] fix: failure in fuzz test result submission (#40344)
<!-- 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
Set the assignedTo field to me in the ADO template first.

![image](https://github.com/user-attachments/assets/e9a21889-ecf3-428d-888e-c5abff693733)

<!-- 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-07-02 18:47:33 +08:00
Gordon Lam
21a3c216da Initial version for .92 Release note (#40266)
To do: 
a. TBD on the sha256 hash
b. Whether add/remove for Action framework section.

---------

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
2025-07-01 20:27:42 +00:00
Gleb Khmyznikov
725535b760 [DevDocs] More content and restructure (#40165)
## Summary of the Pull Request
Accumulated information from internal transition about the modules
development, and reworked it to be added in dev docs. Also the dev docs
intself was restructured to be more organized. New pages was
verified by transition team.

## PR Checklist
- [x] **Dev docs:** Added/updated

---------

Co-authored-by: Zhaopeng Wang (from Dev Box) <zhaopengwang@microsoft.com>
Co-authored-by: Hao Liu <liuhao3418@gmail.com>
Co-authored-by: Peiyao Zhao <105847726+zhaopy536@users.noreply.github.com>
Co-authored-by: Mengyuan <162882040+chenmy77@users.noreply.github.com>
Co-authored-by: zhaopeng wang <33367956+wang563681252@users.noreply.github.com>
Co-authored-by: Jaylyn Barbee <51131738+Jaylyn-Barbee@users.noreply.github.com>
2025-07-01 14:27:34 +02:00
PesBandi
9c2e83d6eb [CmdPal][Calc]Parse result returned by ExprTk correctly (#40317)
## Summary of the Pull Request
The ExprTk result was previously parsed with CurrentCulture, which means
that calculator was broken on every device which's culture info differed
from what ExprTk returns.
It would probably be better to just obtain the result as a double
directly, but that can wait.
## PR Checklist
- [x] **Closes:** #40305
- [ ] **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
- [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
ExprTk, the math library that CmdPal's Calculator uses, returns the
result as a string formatted in `en-US`, therefore we need to also parse
it as `en-US`.
## Validation Steps Performed
Small and large numbers work correctly with all decimal separators
2025-07-01 20:20:23 +08:00
leileizhang
73841f686f [AOT] Update logger to support NativeAOT (#40154)
<!-- 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:
`FileVersionInfo.GetVersionInfo(Assembly.Location)` is not compatible
with NativeAOT

### Fix:
Replaced the usage of FileVersionInfo with static reflection
`GetCustomAttribute<AssemblyFileVersionAttribute>()?.Version`. This uses
static reflection to read version metadata directly from the assembly,
which is fully supported in NativeAOT. It does not require file system
access and is trimming/AOT-safe.

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

- [x] **Closes:**
[#40151](https://github.com/microsoft/PowerToys/issues/40151)
- [ ] **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-07-01 17:04:16 +08:00
Yu Leng
a9f7c3bd50 [cmdpal][AOT] fix some cmdpal aot issue (#40301)
<!-- 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

<del>Most of them are safe change but only one line may break something
is in
[TrayIconService.cs](https://github.com/microsoft/PowerToys/compare/yuleng/aot/pr?expand=1#diff-bc3e603a50df89710c69ff6f4fc8f29967fca19cdbe615f06b53534e9c986bb5)</del>
ok, I've confirmed no problem.


<!-- 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

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2025-07-01 10:36:59 +08:00
Mike Griese
d064f60a64 CmdPal: hotfix loading packaged apps (#40310)
Regressed in #39678

This block of code just moved up too far. It needs to be after the first
attempt to load the resource.

closes: did we even file it yet

## Validation Steps Performed


![image](https://github.com/user-attachments/assets/abb4f9d0-ff15-4168-8f65-8b243954a48c)

![image](https://github.com/user-attachments/assets/c48e7bc1-55b6-4294-ac07-518c9faeabc9)
2025-06-30 19:51:16 -05:00
Chek Wei Tan
db7a4cfdee Fix: Prevent memory leak in view model lifecycle (#40216)
<!-- 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

A memory leak was identified where activating a Command Palette
extension via a hotkey would lead to a linear increase in resource
consumption and a corresponding decrease in search performance.

Each activation created a new `PageViewModel` instance for the
extension's UI. However, the `ShellViewModel` did not dispose of the
previous `PageViewModel` instance when a new one was created.

The fix is implemented in
`Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs` by ensuring that
`PageViewModel` instances are correctly disposed of when they are no
longer active.

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

- [x] **Closes:** #40199
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here
## Detailed Description of the Pull Request / Additional comments -->


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

1. Installed [Workspace Launcher for Visual Studio /
Code](https://github.com/tanchekwei/WorkspaceLauncherForVSCode)
2. Configured a global hotkey for the extension (e.g., Alt + Q).
3. Ran the following AHK script. Pressing F1 simulates pressing the
hotkey 10 times with a 200ms interval, followed by typing p to trigger a
search and observe how many times `GetItems` is invoked.

```ahk
#NoEnv
SetBatchLines, -1

; Press F1 to run the sequence
F1::
Loop, 10
{
    Send, !q
    Sleep, 200
}
Send, p
return
```

### Before the Fix (PowerToys v0.91.1)

- Pressing the hotkey 10 times then search will triggered `GetItems` 12
times.
- See video and log output below:


https://github.com/user-attachments/assets/3c7d59d6-2dda-4ab4-b230-2f2472c45776


```log
[2025-06-25 00:04:58.251] [VisualStudioCodePage.UpdateSearchText] Started
[2025-06-25 00:04:58.251] [VisualStudioCodePage.UpdateSearchText] SearchText: p
[2025-06-25 00:04:58.251] [WorkspaceFilter.Filter] Started
[2025-06-25 00:04:58.263] [WorkspaceFilter.Filter] Finished in 11ms
[2025-06-25 00:04:58.269] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.269] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.373] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.373] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.408] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.408] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.445] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.446] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.485] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.486] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.524] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.525] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.563] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.564] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.604] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.604] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.645] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.645] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.685] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.686] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.755] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.756] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.798] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:04:58.798] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:04:58.843] [VisualStudioCodePage.UpdateSearchText] Finished in 591ms
```

### After the Fix
- Pressing the hotkey 10 times then search will now triggers `GetItems`
only once.
- See updated video and log output:


https://github.com/user-attachments/assets/e38f3eb5-5353-44da-a9d9-ff83647eb6e9

```log

[2025-06-25 00:03:44.862] [VisualStudioCodePage.UpdateSearchText] Started
[2025-06-25 00:03:44.863] [VisualStudioCodePage.UpdateSearchText] SearchText: p
[2025-06-25 00:03:44.864] [WorkspaceFilter.Filter] Started
[2025-06-25 00:03:44.866] [WorkspaceFilter.Filter] Finished in 2ms
[2025-06-25 00:03:44.870] [VisualStudioCodePage.GetItems] Started
[2025-06-25 00:03:44.870] [VisualStudioCodePage.GetItems] Finished in 0ms
[2025-06-25 00:03:44.909] [VisualStudioCodePage.UpdateSearchText] Finished in 46ms
```
2025-06-30 18:17:38 -05:00
Michael Jolley
7ad95e29b5 Aligning Kill Process with End Task naming (#40263)
- Renaming "Kill process" to "End task" to align with Windows.
- Updating End task and Close window icons to align with End Task in
Windows.

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
2025-06-30 10:17:56 -05:00
Clint Rutkas
a6a874dd81 commenting out action framework code (#40279)
Commenting out code from chat with the team for right now. we haven't
had time to fully kick the tires and want to be 100% sure the life cycle
is great for end users

---------

Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2025-06-30 12:06:45 +08:00
Kai Tao
16742354c4 Mouse highlighter: support a spotlight mode - inner transparent, out a backdrop (#40043)
<!-- 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:** #15512 
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [ ] **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/0748c526-fcf5-4859-b832-14a413d2cad1
2025-06-27 14:11:39 +08:00
Yu Leng
0134823de1 [cmdpal] Fix primary button doesn't work issue (#40243)
<!-- 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
ok... it seems didn't work since 0.91.

Maybe we forgot to send message when command has more commands?

<!-- 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: Yu Leng <yuleng@microsoft.com>
2025-06-27 10:08:46 +08:00
Yu Leng
6d0af32e39 [cmdpal] Fix TimeAndDate extension crash issue when typing query (#40245)
<!-- 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
When we call RaiseItemsChanged, it will trigger function GetItems. So if
you enter this function through typing query, it will trap in an inf
loop. Eventually leading to crash.

related change: https://github.com/microsoft/PowerToys/pull/40050

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

- [x] **Closes:** #39973
- [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-06-27 10:07:49 +08:00
Copilot
8412309fed Make "Reload" command case-insensitive in Command Palette (#39779)
## Problem
The "Reload" command in the Command Palette was only showing up when
searching with a lowercase 'r' (e.g., "reload") but not with an
uppercase 'R' (e.g., "Reload"). This was inconsistent with the
documentation which references a "Reload" command.

## Solution
Fixed the case-sensitivity issue in `FallbackReloadItem.UpdateQuery()`
by changing the string comparison from case-sensitive to
case-insensitive:

```csharp
// Before
_reloadCommand.Name = query.StartsWith('r') ? "Reload" : string.Empty;

// After
_reloadCommand.Name = query.StartsWith("r", StringComparison.OrdinalIgnoreCase) ? "Reload" : string.Empty;
```

This change makes the Reload command visible when typing either "reload"
or "Reload" in the Command Palette, improving the user experience for
extension developers.

Fixes #39769.

---

💡 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: zadjii-msft <18356694+zadjii-msft@users.noreply.github.com>
2025-06-26 16:35:51 -05:00
purofle
471f6d1539 [CmdPal] Fix correct comment typo in SamplePagesExtension (#40242)
<!-- 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

Fixed a simple English grammar error in SamplePagesExtension in CmdPal.

<!-- 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-06-26 12:12:27 -05:00
leileizhang
d65ba7f348 [CmdPal] Refactor ActionRuntime initialization to avoid repeated delays on failure (#40229)
<!-- 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 addresses an issue where ActionRuntime initialization may
repeatedly incur delays and fail during runtime usage, especially when
the OS supports the API but action creation fails.

### Fix:
Introduced ActionRuntimeManager to:

- Manage a shared static ActionRuntime instance
- Perform initialization once, at extension loading time
- Store the result (success or failure) to avoid repeated creation
attempts

Consumers now:

- ActionRuntimeManager.InstanceAsync.GetAwaiter().GetResult()

Initialization will only be attempted up to 3 times. After that, runtime
is marked as unavailable and no further attempts are made.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:** #40228
- [ ] **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-06-26 23:50:17 +08:00
Kai Tao
1952a17a17 Runner: Remove "Show Tray Icon" menu in tray icon (#40190)
<!-- 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
"Show Tray Icon" when you click tray icon has not sense. 
If it's visible, show that has no effect, 
if it's not, you can't make it visible by click it.

Remove the menu for that 

This impl is just not showing the menu item, if open for the choice that
show "hide the tray icon" here
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] **Closes:** #xxx
- [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
Locally tested
2025-06-25 17:31:56 +08:00
leileizhang
20dda12dbc [CmdPal]Limit exprtk result to 15 total digits with proper rounding (#40194)
<!-- 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 addresses an issue where direct double output from exprtk
evaluation led to precision artifacts (e.g., 12.2 + 10 resulting in
22.199999999999999). This behavior is due to how double represents
decimal fractions in binary.

- To improve user-facing precision, the result is now:
- Converted to decimal for higher decimal accuracy.
- Rounded to fit within 15 total significant digits (integer +
fraction).
- Formatted using "G29" to eliminate unnecessary trailing zeros.
- Cleaned up to remove dangling decimal points.

This ensures more intuitive and readable output like:

- 1.9999999999 → "1.9999999999"
- 100000.9999999999 → "100001"
- 100000.999999999 → "100000.999999999"

This change improves clarity, especially for users entering expressions
expecting decimal-accurate results.

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

- [ ] **Closes:** #40097 
- [ ] **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-06-24 13:42:22 +08:00
leileizhang
0c870d68c6 [CmdPal] Fix slow fuzzy search in apps extension by properly handling null-terminated strings from SHLoadIndirectString (#40198)
<!-- 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 change addresses a significant performance regression caused by
improper handling of null-terminated strings returned from the
SHLoadIndirectString API.

Previously, the output buffer was converted to string using
Span<char>.ToString() without trimming at the null terminator (\0). As a
result, the entire buffer (1024 characters) was converted, including
trailing garbage data after the valid string.

This caused the fuzzy matching logic to process unnecessarily long
strings, leading to excessive CPU usage and input lag (~2 seconds delay
per keystroke).

The fix properly locates the first null terminator in the buffer and
slices the span before converting to string, eliminating trailing
garbage characters. This reduces the workload in the scoring function
and resolves the input lag in the apps extension search.

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

- [x] **Closes:** #40197
- [ ] **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-06-24 13:41:53 +08:00
leileizhang
f31497e08e [pipeline] Add AdaptiveCards.Templating.dll to version check exception list (#40157)
<!-- 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

![image](https://github.com/user-attachments/assets/adcfc759-2f24-4b4b-8077-7560eb0423b9)

Add AdaptiveCards.Templating.dll to version check exception list 
<!-- 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-06-24 11:19:25 +08:00
Yu Leng
718600a379 Sign for the new managedCsWin32 dll (#40150)
<!-- 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
We need to sign for all dll in our pipeline. But I forgot to do it in
the last PR.

<!-- 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: Yu Leng <yuleng@microsoft.com>
2025-06-21 20:09:56 +08:00
Chris Guzak
63b13d219c fix bad link in cmdpal sdk README.md (#40144)
## Summary of the Pull Request

found this bad link, fixing it to help others

## Validation Steps Performed

Used markdown preview in VSCode, clicked the link, it works!
2025-06-20 05:58:06 -05:00
leileizhang
1e79a98b2e [CmdPal] Fix apps using incorrect AsSpan usage after CsWin32 upgrade (#40156)
<!-- 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:
After the CsWin32 upgrade, the code switched from using manually
allocated unmanaged buffers (Marshal.AllocHGlobal) to using Span<char>
via outBuffer.AsSpan(). However, the Span length passed to
SHLoadIndirectString was not correctly calculated.

<!-- 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-06-20 17:07:41 +08:00
Yu Leng
250be2ddf0 [AOT] Fix issues when we want to log some telemetry in AOT version (#40148)
<!-- 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
Telemetry.write will serialize all of the whole object graph. So we need
to ensure it will not be trimmed.

This is a safe PR because it doesn't apply any logic change. If you
disable the AOT feature, this PR won't take any effect.

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

- [x] **Closes:** #40149
- [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-06-20 14:10:17 +08:00
leileizhang
95e6ff5b80 [CmdPal][AOT] Make Adaptive Card rendering AOT-compatible (#40134)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
### 1. Make AdaptiveCards WinUI3 AOT Compatible
The AdaptiveCards.WinUI3 NuGet packages ship with precompiled WinRT
projections (RendererCsProjection.dll, etc.), which are not
trim/AOT-safe. These projections internally use APIs like
ComWrappersSupport.GetObjectReferenceForInterface, which break under
PublishAot.
To resolve this:
- We exclude their compile assets to avoid using the shipped C#
projections.
- Use the .winmd metadata files with CsWinRT to regenerate our own
AOT-compatible projections.
- Manually copy the required native .dlls from the NuGet package.

### 2. Ensure AOT-Compatible Transitive Dependency
The AdaptiveCards.Templating package depends on
Microsoft.Bot.AdaptiveExpressions.Core, but doesn’t pin an AOT-safe
version. We explicitly version Microsoft.Bot.AdaptiveExpressions.Core to
4.23.0 to ensure compatibility with NativeAOT.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] **Closes:**
[#40133](https://github.com/microsoft/PowerToys/issues/40133)
- [ ] **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-06-20 12:59:19 +08:00
Mengyuan
713b11db82 [Fuzz] Update private Email to Group Email (#40129)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Update private notification and ado assignment email to
PowerToys@microsoft.com
<!-- 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-06-19 12:10:48 -05:00