mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
f1548fcf8b688eb44c3305800a261c8fbdd9b514
9552 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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
|
||
|
|
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. |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 `` 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: `` renders - [x] Toggle ON with HTML img: `<img src="images/test.png">` renders - [x] Toggle ON with path traversal: `` — blocked - [x] Toggle ON with remote URL: `` — 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> |
||
|
|
5193a1e497 |
Pin GitHub Actions to full-length commit SHAs (#49848)
Just like it says on the tin. |
||
|
|
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> |
||
|
|
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  # 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 |
||
|
|
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. |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
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> |
||
|
|
b605fd35c5 |
New+ Rename and Desktop icon positioning improvements (#48083)
New+ Rename and Desktop icon positioning improvements. Manually tested on Windows 11. Windows 10 updates have NOT been tested. ## Summary of the Pull Request * Obtain cursor position early in the lifecycle of the context menu * Busy wait until copy is complete and shell is aware of icon * If context menu is on desktop, reposition the icon using the cursor position obtained scaled using monitor appropriate DPI * Slight refactor to help port code from New++ to New+ ## PR Checklist - [x] Closes: #36440 - [ ] **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 - [n/a] **Localization:** All end-user-facing strings can be localized - [n/a] **Dev docs:** Added/updated - [n/a] **New binaries:** Added on the required places - [n/a] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [n/a] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [n/a] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [n/a] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [n/a] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments * n/a ## Validation Steps Performed **Windows 11** * x64: Manually tested * ARM64: Not tested **Windows 10** * Not tested --------- Co-authored-by: Boliang Zhang (from Dev Box) <bozhang@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41b6b39b-b620-4e02-b7ca-8ae470a9c1e2 |
||
|
|
c4431304c4 |
[Quick Accent] Fix missing last-item selection highlight (#49820)
## Summary of the Pull Request Fixes a pre-existing Quick Accent rendering edge case where the last character is selected and inserted correctly, but its selection highlight is missing when a long character list is scrolled to the end. The horizontal items panel now leaves a symmetric 1-DIP margin outside its edge containers. This keeps `ScrollIntoView` from landing exactly at the maximum scroll offset, where WinUI can clip the last item's selected visual. The symmetric margin preserves short-list centering and works in both flow directions. The behavior was reproduced on both the #49633 baseline and #49655, so it was not introduced by #49655. ## PR Checklist - [ ] Closes: N/A — discovered while validating #49655; no matching issue is currently filed - [ ] **Communication:** Draft PR for maintainer discussion - [x] **Tests:** Existing tests pass; the XAML compositor edge was also covered by a deterministic GUI regression run - [x] **Localization:** N/A — no end-user-facing strings changed - [x] **Dev docs:** N/A — no developer-facing behavior or contract changed - [x] **New binaries:** N/A — no binaries or dependencies added - [x] **Documentation updated:** N/A — no documentation impact ## Detailed Description of the Pull Request / Additional comments With the overflowing horizontal list at its maximum offset, the last `ListViewItem` remains realized, selected, and visible, and its `SelectionIndicator` has opacity 1. However, WinUI does not paint that selected visual. Adding one DIP of scroll extent after the edge container avoids that boundary condition without changing selection or keyboard-navigation logic. The panel margin is symmetric so non-overflowing lists remain centered and RTL layouts receive the same protection at either edge. Infinite-width measurement already includes the margin, so the existing window sizing path needs no special case. ## Validation Steps Performed - Built `PowerAccent.UI` with `Debug|x64` using `tools/build/build.ps1`. - Built `PowerAccent.Common.UnitTests` and `PowerAccent.Core.UnitTests` with `Debug|x64`. - Ran both suites with `vstest.console.exe`: **55/55 passed**. - Reproduced the original failure by holding `A`, pressing `Space`, then `Shift+Space` before reveal: the selected `ₐ` was inserted but the baseline showed no selection-highlight pixels. - Repeated the same first-frame scenario **20 times** after the fix: all first and stable frames rendered the highlight (4441 detected accent pixels), with the foreground window preserved. - Repeated insertion validation in a dedicated text host **5 times**: all runs inserted `U+2090` (`ₐ`), rendered the highlight, and preserved foreground focus. - Ran `git diff --check` successfully. Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> |
||
|
|
dbff0e798d |
[Mouse Highlighter] Keep ripple work off the low-level hook (#49699)
<!-- 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 Mouse Highlighter performed synchronous WinRT Composition work in its `WH_MOUSE_LL` callback. Slow low-level hook callbacks stall the shared mouse-hook chain and can be silently removed by Windows, causing a button-up event to be lost and leaving the ripple or pressed state stuck. FancyZones was inspected to confirm ownership but is not changed by this PR. This moves Mouse Highlighter's visual, animation, timer, and Z-order work onto its module window thread. The hook now records events in a bounded, allocation-free FIFO and posts a window message. Adjacent high-rate mouse moves are coalesced, while button ordering, hook timestamps, and signed screen coordinates (including negative multi-monitor coordinates) are preserved. Stop, settings changes, and teardown clear pending events, pressed state, hold state, and timers. Settings application is also marshaled to the window thread so WinRT Composition remains thread-affine. <!-- 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 - [x] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments The low-level hook now does only constant-time event capture and queue signaling. A fixed-capacity FIFO preserves the sequence of button transitions and mouse positions without allocating in the hook. Only adjacent move events are coalesced, avoiding message flooding without moving a cursor update across a button boundary. Input timestamps keep quick-click versus hold classification based on the original 180 ms threshold even if window-thread processing is delayed. All Composition access runs through the Mouse Highlighter window/message queue. Lifecycle paths unhook before clearing the queue and reset button, ripple-hold, spotlight, and timer state. If the bounded queue ever fills, recovery resets transient visual state before retaining the triggering button event rather than risking a dropped button-up. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Built `src/modules/MouseUtils/MouseHighlighter/MouseHighlighter.vcxproj` in Debug x64. - Built `src/modules/FancyZones/FancyZonesLib/FancyZonesLib.vcxproj` in Debug x64 to verify the unchanged hook-chain neighbor. - Ran `git diff --check`. - Performed a focused concurrency and event-ordering code review. No focused native unit-test seam exists for this hook/Composition path without disproportionate refactoring, so no automated test was added. No end-to-end rapid-click/drag stress run across mixed-DPI multi-monitor layouts was performed. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Muyuan Li <116717757+MuyuanMS@users.noreply.github.com> Copilot-Session: 6caaf738-168e-4b11-8efb-b155139dac31 Copilot-Session: 259addc8-304d-4595-83c8-bba3d76e0637 |
||
|
|
a60c104d71 |
FileLocksmith: Fix context menu items are not localized (#49606)
<!-- 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 Fixing the issue where Windows 11 context menu items are not localized. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #37271 (Localized part ONLY) <!-- - [ ] 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 - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** No documentation changes are required for project configuration fixes - [x] **New binaries:** No new binaries are added - [x] **Documentation updated:** No user documentation changes are required <!-- 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 Reorganize resource items for the `FileLocksmithContextMenu` project - Mark `resource.base.h` as a non-compiled `None` - Add `Generated Files/resource.h` as a `ClInclude` - Mark `FileLocksmithContextMenu.base.rc`as a non-compiled `None` - Add `Generated Files/FileLocksmithContextMenu.rc` as a `ResourceCompile` Update the `.vcxproj.filters` accordingly to reflect the new locations and filters for header and resource files. <img width="1920" height="1020" alt="before" src="https://github.com/user-attachments/assets/db8732e5-408c-4ab9-8c42-2f4d3d31e00a" /> Before <img width="1920" height="1020" alt="after" src="https://github.com/user-attachments/assets/87d82eaa-4daf-4339-92c5-40bbe45f7170" /> After <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed |
||
|
|
fe4a86a54d |
[Quick Accent] Cloak the accent bar instead of hiding it (#49655)
## Summary of the Pull Request Follow-up to #49633: replace the way the accent bar's first frame is protected. #49633 fixed the blank/stale first frame (#49489) by masking it — `Selector.Opacity = 0`, unveil after two `CompositionTarget.Rendering` ticks, backed by a 150 ms watchdog. This PR removes the cause instead, using the technique the Command Palette and Quick Access already ship: **DWM-cloak the overlay instead of hiding it**, so it never stops rendering and there is no stale frame to put back on screen. No user-visible behaviour change is intended beyond removing the fixed two-render-tick reveal delay; this is a mechanism swap plus the cleanup it enables. ## PR Checklist - [x] **Closes:** N/A — #49489 was already closed by #49633; this replaces that fix's mechanism - [x] **Communication:** follow-up to a merged PR in the same module, no new feature surface - [x] **Tests:** `PowerAccent.Core.UnitTests` 32/32 still pass (the pure width logic from #49633 is untouched). The current-head CI status is tracked in the PR checks; the compositor-specific manual measurements below were captured before the final commit-fence follow-up and are labeled accordingly - [x] **Localization:** no new end-user-facing strings - [x] **Dev docs:** N/A - [x] **New binaries:** none - [x] **Documentation updated:** N/A ## Detailed Description of the Pull Request / Additional comments ### Why cloaking A hidden WinUI 3 window renders nothing. Its composition surface therefore still holds the frame it was showing when it was hidden, and `ShowWindow` puts that stale frame back on screen before the rebuilt accent list has been laid out — that is #49489. Everything downstream of that follows from "the window does not render while hidden": * the bar cannot be measured before it is shown (a `Collapsed` subtree is never measured), hence #49633's measure-twice workaround; * #49633 deferred reveal using rendering ticks because it did not have a composition-commit fence; * this PR calls `Microsoft.UI.Composition.Compositor.RequestCommitAsync()` after the bar has been laid out, sized, positioned and scrolled, and only reveals after that commit completes. This replaces the frame counter and watchdog with an explicit compositor fence. A cloaked window is equally invisible to the user but stays `SW_SHOWNA`-shown, so XAML keeps laying it out and painting it. This is exactly what `Microsoft.CmdPal.UI\MainWindow.xaml.cs` does, and its comment names the same symptom: ```csharp // TRICKY: show our HWND again. This will trick XAML into painting our // HWND again, so that we avoid the "flicker" caused by a WinUI3 app // window being first shown ``` `QuickAccess.UI\QuickAccessXAML\MainWindow.xaml.cs` uses the same pattern, including the "warm up the window while cloaked" prewarm that this PR also picks up — which is what removes the *first summon of the process* case that #49633's second measurement existed for. ### What the summon looks like now `Show()` still raises `Showing`, so the surface leaves `Collapsed` and the bar lays out — but the window is still cloaked, so nothing reaches the screen. The bar is then measured **once** (on a templated, laid-out, non-collapsed subtree), sized, positioned and scrolled to the selection. The compositor commit is then awaited, and only after it completes does `Reveal()` uncloak the window. The first visible frame is a finished bar by construction rather than by timing. Removed as a result: `RevealTimeoutMs`, `FramesBeforeReveal`, `_revealTimer`, `_revealGeneration`, `_renderedFrames`, `_measuredContentWidthDip`, `ArmRevealTimeout`, `CancelPendingReveal`, `WaitForFirstFrameThenReveal`, `OnRenderingBeforeReveal`, the local `Reveal`, and the `Selector.Opacity` dance — 87 net lines out of `MainWindow`. `_showGeneration` stays: a layout callback queued by a dismissed summon still has to be dropped. ### `TransparentWindow` The cloak lives in the shared window because `Hide()` owns the `AppWindow.Hide()` that has to be replaced. It is **opt-in** (`EnableCloakedHide()`), so Shortcut Guide's overlay and CmdPal's toast keep hiding exactly as they do today; only Quick Accent enables it. `Reveal()` is a no-op for them. Two details worth review attention: * **Hit-testing.** Cloaking takes a window out of composition but *not* out of hit-testing, and this HWND sits exactly where the user is typing. While cloaked the window is therefore made click-through (`WS_EX_TRANSPARENT`), restored on reveal. Without this, an invisible accent bar would swallow clicks meant for the app underneath. * **`SW_HIDE` then `SW_SHOWNA`.** Same order as CmdPal: the hide is what hands the foreground back to whatever window should own it, and the show that follows leaves the window "shown" — which is what keeps XAML painting — while the cloak keeps it off screen. If DWM refuses to cloak, the HWND remains hidden; a later `Show()` retries instead of exposing an un-laid-out frame. ### Relationship to #34849 / #41044 Always-on-top is still released on hide, so the dormant overlay is `WS_EX_TOPMOST=False` exactly as before — verified below. Cloaking is orthogonal to topmost. The one honest trade-off is that the HWND is now permanently `WS_VISIBLE` (cloaked), so it keeps participating in composition while dormant, the same as CmdPal and Quick Access already do; it stays out of Alt-Tab and the taskbar via a hidden owner plus `WS_EX_TOOLWINDOW`. ## Validation Steps Performed > The build/test/live-state results below were recorded at `e372cdf`. Current head `ea658bb` adds the explicit `RequestCommitAsync` fence after that validation. Current-head CI is tracked by the PR checks, and the live window-state/frame-capture checks should be repeated before merge. * `build-essentials`, `Common.UI.Controls`, `PowerAccent.UI` and `PowerAccent.Core.UnitTests` all build clean (Debug|x64), 0 warnings. * `PowerAccent.Core.UnitTests`: 32/32 pass. * Live window-state measurement against the built `PowerToys.PowerAccent.exe` (`DwmGetWindowAttribute(DWMWA_CLOAKED)` + `IsWindowVisible` + ex-styles), driving a real summon of the <kbd>R</kbd> bar with **All languages** selected: | phase | state | |---|---| | dormant (prewarmed, before any summon) | `visible=True cloaked=1 topmost=False clickThrough=True` | | summoned | `visible=True cloaked=0 topmost=True clickThrough=False` | | dismissed | `visible=True cloaked=1 topmost=False clickThrough=True` | i.e. the window is shown-and-painting the whole time, invisible and click-through while dormant, and topmost/interactive only while summoned. * Screen-captured the summoned bar: all 22 characters for <kbd>R</kbd> render (including the wide `₹ ៛ ﷼`), leading and trailing padding are symmetric, nothing is clipped and the selection is on the first cell. --------- Co-authored-by: Yu Leng <yuleng@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
e48152c52d |
[UITests] Add UITest.Next suites (Image Resizer, Peek, File Explorer add‑ons, File Locksmith) + local‑VM tooling and CI test‑signing (#49671)
## Summary Adds end‑to‑end UI tests on the `Microsoft.PowerToys.UITest.Next` (winappcli) framework for three modules, grows the shared `.Next` test framework with the helpers those suites needed, and adds the CI plumbing that lets shell‑extension tests exercise the **real** Windows 11 modern context menu. Also ships two agent skills that document how to write and run these tests. Product runtime behavior is **unchanged** — the only product edits are test‑observability hooks in Peek and a unit‑test project exclude. Closes: https://github.com/microsoft/PowerToys/issues/40660 https://github.com/microsoft/PowerToys/issues/49424 https://github.com/microsoft/PowerToys/issues/40661 ## What's added ### New UI test suites - **Image Resizer** — `src/modules/imageresizer/tests/ImageResizer.UITests`: context‑menu enable/disable tracking, the resize dialog, custom presets, every fit mode, every unit, filename format, keep‑date, shrink‑only, replace‑in‑place, and orientation. - **Peek** — `src/modules/peek/Peek.UITests.Next`: file‑preview coverage across image/text/archive/ markdown types with per‑arch visual baselines. - **File Explorer add‑ons** — `src/modules/previewpane/PreviewPane.UITests`: Preview Pane handlers and thumbnail providers. ### `UITestAutomation.Next` framework - New helpers: `ExplorerShell` (Shell selection/view‑mode interop), `WaitHelper` (structured stable waits), `WindowControl` (foreground/context‑menu/process control), `VisualAssert` (image compare), `WindowHelper`. - Updates to `Session`, `UITestBase`, `SettingsConfigHelper`, `WinappCli`. - New `UITestAutomation.Next.UnitTests` project covering the new wait/settings/CLI helpers. ### CI — sign sparse MSIX so the modern menu registers - **`.pipelines/signSparsePackages.ps1`** — self‑signs each sparse context‑menu MSIX with a publisher‑matching test certificate and force‑trusts it (machine stores), so `AddPackageByUriAsync` succeeds on otherwise‑unsigned PR builds. Robust `signtool` discovery with a NuGet fallback; test‑only trust that asserts no security. - Wired into **`.pipelines/v2/templates/job-test-project.yml`** as a best‑effort step covering the run‑in‑place, machine‑install, and per‑user‑install locations. Signs nothing it can't (skips already‑signed packages) and never fails the job. ### Product changes (test observability only) - **Peek `FilePreview.xaml` / `.xaml.cs`** — a named `LoadingIndicator` and a hidden automation peer that exposes the current preview state as text, so tests can read load state deterministically. No runtime behavior change. - **`ImageResizer.UnitTests.csproj`** — exclude the sibling `ImageResizer.UITests\**` folder from the unit‑test compilation. ### Agent skills & docs - **New `ui-tests-local-vm` skill** — run `.Next` suites in persistent dockur/windows VMs: setup, agentic loop, image customization, troubleshooting, the shell‑extension **signing** reference, plus controller/guest scripts and VM templates. - **Updated `ui-tests-migration` skill** — WinAppDriver/Selenium → `.Next` porting guidance (CI stability, Explorer/shell‑extension test design, patterns & pitfalls). - **`doc/devdocs/development/ui-tests.md`** — updated for the `.Next` workflow. ## Testing - All three suites pass locally and in CI across **x64 Win10**, **x64 Win11**, and **arm64** (machine and per‑user install legs). ## Reviewer notes - No product runtime behavior changes; product edits are limited to the Peek test hooks above. - The CI signing step is a **test‑only** trust anchor (self‑signed, scoped to the agent) and is best‑effort, so it can only add modern‑menu coverage and never regress the job. |
||
|
|
aac9fb9802 |
fix(settings-ui): restore General page navigation (#49801)
## Summary of the Pull Request Fixes Settings navigation to the General page by applying the correctly typed `SecondaryIsEnabledTextBlockStyle` to `GeneralPage_UpdateChannelDescription` in `src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml`. The previous `SecondaryTextStyle` targets `TextBlock`, so WinUI threw a `XamlParseException` when applying it to the custom `IsEnabledTextBlock` control. This prevented `GeneralPage.InitializeComponent()` from completing. ## PR Checklist - [x] **Communication:** Regression identified while validating the v0.101 preview candidate - [x] **Tests:** Existing Settings tests pass and the runtime regression was verified - [x] **Localization:** No end-user-facing strings changed ## Detailed Description of the Pull Request / Additional comments PR #49722 introduced the incompatible style assignment. This change reuses the existing `SecondaryIsEnabledTextBlockStyle`, which targets `controls:IsEnabledTextBlock` and preserves the intended secondary foreground and 12px font size. The same regression is present on `stable`; this fix should be included in the v0.101 release branch after merge. ## Validation Steps Performed - Built `src/settings-ui/PowerToys.Settings.slnf` in Release x64. - Ran `Settings.UI.UnitTests.dll`: 185 passed, 0 failed, 0 skipped. - Launched the fixed Release Settings binary directly on `Overview`; the General header and Update channel controls rendered. - Confirmed no new `NavigationService` or `XamlParseException` log entries and no relevant Event Viewer crash. Copilot-Session: e9f79ac2-9a7b-4083-834c-0d87e8c83bfd |
||
|
|
110107e74a |
feat(shortcut-guide): add Claude Desktop manifest (#49245)
## Summary of the Pull Request Adds a Shortcut Guide manifest for Claude Desktop (Claude.exe), covering General (quick chat/search, incognito chat, sidebar toggle, keyboard shortcuts, settings, open-from-anywhere) and In-chat actions (send, new line, extended thinking toggle, file upload, stop generation), pulled directly from the app's own in-app "Keyboard shortcuts" panel (Ctrl+/ inside Claude Desktop). ## PR Checklist - [x] Closes: #49237 - [ ] **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 Note: the "Open Claude from anywhere" global hotkey (Ctrl+Alt+Space) is included since it's shown live in the app's shortcut panel on Windows, though I haven't found it documented on support.claude.com as of this writing — worth flagging in case Anthropic's docs are just behind. Tests/Localization/Dev docs/New binaries/Documentation: N/A — this is a data-only YAML manifest addition, no code changes, following the same shape as the merged Postman manifest (#48461). ## Validation Steps Performed Tested manually against a live build of Shortcut Guide with Claude Desktop focused. Confirmed the Claude section renders with both categories, and recommended shortcuts (Quick chat/search, Open Claude from anywhere) are pinned at top. Screenshot attached below. <img width="547" height="913" alt="Claude_Shortcut_Guide" src="https://github.com/user-attachments/assets/cd4b17ab-058b-4a64-ade9-e34122aa1eab" /> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7f3671bf-4341-4127-90f2-c8fbd00a1f73 |
||
|
|
731f2e3b5f |
Prefer running executable location when resolving PowerToys install path (#48905)
## Summary of the Pull Request `PowerToysPathResolver.GetPowerToysInstallPath()` now resolves the PowerToys installation directory from the **running executable''s own location** first, and only falls back to the registry when the caller is not running from within the PowerToys install tree. Previously the resolver always went through the registry (the `powertoys` protocol registration) for release builds. For the common callers — module executables that ship in the PowerToys install folder (Settings deep links from Color Picker, FancyZones, Image Resizer, Workspaces, etc.) — the install directory is simply the folder the binary was loaded from, so reading it from the running process is more direct and does not depend on the registry registration being present or up to date. The registry path is retained as a fallback for callers that legitimately run **outside** the install tree — notably the packaged Command Palette extension host (MSIX, deployed under `WindowsApps`), which has no other way to locate a separately-installed PowerToys to launch `WinUI3Apps\PowerToys.Peek.UI.exe`. ## PR Checklist - [ ] Closes: #xxx - [x] **Communication:** discussed with core contributors - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** No end-user-facing strings changed - [x] **Dev docs:** Not applicable - [x] **New binaries:** None added ## Detailed Description of the Pull Request / Additional comments `GetPowerToysInstallPath()` (release path) now: 1. Resolves from the current process location first via the existing `GetPathFromCurrentProcess()` helper. This works for both per-user and per-machine installs and for any caller that runs from inside the install tree. 2. Falls back to the registry only when step 1 yields nothing — i.e. for the packaged Command Palette extension host that runs from `WindowsApps`. The per-machine (HKLM) registration is consulted for any process running with administrator rights, since the per-user (HKCU) registration is only meaningful for the interactive user. The change reuses existing helpers (`GetPathFromCurrentProcess`, `GetPathFromRegistry`) and adds no new public API, dependencies, or binaries. Debug-build behavior is unchanged. ## Validation Steps Performed - Built `ManagedCommon` (Release) — compiles clean, 0 warnings / 0 errors. - Verified the three callers of `GetPowerToysInstallPath()`: - In-tree module callers (Settings deep links, Workspaces) resolve via the running executable location. - The packaged Command Palette Indexer (`PeekFileCommand`) still resolves via the registry fallback, since it runs from `WindowsApps` and PowerToys is installed separately. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Boliang Zhang (from Dev Box) <bozhang@microsoft.com> Copilot-Session: 41b6b39b-b620-4e02-b7ca-8ae470a9c1e2 |
||
|
|
0f8120984e |
build(release): advance release train to 0.101 (#49795)
## Summary of the Pull Request Updates `ReleaseTrainVersion` in `src/Version.props` from `0.100` to `0.101` so automatic builds from `main` use the 0.101 release train. ## PR Checklist - [x] **Communication:** This release-train transition was requested and discussed with a core contributor - [x] **Tests:** Existing version resolution was exercised with the updated checked-in value ## Detailed Description of the Pull Request / Additional comments The release pipeline defaults `versionNumber` to `auto`, which reads the checked-in release train from `src/Version.props`. This change advances that source of truth to `0.101` while retaining `ReleaseTrainEpoch` as `2026-01-01` because the train transition occurs in the same calendar year. Automatic builds now generate versions in the form `0.101.<YDDDB>.0`. ## Validation Steps Performed - Ran `.pipelines/resolveBuildMetadata.ps1` for a `main` build with `versionNumber=auto`, build date `20260810`, and daily sequence `1`. - Confirmed the resolved version is `0.101.2221.0` with the `preview` channel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e04a72e-3b0f-4ac4-8156-d04ea9b8bb85 |
||
|
|
5b7b91c9de |
CmdPal: Add extension gallery deep links (#49780)
## Summary of the Pull Request
This PR extends the x-cmdpal:// protocol to allow opening the Extension
Gallery and individual Extension Gallery items.
Extension developers can use this to link users directly from their
websites to the gallery, shortening the path to discovering and
installing Command Palette extensions.
- Adds typed x-cmdpal:// URI parsing in CmdPalProtocolActivation.
- Adds gallery and specific-extension deep links.
- `x-cmdpal://extensions/gallery`
- `x-cmdpal://extensions/gallery/{extension-id}`
- Opens extension details after the gallery loads.
- Integrate into existing gallery navigation to prevent garbage nav
stack.
Pictures? Pictures!
https://github.com/user-attachments/assets/d4d55b2a-2624-4a93-bdf7-55348b044b76
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] Closes: #49770
<!-- - [ ] 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
|
||
|
|
66f63c988a |
Fix PowerToys Run settings text: searchbox -> search box (#49777)
## Summary Fixes #49717. On the PowerToys Run settings page, the plugin keywords description said "searchbox". Updated the English string to "search box". ## Validation Steps / Documentation 1. Open PowerToys Settings 2. Go to PowerToys Run 3. Confirm the plugin keywords description uses "search box" ## PR Checklist - [x] Closes: #49717 - [x] Communication: I've discussed this with a PowerToys maintainer or discussed this in a GitHub issue / discussion - [ ] Tests: Added or updated tests for this change / N/A for string-only change - [ ] Docs: Documentation has been updated or N/A - [x] Binary assets: N/A |
||
|
|
68a2a0d57b |
[Modules] Handle WM_ENDSESSION in run_message_loop daemons (GrabAndMove, AlwaysOnTop, FancyZones) (#48404)
## Summary Companion PR to #48378 (runner). Fixes the same `APPLICATION_HANG_QUIESCE_*_PowerToys.exe!run_message_loop` WER bucket in the other PowerToys daemons whose top-level windows ignored `WM_ENDSESSION`. ## Root cause (same as #48378) `run_message_loop` (`src/common/utils/window.h`) calls `GetMessageW` which only returns `0` on `WM_QUIT`. If a daemon's WndProc lets `WM_ENDSESSION` fall through to `DefWindowProc`, no `WM_QUIT` is ever posted on logoff/shutdown, the loop blocks, CSRSS hits the quiesce timeout (~5s), `TerminateProcess` fires, and Watson logs `APPLICATION_HANG_QUIESCE`. ## `run_message_loop` callsite audit 8 production callsites. Persistent daemons that own a top-level window and were affected: | Module | Status before | Fix here | |---|---|---| | `runner` | hang | Fixed in #48378 | | `GrabAndMove` | hang (tray icon, NIM_DELETE in WM_DESTROY) | ✅ `main.cpp` | | `AlwaysOnTop` | hang | ✅ `AlwaysOnTop.cpp` | | `FancyZones` | hang | ✅ `FancyZones.cpp` | | `KeyboardManagerEngine` | n/a | No top-level window → OS skips WM_ENDSESSION and TerminateProcess directly; no hang bucket possible | | `ZoomIt` | already handled | SysInternals heritage | | `PowerLauncher` | already handled | Managed `SessionEnding` event | | `MeasureTool`, `Notifications` | transient/spawned on demand | Not a shutdown-time daemon | ## Fix pattern For `AlwaysOnTop` and `FancyZones` (no tray icon to clean up) — minimal: ```cpp case WM_ENDSESSION: if (wparam) PostQuitMessage(0); // wparam==FALSE => shutdown vetoed return 0; ``` For `GrabAndMove` (has `Shell_NotifyIcon` cleanup in `WM_DESTROY` that must not run on shutdown) — use a `g_session_ending` flag and skip the tray-icon delete in `WM_DESTROY`, mirroring runner's `tray_icon.cpp` pattern from #48378. No shared header: each module's `WM_DESTROY` cleanup is module-specific; the abstraction would be too thin and would hide the variance in what to *skip*. ## Why no logging on the shutdown path Same reasoning as #48378 review feedback — `spdlog::flush_on(info)` synchronously flushes to disk; emitting log lines from `WM_ENDSESSION`/`WM_DESTROY` burns the ~5s quiesce budget for no diagnostic value (Watson already records the bucket on failure). ## Verification - Built clean (Debug|x64): GrabAndMove.vcxproj, AlwaysOnTop.vcxproj, FancyZonesLib.vcxproj — all exit 0. - Runner counterpart fix (#48378) verified end-to-end with real reboot + WM_ENDSESSION injection; quiesce 1–8 ms. Same OS-level mechanism applies here. ## Related - #48378 — runner fix (this PR's companion) - #48363 — original community fix (over-engineered; this approach is the minimal correct one) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
ed7595f3a7 |
Harden IPC pipe ownership and shutdown lifecycle (#48902)
## Summary of the Pull Request The two-way named-pipe IPC server (`TwoWayPipeMessageIPC`, shared by the runner, Settings, and Quick Access host) created every pipe instance without `FILE_FLAG_FIRST_PIPE_INSTANCE`. If a pipe with the same name already existed — for example a leftover instance from a previous run or another process — `CreateNamedPipe` would quietly create an *additional* instance and share the name instead of owning it. This makes `start_named_pipe_server` create the **first** instance with `FILE_FLAG_FIRST_PIPE_INSTANCE`, so `CreateNamedPipe` fails fast on a name collision and the server is the authoritative owner of its pipe name. ## 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 - [x] **Localization:** All end-user-facing strings can be localized (N/A — no user-facing strings) - [x] **Dev docs:** Added/updated (N/A) - [x] **New binaries:** Added on the required places (N/A — no new binaries) ## Detailed Description of the Pull Request / Additional comments - The flag is applied **only** to the first instance. Subsequent instances continue to omit it, so the existing `PIPE_UNLIMITED_INSTANCES` behavior is fully preserved. - The change is contained to a single function in `src/common/interop/two_way_pipe_message_ipc.cpp`. Public signatures and the `PowerToys.Interop` ABI are unchanged, so the runner, Settings, and Quick Access host all benefit without any code changes on their side. ## Validation Steps Performed - The existing `Common.Interop.UnitTests` `TestSend` exercises the modified first-instance code path (`Start()` → `start_named_pipe_server`) and continues to pass — a full IPC round-trip still works. - Verified the updated `CreateNamedPipe` open-mode logic compiles cleanly. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49797c8c-784d-47e6-bc0f-53464eecec4b |
||
|
|
9d96049b1f |
[Mouse Jump] Sign new WinUI3 binaries (#49747)
## Summary - add the new Mouse Jump HotKeys, Models, and WinUI3 binaries to the core ESRP signing policy - remove the retired MouseJumpUI signing entries ## Context The signed main build [154175666](https://microsoft.visualstudio.com/Dart/_build/results?buildId=154175666) failed for both x64 and ARM64 because the binaries introduced by #48393 were not selected for signing. ## Validation - parsed `.pipelines/ESRPSigning_core.json` successfully - confirmed all four new binary names are present and the two obsolete names are removed --------- Copilot-Session: 11e23507-f1c3-45e5-888d-22cd78240f6b |
||
|
|
9e12b7a8ee |
CmdPal: Reduce items on default perfmon band (#49674)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR limits the number of items shown in the default Performance Monitor dock band to prevent an overcrowded Dock experience. - Limits the primary Performance Monitor dock band to CPU and RAM. - Adds a new single-item dock band for network speed, showing upload and download traffic. (The existing single-item Network shows only % usage). - Updates the default docks to include both the primary Performance Monitor band (CPU and RAM) and the new Network Speeds (Received / Sent) band. This PR intentionally avoids solving the question of what to do with the original Performance dock band, that should be triaged separately. <!-- 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 |
||
|
|
03c571e1fc |
CmdPal: Aggregate net adapter stats and default adapter selection (#49678)
## Summary of the Pull Request This PR introduces a new virtual network adapter in performance monitor that sums up data from all physical adapters. That way users will see any network usage, and for most of them it might be good enough. For the rest, this PR adds a new command to set any network adapter as a default. - Switches from Performance Counters to raw GetIfTable2. - Adds a new virtual network adapter "All" and uses it as a default. - Adds a new command to set an actual default network adapter for the perfmon. <!-- 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 |
||
|
|
9cfba78b60 |
CmdPal: Clean up removed top-level view models (#49728)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR ensures that manager-owned top-level commands and dock bands release their extension subscriptions when they leave their collections. Previously, provider reloads, removals, and enable/disable cycles could retain discarded view models and their extension object graphs. - Add an explicit cleanup path to `TopLevelViewModel`. - Clean up commands and dock bands displaced by provider updates. - Clean up entries removed during full command reloads. - Clean up provider entries when a provider is removed or disabled. - Perform cleanup after releasing collection locks. <!-- 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: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
a18779ec7c |
CmdPal: Clean up replaced command view models (#49730)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR formalizes ownership of command view models so replacing a command releases the outgoing owned instance without cleaning up commands borrowed by synthetic context items. It applies the same cleanup discipline to parameter commands and partially built parameter lists. This is one of the places that let Command Palette hold COM proxies much longer than it's desirable. - Track whether a `CommandViewModel` is owned or borrowed. - Add replacement logic that cleans up outgoing owned commands. - Add a borrowing path for shared command instances. - Clean up commands replaced in parameter view models. - Roll back partially initialized parameter-list updates. - Add regression tests for replacement and failure paths. <!-- 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 |
||
|
|
a0619fe430 |
CmdPal: Release extension objects after navigation (#49732)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR replaces the bare collection performed after leaving a list page with a complete collection and finalization cycle. WinRT and COM proxies are released by their finalizers, so a single `GC.Collect()` can leave extension-owned objects retained on the finalizer queue. Correctly offloaded onto background thread shouldn't pose UX issue, and finalizers are only way to release COM garbage. For now, I left the call only in the original place: - Content and Parameter pages shouldn't generate too much garbage, so we don't have to push for release explicitly. - I considered cleanup when the CmdPal cloaks, but that would be redundant to the cleanup after navigation. Changes: - Adds a reusable `ExtensionObjectReleaser` class that can push hard enough on GC to trash COM garbage. - Schedules cleanup after navigation instead of collecting immediately. - Runs a collect, finalizer drain, and second collect off the UI thread. - Debounces navigation bursts into a single cleanup cycle. - Reschedules requests when another release cycle is already running. <!-- 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 |
||
|
|
14b09db016 |
Add Brave Browser keyboard shortcuts manifest for Shortcut Guide (#49615)
Shortcut Guide had no manifest for Brave Browser, so no shortcuts were displayed when Brave was the active window. ## Summary of the Pull Request Adds `BraveSoftware.BraveBrowser.en-US.yml` to the Shortcut Guide manifests directory. Uses `WindowFilter: "brave.exe"` to match the active process. The index is auto-generated at runtime by enumerating all `.yml` files, so no code changes are required. ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments 57 shortcuts across 4 sections, mirroring the Chrome manifest structure (Brave is Chromium-based) with Brave-specific adjustments: - **Tabs and windows** — standard tab/window management plus Brave's unique "New private window with Tor" (`Ctrl+Alt+N`) - **Brave features** — Brave Shields toggle (`Alt+D`), bookmarks bar, history, downloads, DevTools, task manager, find bar, clear browsing data - **Address bar** — navigation and search shortcuts - **Web page** — print, save, reload, zoom, bookmarking, page source, scrolling ## Validation Steps Performed - YAML parsed and validated programmatically; structure matches the existing manifest schema - Confirmed `WindowFilter: "brave.exe"` matches the Brave Browser executable name - Confirmed index.yml is generated at runtime from all `.yml` files — no index update needed <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #49605 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|
|
d96144a506 |
CmdPal: Prevent crashes when switching main window backdrops on the fly (#49755)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR prevents CmdPal from crashing when switching backdrops and fixes transparent tint. - Keeps a single SystemBackdrop attached and root projected targets until WinUI disconnects them. - Swaps and dispose controllers, brushes, and compositors on the XAML thread. - Restores tint for transparent solid backdrops using a retained composition brush. - Coalesces theme updates and retry transient native backdrop handoffs. - Adds a fallback background if "Ooops" happens. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #49744 <!-- - [ ] 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 |
||
|
|
f2796b74a5 |
CmdPal: make dialogs prevent compact mode from being collapsed (#49451)
ContentDialogs we present for CommandResult.Confirm need to be visible. When the window is clipped for compact mode, the dialog is predictably also collapsed. This makes sure that content dialogs are always visible, by forcing us out of compact mode when dialogs are shown. Closes: quite sure it was filed somewhere, right? |
||
|
|
a87f5b07a9 |
Advanced Paste additional customizations and PhiSilica provider (#46727)
## Summary Adds an on-device **Phi Silica (Windows AI) paste provider** to Advanced Paste and richer per-action customization, plus the **package-identity plumbing** that lets the unpackaged Advanced Paste app use Windows AI APIs. > Note: this supersedes the earlier "self-contained MSIX package installed/registered by the > WiX installer" approach. Advanced Paste is **not** packaged or installed as a standalone > MSIX. It keeps shipping as the existing unpackaged, self-contained WinUI 3 executable in > `WinUI3Apps/` and acquires **package identity at runtime from the existing PowerToys sparse > package** — there are no installer or ESRP MSIX repack changes. ## Advanced Paste features - **New Phi Silica paste provider** (`CustomActions/PhiSilicaPasteProvider.cs`): an on-device AI provider backed by the Windows AI Phi Silica language model — no cloud endpoint or API key required. Registered as a new `AIServiceType` via `PasteAIProviderFactory` / `AIServiceTypeRegistry`. - **Additional custom actions** (`AdvancedPasteAdditionalAction`): user-defined actions with their own prompt, system prompt, AI provider, and shortcut — plus an optional "coaching" prompt/system-prompt/provider/shortcut and shortcut-conflict detection. - **Built-in default prompts** (`AdvancedPasteDefaultPrompts`) and updates to `AdvancedPasteCustomAction`, `PasteFormat(s)`, `OptionsViewModel`, and `PasteFormatExecutor` to support per-action provider selection and system prompts. - **Settings UI** (`AdvancedPastePage.xaml`/`.xaml.cs`, `Resources.resw`): configure the Phi Silica provider, choose a provider per action, edit system/coaching prompts, and a Phi Silica availability/readiness experience — Settings queries the Advanced Paste executable via `--check-phi-silica`, and a **"Download model"** action triggers `--prepare-phi-silica` to fetch the model and then re-probes. ## Package identity for Windows AI (replaces the MSIX-install approach) - Phi Silica is a **Limited Access Feature (LAF)** that can only be unlocked by a process with a registered **package identity**. Advanced Paste runs unpackaged, so it obtains identity from the existing **`Microsoft.PowerToys.SparseApp`** sparse package (`src/PackageIdentity/`): a new `<Application Id="PowerToys.AdvancedPasteUI">` entry in `AppxManifest.xml` maps it to `PowerToys.AdvancedPaste.exe`, with matching updates to `BuildSparsePackage.ps1`. - **LAF unlock** at runtime via `PhiSilicaLafHelper.cs`. The token/attestation are baked at build time by the `GeneratePhiSilicaLafCredentials` MSBuild target into `PhiSilicaLafCredentials.g.cs` — local **dev defaults** live in `src/PhiSilicaLaf.props` (imported from `Directory.Build.props`) and the **production secret** is injected via `/p:` in the release pipeline. - New **`AdvancedPaste.dev.manifest` / `AdvancedPaste.prod.manifest`** application manifests (selected by `CIBuild`) declaring full-trust and the system AI models capability. ## Build & pipeline - **Windows App SDK** moved to the coherent **stable `2.2.0`** line and **added `Microsoft.WindowsAppSDK.AI` `2.2.3`** (the Phi Silica APIs). Foundation `2.1.0` carries the sparse-identity PRI fix, and the stable AI build matches the OS Windows AI runtime. - **Independent versioning** for Advanced Paste (`src/modules/AdvancedPaste/custom.props`, XES one-store versioning, `AdvancedPasteVersion`). A `steps-setup-versioning.yml` step is added for Advanced Paste in `job-build-project.yml`, ordered **before** CmdPal to avoid a version-collision installer failure (WIX0103). - `release.yml` passes `PhiSilicaLafToken`/`PhiSilicaLafAttestation` into the main build; spell-check allow-list/patterns updated. - Removed now-unneeded dependencies: the `Microsoft.Windows.Compatibility` reference and the `Common.UI` "force matching DLL versions" hack. <img width="1073" height="716" alt="image" src="https://github.com/user-attachments/assets/9364d86a-c0d1-4a08-a669-d98cbcb4b140" /> <img width="1038" height="308" alt="image" src="https://github.com/user-attachments/assets/00eef1dd-b407-4841-bd64-f54f8a145c46" /> <img width="194" height="405" alt="image" src="https://github.com/user-attachments/assets/d2f9c5bb-2507-4112-b3e0-56da681f88ea" /> <img width="489" height="453" alt="image" src="https://github.com/user-attachments/assets/811d1afd-9993-48be-824e-82bb56c5ceca" /> [Video clip internal](https://onedrive.cloud.microsoft/✌️/a@9n6nl3fp/S/cQpvAHrL5M9ZR6eUawztyfyBEgUCwCF-aKg9TbKyyGWP4c0KMA) [Build internal](https://microsoft.visualstudio.com/Dart/_build/results?buildId=149920754&view=artifacts&pathAsName=false&type=publishedArtifacts) --------- Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> |
||
|
|
56025d7372 |
CmdPal: Separate in-flight icon loads from cached results (#49738)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR is stacked on #49737 and separates in-flight icon loading from completed-result caching. The XAML request path no longer takes a provider-wide lock, while concurrent requests for the same icon still share a single task and completion cleanup can retire only that exact task generation. The loader now reports whether queue admission succeeded, preventing requests rejected during shutdown from remaining pending indefinitely. Overall, it seems that we got rid of a lock and actually reduced turnaround on UI thread. The separate in-flight tracking takes its tall, but overall throughput increased (tl;dr - it's faster). - Deduplicate outstanding icon loads in a dedicated in-flight dictionary. - Cache successful tasks before atomically retiring their in-flight entries. - Keep failed and rejected loads out of the adaptive cache so they can be retried. - Replace `EnqueueLoad` with `TryEnqueueLoad` and fault rejected requests. - Add tests for concurrent loading, publication ordering, failures, rejection, and retries. <!-- 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 |