Commit Graph

9577 Commits

Author SHA1 Message Date
Niels Laute
a3944b99eb Update README for PowerToys 0.101 (#50101)
## Summary of the Pull Request

Updates the README for the PowerToys 0.101 release by:

- Adding Window Hopper to the utilities list with its icon and
documentation link
- Replacing the What's new banner with the 0.101 release artwork

## 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
- [ ] **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 utilities table now includes Window Hopper in alphabetical order and
links to `https://aka.ms/PowerToysOverview_WindowHopper`. The existing
release banner asset is replaced with the supplied 1200×252 PowerToys
0.101 artwork.

## Validation Steps Performed

- Confirmed the Window Hopper icon exists and its documentation alias
resolves successfully
- Confirmed the replacement banner exactly matches the supplied image
and retains the existing 1200×252 dimensions
- Confirmed the README diff has no whitespace errors

Documentation and image-only change; automated tests are not applicable.

---------

Copilot-Session: b9216327-0d3a-4bd0-be95-798efc896ca1
Copilot-Session: 6b6a57da-3890-46e4-aefa-369c9e1e9603
2026-08-25 03:40:39 +00:00
Niels Laute
6cfe2179c4 fix(shortcut-guide): restore transparent overlay on Windows 10 (#50094)
## Summary of the Pull Request

Restores the transparent Shortcut Guide overlay on Windows 10 by
removing the full-bleed DWM hardening introduced for the monitor-sized
host window.

The hardening set `DWMWA_NCRENDERING_POLICY` to `DWMNCRP_DISABLED`,
which disables earlier `DwmEnableBlurBehindWindow` and
`DwmExtendFrameIntoClientArea` behavior used by WinUIEx's transparent
backdrop. Shortcut Guide now relies on the existing baseline transparent
chrome instead.

## PR Checklist

- [x] Closes: #49975
- [x] Closes: #50076
- [x] **Communication:** Investigated from the active reports and
validated with a core contributor
- [x] **Tests:** Existing build validation and manual end-to-end
validation pass; no automated test covers DWM composition behavior
- [x] **Localization:** N/A; no end-user-facing strings changed

## Detailed Description of the Pull Request / Additional comments

- Removes `ApplyFullBleedHardening` and its DWM/style interop from
`src/common/Common.UI.Controls/Window/TransparentWindow/TransparentWindow.cs`.
- Removes both Shortcut Guide call sites and updates the related
comments in
`src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/OverlayWindow.xaml`
and `OverlayWindow.xaml.cs`.
- Keeps `ApplyTransparentChrome`, including native-frame removal, DWM
border suppression, corner suppression, and tool-window behavior. It is
still reapplied after cross-monitor moves.

This avoids disabling the DWM path required for transparency while
preserving the normal borderless overlay setup.

## Validation Steps Performed

- Built the complete x64 Debug `PowerToys.slnx` successfully with an
empty errors log.
- Launched `x64\Debug\PowerToys.exe` and confirmed the rebuilt Shortcut
Guide process was active.
- Invoked Shortcut Guide through the Runner and manually confirmed the
overlay rendered transparently and behaved correctly on the Windows 11
development machine.

Copilot-Session: e7fa0065-bbdd-403c-9444-23ab3ca9d56a
2026-08-25 11:34:09 +08:00
Michael Jolley
1a6a5e57b6 CmdPal: add .vsconfig to extension template (#50095)
Opening the extension template in Visual Studio can leave contributors
without the components needed to build it. The template now carries the
same component manifest as PowerToys, so Visual Studio can detect and
install the missing pieces up front.

Closes #39114

---------

Copilot-Session: 6a65e567-f473-417c-bf11-c1fe3fcc570d
2026-08-24 16:20:19 +00:00
Zhibo Lin
19c4d80532 CmdPal: use unique IDs for PowerToys fallback commands (#50047)
## Summary of the Pull Request

PowerToys fallback commands currently all use the same fallback ID
(`com.microsoft.powertoys.fallback`). Because Command Palette persists
fallback settings by ID, disabling one command writes a setting that is
then read by every fallback command in the provider.

This change derives each fallback item's ID from the command's existing
stable ID by appending `.fallback`, so fallback settings are stored
independently without colliding with the underlying command IDs. It also
adds a focused regression test covering the generated fallback IDs.

## PR Checklist

* [x] Closes: #48607
* [x] **Communication:** The issue is labeled `Help Wanted`;
implementation intent and approach were posted in #28769.
* [ ] **Tests:** Added; official CI pending. The local PowerToys build
is blocked because the available Visual Studio/MSBuild 17.10 cannot load
the repository's .NET 10 SDK, which requires MSBuild 18.
* [x] **Localization:** No end-user-facing strings were added or
changed.
* [x] **Dev docs:** Not applicable; no public behavior or API contract
was added.
* [x] **New binaries:** No shipping binaries were added. The new
unit-test assembly is included in `PowerToys.slnx` and the applicable
Command Palette solution filters, and matches the existing
`*UnitTest*.dll` CI test discovery pattern.
* [x] **Documentation updated:** Not applicable.

## Detailed Description of the Pull Request / Additional comments

`ProviderSettingsViewModel` stores fallback state in a dictionary keyed
by `IFallbackCommandItem.Id`. The PowerToys extension generated many
fallback items with one shared ID, causing the last persisted state for
that key to apply to the entire provider after reopening settings.

All commands produced by the PowerToys module catalog already have
stable, unique IDs used for command identity and pinning. Appending
`.fallback` to those IDs gives each fallback item a stable, unique
identity while keeping it distinct from the underlying command. Existing
legacy settings under `com.microsoft.powertoys.fallback` are left
harmlessly unused because there is no meaningful way to map that shared
value back to one specific command.

The new unit-test project is also included in the applicable Command
Palette solution filters so it is available in the relevant development
and test configurations.

## Validation Steps Performed

* Added `FallbackItemsAppendFallbackSuffixToCommandIds`, covering two
commands and verifying that fallback IDs append `.fallback`, remain
distinct from the underlying command IDs, and remain unique across
commands.
* Added the new unit-test project to `PowerToys.slnx`,
`CommandPalette.slnf`, `CommandPalette - no UI tests.slnf`, and
`Microsoft.CmdPal.Ext.PowerToys.slnf`.
* Included `Microsoft.CmdPal.Ext.UnitTestsBase` in the
PowerToys-specific solution filter because it is a direct dependency of
the new unit-test project.
* Validated the modified solution and project files.
* Confirmed all 64 literal command IDs in the PowerToys module providers
are unique.
* Ran `git diff --check` successfully.
* Attempted the repository-prescribed targeted Release/x64 build. It
reached MSBuild but was blocked by the local toolchain version noted
above; authoritative build and test results are therefore left to CI.
2026-08-23 15:43:22 -05:00
Gleb Khmyznikov
5759a62d4a [UITests][Keyboard Manager] UI tests for new keyboard manager. (#50059)
<!-- Suggested title: [UITests][Keyboard Manager] Add and stabilize UI
tests for the unified editor -->

## Summary of the Pull Request

Closes: #40662

Adds a new `Microsoft.PowerToys.UITest.Next` end-to-end suite for
Keyboard Manager and hardens the unified editor behavior uncovered while
exercising it on Windows 10, Windows 11, x64, and ARM64.

The Keyboard Manager suite executes 32 test cases covering:

- Unified editor create, edit, save, enable/disable, delete, restart
persistence, missing-profile recovery, validation, and special actions.
- Single-key, key-to-shortcut, shortcut-to-shortcut, shortcut-to-key,
disabled-key, and app-specific remapping.
- Modifier ordering and release behavior, including Alt+Tab and Alt+F4
targets.
- Real keyboard behavior through Windows Notepad and Calculator fixtures
rather than synthetic input windows.

The PR also adds 26 managed unit tests around settings normalization,
profile reconciliation, metadata ownership, active-state changes, and
canonical modifier ordering.

## Detailed Description of the Pull Request / Additional comments

### Keyboard Manager UI tests

Adds `src/modules/keyboardmanager/Tests/KeyboardManager.UITests` as a
Microsoft Testing Platform executable using `UITestAutomation.Next` and
winappcli.

The suite includes:

- `KeyboardManager.Editor.CreateEditPersistDelete`
  - Creates and edits mappings.
- Verifies native profile and editor metadata persistence across
restarts.
- Exercises active-state toggling, row deletion, and missing
native-profile recovery.
- `KeyboardManager.Editor.InputAndValidation`
- Covers key recording, dropdown input, keyboard navigation,
cancellation, and app-specific validation.
- `KeyboardManager.Editor.ActionPersistence`
- Covers Open URL, Open app, and Insert text actions and verifies
canonical readback after restart.
- Parameterized runtime tests for key/shortcut combinations, disabled
targets, app-specific mappings, modifier release order, Alt+Tab, and
Alt+F4.

The test support code provides:

- A shared cross-process fixture lock and isolated Keyboard Manager
settings scope.
- Real Notepad documents with exact window/document ownership and
cleanup.
- Win10/Win11-aware Calculator window ownership for Alt+F4 assertions.
- A low-level keyboard event recorder that validates injected
key-down/key-up sequences and flags.
- Authoritative persisted JSON assertions instead of relying only on
transient UI state.

### Keyboard Manager correctness fixes found by the suite

The tests exposed product races and persistence issues that are fixed in
the same PR:

- Native profile JSON is written through checked same-directory atomic
replacement instead of a truncation-prone direct write.
- Editor metadata and native mappings are normalized and reconciled per
profile.
- Create, edit, delete, and active-state mutations commit metadata and
native state transactionally under a cross-process lock.
- Startup reconciliation preserves inactive metadata owned by other
profiles and repairs legacy/profileless settings.
- Native Boolean return values use one-byte marshaling to match the C++
ABI.
- Modifier keys and serialized targets are canonicalized consistently.
- Unit-test initialization no longer starts real settings
synchronization.

### CI stability hardening

The editor workflows use coordinate-free UIA invocation for command
buttons and authoritative-signal retries for idempotent row
interactions. Window fixtures bind exact top-level HWNDs and distinguish
the Win10 Calculator `ApplicationFrameWindow` from its child content
window.

The child-specific `UITestAutomation.Next` updates add or improve:

- `WindowShowWatcher` lifecycle handling used by the Keyboard Manager
window fixtures.
- Exact HWND foreground, close, and process-tree cleanup helpers
required by the Win10/Win11 tests.

### Pipeline workflow

Adds the internal `ui-tests-pipeline-ci` skill and Azure DevOps helper
used during stabilization:

- Uses an existing Azure CLI session plus Azure DevOps REST APIs without
per-call authentication prompts.
- Supports paged branch/build discovery, preview and queue operations,
exact-SHA reconciliation, stage retry/cancel, logs, test results,
artifacts, and direct result-attachment downloads.
- Uses build-scoped one-shot completion monitoring and retains the
three-run stabilization guardrail.

## Validation Steps Performed

### Azure DevOps UI Test Automation

Final verification build: 
-
https://microsoft.visualstudio.com/Dart/_build/results?buildId=155512681&view=results
-
https://microsoft.visualstudio.com/Dart/_build/results?buildId=155525972&view=results

## Reviewer guide

Suggested review order:

1. `src/modules/keyboardmanager/Tests/KeyboardManager.UITests/` -
intended workflows and assertions.
2. `KeyboardManagerEditorUI/Settings/SettingsManager.cs` and
`Pages/MainPage.xaml.cs` - transaction and reconciliation ownership.
3. `common/MappingConfiguration.cpp` and
`Interop/KeyboardManagerInterop.cs` - native persistence and ABI fixes.
4. `src/common/UITestAutomation.Next/WindowControl.cs` and
`WindowShowWatcher.cs` - child-specific window lifecycle hardening.
5. `.github/skills/ui-tests-pipeline-ci/` - internal Azure CLI/REST
stabilization workflow.

Local evidence: 
<img width="1237" height="854" alt="image"
src="https://github.com/user-attachments/assets/ff49652e-fbc8-4581-a48f-836dbed37b6e"
/>
2026-08-21 17:35:13 -07:00
Gleb Khmyznikov
d68980a81b [UITests][FancyZones + Editor] Migrate FZ UI tests to .Next framework + add new tests (#49985)
# test(fancyzones): migrate and expand UI tests to winappcli

## Summary of the Pull Request

Part of #40658.

Adds `FancyZones.UITests.Next`, a Microsoft.Testing.Platform test
executable built on `UITestAutomation.Next` and winappcli. It ports the
18 active legacy FancyZones tests and adds 3 conservative backend
scenarios selected from the larger manual plan:

- quick-layout switching during an active window drag
- excluded-app enforcement
- one-monitor keyboard snapping, zone cycling, and last-zone restore on
reopen

The suite now contains 21 tests. Editor CRUD and layout-authoring
coverage remains in the separate `FancyZonesEditor.UITests` project.

The migration also fixes two FancyZones defects exposed by the new
tests: swallowed Shift input did not update drag state, and the first
Shift-triggered zone highlight was reset after it was calculated.

## PR Checklist

- [ ] Closes: #49426 
- [x] CI Green
https://microsoft.visualstudio.com/Dart/_build/results?buildId=155118915

## Detailed Description of the Pull Request / Additional comments

### FancyZones test migration

- Registers `FancyZones.UITests.Next` for x64 and ARM64 in
`PowerToys.slnx`.
- Ports dragging, quick-layout, virtual-desktop, window-switching,
transparency, editor-launch, and process-start coverage.
- Adds focused coverage for excluded apps, keyboard snap
override/cycling, last-zone restore, and quick-layout switching during a
drag.
- Uses per-monitor-v2 DPI awareness and keeps the legacy WinAppDriver
suite in place.

### Stable behavioral signals

- Uses `app-zone-history.json`, `applied-layouts.json`, and per-HWND
`FancyZones_zones` properties instead of relying on visual geometry
alone.
- Uses WinEvent hooks for transient zone flashes and Win32
window/process queries for cheap readiness checks.
- Drives the layout editor through its named event and verifies the
resulting files.
- Tracks Explorer windows by HWND, validates title-bar point ownership,
recomputes grab coordinates after failures, and retries the complete
drag gesture.
- Keeps modifier state through `MOVESIZEEND` and avoids cursor movement
that changes the selected zone.

### Product fixes

- Records Shift state before the low-level hook swallows the key during
an active move loop.
- Enters snapping mode before calculating the first highlighted zone so
the transition does not reset that result.

### Shared framework and CI hardening

- Adds reusable named-event, window-show watcher, keyboard-state,
window-property, alpha, foreground, and capture helpers to
`UITestAutomation.Next`.
- Advances the centrally managed .NET package set from `10.0.10` to
`10.0.11` to match the runtime packs selected by SDK `10.0.400` and
prevent dependency-audit collisions.
- Documents Azure Artifacts runtime-pack cache misses and the
authenticated upstream-cache workflow.

The broader manual checklist remains intentionally manual where
automation would be costly or fragile: multi-monitor/span scenarios,
lock/reboot and device reconnect, administrator boundaries, child/popup
windows, appearance color rendering, and overlap-algorithm visuals.
FancyZones Editor creation/copy/delete/grid/canvas workflows are already
covered by its dedicated UI-test project.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: khmyznikov <6115884+khmyznikov@users.noreply.github.com>
2026-08-21 23:43:32 +02:00
Niels Laute
a4d10fc859 fix(settings-ui): prevent update checks from resetting modules (#50018)
## Summary of the Pull Request

Prevents update checks from resetting enabled module states when
Settings UI holds stale or default general settings.

The update check now sends the existing action-only IPC shape from
`src/settings-ui/Settings.UI/ViewModels/UpdateViewModel.cs`. Runner
handles that command without applying its payload as general settings in
`src/runner/settings_window.cpp`.

## PR Checklist

- [x] Closes: #48907
- [x] **Communication:** Root cause analysis was posted on the linked
issue
- [x] **Tests:** Added/updated and all pass

## Detailed Description of the Pull Request / Additional comments

Previously, `CheckForUpdates()` embedded the complete mutable
`GeneralSettings` object in a custom-action message. Runner then called
`apply_general_settings` on that action payload. If Settings UI had
loaded fallback defaults, merely checking for an update could persist
those defaults and overwrite the user's enabled module choices.

This change:

- sends only `{ "action": { "general": { "action_name":
"check_for_updates" } } }`;
- prevents Runner from treating an update action as a general-settings
update;
- preserves prerelease behavior because changing that setting already
sends normal general-settings IPC before starting the update check; and
- updates
`src/settings-ui/Settings.UI.UnitTests/ViewModelTests/Update.cs` to
verify non-default module states are neither transmitted nor mutated.

No persisted settings schema, localization, documentation, or binary
changes are required.

## Validation Steps Performed

- Built
`src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj` for
x64 Debug.
- Ran `ViewModelTests.Update` with `vstest.console.exe`: 26 passed.
- Built `src/runner/runner.vcxproj` for x64 Debug.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-21 14:14:48 +08:00
Boliang Zhang
5ec457ea44 fix(shortcutguide): restore excluded-app filtering regression (#50046)
## Summary of the Pull Request

**Regression:** PR #48683 changed Shortcut Guide from a process launched
per invocation to a
persistent background process. Before that change, every activation
started a process and evaluated
the current foreground app against the latest excluded-app settings. The
excluded-app check
remained in `Program.Main`, so after #48683 it ran only when the
persistent process started.
Excluded apps therefore stopped blocking later regular-hotkey and
Windows-key-hold activations, and
newly saved exclusions had no effect until the process was recycled.

This PR restores the pre-#48683 excluded-app behavior by:

- starting the persistent Shortcut Guide listener regardless of the
startup foreground app;
- evaluating the current foreground app against the latest excluded-app
settings before each
  hidden-overlay activation;
- applying the same gate to the regular hotkey and Windows-key-hold
paths; and
- preserving close and hold-surface promotion behavior when the overlay
is already visible.

## PR Checklist

- [x] Closes: #50030
- [ ] **Communication:** This regression was diagnosed from the issue
and recent Shortcut Guide
lifecycle changes; it has not yet been discussed with core contributors
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** N/A - no end-user-facing strings were added or
changed
- [x] **Dev docs:** N/A - no public behavior or developer contract
changed
- [x] **New binaries:** N/A - no binaries or projects were added
- [x] **Documentation updated:** N/A - this is a regression fix
restoring existing behavior

## Detailed Description of the Pull Request / Additional comments

`src/modules/ShortcutGuide/ShortcutGuide.Ui/Program.cs` no longer exits
at process startup when the
then-foreground application is excluded. The background listener must
remain available for later
activations.


`src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml.cs`
calls the existing native
excluded-app helper for each activation while the overlay is hidden.
That helper already reloads
`settings.json` and rebuilds its excluded-app list on every call, so no
watcher or cache is needed.
The result is passed into

`src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ShortcutGuideActivationPolicy.cs`,
keeping the
decision shared by both activation sources and directly testable.

The check is intentionally skipped while the overlay is visible. This
preserves the regular
hotkey's ability to close its guide or take ownership of a guide opened
by Windows-key hold.
Suppression logging is generic and does not include application names,
paths, window titles, or
settings content.

This is a regression fix rather than a new excluded-app feature or
settings-schema change.

## Validation Steps Performed

- Built
`src/modules/ShortcutGuide/ShortcutGuide.UnitTests/ShortcutGuide.UnitTests.csproj`
for x64
  Release from the final rebased commit.
- Ran the Shortcut Guide test executable: **48 passed, 0 failed, 0
skipped**.
- Added cases covering:
  - regular-hotkey suppression over an excluded app;
- Windows-key-hold suppression for taskbar indicators and the full
guide;
  - closing a visible regular guide; and
  - promoting visible hold indicators with the regular hotkey.
- Built a complete local x64 Release payload and confirmed its Runner
launched the local Shortcut
  Guide process and handled open/close activation.

Copilot-Session: 8271bded-18e8-474e-8e3b-addd71f67f50
2026-08-21 14:13:47 +08:00
Niels Laute
d3eccba55d [Window Hopper] Add AltBackTic attribution (#49962)
## Summary
- add an attribution link to the Window Hopper settings page
- credit Wzhudev's work on AltBackTic and link to their GitHub profile

## Validation
- built `PowerToys.Settings.csproj` for Debug ARM64

Copilot-Session: b9216327-0d3a-4bd0-be95-798efc896ca1
2026-08-21 10:53:09 +08:00
Niels Laute
ddc536c696 fix(ci): correct issue triage labels and repro detection (#49999)
## Summary of the Pull Request

Fixes two automated issue-triage regressions exposed by #49989:

- Stops `.github/workflows/issue-triage.md` from adding, removing, or
replacing version labels. Reported versions remain available for the
triage summary and update guidance only.
- Expands `.github/scripts/issue-triage/issue-context.py` action
detection so concise natural-language reproduction steps using verbs
such as `make`, `hold`, and `use` are treated as actionable.
- Adds regression coverage for #49989 and a workflow contract test that
prohibits version-label management.

## PR Checklist

- [x] **Communication:** Discussed with a core contributor based on the
automation behavior observed in #49989
- [x] **Tests:** Added/updated and all pass
- [x] **Dev docs:** Updated `.github/scripts/issue-triage/README.md`

## Detailed Description of the Pull Request / Additional comments

The issue body in #49989 was not edited after creation. The workflow
received the original reproduction steps, but deterministic
preprocessing recognized only one action verb (`press`) and classified
the steps as insufficient because two action markers were required. The
publisher then added `Needs-Author-Feedback` from that result.

Independently, the publisher explicitly matched the reported PowerToys
version against repository labels and added `0.100.2`. That
version-label mutation has been removed from both the source workflow
and generated lockfile, with a static contract test to prevent it from
returning.

This PR does not close #49989 because that issue tracks the underlying
Keyboard Manager behavior, not the triage automation regression.

## Validation Steps Performed

- `python -m unittest discover .github\scripts\issue-triage\tests` — all
50 tests passed.
- Evaluated the exact #49989 issue body through `reproduction_quality`;
it now returns `SUFFICIENT`.
- Regenerated `.github/workflows/issue-triage.lock.yml` with `gh aw
compile issue-triage --no-check-update` using gh-aw v0.86.2.

Copilot-Session: 498721d4-1098-4298-ac8a-147066fbfea3
2026-08-19 16:44:21 +02:00
Boliang Zhang
ab1f521067 fix(shortcutguide): separate hotkey and Win hold activation (#50000)
## Summary of the Pull Request

Fixes a regression where `Win+Shift+/` was treated as a Windows-key hold
because both activation paths signaled the same event. Regular
activation now opens the full Shortcut Guide independently of the **Hold
Windows key** setting and remains visible after Win is released.

## PR Checklist

- [x] Closes: #49990
- [ ] **Communication:** Core contributor review is still required
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** N/A - no end-user-facing strings changed
- [x] **Dev docs:** N/A - no developer-facing contract or workflow
changed

## Detailed Description of the Pull Request / Additional comments

- Keeps regular activation on `OnHotkeyEx()` and routes Win-only holds
through the existing `on_hotkey(size_t)` module seam with a reserved ID.
- Adds a dedicated named event for Win-key hold activation while
preserving the existing regular trigger event and module ABI layout.
- Removes `GetAsyncKeyState` trigger-source inference from Shortcut
Guide UI.
- Tracks the source and visible surface explicitly so Win release closes
only hold-owned UI:
- regular hotkey always opens the full guide and is unaffected by hold
settings;
  - **Off** ignores Win-only holds;
  - **Taskbar indicators** closes on Win release;
- **Open Shortcut Guide** follows the configured close-on-release value.
- Handles both left and right Windows keys.
- Clears stale held-key registrations and pending timers before
re-registering them.
- Uses `MOD_NOREPEAT` for centralized activation hotkeys so a held chord
cannot repeatedly toggle the overlay.
- Normalizes `MOD_NOREPEAT` before centralized action lookup, validates
queued hold activations against the current Win-key state, and transfers
hold-owned full-guide surfaces to regular-hotkey ownership.
- Adds a pure activation policy and a data-driven unit-test matrix.

Touched areas:

- `src/runner/` - source-specific dispatch, held-key registration
cleanup, and repeat suppression.
- `src/common/interop/` - additive hold-event constant and WinRT
projection.
- `src/modules/ShortcutGuide/ShortcutGuideModuleInterface/` - dedicated
hold event signaling and hold-setting guard.
- `src/modules/ShortcutGuide/ShortcutGuide.Ui/` - explicit activation
routing and source-aware release behavior.
- `src/modules/ShortcutGuide/ShortcutGuide.UnitTests/` - activation and
release policy coverage.

**Risks and mitigations**

- The existing regular event and settings JSON remain unchanged.
- No virtual method or data member was added to `PowertoyModuleIface`;
the existing `on_hotkey(size_t)` method is reused.
- Duplicate hold callbacks are prevented during settings refresh, and
duplicate hold events are UI no-ops.
- No new telemetry or user-content logging was added.

## Validation Steps Performed

- Built the full x64 Release solution and confirmed the complete payload
starts without missing-module dialogs or Runner startup errors.
- After rebasing onto current `main`, reran
`tools\build\build-essentials.cmd -Platform x64 -Configuration Release`
and built the affected interop, Runner, module-interface,
index-generator, UI, and unit-test projects; all error logs were empty.
- Ran the x64 Release `ShortcutGuide.UnitTests.dll` with
`vstest.console.exe`: **43/43 passed**, including all 15
activation-policy cases.
- After addressing review feedback, rebuilt the x64 Release Runner,
Shortcut Guide UI, and unit-test projects; all builds passed and the
unit tests remained **43/43**.
- Signaled a queued hold after Win was released and confirmed no overlay
opened. Then exercised hold-owned full-guide to regular-hotkey ownership
transfer and confirmed both activations resolved to `ShowFullGuide` and
the guide remained visible after Win release.
- Held an injected `Win+Shift+/` chord for 1.4 seconds over Notepad: the
full guide opened, remained visible after Win release, and logs recorded
two regular activations (open/close) with **zero** hold activations.
- Triggered the dedicated hold event over Notepad in both hold modes:
- **Taskbar indicators:** the 2048x1104 overlay was visible and
`WS_EX_TOPMOST`.
- **Open Shortcut Guide:** the full guide and taskbar indicators were
visible in the same topmost overlay.

Manual verification matrix for a preview build:

1. Set **Hold Windows key** to Off, Taskbar indicators, and Open
Shortcut Guide.
2. In each mode, press and release `Win+Shift+/`; confirm one full panel
remains visible.
3. Hold LWin and RWin separately; confirm only the selected hold
behavior runs.
4. For Open Shortcut Guide, verify close-on-release enabled and
disabled.
5. Verify a second regular activation toggles the full panel closed.

For physical Win-hold checks, run PowerToys at the same or higher
integrity level as the foreground app. `RegisterHotKey` activation can
work across an elevation mismatch while Runner's low-level hold hook
cannot observe the key.

Closes #49990

---------

Copilot-Session: 8271bded-18e8-474e-8e3b-addd71f67f50
2026-08-19 08:11:11 +00:00
Niels Laute
5eeb979339 fix(screen-ruler): migrate legacy measurement unit values (#49898)
## Summary of the Pull Request

Closes #49899

Fixes a PowerToys Settings crash when navigating away from the Screen
Ruler page with legacy measurement-unit settings.

Older Screen Ruler builds persisted `Measurement::Unit` enum values
(`Pixel = 1`, `Inch = 2`, `Centimetre = 4`, `Millimetre = 8`). The
current Settings page binds the persisted value directly to a four-item
`ComboBox.SelectedIndex`, which only accepts `0-3`. A persisted value
such as `4` therefore produces a WinUI `E_INVALIDARG` stowed exception
when the page is unloaded.

`MeasureToolViewModel` now migrates legacy values to the current
indices, validates all values before exposing them to XAML, and persists
the repaired setting:

- `4` (legacy centimetres) → `2`
- `8` (legacy millimetres) → `3`
- other out-of-range values → `0` (pixels)

## PR Checklist

- [x] Closes: #49899
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** N/A - no user-facing strings changed

## Detailed Description of the Pull Request / Additional comments

The failure was reproduced on `main` with
`%LOCALAPPDATA%\Microsoft\PowerToys\Measure Tool\settings.json`
containing:

```json
"UnitsOfMeasure": { "value": 4 }
```

Screen Ruler opened successfully, but navigating to Shortcut Guide
terminated `PowerToys.Settings.exe` in `Microsoft.UI.Xaml.dll` with
exception `0xc000027b` and `E_INVALIDARG` (`0x80070057`). Changing the
persisted value to `0` eliminated the crash, confirming the invalid
`SelectedIndex` as the cause.

The migration preserves the intended legacy centimetre/millimetre
selection rather than resetting it unnecessarily.

## Validation Steps Performed

- Built `PowerToys.Settings.csproj` in ARM64 Release.
- Added six Measure Tool ViewModel regression cases covering valid,
invalid, and legacy values.
- Ran the full Settings unit suite: **222 passed, 0 failed**.
- Reproduced the original UI flow with `UnitsOfMeasure = 4`:
  - opened Screen Ruler;
  - verified the setting migrated to `2`;
  - navigated to Shortcut Guide;
  - repeated Screen Ruler → Shortcut Guide navigation;
  - verified the Settings process remained alive after both transitions.

Copilot-Session: ebcedcc4-a067-4657-a6a9-046753f9d70c
2026-08-19 10:46:54 +08:00
Pedro Lamas
ed0605a68c [SvgThumbnailProvider] Preserve alpha transparency (#49301)
Render the WebView2 preview on a transparent background and keep the
alpha channel when resizing, so SVGs with transparency no longer render
as black thumbnails.

This also ensures we return an ARGB bitmap that matches what is the
expected in SvgThumbnailProvider.cpp with `WTS_ALPHATYPE::WTSAT_ARGB`.

<!-- 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: #36234
<!-- - [ ] 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
- [ ] **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

**The fix** is a single line — `_browser.DefaultBackgroundColor =
Color.Transparent` in `SvgThumbnailProvider.GetThumbnailImpl`. Without
it WebView2 composites onto an opaque background, so
`CapturePreviewAsync` returns a PNG with no usable alpha.

The native side already advertised `WTS_ALPHATYPE::WTSAT_ARGB`
(`SvgThumbnailProviderCpp/SvgThumbnailProvider.cpp:168`), so it was
promising Explorer an ARGB bitmap that the managed side never actually
produced.

**On the `ResizeImage` changes** (`Format32bppArgb` + dropping
`graphics.Clear(Color.White)`):
I measured these and they are strictly defensive — neither alters
output. `new Bitmap(w, h)`
already defaults to `Format32bppArgb`, and the `Clear` was entirely
overwritten by the
full-coverage `DrawImage` under `CompositingMode.SourceCopy`. I've kept
them because they
make the intent explicit and match the Gcode/Qoi/Bgcode providers, but
they are not
what fixes the bug.

**Also fixed:** `ResizeImage` never disposed its source image, leaking a
GDI bitmap per resize. The three sibling providers all dispose it; SVG
was the only one that didn't.

**Why the BMP round-trip doesn't lose the alpha:** the managed process
saves to a `.bmp`
(`Program.cs:35`) which the native handler reloads via `LoadImage`
(`SvgThumbnailProvider.cpp:167`).
The GDI+ BMP encoder writes 32bpp with the alpha bytes intact, and
`LoadImage` preserves
them, so transparency survives end to end — as the screenshots below
show.

## Screenshots

### Before

<img width="2289" height="1301" alt="image"
src="https://github.com/user-attachments/assets/b08c468a-fa74-4bf6-a007-f45212357503"
/>

### After

<img width="2279" height="1296" alt="image"
src="https://github.com/user-attachments/assets/df586ddc-70d3-4a5f-8939-5a1e3976e465"
/>

(FWIW, the blank icons are expected as those icons where incorrectly
exported)

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

- Viewed a folder of SVGs with transparent backgrounds in File Explorer
at various
  thumbnail sizes — see before/after above.
- Two tests added to `Preview.SvgThumbnailProvider.UnitTests`:
- `GetThumbnailShouldPreserveTransparentBackground` — renders an SVG
covering only
part of the viewBox, asserts the corner pixel stays at `A=0`. Fails
without this fix.
- `ResizeImageShouldPreserveAlphaChannel` — asserts `ResizeImage`
returns
    `Format32bppArgb` and does not force opacity.
- Full suite green locally: 15/15.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 16:30:58 +00:00
Yu Leng
82f2ac632a [Settings] Move NEW tag from Shortcut Guide to Window Hopper (#49995)
## Summary of the Pull Request

Moves the `NEW` tag from Shortcut Guide to Window Hopper across
Settings:

- Moves the navigation badge, including the collapsed parent-category
badge, from System Tools to Windowing & Layouts.
- Marks Window Hopper instead of Shortcut Guide as new on the Dashboard.
- Marks Window Hopper as the new module in the OOBE module metadata.

## PR Checklist

- [ ] Closes: #xxx
- [x] **Communication:** Requested by a PowerToys contributor
- [ ] **Tests:** Not run
- [x] **Localization:** No end-user-facing strings were added or changed
- [ ] **Dev docs:** Not applicable
- [ ] **New binaries:** Not applicable
- [ ] **Documentation updated:** Not applicable

## Detailed Description of the Pull Request / Additional comments

Shortcut Guide no longer shows the `NEW` tag in the Settings navigation
or Dashboard. Window Hopper now shows it in both locations. The parent
navigation badges were moved as well so the correct category surfaces
the tag when collapsed.

The OOBE metadata already had Shortcut Guide marked as not new; this
change marks Window Hopper as new.

## Validation Steps Performed

- Ran `git diff --check`.
- Parsed `ShellPage.xaml` as XML.
- Ran source-level assertions verifying badge ownership for Shortcut
Guide, System Tools, Window Hopper, and Windowing & Layouts.
- Build and tests were not run, following the repository instruction to
avoid builds during routine verification.

Co-authored-by: Yu Leng <yuleng@microsoft.com>
2026-08-18 13:06:26 +02:00
Dave Rayment
0087d2d576 [Build] Separate WinRT props from common .NET props, make verify script more robust and faster (#48059)
<!-- 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
Separates out the common .NET build properties from
**Common.Dotnet.CsWinRT.props** into a new file so POCO libraries don't
have to import WinRT or add exclusions to **verifyCommonProps.ps1**.
Also updates the verify script for robustness and speed.

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

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

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
This is a follow-on from #47211, which included a C# project that didn't
target WinRT. Previously, all C# projects were mandated to include
**Common.Dotnet.CsWinRT.props**, even if they didn't need the WinRT
import, because the common .NET build properties like `TargetFramework`
and Debug/Release configuration were included in the same file.

This PR separates out the non-WinRT information into a new
**Common.Dotnet.props** file. The existing
**Common.Dotnet.CsWinRT.props** file imports this, meaning no changes
are required for existing C# projects.

Additionally, the **verifyCommonProps.ps1** script has been updated to
remove redundant exclusions, add checks for malformed XML, and to speed
up the scan.

### Changes to verifyCommonProps.ps1
The following updates were made:

- Added descriptive header and param info.
- Now using .NET's `EnumerateFiles()` instead of Powershell's slow file
enumeration.
- Now using `XmlDocument.Load()` to quickly load the content of the
file.
- Parsing the document now uses `GetElementsByTagName()` with a '*'
wildcard for the namespace to pull out `Import` tags regardless of
location or ns prefix.
- Removed prior exclusions for **Microsoft.CmdPal.Core.*** and
**Microsoft.CmdPal.Ext.Shell** projects. There are no Core projects any
longer and the **Microsoft.CmdPal.Ext.Shell** project already includes
an import for **Common.Dotnet.CsWinRT.props**.
- Filename comparisons now use an exact match to the filename itself
rather than a wildcard substring match. This means the check is robust
against project names with the same suffix.
- Early exit `break` on successful match, so the whole file need not be
scanned.
- `try/catch` added to prevent a .csproj XML parsing error from breaking
the CI.

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

- Built all Quick Accent projects and confirmed all unit tests passed.
- Edited a .csproj to exclude the end tag. Ran **verifyCommonProps.ps1**
to confirm the parsing error was reported.
- Edited **verifyCommonProps.ps1** to remove the exclusion for
**TemplateCmdPalExtension.csproj**. Ran the script to confirm that the
file was correctly flagged.
- Edited **PowerAccent.Common.csproj** to remove the Import for
**Common.Dotnet.props**. Ran the verify script to confirm that the file
was correctly flagged.
- Edited **PowerAccent.Core.csproj** to remove the Import for
**Common.Dotnet.CsWinRT.props**. Ran the verify script to confirm that
the file was correctly flagged.

## Verify Script Performance

File cache|Before (ms)|After (ms)
--|--|--
Cold|3123|1739
Warm|1849|686
2026-08-18 06:44:10 +00:00
Sthitadhi Maity
93aeae9aa1 Add regression test for issue #49838 (#49867)
## Summary of the Pull Request

Adds a regression test guarding against re-introduction of a hardcoded
`ReasoningEffort` value in
`SemanticKernelPasteProvider.CreateExecutionSettings()`. This value
previously broke every OpenAI/Azure OpenAI custom paste action for
models that don't support `reasoning_effort: minimal`, causing HTTP 400
errors (see #49838).

The underlying fix already exists on `main` —
`CreateExecutionSettings()` no longer sets `ReasoningEffort`, and the
Phi Silica on-device provider has since been split into its own
`PhiSilicaPasteProvider` class. This PR does not modify provider logic;
it adds test coverage to prevent this specific regression from being
reintroduced.

## PR Checklist

- [x] Closes: #xxx
_(Not applicable — this PR does not close #49838, since the underlying
fix already landed separately. Filed to add regression coverage only.)_
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
_(Not yet discussed with core contributors — flagging that this is a
test-only addition in response to already-observed regression risk, and
happy to adjust scope/approach based on maintainer feedback.)_
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
  _(N/A — no user-facing strings changed.)_
- [x] **Dev docs:** Added/updated
  _(N/A — internal test-only change, no dev docs affected.)_
- [x] **New binaries:** Added on the required places
  _(N/A — no new binaries introduced.)_
- [x] **Documentation updated:** If checked, please file a pull request
on our docs repo and link it here: #xxx
  _(N/A — no user-facing documentation changes.)_

## Detailed Description of the Pull Request / Additional comments

Issue #49838 reported that Advanced Paste custom actions fail with HTTP
400 for OpenAI/Azure OpenAI models that don't support `reasoning_effort:
minimal`, a value that was hardcoded in
`SemanticKernelPasteProvider.CreateExecutionSettings()` (originally
introduced in #46727 alongside the Phi Silica on-device provider).

By the time this was investigated, the hardcoded value had already been
removed from `main`, and the code now includes an explicit comment
warning against reintroducing model-specific tuning properties in this
shared method. However, there was no test enforcing that guarantee —
meaning a future change could silently reintroduce the same class of bug
(this is the second time this exact pattern has caused a regression; see
#43766 for the first).

This PR adds a unit test in `AdvancedPaste.UnitTests` that constructs an
OpenAI-configured `SemanticKernelPasteProvider` and asserts that
`CreateExecutionSettings()` returns an `OpenAIPromptExecutionSettings`
object with `ReasoningEffort` left unset. No production code is
modified.

## Validation Steps Performed

- Added the new unit test to `AdvancedPaste.UnitTests`.
- Ran the test locally against the current `main` branch and confirmed
it passes.
- Confirmed no other tests in the `AdvancedPaste.UnitTests` project were
affected by this change.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-08-18 06:28:18 +00:00
李柏汉
7aa5dab2f4 Add PoetSearch to third-party Run plugins list (#49946)
## Add PoetSearch 📜

Add
[PoetSearch](https://github.com/Greyaircraft/PowerToysRun-PoetSearch) to
the third-party PowerToys Run plugins list.

### Features
- Search **78,581 classical Chinese poems** (全唐诗 + 全宋词) directly from
PowerToys Run
- Search by title, author, or content: `poet 静夜思`, `poet 李白`, `poet
床前明月光`
- `poet 随机` / `poet random` — random poem
- **Enter** copies the full poem to the clipboard
- Dark/light theme aware icons

### Install
Extract the release ZIP to `%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys
Run\Plugins\PoetSearch`.

### Note
This is a docs-only change to `doc/thirdPartyRunPlugins.md`.
2026-08-18 06:13:01 +00:00
Subhrajyoti Singha
6d903a42e1 [CmdPal] Add "Update and restart" / "Update and shut down" system com… (#49437)
## Summary of the Pull Request

Adds **Update and restart** and **Update and shut down** to the Windows
System Commands extension, matching what Windows shows in the Start menu
power flyout when updates are waiting for a reboot.

Both only show up while Windows Update is actually waiting on a restart.
When nothing is pending, the command list is exactly what it is today.

## PR Checklist

- [x] Closes: #48849
- [x] **Communication:** commented on the issue before starting;
zadjii-msft had greenlit the idea as long as the commands actually do
something rather than just report status
- [x] **Tests:** added and passing (27/27)
- [ ] **Localization:** 6 new resx strings, each with a translator
comment
- [ ] **Dev docs:** n/a
- [ ] **New binaries:** n/a

## Detailed Description of the Pull Request / Additional comments

**Detecting the pending update.**
`WindowsUpdateHelper.IsUpdatePending()` reads
`ISystemInformation::RebootRequired` from WUAPI, which is the same
signal the Start menu uses, so the commands appear exactly when Windows
would offer them itself.

A few notes on that file, since the interop is a bit unusual:

- I used `[GeneratedComInterface]` rather than `ComImport` to keep it
AOT-compatible.
- `ISystemInformation` is a dual interface, so its first four vtable
slots belong to `IDispatch`. They're declared as placeholder methods
that are never called, and the two real members follow in vtable order.
- The result is cached for 5 seconds. `GetItems()` runs on every
keystroke and would otherwise create a COM object each time — same
reasoning as the existing network info cache in this extension.
- If anything goes wrong (COM creation fails, an exception is thrown) it
falls back to "no update pending", so the commands stay hidden and the
extension behaves exactly as it does now. The failure is logged through
`ExtensionHost.LogMessage`.

**Running the command.** `InitiateShutdown` with
`SHUTDOWN_INSTALL_UPDATES` plus either `SHUTDOWN_RESTART` (0x44) or
`SHUTDOWN_POWEROFF` (0x48). That first flag is what makes this "update
and restart" instead of a plain restart. `SeShutdownPrivilege` is
disabled by default on the process token, so it gets enabled first.

**Wiring.** Both items use the existing `ExecuteCommandConfirmation`
flow, so they respect the "confirm system commands" setting like the
other commands here. They're registered on the System Commands page and
the top-level search fallback, with stable ids
(`...system.update_restart`, `...system.update_shutdown`).

## One question for reviewers

`ShowDialogToConfirmCommand` defaults to `false`, so out of the box
these run immediately when you press Enter, the same as the existing
Shutdown and Restart commands. I kept them consistent rather than
special-casing them, but I hit this myself while testing — I pressed
Enter and my machine started updating and rebooting straight away, which
was a bit of a surprise. Happy to force a confirmation for these two
regardless of the setting if you'd prefer that.

## Validation Steps Performed

27/27 unit tests pass. The 5 new test methods cover the commands being
present/absent in both states, query matching, stable ids, the 0x44 /
0x48 flag values, and that the real WUAPI call doesn't throw.

I also tested it on a machine with a genuine pending update, confirmed
via WUAPI `RebootRequired` and the Windows Update and CBS registry keys:

1. **Before** — the installed 0.11 build, same machine, same pending
update: no update commands.
2. **After** — this build: both commands show up, in the same situation
the Start menu offers them.
3. **Search** — typing `update` matches both, which is the
discoverability gap the issue is about.
4. **Actually ran it** — pressing Enter on "Update and restart"
installed the pending update (KB5121767) and restarted the machine.
After it came back up, `RebootRequired` was false and the two commands
were correctly gone from the list.

### Screenshots

**1. Before**
<img width="785" height="473" alt="Screenshot 2026-07-21 214038"
src="https://github.com/user-attachments/assets/27b12a4c-f636-4815-b8e2-fc918282959b"
/>

**After**
<img width="762" height="445" alt="Screenshot 2026-07-21 215452"
src="https://github.com/user-attachments/assets/80e1936d-af67-48ab-91b4-59b94fb56827"
/>
<img width="762" height="149" alt="pr48849-search-update"
src="https://github.com/user-attachments/assets/53b7f065-4b7c-4317-9e66-e621eed44e61"
/>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 22:15:25 +00:00
Michael Jolley
6fc7f2d058 [CmdPal] Rank global fallbacks by their title match (#49983)
Fallbacks were always getting buried under fuzzy junk, even though their
title matched exactly what you typed. The recent MainListPage ranking
overhaul pinned every fallback to the bottom tier, so a perfect match
was treated the same as no match at all.

Global fallbacks now earn the tier their title/subtitle actually
deserves. A fallback resolves a live title from your query, so when that
title matches exactly (like "Reload" for "reload"), it ranks right
alongside a real command's exact match instead of getting floored.
Fallbacks that don't match anything still drop to the floor, so
always-available handlers like Run command and web search keep showing
without crowding the top.

Non-global fallbacks stay in their own bottom section like before.



https://github.com/user-attachments/assets/685b8cc2-3a69-4ea8-91a9-cfba08a1d23c

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e51d0ce1-d74f-4a27-ac29-9cb9b86ddbee
2026-08-17 19:58:41 +00:00
Alex Mihaiuc
fe9dd6ef5c Protect ZoomIt audio initialization from race on failure (#49912)
This could end up in a deadlock upon trying to record while the previous
recording was still initializing but in an error state.

<!-- 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
2026-08-17 20:32:30 +02:00
moooyo
f510c972f7 [Color Picker] Handle default display refresh-rate sentinel values (#49973)
## Summary of the Pull Request

Treats `dmDisplayFrequency` values `0` and `1` as the display hardware's
default refresh rate instead of literal frequencies.

Color Picker now retains its existing 60 Hz fallback for these sentinel
values, preventing a timer interval overflow for `0` and one-second
sampling for `1`. Valid refresh rates greater than `1` remain unchanged.

## PR Checklist

- [x] Closes: #49971
- [ ] **Communication:** The issue has been filed for triage; this
change has not yet been discussed with core contributors
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** No end-user-facing strings were added
- [ ] **Dev docs:** Not applicable for this implementation-only bug fix
- [ ] **New binaries:** No new binaries were added
- [ ] **Documentation updated:** Not applicable; no user-facing
documentation contract changed

## Detailed Description of the Pull Request / Additional comments

`GetMainDisplayRefreshRate` now accepts a reported refresh rate only
when it is greater than `1`. Otherwise, it keeps the existing 60 Hz
fallback.

A small test seam and unit tests cover reported values `0`, `1`, `60`,
and `144`. The correct `InternalsVisibleTo` entry is added for the
existing `ColorPickerUI.UnitTests` assembly.

This issue was discovered while reviewing #49855, but it is an existing
bug and this PR targets current `main` independently. Since #49855 also
changes the refresh-rate code, whichever PR merges second may need a
trivial rebase that preserves the `> 1` sentinel handling.

No settings schema, IPC contract, dependencies, installer content, or
production binaries were changed.

## Validation Steps Performed

- `tools\build\build-essentials.cmd -Platform x64 -Configuration Debug`:
passed with exit code 0, 0 warnings, and 0 errors.
- `tools\build\build.cmd -Platform x64 -Configuration Debug` from
`ColorPickerUI.UnitTests`: passed with exit code 0, 0 warnings, and 0
errors.
- Full `vstest.console.exe` run for `ColorPickerUI.UnitTests.dll`: **382
passed, 0 failed**.
- `git diff --check`: passed.

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2026-08-17 08:58:36 +00:00
Niels Laute
4494a96be6 chore(common): remove unused shared UI dependencies (#49895)
## Summary of the Pull Request

Removes unused dependencies, stale API surface, and unreachable managed
settings deep-link aliases from the shared UI libraries.

## PR Checklist

- [x] **Communication:** Cleanup scope was reviewed before
implementation
- [x] **Tests:** No automated tests were needed for unused
dependency/API removal; affected projects build successfully
- [x] **Localization:** No end-user-facing strings are changed
- [x] **New binaries:** No new binaries are introduced

## Detailed Description of the Pull Request / Additional comments

- Removes unused `CommunityToolkit.WinUI.Controls.Primitives` and
`CommunityToolkit.WinUI.Converters` package references from
`src/common/Common.UI.Controls/Common.UI.Controls.csproj`.
- Removes the unused `FlyoutWindowHelper.GetDpiScale(WindowEx)` overload
from `src/common/Common.UI.Controls/Window/FlyoutWindowHelper.cs`.
- Removes the unused `SettingsDeepLink.SettingsWindow.PowerDisplay`
value; PowerDisplay uses its module-local settings deep-link helper.
- Removes unreachable `Run` and `PowerPreview` managed aliases,
superseded by `PowerLauncher` and `FileExplorer`, plus their dead CmdPal
lookup cases.
- Preserves the runner's raw `--open-settings=Run` and
`--open-settings=PowerPreview` routes for backward compatibility.
- Intentionally leaves the existing WinForms configuration and
compatibility project references unchanged.

## Validation Steps Performed

- Built `src/common/Common.UI/Common.UI.csproj` for x64 Debug.
- Built `src/common/Common.UI.Controls/Common.UI.Controls.csproj` for
x64 Debug.
- Built
`src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csproj`
for x64 Debug.
- Ran `git diff --check`.

---------

Copilot-Session: f4b96463-079f-47c2-ae9b-7f4c59baf591
2026-08-17 16:56:54 +08:00
moooyo
75df8d022a [Image Resizer] Fix CLI input validation and diagnostics (#49854)
## Summary of the Pull Request

Closes #49852.

Image Resizer CLI previously accepted several invalid inputs as
successful work: unknown options could be consumed as file arguments,
invalid files were silently dropped, unsafe dimensions could reach the
resize engine, and equivalent inputs could process the same source
concurrently.

This change makes `PowerToys.ImageResizerCLI.exe` strict, deterministic,
and diagnosable while preserving the existing lenient command-line
behavior used by the GUI and context-menu path.

## PR Checklist

- [x] Closes: #49852
- [x] **Communication:** Discussed with core contributors
- [x] **Tests:** Added/updated
- [x] **Localization:** End-user-facing diagnostics are localizable
- [x] **Dev docs:** Built-in CLI help and examples updated; no
standalone dev-doc change required
- [x] **New binaries:** No new binaries introduced
- [x] **Documentation updated:** No external user-documentation change
required

## Detailed Description

### Strict CLI parsing without breaking supported syntax

- Adds a strict parse path for the public CLI while keeping the
GUI/context-menu parser lenient.
- Rejects unknown option-like positional tokens before processing.
- Preserves `--`, response files, attached values such as `-w100`, legal
bundles such as `-rq85`, and explicit attached boolean values such as
`-rtrue`.
- Preserves valid file, pipe, and destination values for lenient callers
when another option fails conversion.

### Deterministic and diagnosable input resolution

- Expands wildcards in the final path segment and reports zero-match
patterns.
- Reports missing, unsupported, invalid, and empty inputs instead of
silently filtering them.
- Processes valid files in mixed batches, reports every rejected input,
and returns a non-zero exit code.
- Canonicalizes filesystem paths before deduplication, covering normal,
extended (`\\?\`), long, casing, and parent-reparse aliases while
preserving distinct hard links, final symbolic links, and files in
case-sensitive directories.
- Applies the same strict validation and deduplication to public-CLI
named-pipe input; the GUI/context-menu pipe remains lenient.
- Treats an empty public-CLI pipe as an error.
- Reads redirected stdin using the producing shell's output encoding
with BOM detection, including non-ASCII paths from default cmd and
PowerShell pipelines.

### Validation before file writes

- Rejects negative, non-finite, zero/zero, grouped out-of-range, and
otherwise unsupported custom dimensions.
- Requires a positive effective width for percentage-based Fit and Fill
sizes.
- Treats an out-of-range preset index as an error instead of continuing
with the current preset.
- Validates resize-engine dimensions before integer conversion and
before destination creation.
- Rounds positive fractional Fill targets safely to at least one pixel.
- Deduplicates equivalent paths before parallel processing so
overlapping explicit/glob/pipe inputs cannot race under `--replace`.

### Diagnostics and compatibility

- Includes exception type and HRESULT when a decoder exception has an
empty message.
- Documents and warns that shrink-only remains ignored for
percentage-based sizes, preserving existing behavior.
- Preserves the original UTC modified time after `KeepDateModified +
Replace` by restoring it on the final replaced file.

## Validation

Validation was repeated after merging the latest `main` (`e753ec51fb`)
into the PR branch.

1. Restored with the configured host `NuGet.Config` and built
`src/modules/imageresizer/ImageResizerCLI/ImageResizerCLI.csproj` in x64
Release using `tools/build/build.ps1`.
   - Result: exit code 0; errors log empty.
2. Restored and built
`src/modules/imageresizer/tests/ImageResizer.UnitTests.csproj` in x64
Release with the same build script and configured package source.
   - Result: exit code 0; errors log empty.
3. Ran the complete x64 Release Image Resizer unit-test assembly with
Visual Studio `vstest.console.exe`.
   - Result: **205 passed, 0 failed, 0 skipped**.
4. Ran 10 process-level CLI regressions covering:
   - attached boolean parsing (`-rtrue`);
   - grouped out-of-range dimensions without source modification;
   - positive fractional Fill producing a valid `1x100` image;
   - normal/extended/wildcard path deduplication;
- non-ASCII redirected stdin from default PowerShell 7 and cmd
pipelines;
   - empty, invalid, and duplicate named-pipe inputs;
- `KeepDateModified + Replace`, including content change and exact UTC
timestamp preservation.
   - Result: **10/10 passed**.
5. Confirmed both build error logs remained empty, all temporary
fixtures were removed, and the real Image Resizer settings file retained
its original length, timestamp, and SHA-256 hash.

The new Image Resizer UI-test project added on `main` was not run
locally because it requires the repository's WinAppDriver/local-VM
UI-test environment; this PR does not change that UI-test project.

---------

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
2026-08-17 08:50:51 +00:00
Boliang Zhang
e753ec51fb feat(release): automate draft preview release preparation (#49797)
## Summary of the Pull Request

Adds a `Prepare Preview Release` custom agent that autonomously turns a
successful PowerToys Azure DevOps release-candidate build into a
complete GitHub draft prerelease for final human review.

The implementation extends the existing `release-note-generation` skill
instead of duplicating it. It adds exact-build metadata resolution,
published-release baseline selection, semantic PR deltas across `main`
and `stable`, release asset validation, idempotent draft-only release
updates, and final draft verification.

## PR Checklist

- [x] **Communication:** The autonomous preview-release design was
reviewed and approved before implementation
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** N/A; no end-user-facing strings were added
- [x] **Dev docs:** Added preview scenario, delta, draft safety, and
reporting references

## Detailed Description of the Pull Request / Additional comments

- Adds `.github/agents/prepare-preview-release.agent.md` with a
no-mid-run-decision workflow and a strict prohibition on publishing
releases.
- Extends `.github/skills/release-note-generation/SKILL.md` with
stable/preview scenario routing while preserving the existing
stable-release workflow.
- Adds canonical scripts under
`.github/skills/release-note-generation/scripts/` to:
  - Resolve and validate ADO build metadata.
- Select the latest published stable or preview baseline before build
queue time.
- Calculate same-lineage or branch-transition PR deltas using PR
numbers, cherry-pick provenance, and patch-ID equivalence.
  - Collect normalized PR metadata and create `release-manifest.json`.
- Download and validate installers, symbols, and GPO assets, including
hashes, signatures, and ZIP contents.
- Create or update draft prereleases while preserving human text outside
managed markers.
- Verify draft flags, immutable target commit, body markers, and
uploaded assets.
- Updates `.pipelines/resolveBuildMetadata.ps1` and
`.pipelines/v2/release.yml` with explicit `auto`, `preview-release`, and
`stable-release` intent handling so preview candidates can be built from
either `main` or `stable`.
- Adds `.pipelines/writeReleaseMetadata.ps1` so each signed build
artifact records its resolved version, channel, intent, source branch,
and immutable source commit.
- Keeps release publication outside the agent: the automation can only
create or update a draft prerelease.

## Validation Steps Performed

- `Invoke-Pester` for:
  - `.pipelines/tests/resolveBuildMetadata.Tests.ps1`
  - `.pipelines/tests/writeReleaseMetadata.Tests.ps1`
-
`.github/skills/release-note-generation/tests/preview-release.Tests.ps1`
- 37 tests passed, covering stable-branch preview intent, metadata
contracts, baseline selection, same-lineage and branch-transition
deltas, patch-ID equivalence, managed-body preservation, and
published-release refusal.
- Parsed all added or modified PowerShell scripts with the PowerShell
AST parser.
- Parsed the modified pipeline YAML files with `ConvertFrom-Yaml`.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8e04a72e-3b0f-4ac4-8156-d04ea9b8bb85
Copilot-Session: e9f79ac2-9a7b-4083-834c-0d87e8c83bfd
Copilot-Session: 1ecea747-b313-49a1-9969-543c01ba1be8
2026-08-17 14:47:18 +08:00
Niels Laute
3d0c3bdb29 Fix issue triage and PR intake workflow behavior (#49924)
## Summary

- run AI issue triage only when an issue is opened or its original
title/body is edited
- do not run issue triage for comments or reopen events
- store deterministic issue evidence in the agent-visible runner temp
directory
- expose structured safe-output publication through the restricted CLI
proxy while keeping shell, edit, and GitHub API tools disabled
- skip PR intake jobs for draft pull requests and run intake when they
become ready for review
- replace the `Needs-Review` lifecycle label with `Ready for review`,
migrating the legacy label on subsequent intake runs

Closes #49917

## Validation

- `gh aw compile issue-triage`
- `python -m unittest discover .github\scripts\issue-triage\tests -v`
(46 tests)
- `node --test .github\scripts\pr-intake\tests\pr-intake.test.mjs` (32
tests)
- `git diff --check` on committed files

---------

Copilot-Session: 3067a641-aa79-4f96-8d9f-eaa1c6d9b3cf
2026-08-15 08:45:39 -07:00
Jiří Polášek
f1548fcf8b CmdPal: Fix Dock refresh resource leak (#49742)
## Summary of the Pull Request

This PR improves Dock band refresh and partially eliminates our favorite
leak:

- Reuses Dock item view models while their source items remain stable.
- Coalesces bursty ItemsChanged notifications into a single follow-up
refresh.
- Cleans replaced and discarded view models after applying UI updates.
- Prevents queued refreshes from repopulating bands after cleanup.
- Handles unavailable UI schedulers without abandoning created view
models.
- Adds unit tests for reuse and cleanup.


## Pictures? Pictures!

Before

<img width="1671" height="400" alt="image"
src="https://github.com/user-attachments/assets/3a0874e6-eded-44f0-8bc2-bfa223e2888d"
/>


After

<img width="1671" height="716" alt="image"
src="https://github.com/user-attachments/assets/1560bfdb-5701-40bd-9f20-d4e885159ab8"
/>


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

- [x] Closes: #49428
<!-- - [ ] 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-08-14 17:44:55 -05:00
Michael Jolley
bcb2ed6dc7 CmdPal: Fix Command Palette Dock breaking on monitor topology changes (#49814)
Docking or undocking a laptop, or flipping display modes with Win+P, can
leave the Dock empty, missing, or misconfigured. Fixes #48516.

The root of it: the Dock's per-monitor config leans on a stable hardware
ID for each monitor. Right after a `WM_DISPLAYCHANGE`, before Windows
has settled the new topology, that lookup can come back empty or fall
back to a volatile GDI name. The reconciler then reads that as "hey, a
new monitor showed up" and creates a fresh, disabled, empty config for a
monitor that never actually left. On top of that, a burst of
`WM_DISPLAYCHANGE` messages during a mode switch each triggered an
immediate write to settings, so one bad intermediate snapshot could get
baked in permanently. And since only the Dock window itself was
listening for `WM_DISPLAYCHANGE`, the Settings page's monitor list could
go stale whenever no Dock window happened to be alive.

## The plan

- Retry the stable-ID lookup a few times before giving up and falling
back to the volatile name.
- Debounce monitor-change handling so a flurry of `WM_DISPLAYCHANGE`
events settles down before we reconcile and persist, instead of writing
every half-finished intermediate state.
- Have the main window forward `WM_DISPLAYCHANGE` too, so the monitor
cache stays fresh even when the Dock is off or has no windows up.
- Teach the reconciler to reassociate a secondary monitor's config with
its new ID when there's exactly one unmatched monitor and one unmatched
config, the Win+P round trip case, instead of treating it as new
hardware.
- Added tests covering the transient ID fallback, the ambiguous
multi-monitor case, and the Win+P reassociation.

Scaling behavior when the Dock lands on a monitor with a different DPI
is a separate issue (#48466) and isn't touched here.

---------

Copilot-Session: d2bc281b-062c-4e6e-9356-bdb7a2ef9e1e
2026-08-14 16:52:18 -05:00
Niels Laute
523409ed06 Add AI-assisted PR triage (#49911)
## Summary of the Pull Request

Adds AI-assisted pull request triage using GitHub Agentic Workflows. A
bounded Copilot pass summarizes each PR and classifies screenshots,
GIFs, or video as required, recommended, or unnecessary. Deterministic
publishing validates the exact PR evidence hash, closing issue
references, merge conflicts, draft state, and supplied visual evidence
before updating one canonical comment.

The workflow manages only `Needs-Review` and `Needs-Author-Feedback`.
Missing issue references are advisory; invalid references, merge
conflicts, and missing required visual evidence block readiness.
Existing resource-management automation continues to close inactive PRs
awaiting author feedback.

## PR Checklist

- [ ] Closes: #xxx
- [x] **Communication:** Discussed the intended PR intake flow and
comment format
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** No product strings added
- [x] **Dev docs:** Added workflow documentation
- [x] **New binaries:** Not applicable
- [x] **Documentation updated:** Repository automation documentation
updated

## Validation Steps Performed

- `node --check .github/scripts/pr-intake/pr-intake.mjs`
- `node --test .github/scripts/pr-intake/tests/pr-intake.test.mjs` — 23
passing
- `gh aw compile pr-intake` with gh-aw v0.86.2
- Read-only preprocessing against PR #49905 confirmed four changed
files, no visual-evidence hint, and `mergeable=false` /
`mergeable_state=dirty` is detected as a blocking conflict

Copilot-Session: 3067a641-aa79-4f96-8d9f-eaa1c6d9b3cf
2026-08-14 21:29:14 +00:00
Niels Laute
8088120b06 Improve issue triage product-label detection (#49905)
## Summary

Issues that put the module in a `[Module]` title prefix (a common
PowerToys convention) but omit the bug template's **"Area(s) with
issue?"** section were left **Unclassified** with no `Product-*` label —
e.g. #49899 *"[Screen Ruler] Settings crashes ..."* got no
`Product-Screen Ruler` label despite the title.

Root cause: product-label detection was purely deterministic and narrow.
`parse_area` (`.github/scripts/issue-triage/issue-context.py`) only read
the template area section or a 6-entry keyword map, and the agent prompt
instructed the model to copy that candidate verbatim (and send `None`
otherwise). The `[Module]` title convention was never consulted.

## Change (two layers)

**1. Deterministic title-prefix matching (primary).** Parse the leading
`[Module]` bracket(s) in the title and match against existing
`Product-*` labels; upgrade the detected area when the body has no area
signal. Fully deterministic and auditable — this alone fixes Screen
Ruler and every other bracketed title.

**2. Constrained AI fallback (secondary).** Expose the repo's
`Product-*` labels as `Available product labels` in the deterministic
evidence, and allow the agent — **only when the deterministic candidate
is `None`** — to select the single best-matching existing label. This is
safe because the publisher already validates the agent's `product_label`
against the real label set, so the agent can only ever **add a valid
existing label**, never invent one or remove/change others.

The workflow prompt is `{{#runtime-import}}`-ed from `issue-triage.md`,
so the lock file changes only by its `body_hash` (sync check);
recompiled with the repo's current gh-aw `v0.84.3` to avoid unrelated
version drift.

## Tests

New unit tests in `tests/test_issue_context.py`:
- `test_title_prefix_maps_to_existing_product_label`
- `test_available_product_labels_are_sorted_and_filtered`
- `test_prepare_labels_bracketed_title_without_area_section`

All 30 tests pass (`python -m unittest tests.test_issue_context`).

## Files
- `.github/scripts/issue-triage/issue-context.py` — title-prefix
detection, available-label list, wiring
- `.github/scripts/issue-triage/tests/test_issue_context.py` — new tests
- `.github/workflows/issue-triage.md` — prompt allows constrained
fallback
- `.github/workflows/issue-triage.lock.yml` — recompiled (`body_hash`
only)

Generated with the GitHub Copilot CLI.

Co-authored-by: niels9001 <niels9001@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26025067-259e-43e3-9dc7-a9fc4b5ba58b
2026-08-14 21:14:55 +00:00
Niels Laute
105ef0abcb Add Daily Dedupe Digest workflow driven by AI Issue Triage output (#49907)
## Summary

Rewrites the Daily Dedupe Digest as a lightweight aggregator over the
existing **AI Issue Triage** workflow, superseding #48244.

Instead of running its own `gpt-4o-mini` duplicate-detection pass, this
workflow treats the triage workflow as the single source of truth. AI
Issue Triage already:

- posts a canonical comment per issue (marker `<!--
powertoys-ai-triage:canonical:v1 -->`) containing a `### 🔁 Possible
duplicates` section, and
- files a *pending* native duplicate-close suggestion pointing at the
strongest canonical candidate.

The digest simply collects those and drops them into one daily review
issue.

## Behavior

Runs daily (`0 8 * * *`) and via `workflow_dispatch`. Each run:

1. Ensures the `dedupe-digest` label exists.
2. Builds a candidate set from **carry-over** issues remembered in the
previous digest (hidden `<!-- dup:ISSUE=.. CANON=.. -->` markers) plus
**fresh** open issues updated in the lookback window (default 26h).
3. Re-validates each candidate against its *live* triage comment —
issues that are closed or labeled `duplicate` / `Resolution-Duplicate`
drop out automatically.
4. Opens a **new** issue each day, assigned to `@niels9001`, listing
every flagged issue (the duplicate → to close) with its suggested
canonical issue (→ keep) and the triage reason. Links to each triage
summary comment are included.
5. Closes the previous digest, superseded by the new one.
6. If nothing is flagged, it closes the previous digest and creates
none.

## Notes

- No model calls / no `models: read` permission — only `issues: write`.
- Untrusted issue/comment text is sanitized (HTML comments, control
chars, angle brackets stripped) before being written into the digest, to
avoid marker injection.
- Tunable via `env`: assignee, label, title prefix, lookback hours,
scan/flag caps, resolved-duplicate labels.

Supersedes #48244.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: niels9001 <niels9001@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26025067-259e-43e3-9dc7-a9fc4b5ba58b
2026-08-14 20:59:29 +00:00
Jiří Polášek
8d463be70c CmdPal: Ignore failed package catalog completion events (#49887)
## Summary of the Pull Request

This PR prevents Command Palette from processing failed package
lifecycle operations as successful extension changes.

`PackageCatalog` can report an operation as complete while exposing the
failure through `ErrorCode`. Previously, `WinRTExtensionService` checked
only `IsComplete`, allowing failed installation, uninstallation, and
update operations to enter extension handling.

- Adds a shared `IsSuccessfulPackageOperation` check requiring both
    - the package operation to be complete, and
    - the projected `ErrorCode` to be null.
- The check is applied to catalog event:
    - `PackageInstalling`
    - `PackageUninstalling`
    - `PackageUpdating`


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

- [x] Closes: #49886
<!-- - [ ] 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-08-14 14:52:35 -05:00
jan-jaros
3487113068 Add DevDocs plugin to third-party plugins list (#49697)
Adds a row for the DevDocs plugin, per @niels9001's suggestion in #49592
to publish it as a standalone third-party plugin instead of built-in.
2026-08-14 17:03:16 +00:00
Niels Laute
5485e27a0c Bump AI Issue Triage gh-aw engine and image versions (#49885)
## Summary

The **AI Issue Triage** agentic workflow ([run
31779057901](https://github.com/microsoft/PowerToys/actions/runs/31779057901/job/94700789335))
failed at the **Execute GitHub Copilot CLI** step. The Copilot CLI
binary was missing at `/usr/local/bin/copilot` inside the AWF firewall
agent container:

```
[copilot-harness] pre-flight: command not found: /usr/local/bin/copilot (F_OK check failed — binary does not exist at this path)
[copilot-harness] attempt 1: failed to start process '/usr/local/bin/copilot': spawn /usr/local/bin/copilot ENOENT
[copilot-harness] attempt 1: no output produced — not retrying
```

With no output produced, the harness exited with code 1 and the job
failed.

## Change

Recompiled the workflow with `gh aw upgrade` (gh-aw `v0.84.3` →
`v0.86.2`), which refreshes the pinned engine, images and actions —
including the agent container image that ships the Copilot CLI binary.

| Component | Before | After |
| --- | --- | --- |
| `github/gh-aw-actions/setup` | `v0.84.3` | `v0.86.2` |
| gh-aw compiler | `v0.84.3` | `v0.86.2` |
| AWF firewall (agent/api-proxy/squid) | `0.27.43` | `0.27.44` |
| Copilot CLI (agent) | `1.0.77` | `1.0.79` |
| `gh-aw-mcpg` | `v0.4.7` | `v0.4.9` |
| `github-mcp-server` | `v1.8.0` | `v1.9.0` |

All container images are digest-pinned; digests were verified against
GHCR.

## Files
- `.github/workflows/issue-triage.md` — engine/action version
normalization
- `.github/workflows/issue-triage.lock.yml` — recompiled lock file
- `.github/aw/actions-lock.json` — bumped `gh-aw-actions/setup` pin

Generated with the GitHub Copilot CLI.

Co-authored-by: niels9001 <niels9001@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26025067-259e-43e3-9dc7-a9fc4b5ba58b
2026-08-14 09:01:09 +00:00
Niels Laute
446bb9f241 [Shortcut Guide] Add page-local search (#49639)
## Summary of the Pull Request

Adds an accessible search box to the Shortcut Guide title bar that
filters shortcuts on the currently selected application page.

The query matches shortcut names, descriptions, modifier names, and
displayed key labels while preserving the existing pinned, recommended,
category, and taskbar grouping.

## PR Checklist

- [x] Closes: #48791
- [x] **Communication:** The UX and behavior were discussed before
implementation
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Not applicable
- [ ] **Documentation updated:** Not applicable

## Detailed Description of the Pull Request / Additional comments

- Adds a localized title-bar `AutoSuggestBox` with a find icon and UI
Automation identity.
- Filters only the selected app page using case-insensitive matching
across names, descriptions, modifiers, virtual-key display names, and
rendered special-key aliases.
- Keeps only sections containing matches and shows a polite live-region
no-results state with correct pane spacing.
- Preserves the query when switching app pages, but clears it when
Shortcut Guide closes.
- Adds `Ctrl+F` to focus search; the first `Escape` clears a query and
the next closes the overlay.
- Keeps query text local to the UI with no logging or telemetry.

Related issues: #48860 requests several broader navigation/readability
changes; #49459 requests direct physical-key interception rather than
text search.

## Screenshots

### Filter Windows shortcuts by displayed key label

<img
src="https://raw.githubusercontent.com/niels9001/PowerToys/pr-assets-shortcut-guide-search/.github/pr-assets/shortcut-guide-search/windows-alt-filter.png"
width="667" alt="Shortcut Guide Windows page filtered by Alt" />

### Keep the query while switching to the PowerToys page

<img
src="https://raw.githubusercontent.com/niels9001/PowerToys/pr-assets-shortcut-guide-search/.github/pr-assets/shortcut-guide-search/powertoys-opa-filter.png"
width="660" alt="Shortcut Guide PowerToys page filtered by opa" />

## Validation Steps Performed

- Built `ShortcutGuide.Ui` for ARM64 Debug with the repository build
scripts.
- Built `ShortcutGuide.UnitTests` for ARM64 Debug and passed all 23
tests (16 search cases plus 7 existing tests) with `vstest.console.exe`.
- Verified via UIA and guarded keyboard input that name/key-label
filtering updates immediately, empty sections disappear, and no matches
show the localized live-region state.
- Verified the query persists when switching Windows to PowerToys,
`Ctrl+F` focuses search, first `Escape` clears, second `Escape` closes,
and reopening starts with an empty query.
- Rebuilt after the final no-results accessibility and 16px top-margin
adjustment.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8ffa76b-3cf0-4a67-9adb-a13c5dd9f125
Copilot-Session: 4a96c2c2-6954-4784-8257-e0de0fac15a7
Copilot-Session: 1f00def4-e790-4071-96c6-a81c9c2adba5
Copilot-Session: 76e284a6-9a03-4105-bae6-4ed7fc92042d
2026-08-14 07:32:02 +00:00
Niels Laute
57b01a1c4e Add issue triage actions (#49828)
## Summary of the Pull Request

Replaces the retired GitHub Models-based automatic issue triage and
deduplication flows with the GitHub Agentic Workflow proven in the
`niels9001/powertoys-ai-triage-sandbox`.

This PR also:

- aligns `Needs-Author-Feedback` closure to 7 days for issues and PRs;
- removes the automatic GitHub Models issue/PR labeler;
- removes the automatic GitHub Models new-issue deduplicator;
- removes the Azure Pipelines XAML Styler verification step while
retaining the
  local styling script.

This is a draft because production rollout still requires the
appropriate
privacy and Responsible AI reviews.

## Issue triage rules

### Triggers and refresh behavior

- Runs when an issue is opened, edited, or reopened.
- Runs when the issue author attaches a `PowerToysReport_*.zip` in a
comment.
- Maintainers can force regeneration with `/triage refresh`.
- Ignores unrelated comments, unchanged issue edits, PR comments, and
  bot-initiated reopens.
- Uses per-issue concurrency so a newer run supersedes an older run.
- Maintains one canonical triage comment instead of adding repeated bot
  comments.

### Comment format

- Separates **For the issue author** from **For the PowerToys team**.
- Mentions the author once and lists each requested action as a bullet.
- Distinguishes blocking **Needed** actions from non-blocking
**Recommended**
  actions.
- Shows the product, issue kind, reported PowerToys version, concise
summary,
  diagnostic findings, possible duplicates, and collapsed investigation
  checks.
- Ends with a short disclosure that triage is AI-assisted and
maintainers make
  final decisions.

### Classification and labels

- Detects PowerToys bug-template issues deterministically.
- Reads the selected product area and adds a matching primary
`Product-*`
  label.
- Handles production aliases such as FancyZones Editor and File Explorer
  preview/thumbnail areas.
- Product labeling is additive: existing product and maintainer labels
are
  never removed.
- Normalizes the reported PowerToys version and adds a matching version
label
  when one exists.
- Applies `Needs-Author-Feedback` only when blocking information or an
English
  translation is required.
- Removes `Needs-Author-Feedback` when the issue becomes actionable.

### PowerToys version rule

- Compares the reported version with the latest stable PowerToys GitHub
  release.
- Older versions receive a recommended update-and-retest action.
- Current versions, newer preview/dev versions, missing versions, and
release
  lookup failures are not flagged as outdated.
- Updating is advisory and does not block triage by itself.

### Reproduction rule

- Concrete actions plus an observed result are sufficient.
- Concise steps can use the separate Actual Behavior section as the
observed
  result.
- Passive or intermittent failures are sufficient when the
timing/trigger and
  observed failure are clear.
- Vague statements without an actionable scenario remain insufficient.
- Clearly non-English steps are not treated as missing; reproduction is
  reassessed after the author translates the issue.

### Language rule

- Classifies author-written prose as English, non-English, or uncertain.
- Ignores template headings, code, logs, filenames, URLs, hidden
comments, and
  quoted text.
- Clearly non-English issues ask the author to translate the title and
  description to English.
- Short, mixed, code-heavy, or uncertain text is not flagged.

### Diagnostic report rule

- A report is **required** for diagnostic-heavy failures: crashes,
hangs,
startup/load failures, installation/update failures, performance
failures,
  and service/driver/shell-integration failures.
- A report is **optional** for clear reproducible UI/visual defects.
- A report is **recommended**, but not blocking, for other actionable
bugs.
- Missing or rejected reports block only when the deterministic
requirement is
  `REQUIRED`.

### Diagnostic report privacy and safety

- Accepts only PowerToys report attachment URLs matching the expected
pattern.
- Enforces archive size, decompressed size, file-count, per-file, path
  traversal, and encryption limits.
- Selects only bounded relevant metadata and product-log evidence.
- Redacts email addresses, IP addresses, user paths, URLs, GUIDs, SIDs,
  identity fields, tokens, secrets, and passwords.
- Sends only the sanitized evidence to Copilot.
- Never sends the raw ZIP or extracted files to Copilot, logs,
artifacts, or
  repository storage.
- Deletes the temporary archive after processing.

### Duplicate rule

- Searches only older issues using focused product, title/body, and
exact
  technical-signal queries.
- Ranks candidates deterministically before Copilot runs.
- Copilot judges only the supplied candidates and returns at most five
  high-confidence matches.
- Similar product area alone is not enough; the underlying request or
failure
  must match.
- The model never closes an issue directly.
- The workflow submits the strongest match as a native GitHub
duplicate-close
  suggestion.
- **When a maintainer accepts the suggestion, GitHub automatically
closes the
  issue as a duplicate and links it to the selected canonical issue.**
- Declining the suggestion leaves the issue open.
- A defensive safeguard reopens the issue and fails the run if GitHub
applies
  the close without holding it for review.

### AI cost and permission controls

- Uses the `small` model alias.
- Maximum 5 turns and 10 AI credits per run.
- Maximum 300 AI credits per day.
- Maximum 5 runs per user per 60-minute window.
- Content hashing skips unchanged work before inference.
- The agent receives only `contents: read`, `issues: read`, and
  `copilot-requests: write`.
- A separate validated safe-output job receives `issues: write`.

## Seven-day author-feedback lifecycle

The existing Microsoft GitHub Policy Service configuration remains
responsible
for stale closure:

- Open issues with `Needs-Author-Feedback` and no activity for 7 days
are
  closed with an explanatory comment.
- Open PRs with `Needs-Author-Feedback` and no activity for 7 days are
closed
  with an explanatory comment.
- An author comment removes `Needs-Author-Feedback` and returns the
issue/PR to
  team triage.
- An author push removes `Needs-Author-Feedback` from a PR.
- Manually removing the label immediately makes the issue or PR
ineligible for
  scheduled closure.

## Deprecated automation

- Deletes `.github/workflows/automatic-issue-deduplication.yml`.
- Deletes `.github/workflows/auto-labeler.yml`.
- Automatic PR product labeling from the old Models workflow is
intentionally
not replaced in this PR; a production PR ownership/path map should be
agreed
  separately.
- Keeps the manual batch deduplication workflow unchanged.
- Removes the passive XAML Styler verification step from
  `.pipelines/v2/templates/job-build-project.yml`.
- Keeps `.pipelines/applyXamlStyling.ps1` available for local developer
use.

## Validation Steps Performed

- Compiled `.github/workflows/issue-triage.md` with `gh aw compile`.
- Ran 32 focused Python tests for issue parsing, duplicate retrieval,
version
checks, reproduction rules, language signals, archive validation, report
  selection, redaction, and output privacy.
- Parsed the changed workflow and resource-management YAML.
- Verified the required production labels exist.
- Tested the workflow against the latest 20 PowerToys issues in the
sandbox;
  all 20 produced one canonical comment.
- Verified live variants for outdated versions, intermittent/passive
reproduction, non-English issues, rejected and analyzed reports,
optional UI
  reports, and title-only issues.

## PR Checklist

- [ ] **Communication:** Discussed with core contributors.
- [x] **Tests:** Added/updated and all focused tests pass.
- [ ] **Privacy / Responsible AI:** Complete required production reviews
before
  enabling.
- [x] **Localization:** No product UI strings are added.
- [x] **Dev docs:** Updated repository automation documentation.
- [x] **New binaries:** None.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 18a9b8ad-fd7e-4b9d-a06c-5e350bcde9d7
Copilot-Session: fd512b9b-db6f-4004-a65b-aa49404d568d
2026-08-14 14:57:02 +08:00
Niels Laute
215382050e [CmdPal] Settings UX tweaks (#49865)
## Summary of the Pull Request

Simplifies the Command Palette settings experience by removing obsolete
extension-discovery UI, introducing clearer semantic sections, and
reducing repetitive setting copy.

- Removes the Store discovery banner from the Installed extensions page
now that Gallery is the primary discovery surface in
`src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/ExtensionsPage.xaml`.
- Uses the existing section-header `TextBlock` pattern to organize
General and Personalization without introducing another settings-group
control.
- Regroups General settings into Activation, App behavior, For
developers, and About sections in
`src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml`.
- Regroups Personalization settings into Appearance, Layout and
positioning, and Interaction sections in
`src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/AppearancePage.xaml`.
- Moves compact mode, monitor placement, and notification placement to
Personalization, while preserving their existing bindings and automation
IDs.
- Clarifies compact-mode positioning with a horizontal slider and
directional description.


<img width="941" height="449" alt="Screenshot 2026-08-13 135040"
src="https://github.com/user-attachments/assets/01a53ab1-302b-4ce1-8537-0cc96aca459f"
/>

<img width="941" height="754" alt="Screenshot 2026-08-13 135103"
src="https://github.com/user-attachments/assets/2bae516c-75d3-4504-84e7-070e6b654281"
/>

<img width="710" height="719" alt="Screenshot 2026-08-13 135251"
src="https://github.com/user-attachments/assets/9aad14bb-9089-4cf6-9d7f-674171a22e9c"
/>

## PR Checklist

- [x] **Communication:** The settings UX was discussed and iterated with
Command Palette contributors.
- [x] **Tests:** No automated tests were added because these are
settings layout and copy changes; the CmdPal UI project builds
successfully.
- [x] **Localization:** All end-user-facing strings are stored in
`src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw`.

## Detailed Description of the Pull Request / Additional comments

The Installed extensions page no longer promotes the Microsoft Store
because extension discovery now lives in Gallery. The search field is
promoted to the top of the page and the obsolete Store command and
visual resources are removed.

General and Personalization now use the section-header `TextBlock` style
already established in CmdPal settings. `SettingsExpander` remains
reserved for stronger parent-child relationships, such as activation
shortcut options and compact-mode positioning. The independent **Keep
search text when reopened** and **Select search text when opened**
options remain separate toggle cards.

Compact mode is now labeled **Open with a compact search box**. Its
nested **Vertical search box position** setting uses a horizontal slider
without an icon and explains how left/right maps to lower/higher screen
placement.

## Validation Steps Performed

- Formatted the changed XAML with the repository XamlStyler
configuration.
- Built
`src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj` for
x64 Debug with `tools/build/build.ps1`.
- Launched the freshly staged development package and manually inspected
the Extensions, General, and Personalization pages.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e1966eaa-1e92-4e8a-a4fa-ce27539e508f
Copilot-Session: 120899e5-fc77-425e-918b-644929b65739
2026-08-14 08:33:58 +02:00
moooyo
ae416c045a Add native CLI shims for PowerToys command-line tools (#48631)
## Summary of the Pull Request

Adds a native C++ multi-call shim that exposes existing PowerToys CLIs
through `PATH`. The shims are installed under the PowerToys `bin`
subfolder and follow the `PowerToys.<ModuleName>.CLI.exe` naming
convention. The launcher preserves the raw argument tail, shares the
caller's console, and returns the target process exit code.

| PATH-visible command | Target executable |
| --- | --- |
| `PowerToys.FancyZones.CLI.exe` | `FancyZonesCLI.exe` |
| `PowerToys.ImageResizer.CLI.exe` |
`WinUI3Apps/PowerToys.ImageResizerCLI.exe` |
| `PowerToys.FileLocksmith.CLI.exe` | `FileLocksmithCLI.exe` |
| `PowerToys.PowerDisplay.CLI.exe` |
`WinUI3Apps/PowerToys.PowerDisplay.Cli.exe` |

proof of this work:
<img width="1044" height="294" alt="image"
src="https://github.com/user-attachments/assets/b659c552-5c08-4430-85c3-eba48f286eb0"
/>
<img width="1137" height="244" alt="image"
src="https://github.com/user-attachments/assets/5fed493f-dc30-428d-a618-bf612ccf3635"
/>

<img width="1727" height="868" alt="image"
src="https://github.com/user-attachments/assets/5c32fd2e-4a3a-4138-b968-fb5434eebec3"
/>


## PR Checklist

- [x] Closes: #48634
- [x] **Communication:** Discussed with core contributors in this PR
- [x] **Tests:** Added/updated and all pass
- [ ] **Localization:** CLI diagnostic messages are not localized
- [x] **Dev docs:** Updated CLI naming and installation conventions
- [x] **New binaries:** Added on the required places
  - [x] Signing JSON
  - [x] WiX installer entries
- [x] CI builds through `PowerToys.slnx`; no dedicated YML step is
required
  - [x] The existing release pipeline covers the solution and installer
- [x] **Documentation updated:** `doc/devdocs/cli-conventions.md`

## Detailed Description of the Pull Request / Additional comments

- Uses one native launcher binary for all commands and resolves the
target from the invoked shim filename.
- Installs PATH-visible shims under `PowerToys\bin`.
- Keeps the existing module CLI binaries and their deployment locations
unchanged.
- Rejects the previous unsuffixed and `*cli` command aliases.

## Validation Steps Performed

- Built `tools/CliShim.UnitTests/CliShim.UnitTests.vcxproj` in
`Release|x64`: 0 warnings, 0 errors.
- Ran `CliShim.UnitTests.dll` with `vstest.console.exe`: 5/5 tests
passed.
- Verified the CLI manifest, WiX command names, and `bin` installation
directory are synchronized.
- Ran `git diff --check`.

---------

Co-authored-by: Yu Leng <yuleng@microsoft.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d11c4221-248f-44a9-85fb-7017ed43f4ce
2026-08-14 14:32:27 +08:00
Niels Laute
becc96f59c [Settings] Improve update-notification UX (#49872)
## Summary of the Pull Request

Refreshes the Settings update experience with a shared update
coordinator, consistent state badges, and a compact floating status
surface available across pages. The surface supports checking, update
available, downloading, ready to install, network failure, and download
failure states; it can be dismissed and reopens when users return to
General while attention is still needed.



https://github.com/user-attachments/assets/7b1a7266-efc3-4b6f-9bea-1d25a032ead6


## PR Checklist

- [ ] Closes: N/A
- [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: N/A

## Detailed Description of the Pull Request / Additional comments

- Centralizes persisted and transient update state in a shared
`UpdateViewModel` used by Dashboard, General, navigation, and the
floating surface.
- Adds reusable status, activity, and badge controls with stable layout,
dismissal/reopen behavior, in-app What's New navigation, and retry-safe
single-flight update actions.
- Keeps the existing General update glyph while adding an adjacent state
badge.
- Adds Debug-only controls for previewing every updater state and
running the complete state flow without affecting production
screenshots.
- Adds focused coverage for state mapping, activity visibility,
IPC/launch failures, transient operation recovery, and duplicate
installer-launch prevention.

## Validation Steps Performed

- Built `Settings.UI` for x64 Debug.
- Built `Settings.UI.UnitTests` for x64 Debug.
- Ran focused `ViewModelTests.Update` and `ViewModelTests.General` tests
with `vstest.console.exe`: 39 passed.
- Exercised the Debug updater flow across all states and verified that a
dismissed notification reopens after navigating back to General.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 120899e5-fc77-425e-918b-644929b65739
Copilot-Session: 7da8be2f-1f73-48e9-8ae9-aa2448f2a5e3
2026-08-14 08:56:38 +08:00
Gordon Lam
cade1d9e0e ci: remove redundant Azure module installation (#49861)
## Summary of the Pull Request

Removes a redundant Azure module-install step from the release
symbol-publishing job.

The following `AzurePowerShell@5` task already provides the only
required command, `Get-AzAccessToken`.

## PR Checklist

- [ ] **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

## Detailed Description of the Pull Request / Additional comments

The removed step bootstrapped a package provider and installed several
Azure modules.

Only `Get-AzAccessToken` is used by the job, inside the retained
`AzurePowerShell@5` task. The other installed modules are unused.

This change does not alter feeds, dependency versions, service
connections, token resources, symbol destinations, or artifacts.

## Validation Steps Performed

- Parsed
`.pipelines/v2/templates/job-publish-symbols-using-symbolrequestprod-api.yml`
successfully with PyYAML.
- Ran `git diff --check`.
- Confirmed the redundant package-provider and module-install commands
are removed.
- Signed x64/ARM64 release pipeline completed successfully.
- Required PR CI checks passed for x64 and ARM64 Release.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 07:18:13 +08:00
Noraa Junker
6c9fb8ce52 [Shortcut Guide] Add Windows key hold activation options (#49661)
## Summary of the Pull Request

Adds configurable Windows-key hold activation to Shortcut Guide while
keeping the regular activation shortcut independent.

Users can choose to disable Windows-key activation, show taskbar
indicators, or open the full Shortcut Guide. Full-guide mode also
supports a configurable hold duration and optional close-on-release
behavior.

<img width="1099" height="611" alt="image"
src="https://github.com/user-attachments/assets/e0fe4c0f-3bef-43f8-a526-d22caf9e484e"
/>


## PR Checklist

- [ ] Closes: N/A
- [x] **Communication:** The UX and behavior were discussed before
implementation
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Not applicable
- [ ] **Documentation updated:** Not applicable

## Detailed Description of the Pull Request / Additional comments

- Adds Off, taskbar-indicator, and full-guide Windows-key actions to
Settings.
- Adds a 100–5,000 ms hold-duration setting and a full-guide
close-on-release option.
- Handles left and right Windows keys and suppresses Start after an
activated hold.
- Routes Windows-key holds through a dedicated event so custom
activation shortcuts remain independent.
- Clears previous pressed-key registrations before refreshing them to
prevent duplicate long-press callbacks.
- Preserves compatibility with the existing `press_time` setting and
documents the new options.

## Validation Steps Performed

- Built the affected ARM64 Debug Settings, Runner, Shortcut Guide
module-interface, and Shortcut Guide UI projects.
- `ShortcutGuide.UnitTests`: 7/7 passed.
- Targeted Settings tests: 12/12 passed.
- Manually verified Off, taskbar-indicator, full-guide close-on-release,
and full-guide persistent modes.
- Verified configured hold thresholds, both Windows keys, Start
suppression, and regular-shortcut independence.
- Validated the final Settings XAML layout in the running Settings app.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Muyuan Li (from Dev Box) <muyuanli@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2b3acca3-e49b-4936-8fb9-6f669bd449db
2026-08-13 22:27:39 +02:00
Niels Laute
b7891108fa [Mouse Highlighter] Update default click colors (#49833)
## Summary of the Pull Request

Updates Mouse Highlighter's default click colors to the recommended
palette colors:

- Left click: green (`#BFFF00`)
- Right click: blue (`#00BFFF`)

Keeps the Settings UI, native module fallback, and DSC reference aligned
while preserving the existing 65% opacity. Existing saved preferences
are unchanged.

## PR Checklist

- [ ] Closes: N/A
- [x] **Communication:** Requested by a core contributor
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** No end-user-facing strings changed
- [x] **Dev docs:** Updated the Mouse Highlighter DSC reference
- [ ] **New binaries:** No new binaries
   - [ ] JSON for signing
   - [ ] WXS for installer
   - [ ] YML for CI pipeline
   - [ ] YML for signed pipeline
- [ ] **Documentation updated:** No external documentation update
required

## Detailed Description of the Pull Request / Additional comments

Adds shared managed constants for the two click-color defaults so
serialized settings and Settings UI fallback behavior cannot drift. The
native Mouse Highlighter fallback uses the same RGB values, and a
focused unit test locks down the defaults.

## Validation Steps Performed

- Built `MouseHighlighter.vcxproj` for x64 Debug
- Built `Settings.UI.UnitTests.csproj` for x64 Debug
- Passed
`MouseHighlighterSettingsTests.Defaults_ShouldUseRecommendedClickColors`

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-13 17:11:49 +00:00
st-gr
69a600e249 feat(File Explorer): Add configurable local image rendering to Markdown previewer (#47857)
## Summary
- Adds a "Show local images" toggle in PowerToys Settings (File Explorer
> Markdown)
- When enabled, renders images referenced via relative paths or local
file paths in the Markdown preview pane
- Serves validated local image files on a WebView2 virtual host
(`https://localmdimages/`) directly from the handler's resource filter
- Supports local paths and UNC/network share paths
- Default: OFF (preserves existing behavior)
- GPO support: Admins can force-enable or force-disable via Group Policy

Fixes #40787
Fixes #3713

## Security model

| Scenario | Behavior |
|----------|----------|
| Setting OFF (default) | All images blocked, info bar shown. Raw HTML
`src` is rewritten to `#` in this state too, so a `data:` image cannot
render (it is resolved internally and never reaches the resource filter)
|
| Setting ON + relative path (`media/img.png`) | Resolved against .md
directory, rendered if under that tree |
| Setting ON + path traversal (`../../secret.png`) | Blocked — resolved
with `Path.GetFullPath` and checked with `Path.GetRelativePath`,
including percent-encoded traversal on the serving side |
| Setting ON + junction/symlink below the allowed path | Blocked — each
component of the resolved path is rejected if it carries
`FileAttributes.ReparsePoint`, since lexical containment alone does not
prevent redirection |
| Setting ON + UNC relative path (`images/pic.png` on `\\server\share`)
| Allowed within share root |
| Setting ON + remote URL (`https://evil.com/track.png`) | Always
blocked |
| data:/javascript: URI | Always blocked, in both setting states |
| `srcset` on a raw HTML `<img>` | Attribute removed, in both setting
states — its candidates are not validated by the `src` sanitizer |
| Script execution | Always disabled (`IsScriptEnabled = false`) |
| Mark-of-the-Web (MotW) | Explorer blocks preview of MotW-tagged files
before our code runs (OS-level protection) |

## GPO Policy

- Policy name: `MarkdownAllowLocalImages`
- Registry: `HKLM\SOFTWARE\Policies\PowerToys\MarkdownAllowLocalImages`
(DWORD: 1=enabled, 0=disabled)
- ADMX category: **PowerToys > File Explorer Preview**
- Uses `getConfiguredValue()` (individual module setting pattern, no
global utility fallback)

## Screenshots

### Settings UI — new toggle
_"Show local images" toggle nested under the Markdown preview section
(File Explorer add-ons). Captured from a Debug build of this branch (the
Settings app only runs standalone in Debug builds):_

<img width="1904" height="1014" alt="07-settings-ui-toggle"
src="https://raw.githubusercontent.com/st-gr/PowerToys/pr-47857-assets/07-settings-ui-toggle.png"
/>

### Settings UI — locked by GPO
_With the `MarkdownAllowLocalImages` policy set to Disabled, the toggle
is forced Off and grayed out, and the "managed by your organization"
info bar appears:_

<img width="1904" height="1014" alt="08-settings-ui-gpo-locked"
src="https://raw.githubusercontent.com/st-gr/PowerToys/pr-47857-assets/08-settings-ui-gpo-locked.png"
/>

### GPO in Group Policy Editor
_New "File Explorer Preview" category under PowerToys, showing the
policy and its description:_

<img width="1472" height="847" alt="01-gpedit-category"
src="https://github.com/user-attachments/assets/54acb539-345b-4512-9685-35930966a142"
/>

### GPO set to Enabled
_Policy enabled state in gpedit.msc:_

<img width="1473" height="848" alt="02-gpedit-policy-enabled"
src="https://github.com/user-attachments/assets/883f6b22-179d-4311-983d-2d835e4d897a"
/>

### Preview with local images rendered
_Markdown preview with local image rendering enabled — relative path
image renders:_

<img width="1430" height="881" alt="03-preview-images-shown"
src="https://github.com/user-attachments/assets/4a7ac7f0-d57d-4feb-bf2f-7e3c9093ab52"
/>

### Info bar for blocked remote images
_When the document contains remote (http/https) image URLs, they are
always blocked and an info bar is shown:_

<img width="1412" height="1035" alt="04-preview-infobar"
src="https://github.com/user-attachments/assets/0f798bbc-ae1b-43bf-b343-394080fff8e3"
/>

### GPO disabled — all images blocked
_With GPO set to disabled, all images (local and remote) are blocked.
Info bar reads "Some pictures have been blocked...":_

<img width="1417" height="704" alt="05-gpo-disabled-blocked"
src="https://github.com/user-attachments/assets/1c7a09a7-f4b9-467c-a0c0-f670680d6a2d"
/>

### Mark-of-the-Web protection
_Files copied from a network source carry a Zone Identifier (MotW).
Explorer blocks the preview entirely before our code runs — an OS-level
security layer:_

<img width="1114" height="591" alt="06-MotW-tagged"
src="https://github.com/user-attachments/assets/09cc2055-1e12-4c11-81fb-abd83ab8249c"
/>

## Implementation

Two layers were blocking images:
1. **Markdig AST layer** (`HTMLParsingExtension.cs`): replaced image
URLs with `#`
2. **WebView2 layer** (`MarkdownPreviewHandlerControl.cs`): returned
HTTP 403 for all non-HTML requests

Changes:
- `HTMLParsingExtension`: conditionally resolves markdown `![](path)`
images to virtual host URLs with path traversal protection
- `MarkdownHelper`: regex-rewrites relative `src=""` in raw HTML `<img>`
tags to virtual host URLs
- `MarkdownPreviewHandlerControl`: serves `https://localmdimages/`
requests in the `WebResourceRequested` handler — the URL is resolved
back to a file path, re-validated for containment against the allowed
base path (document directory, or share root for UNC), and the bytes are
returned via `CreateWebResourceResponse` with the proper content type.
Note: `SetVirtualHostNameToFolderMapping` is deliberately NOT used for
images — WebView2 Runtime 150+ no longer serves files from UNC/network
folder mappings (verified by A/B test on 150.0.4078.48); serving from
the handler works uniformly for local and UNC paths
- Settings UI: new toggle nested under the Markdown preview expander,
with GPO lock support
- Handler `Settings.cs`: reads `EnableMdLocalImages` via
`SettingsUtils`, GPO override via `GPOWrapper`
- GPO: `gpo.h` individual module setting, ADMX/ADML with
`FileExplorerPreview` category

## Known limitation

Peek also renders Markdown through `FilePreviewCommon.MarkdownHelper`,
but calls it without the
local-images arguments, so **Peek does not show local images even when
the setting is enabled** — it
keeps the existing behavior of blocking every image. With the setting
on, the same file therefore
renders differently in the preview pane (images shown) and in Peek
(images blocked).

This is deliberate for now: wiring the setting through Peek means
changing a module that is otherwise
untouched by this PR. Verified that Peek itself is unaffected — it still
renders Markdown correctly
against the shared assembly, with images blocked as before.

## Test plan
- [x] Toggle OFF: images blocked, "pictures blocked" info bar shows
(existing behavior)
- [x] Toggle ON with relative paths: `![](images/test.png)` renders
- [x] Toggle ON with HTML img: `<img src="images/test.png">` renders
- [x] Toggle ON with path traversal: `![](../../secret.png)` — blocked
- [x] Toggle ON with remote URL: `![](https://...)` — blocked, info bar
shown
- [x] UNC path: preview works on `\\server\share\...\file.md` with
relative images
- [x] UNC path with `../` within share: allowed (resolves within share
root)
- [x] Regression tested on WebView2 Runtime 150.0.4078.48: local + UNC
images render, blocked cases (traversal, data:, remote, encoded
traversal) stay blocked
- [x] GPO Enabled: images forced on
- [x] GPO Disabled: images forced off
- [x] GPO Not Configured: user controls toggle
- [x] gpedit.msc: policy appears under PowerToys > File Explorer Preview
- [x] MotW-tagged files: Explorer blocks preview before our code runs
- [x] Settings UI toggle locked when GPO configured (grayed out for both
forced states)
- [x] Other preview handlers (Monaco, SVG, PDF) unaffected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-08-13 18:12:04 +02:00
Dan Fiedler
5193a1e497 Pin GitHub Actions to full-length commit SHAs (#49848)
Just like it says on the tin.
2026-08-13 11:28:16 +00:00
Gordon Lam
39c048d06f [Advanced Paste] Don't hardcode reasoning_effort=minimal for OpenAI p… (#49840)
…roviders

PR #46727 added `ReasoningEffort = "minimal"` to
OpenAIPromptExecutionSettings in
SemanticKernelPasteProvider.CreateExecutionSettings(). The value is not
user-configurable, so every OpenAI/Azure OpenAI request now fails on
models that don't accept 'minimal':

HTTP 400 (invalid_request_error: unsupported_value) Parameter:
reasoning_effort
Unsupported value: 'reasoning_effort' does not support 'minimal' with
this
  model. Supported values are: 'medium'.

This is the same class of regression PR #43766 previously fixed by
removing hardcoded Temperature/tuning properties. Remove the property so
the service default applies, and add a comment to prevent it being
reintroduced.

<!-- 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: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-13 11:24:09 +00:00
Lucas Martins
29471231dd Add FancyZones monitor window rotation (#48772)
# Summary

Adds an opt-in FancyZones feature to rotate processable windows across
connected monitors.

The feature lets users hold the configured monitor rotation hotkey,
preview the current monitor content order, and rotate windows left or
right across monitor work areas using the arrow keys. The overlay keeps
content numbers visually consistent while windows move between monitors.

This change was prototyped and implemented with assistance from Codex.

# Demo

![Monitor window rotation
demo](https://raw.githubusercontent.com/APONTES19/PowerToys/feature/monitor-window-rotation/doc/images/fancyzones/monitor-window-rotation.gif)

# Details

- Adds FancyZones settings for monitor rotation and its activation
hotkey.
- Adds Settings UI controls under FancyZones > Windows.
- Extends the FancyZones keyboard hook to forward keyup events.
- Adds window snapshot, monitor mapping, and work-area-relative rotation
logic.
- Adds a dark visual overlay with monitor-content numbering and
directional transition hints.
- Updates FancyZones settings parsing coverage.

# Validation

- Built `FancyZonesLib.vcxproj` successfully.
- Built `FancyZones.vcxproj` successfully.
- Built Settings UI projects successfully.
- Built Runner successfully.
- Ran focused FancyZones settings parse tests successfully.
- Manual validation performed on a multi-monitor setup.

# Notes

The feature is disabled by default and must be enabled from FancyZones
settings.

---------

Co-authored-by: Muyuan Li (from Dev Box) <muyuanli@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2b3acca3-e49b-4936-8fb9-6f669bd449db
2026-08-13 09:56:33 +08:00
Jiří Polášek
e453781909 CmdPal: Fix dock band activation lifecycle (#49739)
## Summary of the Pull Request

This PR improve handling of the dock band life cycle, with PerfMon
benefiting from this - it should reduce risk of bands being stuck.

- Remembers the exact IListPage used for the ItemsChanged subscription,
so we have muching unsubscribe.
- Serializes initialization and cleanup to prevent late subscriptions.
- Derives Performance Monitor load state from active subscribers, so our
decisions now follow the real-world state.
- Prevents widget activation counts from underflowing during Dock
rebuilds.
- Adds regression tests for activation transitions and cleanup races.
2026-08-12 17:33:56 -05:00
Jiří Polášek
14a966f3ee CmdPal: Add file and list settings controls (#49623)
## Summary of the Pull Request

This PR adds reusable Command Palette extension settings controls for
selecting files and folders and managing lists.

The new controls include:

- `FilePathSetting` for selecting a single file or folder.
- `FilePathListSetting` for managing multiple file and/or folder paths.
- `StringListSetting` for managing plain string values.
- `KeyValueListSetting` for managing key-value pairs.
- Optional regex validation for strings, keys, and values.
- Optional duplicate prevention for strings and key-value keys.
- Configurable file picker filters.
- Custom persisted-string conversion.
- Fallback content when the Command Palette host does not support a
control. But this has no direct impact now, because there's a bug in
WinUI3 AC renderer that throws it away (sad panda).

## Pictures? Picture!

<img width="856" height="974" alt="image"
src="https://github.com/user-attachments/assets/2e5d9ee1-9eca-48a7-803a-76a96859722e"
/>



<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] Closes: #49622 
<!-- - [ ] 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

This PR extends `Microsoft.CommandPalette.Extensions.Toolkit` with
file-path, file-path-list, string-list, and key-value-list settings.

The Command Palette host registers custom Adaptive Card input elements
during application startup. The controls use native file and folder
pickers parented to the window containing the form, so they work
correctly in both the Settings window and palette-hosted forms.

List controls render as constrained, scrollable lists with add and
remove actions. They support developer-configurable validation,
duplicate handling, picker modes, and error messages.

List values crossing the extension/host boundary use a structured codec
that preserves unknown properties and remains compatible with the
previously accepted bare-string representation. Persisted values can use
the default newline representation or developer-provided conversion
callbacks.

The SDK emits Adaptive Card `requires` and fallback information so
extensions built with the new controls can provide actionable content
when loaded by an older Command Palette host.

A Sample Pages extension page demonstrates all new setting types and
their validation options.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-08-12 17:29:49 -05:00
Clint Rutkas
d3b8d00809 [Deps] Update .NET runtime packages to 10.0.11 (#49847)
upgrading to 10.0.11

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-12 20:08:56 +00:00
Michael Jolley
888a142724 [CmdPal] Consolidate search ranking changes (#49832)
## What's going on

The stacked pull requests are blocked by GitHub's stack merge flow. This
gives the full remaining search ranking change set one PR against
`main`.

## The plan

- Consolidates the open work from #49190, #49191, #49194, #49195,
#49197, #49246, #49247, and #49249.
- Keeps the existing stack unchanged while this PR provides an alternate
merge path.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5459b847-afeb-4163-a803-977759dd92df
Copilot-Session: 49185697-186e-406f-b081-8c985c134274
Copilot-Session: 92905c83-2de6-449c-b4a1-a08003fe2576
Copilot-Session: efe987e5-9297-47fc-af99-2f49b057285a
Copilot-Session: f42917e2-d298-4bde-9056-79a9e6e17dfa
2026-08-12 11:18:10 -05:00
moooyo
9e1c39def7 ci: pin .NET 10 SDK to runtime package version (#49835)
## Summary of the Pull Request

Pins the .NET 10 SDK used by CI to `10.0.302`, whose `10.0.10` runtime
matches the .NET servicing packages declared in
`Directory.Packages.props`. This prevents dependency-audit failures
caused by the floating `10.0` SDK channel advancing independently of the
repository's package versions.

## PR Checklist

- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** N/A for this pipeline-only configuration change;
validation is documented below

## Detailed Description of the Pull Request / Additional comments

The CI template previously passed `10.0` to `dotnet-install.ps1
-Channel`. After .NET 10.0.11 became the latest release, CI combined
SDK-provided 10.0.11 runtime assets with NuGet runtime assets pinned to
10.0.10. `.pipelines/verifyDepsJsonLibraryVersions.ps1` consequently
detected different `System.Private.Windows.GdiPlus.dll` file versions
across generated `.deps.json` files.

This PR:

- Adds the optional `exactVersion` parameter to
`.pipelines/v2/templates/steps-ensure-dotnet-version.yml`. Existing
callers continue using channel-based installation when the parameter is
omitted.
- Sets `exactVersion` to `10.0.302` in
`.pipelines/v2/templates/job-build-project.yml`; that SDK contains the
10.0.10 runtime.
- Defines `DotNetRuntimePackageVersion` once in
`Directory.Packages.props` and references it from all 23 .NET servicing
packages.
- Adds cross-referenced comments so future SDK and runtime package
servicing updates remain aligned.

## Validation Steps Performed

- Confirmed the centralization assertion failed before the change with
23 literal `10.0.10` package versions and passed afterward with 23
`$(DotNetRuntimePackageVersion)` references and no remaining literals.
- Restored `PowerToys.slnx` successfully using `tools/build/build.ps1
-RestoreOnly`.
- Ran `dotnet-install.ps1 -Version 10.0.302 -DryRun` and confirmed that
it resolves the exact `10.0.302` SDK payload.
- Parsed `Directory.Packages.props` successfully as XML.
- Ran `git diff --check` successfully.
- Azure Pipelines validation remains pending while this PR is in Draft.

---------

Co-authored-by: Yu Leng <yuleng@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-12 07:37:52 +00:00