mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
dev/jpolasek/f/49941-cmdpal-icon-presentation
9602 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3a11581532 | Reuse image presenters for icon updates | ||
|
|
b360914ccf | Add placement-aware fallbacks for recycled icons | ||
|
|
630e72317e | Defer installed app icon extraction to IconLoader | ||
|
|
0917d43c15 | Add extensible icon protocol processing | ||
|
|
e6737dc6ea | Split glyph and other icon caches | ||
|
|
5a7448142d | Use synchronous icon source materialization in loader | ||
|
|
1dc528ba51 | Add synchronous icon source materialization | ||
|
|
998bfe85ea | Reduce managed icon path parsing allocations | ||
|
|
35fc1106b1 | Optimize managed icon glyph classification | ||
|
|
22a5e924a0 | Optimize binary icon conversion and fix failure cleanup | ||
|
|
725b8cd792 |
Convert C++ icon helpers to C#
Port glyph classification, icon path parsing, URI and glyph materialization, and shell binary extraction to managed code while preserving the native parsing quirks and fallback behavior. Cover the classifier, parser, and converter with focused tests. Keep ICU emoji-property calls on the normal GC-transition path because ICU initializes that data lazily, and preserve the rationale for returning a non-null empty BitmapIconSource in virtualized lists. |
||
|
|
81a0a64a57 |
Reserve icon loading capacity for live demand
Limit speculative icon work to workerCount - 1 consumers so one existing worker slot remains available for a newly realized IconBox. At two workers this deliberately trades half of speculative concurrency for the live-demand guarantee; a single-worker configuration still processes speculative work normally. Report the configured and retained worker capacity alongside reservation deferrals, and cover the two-worker, four-worker, and single-worker contracts. |
||
|
|
4a0f490aec |
Prioritize icon loads with live UI demand
Track active IconBox requests through shared and in-flight loads, and schedule demanded work ahead of speculative work without increasing worker concurrency. Publish demand changes through a lock-free queue to a dedicated coordinator thread so the WinUI STA never waits on scheduler state. Preserve high/low ordering within each demand class, handle coordinator faults, and guard recycled controls from stale unload notifications. Add coordinator, worker-handoff, demand-churn, and speculative-capacity diagnostics plus concurrency and race coverage. |
||
|
|
9ed92c5fae |
Load glyph icons directly after cache misses
Construct glyph IconSources synchronously on the UI thread after winning the cache miss, while preserving cache hits and in-flight coalescing. Fall back to the existing worker and dispatcher path for non-glyph input or non-UI callers. Report direct construction latency by result kind and cover cached and uncached fast-path behavior. |
||
|
|
078285c34b |
Coalesce redundant IconBox refreshes
Defer refreshes until the control is loaded and has a source handler, avoid reloads when theme and scale are unchanged, capture the active handler, and reject stale completions by request version as well as source identity. |
||
|
|
066658c6db |
Harden icon cache identity and entry lifetimes
Stop reusing mutable cache entries that lock-free readers may still hold, use weak stable identities for stream-backed icon keys, and report cache hit rate, occupancy, and eviction reasons for stage comparisons. |
||
|
|
fd4244ede7 | Add CmdPal icon loading observer foundation | ||
|
|
bbaaad001b |
Measure process work and UI responsiveness
Extend opt-in icon diagnostics with process CPU, managed allocation, GC, working-set, and bounded normal-priority dispatcher probe measurements so later performance stages can be compared against the instrumented-main baseline. |
||
|
|
842e22e8f4 |
Add opt-in CmdPal icon loading diagnostics
Measure request lifetimes, provider resolution, load queue and dispatcher timing, input and result kinds, element updates, and anonymous request origins. Keep recent reports on the internal settings page and cover the aggregation with focused unit tests. Classify shell-binary inputs with the same case-sensitive extension rule used by the icon loader so timing reports describe the path that actually ran. |
||
|
|
e5a19c4ac5 |
fix(ci): correct issue and PR triage automation (#50052)
## Summary - skip AI issue triage when the latest issue state is closed and recheck state before publishing - restrict duplicate searches and digest canonical candidates to live open issues - add deterministic, additive `Product-*` labels from changed paths for draft and non-draft PRs - map Window Hopper, Cursor Wrap, and all Mouse Jump project paths to their specific product labels before generic fallbacks - preserve manually applied product labels while managing only intake lifecycle labels and trusted comments - collect the PowerToys version and release channel in one required bug/localization field - add Window Hopper to the bug report area dropdown and preserve parsing of both old and combined version headings This consolidates and supersedes #49961 and #49804. ## Validation - `node --test .github\scripts\pr-intake\tests\pr-intake.test.mjs` - 39 passing - `python -m unittest discover .github\scripts\issue-triage\tests -v` - 55 passing - parsed all modified issue-form and workflow YAML files with PyYAML - verified every current `src/modules/*` root maps to a product label - verified the Window Hopper path maps to `Product-Window Hopper` - `git diff --check` --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b313a270-e6e8-4c4a-89b2-880c1d79027c Copilot-Session: 498721d4-1098-4298-ac8a-147066fbfea3 |
||
|
|
885459a2f4 |
docs(devdocs): update docs.microsoft.com to learn.microsoft.com (#50102)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually)? --> ## Summary of the Pull Request Updates documentation links in `doc/devdocs/readme.md` from `docs.microsoft.com` to `learn.microsoft.com`.v0.101.2373.0 |
||
|
|
bea1b8e247 |
[UITests][PowerRename] Migrate to new .Next and add more UI tests (#50096)
## Summary of the Pull Request Adds a `PowerRename.UITests.Next` suite powered by winappcli and automates all 18 scenarios from #40663. The suite covers PowerRename settings, search and replace behavior, regular expressions, formatting and filtering options, file-list interactions, and both classic and Windows 11 context-menu workflows. The PR also stabilizes shared `UITestAutomation.Next` runner lifetimes and settings restoration, adds automation IDs for the original and renamed counters, and prepares unsigned CI builds for PowerRename shell testing. CI now signs the sparse context-menu MSIX and the runner/Settings IPC companions with a disposable machine-trusted test identity. ## PR Checklist - [x] Closes: #40663 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** Added/updated - [x] **New binaries:** Not applicable; no new shipped product binaries are added - [x] JSON for signing: Not applicable - [x] WXS for installer: Not applicable - [x] YML for CI pipeline: The new UI-test project is discovered through the existing `*UITest*.csproj` pipeline flow and is registered in `PowerToys.slnx` - [x] YML for signed pipeline: Not applicable - [x] **Documentation updated:** Not applicable; there are no user-facing behavior or documentation changes ## Detailed Description of the Pull Request / Additional comments ### PowerRename UI tests - Adds a 25-case `PowerRename.UITests.Next` executable covering all 18 checklist items from #40663. - Exercises classic context-menu registration on Windows 10 and Windows 11. - Exercises the signed Windows 11 tier-1 context menu, including icon visibility and real invocation with an Explorer selection. - Covers search/replace preview and application, text formatting, file/folder/subfolder inclusion, filename/extension scope, enumeration, case sensitivity, match-all behavior, regular expressions, file timestamps, Boost syntax, MRU autocomplete, persisted values, and file-list selection/filtering. - Preserves the existing legacy tests. ### Test reliability and automation hooks - Reuses one runner/Settings lifetime across the complete PowerRename suite to avoid repeated cold launches on constrained agents. - Retains and restores global settings for the full class lifetime and verifies that both Settings and the runner remain healthy. - Propagates scope and PowerRename cleanup failures instead of silently leaking process or profile state. - Adds `OriginalCount` and `RenamedCount` automation IDs. These are automation-only metadata and do not change the visible UI. - Uses stable preview samples, exact count targeting, authoritative Explorer selection, readable classic-menu inventories, and live UIA visibility for popup items. ### Unsigned CI build support - Extends the existing sparse-package test signer with required Authenticode companion files. - PowerRename jobs sign `PowerToys.exe` and `PowerToys.Settings.exe` with the same disposable machine-trusted test identity used for sparse MSIX packages. - This preserves Release IPC authentication while allowing Settings module-toggle commands to work on unsigned PR builds. - Windows 11 and ARM64 PowerRename jobs require a validly signed `PowerRenameContextMenuPackage.msix` before tests start. ## Validation Steps Performed ### Builds and discovery - `PowerRename.UITests.Next` Debug x64 build: passed - `PowerRename.UITests.Next` Debug ARM64 cross-build: passed - `PowerRenameUI` Release x64 build: passed - `UITestAutomation.Next.UnitTests` Debug x64 build: passed - `UITestAutomation.Next.UnitTests`: 16/16 passed - Microsoft.Testing.Platform discovery: 25 unique PowerRename test cases ### Local VM matrix All runs used the complete unfiltered `TestCategory=PowerRename` suite and restored the standard user's settings file byte-for-byte. | Guest | Profile | Result | |---|---|---:| | Windows 10 x64 | Default, 4 vCPU / 8 GB | 25/25 | | Windows 10 x64 | Constrained, 1 vCPU / 4 GB | 25/25 | | Windows 11 x64 | Default, 4 vCPU / 8 GB | 25/25 | | Windows 11 x64 | Constrained, 1 vCPU / 4 GB | 25/25 | ### Azure DevOps UI Test Automation - Final build: [155646235 / 20260824.1](https://dev.azure.com/microsoft/Dart/_build/results?buildId=155646235) - Source revision: `4496683104aea622b30179909bd6e95a17d5500f` - ARM64: 25/25 passed - Windows 10 x64: 25/25 passed - Windows 11 x64: 25/25 passed - Total: 75/75 passed, with zero failed, skipped, not-executed, or unanalyzed results - ARM64 and x64 Release product builds succeeded and published their normal artifacts - Signing steps verified the PowerRename sparse MSIX where applicable and both IPC companion executables on every PowerRename test job <img width="372" height="314" alt="image" src="https://github.com/user-attachments/assets/bc303673-0325-4f85-8d70-ef93110baf5b" /> |
||
|
|
980d4193df |
Update README roadmap for PowerToys 0.102 (#50108)
## Summary of the Pull Request Updates the README roadmap for PowerToys 0.102 with a single-sentence summary distilled from the milestone's planned work. ## 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 - [ ] **Documentation updated:** If checked, please file a pull request on our docs repo and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments The roadmap now links directly to the PowerToys 0.102 milestone and highlights three recurring themes from its planned work: WinUI 3 modernization across several utilities, Command Palette tabs and JavaScript/TypeScript extensions, and broader productivity improvements. ## Validation Steps Performed - Confirmed the milestone link resolves successfully - Confirmed the README diff has no whitespace errors Documentation-only change; automated tests are not applicable. Copilot-Session: 6b6a57da-3890-46e4-aefa-369c9e1e9603 |
||
|
|
8516625c4d |
fix(installer): terminate remaining PowerToys processes during setup (#50106)
## Summary of the Pull Request Extends `TerminateProcessesCA` in `installer\PowerToysSetupCustomActionsVNext\CustomAction.cpp` so setup closes the remaining independently running PowerToys executables before replacing installed files. The list now covers Shortcut Guide, both current and legacy Keyboard Manager editors, Keyboard Manager Engine, the current Mouse Jump WinUI 3 executable, Grab and Move, Quick Accent, Text Extractor, and Screen Ruler. The legacy `PowerToys.MouseJumpUI.exe` entry remains for upgrade cleanup. ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass — no automated behavior was added; targeted project build is currently blocked by a missing local C++/WinRT NuGet props file - [x] **Localization:** No end-user-facing strings were added or changed ## Detailed Description of the Pull Request / Additional comments The installer already performs a best-effort graceful close followed by forced termination for executable names in `processesToTerminate`. Several shipped out-of-process modules were not represented in that list, so user-open, orphaned, or unresponsive instances could remain during upgrade or uninstall and retain handles to installed files. This change only expands the executable-name array and updates its fixed size. It does not alter shutdown ordering or termination behavior. ## Validation Steps Performed - Verified the array contains exactly 54 entries with no duplicates. - Verified all newly added names against current project outputs, installer manifests, or module process-launch sites. - Preserved the legacy Mouse Jump executable name for upgrade cleanup. - Confirmed `PowerToys.Update.exe` remains excluded because it orchestrates the update. - Independently reviewed the committed diff with no findings. - Attempted an x64 Debug build of `PowerToysSetupCustomActionsVNext.vcxproj`; MSBuild stopped before compilation because `Microsoft.Windows.CppWinRT.props` is missing from the local NuGet package cache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95f93bd1-c36d-4560-bb1c-837e7135c4a2 |
||
|
|
01271fcb52 |
fix(shortcut-guide): prevent orphaned processes during shutdown (#50091)
## Summary of the Pull Request Prevents Shortcut Guide processes from surviving Runner shutdown and blocking PowerToys upgrades. - Shuts down WinUI through its dispatcher instead of forcing CLR termination from a worker thread. - Opens and retains the Runner process handle before WinUI initialization so early Runner exits cannot be missed. - Gives the native module deterministic ownership of the Shortcut Guide process handle, with graceful shutdown and a bounded forced-termination fallback. - Keeps telemetry subprocess handles separate from the persistent UI process. - Adds `PowerToys.ShortcutGuide.exe` to the installer termination fallback so affected existing installations can recover during upgrade. ## PR Checklist - [x] **Communication:** Discussed and requested by a core contributor after investigating the release regression. - [x] **Tests:** Existing tests pass; process lifecycle and installer file replacement were also validated. ## Detailed Description of the Pull Request / Additional comments The Shortcut Guide lifecycle introduced by #48683 could call `Environment.Exit` from a Runner-watcher worker thread while WinUI was still tearing down. The native module also overwrote its persistent child-process handle when launching telemetry and did not close completed handles. Repeated Runner lifetimes could therefore leave `PowerToys.ShortcutGuide.exe` processes retaining shared WinUI files. The installer did not recover from that state: Restart Manager is disabled, the bundle and WiX close-application steps target only `PowerToys.exe`, and `TerminateProcessesCA` did not include `PowerToys.ShortcutGuide.exe`. Locked files could consequently remain at the previous version while installation continued, producing a mixed payload. `src/modules/ShortcutGuide/ShortcutGuide.Ui/Program.cs` now synchronously captures the Runner process handle and publishes its exit through a wait handle. `src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml.cs` registers that wait with the UI dispatcher, centralizes idempotent shutdown, and disposes activation listeners and hooks deterministically. `src/modules/ShortcutGuide/ShortcutGuideModuleInterface/dllmain.cpp` now uses RAII for the tracked UI process, avoids replacing it with telemetry handles, signals the existing native exit event, waits for graceful shutdown, and terminates only as a bounded fallback. The event is projected to managed code through `src/common/interop/Constants.idl`. `installer/PowerToysSetupCustomActionsVNext/CustomAction.cpp` now includes `PowerToys.ShortcutGuide.exe` in the MSI process-termination fallback, allowing upgrades from already-affected builds. ## Validation Steps Performed - Built `PowerToys.Interop.vcxproj`, `ShortcutGuideModuleInterface.vcxproj`, `ShortcutGuide.Ui.csproj`, and `PowerToysSetupCustomActionsVNext.vcxproj` for x64 Release. - Built and ran `ShortcutGuide.UnitTests`: 48/48 passed. - Repeated Runner/Shortcut Guide startup and parent-exit teardown 10 times; every child exited with code 0. - Verified the race where the Runner exits before Shortcut Guide initializes. - Verified `PowerToys.ShortcutGuide.exe`, `PowerToys.Interop.dll`, and `Microsoft.UI.Xaml.dll` were immediately replaceable after shutdown. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7f6c4822-53e0-42ae-a51a-a302a7c6d3ab |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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. |
||
|
|
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" /> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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> |
||
|
|
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> |
||
|
|
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 |
||
|
|
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> |
||
|
|
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`. |
||
|
|
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> |
||
|
|
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 |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
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 |