mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-10 20:39:11 +02:00
2eb5dceb80a2bb04169e57a1e06f9bbdd81dfd42
4353 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
733d3c7131 |
Remove unused MFC/AMP/OpenMP DLLs from build output and installer
VC++ Redistributable copies MFC, C++ AMP, and OpenMP DLLs into the build output via CopyCppRuntimeToOutputDir, but no PowerToys binary imports them (verified with dumpbin /dependents). - Add RemoveUnusedVCRuntimeDlls target in Directory.Build.targets to delete mfc140*.dll, mfcm140*.dll, vcamp140*.dll, vcomp140*.dll from OutDir after CopyCppRuntimeToOutputDir copies them. - Add MFC DLLs to exclusion list in generateAllFileComponents.ps1 to prevent them from being packaged in the installer. Saves ~11 MB per output location. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
5631b20c6c |
Remove WinUI3Apps subfolder from build output and paths
Flatten build output by removing WinUI3Apps intermediate folder. WinUI3 projects now output to the root build folder, eliminating ~435 duplicate DLLs (~316 MB). - Update OutputPath in 47 csproj/props and OutDir in 20 vcxproj files - Fix ~50 hardcoded WinUI3Apps path references in source - Update build scripts (build-installer, cert-sign, self-sign, verify) - Remove WinUI3Apps workarounds in MonacoHelper - Rename GetPowerToysInstallationWinUI3AppsAssetsFolder CmdPal retains its CmdPal\ subfolder for MSIX packaging. Installer WiX files not updated yet (separate phase). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
0089de33bd |
[PD] Re-enable PowerDisplay (#46489)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request 1. Re-enable PowerDisplay for PowerToys. 2. Add PowerDisplay back into installer. 3. Use new PowerDisplay icon and logo. 4. Fix some DPI related issue. 5. UI/UX improvement. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #1052 <!-- - [ ] 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 - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Pull new code from this branch. Set up PowerDisplay.UI as startup project. Click run in VS. Or, build whole solution, set up runner as startup project. Click run to test full experience. --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Niels Laute <niels.laute@live.nl> |
||
|
|
3e2914a0b2 |
Add unit tests for Hosts ValidationHelper and ColorPicker format conversions (#46679)
## Summary of the Pull Request Adds comprehensive unit tests for two previously untested areas to improve test coverage and prevent regressions: 1. **Hosts ValidationHelper** (`ValidationHelperTest.cs`) — 25+ test cases covering `ValidIPv4`, `ValidIPv6`, and `ValidHosts` methods 2. **ColorPicker ColorFormatHelper conversions** (`ColorFormatConversionTest.cs`) — 50+ test cases covering CMYK, HSB, HSI, HWB, CIE XYZ, CIE LAB, Oklab, Oklch, sRGB-to-linear, NCol conversions, plus expanded `GetStringRepresentation` tests for Red, White, Green, and Blue colors across all supported formats ## PR Checklist - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized — N/A (test-only changes) - [ ] **Dev docs:** Added/updated — N/A (test-only changes) - [ ] **New binaries:** Added on the required places — N/A (no new binaries) ## Detailed Description of the Pull Request / Additional comments ### Hosts ValidationHelper (`src/modules/Hosts/Hosts.Tests/ValidationHelperTest.cs`) - Tests `ValidIPv4` with valid addresses (loopback, private ranges, broadcast), invalid addresses (out of range octets, wrong format, CIDR notation), and null/whitespace inputs - Tests `ValidIPv6` with valid addresses (loopback, full/compressed notation, link-local, IPv4-mapped), invalid addresses (extra groups, invalid hex digits), and null/whitespace inputs - Tests `ValidHosts` with valid hostnames, FQDNs, max host count boundary (using `Consts.MaxHostsCount` dynamically for both exact-boundary and exceeds-boundary tests), and invalid hostnames ### ColorPicker Format Conversions (`src/modules/colorPicker/ColorPickerUI.UnitTests/Helpers/ColorFormatConversionTest.cs`) - Tests `ConvertToCMYKColor` for Black, White, Red, Green, Blue, and Mid Gray - Tests `ConvertToHSBColor`, `ConvertToHSIColor`, `ConvertToHWBColor` for primary colors - Tests `ConvertToCIEXYZColor` and `ConvertToCIELABColor` including D65 illuminant verification and negative b* assertion for Blue - Tests `ConvertToOklabColor` and `ConvertToOklchColor` including chroma non-negativity - Tests `ConvertSRGBToLinearRGB` for linear and gamma paths - Tests `ConvertToNaturalColor` for hue letter mapping (R exact match, G and B prefix assertions) - Tests `GetStringRepresentation` with Red, White, Green, Blue across all 11+ format types (Decimal values use BGR byte order via `%Dv` format: Red → "255", Blue → "16711680") - Tests `GetDefaultFormat` returns non-empty strings for all known format names - Tests edge cases: empty/null format strings defaulting to hex output ### Spell-check allow list - Added `SRGBTo` to `.github/actions/spell-check/allow/code.txt` to resolve unrecognized-spelling alerts ### StyleCop / code analysis fixes - Resolved SA1512, SA1515, CA1866, and CA1310 analyzer warnings to comply with repo coding standards ### Code review fixes - Renamed `ConvertToCIELAB_Blue_HasNegativeA` → `ConvertToCIELAB_Blue_HasNegativeB` with corrected comment to match the actual b* axis assertion - Replaced hardcoded 12-host string with dynamic `Consts.MaxHostsCount + 1` in the exceeds-max-count boundary test - Renamed `ConvertToNaturalColor_Green_ReturnsG0` → `ConvertToNaturalColor_Green_HueStartsWithG` and `ConvertToNaturalColor_Blue_ReturnsB0` → `ConvertToNaturalColor_Blue_HueStartsWithB` to accurately reflect prefix-only assertions ## Validation Steps Performed - Verified test files follow existing MSTest patterns (`[TestClass]`, `[TestMethod]`, `[DataTestMethod]`, `[DataRow]`) - Verified all referenced classes and methods exist and are accessible (correct namespaces and visibility) - Verified namespace consistency with existing test files in each project - Used dynamic `Consts.MaxHostsCount` rather than hardcoded values for all boundary tests - Verified Decimal format expected values match the `%Dv` (BGR order) implementation: `R + G*256 + B*65536` - Verified test method names accurately describe their assertions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com> |
||
|
|
3554f0884b |
spelling: move to v0.0.26 (#46851)
This fixes, among other things, the issue with fork PRs. --------- Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> |
||
|
|
ad60090096 |
[KBM] Fixes to text replacement issues (#46794)
<!-- 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 attempts to fix some of the issues that were introduced in 0.98.0 with text replacement <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46498 - [x] Closes: #46440 - [x] Closes: #46366 <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments In 0.98.0 I made a change to support multiline text replacement using Ctrl + V. This was very inconsistent so I have reverted back to _basically_ the same approach we were using before except now when we encounter a newline indicator we send "Shift + Enter" so that this works in chat boxes and plan editors. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Manual testing with single line and multiline replacements in Teams, Terminal, Git bash, Edge, etc |
||
|
|
de6a609d16 |
[KBM] Manual key selection — code review fixes (#46377)
Addresses code review feedback on the KBM manual key selection feature.
No new user-facing behavior; all changes are correctness, robustness,
and maintainability fixes.
## Summary of the Pull Request
- **Localization:** All hard-coded `RemappingDialog.Title` assignments
replaced with `ResourceHelper.GetString()`; added
`RemappingDialog_TitleEdit` resource key
- **VK_DISABLED centralization:** Replaced scattered `0x100`/`"256"`
literals and local `const string vkDisabledCode` with `private const int
VkDisabled = 0x100` / `private const string VkDisabledString = "256"` on
`MainPage`
- **Disable action validation:** Added
`ValidationHelper.ValidateDisableMapping()` — same trigger-key rules as
other action types (empty keys, modifier-only, illegal shortcuts,
duplicates, conflicting modifier variants); wired into
`ValidateMapping()` switch
- **Binding-safe dropdown revert:** `TriggerKeyDropDown_KeyChanged` /
`ActionKeyDropDown_KeyChanged` no longer set `dropDown.KeyName =
e.OldKeyName` on failure (breaks `{Binding}` expression); now use
`RevertKeySelection(keys, index)` which does
`ObservableCollection.RemoveAt` + `Insert` to force a binding-tracked
refresh without touching the DP directly. `NewKeyCode == 0` ("None") is
rejected via the same path
- **Dropdown validation:** `ValidateDropDownSelection` skips
`string.IsNullOrEmpty` placeholder slots (added by
`HandleAutoGrowShrink`) when checking repeated-modifier and max-size
rules
- **`SetActionType`:** Replaced hard-coded `SelectedIndex` with
tag-matching iteration over `ActionTypeComboBox.Items`; immune to XAML
item reorder
- **`ServiceStatusHelper`:** Dispose all `Process` objects returned by
`GetProcessesByName` before returning; prevents handle accumulation on
the 3-second polling timer
- **`KeyDropDownButton.GetKeyList()`:** Filter out `KeyCode == 0`
entries (native "None" sentinel for shortcut lists) before caching
- **`SettingsManager`:** `_mappingService!` used consistently in
`CreateSettingsFromKeyboardManagerService`
- **`KeyboardHookHelper`:** Constructor catch broadened from
`DllNotFoundException or InvalidOperationException` to `Exception`
## 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
- [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
## Detailed Description of the Pull Request / Additional comments
The `RevertKeySelection` pattern: in WinUI, assigning directly to a
bound `DependencyProperty` overwrites the binding expression. Using
`ObservableCollection.RemoveAt` + `Insert` instead raises
`CollectionChanged(Replace)`, causing the binding to re-read from the
source without clearing the expression.
```csharp
private static void RevertKeySelection(ObservableCollection<string> keys, int index)
{
string current = keys[index];
keys.RemoveAt(index);
keys.Insert(index, current);
}
```
## Validation Steps Performed
Manually verified: dropdown key selection and revert on invalid
selection, Disable mapping save/load with the new validation, "None"
absent from key picker flyout, `SetActionType` correctly selects items
with preserved XAML order.
---------
Co-authored-by: Zach Teutsch <88554871+zateutsch@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
||
|
|
243255ecea |
Fix quote breakout in launcher shell plugin commands (#45554)
## Summary of the Pull Request Fixes a command breakout vulnerability in the Shell plugin where user input containing double quotes could be manipulated to execute arbitrary sub-processes. By escaping double quotes, inputs like `test" & calc.exe` are treated as literal strings rather than shell command separators. ## PR Checklist - [ ] Closes: #xxx - [x] **Communication:** Proactive fix for command execution logic. - [x] **Tests:** Verified locally. - [x] **Localization:** N/A - [x] **Dev docs:** N/A - [x] **New binaries:** N/A - [x] **Documentation updated:** N/A ## Detailed Description of the Pull Request / Additional comments Escaping double quotes in the command string before it is passed to the shell prevents the breakout vector I identified while still allowing environment variables to expand as expected. I also removed some redundant property assignments in the shell helpers to keep the logic focused on the core fix. ## Validation Steps Performed Standard diagnostic commands like `ping` and `ipconfig` continue to function as expected via PowerToys Run. Malicious strings designed to break out of quotes now fail to execute sub-commands, as confirmed during local verification. --------- Co-authored-by: LegendaryBlair <legendaryblair@icloud.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
1e1bd07087 |
Add CmdPalLogger, Provider, and extension method (#46768)
This pull request introduces a new logging infrastructure for the CmdPal module by integrating the Microsoft.Extensions.Logging (MEL) abstraction and routing all log output through the existing `ManagedCommon.Logger`. The changes add a custom logger, logger provider, and extension method for easy registration, and update dependencies and service configuration to enable the new logging system. > This logging is not in use currently, but will be in a future PR. **Logging Infrastructure Integration:** * Added a new `CmdPalLogger` class implementing `ILogger`, which delegates logging calls to `ManagedCommon.Logger` to centralize and standardize log output. * Implemented `CmdPalLoggerProvider` to create and manage `CmdPalLogger` instances, allowing MEL-based logging throughout the application. * Introduced `CmdPalLoggingExtensions.AddCmdPalLogging` for registering the logger provider via dependency injection, ensuring all MEL logging is routed appropriately. * Updated `App.xaml.cs` to register the new logging system with `services.AddCmdPalLogging()`, enabling the infrastructure at application startup. [[1]](diffhunk://#diff-84386fa8a23e7058525bd269788bbf9e352b1f49d08e5f877059386ba3b83222R8) [[2]](diffhunk://#diff-84386fa8a23e7058525bd269788bbf9e352b1f49d08e5f877059386ba3b83222R129-R130) **Project and Dependency Updates:** * Updated the project file `Microsoft.CmdPal.Common.csproj` to reference the `ManagedCommon` project and to include a folder for the new logging code. [[1]](diffhunk://#diff-affab7e2df96d3b8073ab649e4ef5a34d459cd69e525573fd6426d698efec18fR29) [[2]](diffhunk://#diff-affab7e2df96d3b8073ab649e4ef5a34d459cd69e525573fd6426d698efec18fR64-R67) |
||
|
|
32b4080007 |
[CmdPal Extension Template] Adding skills and instructions (#46683)
## Summary of the Pull Request Adds Copilot instructions and skills to the CmdPal extension template so that when developers create a new extension via "Create a new extension", the generated project includes AI-assisted development guidance out of the box. I verified the skills on my own extension: <img src="https://github.com/user-attachments/assets/24bddefd-f38a-4faa-aaf0-686bcb891241"> ## 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 ### Problem When developers create a new Command Palette extension, the generated project contains only source code and build configuration — no AI-assisted development guidance. This means Copilot and other AI tools have no context about CmdPal extension APIs, patterns, or publishing workflows. ### Solution Added **2 instruction files** and **5 skills** (11 markdown files total) to the extension template at `src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/.github/`: **Instructions:** | File | Purpose | |------|---------| | `copilot-instructions.md` | Top-level project overview: structure, conventions, build/deploy workflow, skill inventory | | `instructions/cmdpal-extension.instructions.md` | Comprehensive 353-line API reference covering extension architecture, all page types, content types, commands/results, items, icons, dynamic updates, and debugging | **Skills:** | Skill | Description | Why | |-------|-------------|-----| | `publish-extension` | Microsoft Store (MSIX) + WinGet (EXE) + GitHub Actions automation | Every extension eventually needs distribution | | `add-adaptive-card-form` | Adaptive Cards Designer workflow + template JSON patterns | Forms are the primary way to collect user input | | `add-extension-settings` | ToggleSetting / TextSetting / ChoiceSetSetting + persistence | 12 of 20 built-in extensions use settings | | `add-dock-band` | Single/multi-button bands, WrappedDockItem, live-updating | Enables persistent toolbar widgets | | `add-fallback-commands` | FallbackCommands() + DynamicListPage + CancellationToken | 14 of 20 built-in extensions use fallback commands | ### Code changes - **`ExtensionTemplateService.cs`** — Added `.md` to `_copyAsIsTemplateExtensions` so markdown files are properly handled during template extraction - **`template.zip`** — Regenerated to include the new `.github/` directory (19KB → 44KB) - **`.github/actions/spell-check/expect.txt`** — Added 17 Inno Setup constants/flags, placeholder identifiers, and technical tokens from the new skill files to the spell-check allowlist ### Content sources - Instructions derived from the **SamplePagesExtension** (all 20+ sample pages), the **CmdPal extension SDK** (IDL + toolkit base classes), and **official MS Learn documentation** - Publishing skill based on the [Publish Command Palette extensions](https://learn.microsoft.com/windows/powertoys/command-palette/publishing-your-extension) docs - Patterns verified against all 20 real CmdPal extensions in the repo ## Validation Steps Performed 1. ✅ All 7 `ExtensionTemplateServiceTests` pass: - `CreateExtension_BuildsExtensionFromTemplateArchive` - `CopyTemplateFile_RewritesTextFiles` - `CopyTemplateFile_CopiesUnchangedTextFilesVerbatim` - `CopyTemplateFile_CopiesBinaryFilesWithoutRewritingContents` - `TemplateFileHandling_ThrowsForUnknownExtension` - `TemplateExtensionCategories_AreDisjointAndCoverTemplateZip` — validates `.md` is in the extension lists - `TemplateZipFiles_AllUseKnownHandling` — validates all zip entries have known handling 2. ✅ Verified `template.zip` contains all 31 entries (20 original + 11 new `.md` files) 3. ✅ Verified directory structure is preserved correctly in the zip 4. ✅ Added 17 flagged tokens to `expect.txt` to resolve `check-spelling` CI failures — all are valid technical terms (Inno Setup constants/flags, domain names, Windows environment variables, code example placeholders) that appear inside code blocks in the skill documentation 5. ✅ `check-spelling` CI passes with 0 new misspelled words found on the latest commit --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> |
||
|
|
8ee3d64667 |
CmdPal: Fix inline code text color in Details panel ignoring theme (#46739)
## Summary of the Pull Request Inline code (backtick-wrapped text) in the Details panel renders white regardless of theme, making it invisible on light backgrounds. The `DefaultMarkdownThemeConfig` in CmdPal was missing `InlineCode*` styling properties, so the toolkit's `MarkdownTextBlock` fell back to non-theme-aware defaults. The Settings UI already had this configured correctly. Fixes: #46734 ## PR Checklist - [x] **Tests:** XAML-only change; no behavioral logic affected - [ ] **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 Added theme-aware `InlineCode*` properties to `DefaultMarkdownThemeConfig` in two files, matching the existing pattern from `Settings.UI/App.xaml`: - **`ShellPage.xaml`** — Details panel (the reported bug) - **`ContentPage.xaml`** — Content page markdown (consistency) Properties added: ```xml InlineCodeForeground="{StaticResource TextFillColorSecondaryBrush}" InlineCodeBackground="{StaticResource ControlFillColorDefaultBrush}" InlineCodeBorderBrush="{StaticResource ControlElevationBorderBrush}" InlineCodeCornerRadius="2" InlineCodePadding="2,0,2,1" ``` These `StaticResource` brushes resolve per-theme (Light/Dark/HighContrast) automatically. ## Validation Steps Performed - Verified the Settings UI already uses this exact pattern in `App.xaml` (`DescriptionTextMarkdownThemeConfig`) and renders inline code correctly across themes. - Confirmed no other `MarkdownThemes` definitions exist in the CmdPal module. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: michaeljolley <1228996+michaeljolley@users.noreply.github.com> |
||
|
|
51c9bc4930 |
CmdPal: give each built-in extension its own settings file (#46685)
## Summary of the Pull Request
Each built-in CmdPal extension was reading and writing settings directly
to a shared `settings.json` file, which could be silently overwritten by
the persistence service. This PR gives each extension its own
`{namespace}.settings.json` file and adds transparent migration from the
legacy shared file.
## PR Checklist
- [x] Closes: #46667
- [x] **Communication:** I've discussed this with core contributors
already.
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** N/A — no user-facing strings changed
- [ ] **Dev docs:** N/A — internal implementation detail
- [ ] **New binaries:** N/A — no new binaries
## Detailed Description of the Pull Request / Additional comments
### Core change — `JsonSettingsManager` (extensions SDK)
Added `MigrateFromLegacyFile(string legacyFilePath)` to
`src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/JsonSettingsManager.cs`:
- Skips if the per-extension file already exists (idempotent).
- Reads the legacy shared `settings.json`, extracts only the keys the
current extension owns via `Settings.Update()`, and writes them to the
new per-extension path.
- Logs on failure without throwing.
### Per-extension changes (11 SettingsManager files)
Each built-in extension's `SettingsJsonPath()` now returns
`{namespace}.settings.json` instead of `settings.json`, and a new
`LegacySettingsJsonPath()` helper preserves the old path for migration:
- `Microsoft.CmdPal.Ext.Apps` — `AllAppsSettings.cs`
- `Microsoft.CmdPal.Ext.Calc` — `Helper/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.ClipboardHistory` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.Registry` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.RemoteDesktop` — `Settings/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.Shell` — `Settings/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.System` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.TimeDate` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.WebSearch` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.WindowWalker` — `Helpers/SettingsManager.cs`
- `Microsoft.CmdPal.Ext.WindowsTerminal` — `Helpers/SettingsManager.cs`
## Validation Steps Performed
- Built the solution and confirmed all 11 extensions compile cleanly.
- Launched CmdPal with an existing shared `settings.json` containing
settings for multiple extensions. Verified each extension created its
own `{namespace}.settings.json` and loaded the correct values.
- Confirmed subsequent launches skip migration (per-extension file
already exists).
- Verified the persistence service no longer overwrites
extension-specific settings.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
||
|
|
e1ad13ab34 |
Peek: Auto detect file name encoding when previewing zip file (#44799)
<!-- 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 Auto detect file name encoding when previewing zip file <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #44790 <!-- - [ ] 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 - [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 encoding of file names in zip files defaults to the native encoding of the creator's OS. For example, a zip file created on a zh-CN Windows PC uses GBK. However, currently peek always uses UTF-8 when opening zip file, resulting in garbled text. Here I added an auto-detection mechanism in peek to support different zip filename encodings. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Turn on peek 2. Download this file: [chinese-example.zip](https://github.com/user-attachments/files/24155422/chinese-example.zip) 3. Select this file and press Ctrl+Space Previous behaviour (incorrect): <img width="1964" height="1326" alt="Image" src="https://github.com/user-attachments/assets/2d331647-5761-4331-97ba-4c4c01132afb" /> Current behaviour (correct): <img width="2026" height="1269" alt="图片" src="https://github.com/user-attachments/assets/db456426-f7f6-467c-8f3c-1e01cba44fec" /> |
||
|
|
cea0497bb9 |
Refactor PadImage to use out param and improve disposal (#44906)
Refactored PadImage to return a bool and use an out parameter for the padded bitmap, with [NotNullWhen(true)] for nullability. Updated GetWindowBoundsImage to handle disposal of the original bitmap when padding is applied, improving memory management and code clarity. <!-- 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 |
||
|
|
fd5be6d04e |
Fix SA1614: Add text to empty parameter documentation (#46706)
Add meaningful descriptions to 3 empty param XML doc tags in BaseDscTest.cs and ShellHelpers.cs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
4dfdf46e0d |
Fix WMC1506 XAML compiler warnings in AdvancedPaste (#46726)
## Summary
Fixes all 13 **WMC1506** XAML compiler warnings ("OneWay bindings
require at least one of their steps to support raising notifications
when their value changes") by changing \Mode=OneWay\ to \Mode=OneTime\
on \x:Bind\ expressions bound to non-observable properties.
## Details
**Root cause:** \PasteFormat\ (plain sealed class) and \ClipboardItem\
(plain class) do not implement \INotifyPropertyChanged\. Using
\Mode=OneWay\ on their properties creates subscriptions that will never
fire, generating WMC1506 warnings.
**Fix:** Changed to \Mode=OneTime\ which is semantically correct — these
properties are set once and never change after construction.
**Files changed:**
- \ClipboardHistoryItemPreviewControl.xaml\ — 2 bindings (\Header\,
\Timestamp\)
- \MainPage.xaml\ — 11 bindings across \PasteFormat\ and \ClipboardItem\
DataTemplates
**Note on ClipboardHistoryItemPreviewControl:** Its computed properties
(\Header\, \Timestamp\) are refreshed via \Bindings.Update()\ when the
\ClipboardItem\ DependencyProperty changes. \Bindings.Update()\ forces
re-evaluation of all \x:Bind\ bindings regardless of mode, so \OneTime\
works correctly here.
## Validation
- [x] Full solution build passes (exit code 0)
- [x] Zero WMC1506 warnings after changes (was 13 before)
- [x] No behavioral changes — only binding mode optimization
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
||
|
|
152f64151b |
Fix MSTEST0017: Correct assertion argument order (#46712)
Swap expected/actual arguments in 22 Assert calls to follow the correct MSTest convention of Assert.AreEqual(expected, actual). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
76b773b016 |
Fix SA1616: Add text to empty return value documentation (#46718)
Add meaningful descriptions to 6 empty returns XML doc tags across DSC, CmdPal, and Extensions.Toolkit. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
0da5602f68 |
CmdPal: Update CommunityToolkit.WinUI to 8.2.251219 and remove SearchBar debouncer hacks (#46027)
## Summary of the Pull Request Updates all `CommunityToolkit.WinUI` packages from `8.2.250402` to `8.2.251219` (latest stable) and removes three workaround hacks from `SearchBar.xaml.cs` that were added to paper over bugs in the `CommunityToolkit.WinUI.Extensions` debouncer (`Debounce` with `immediate: true` not firing correctly). Those bugs were fixed upstream and are included in `8.2.251219`. ## 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 ### Package update (`Directory.Packages.props`) All `CommunityToolkit.WinUI` packages bumped from `8.2.250402` → `8.2.251219`: - `CommunityToolkit.WinUI.Animations` - `CommunityToolkit.WinUI.Collections` - `CommunityToolkit.WinUI.Controls.Primitives` - `CommunityToolkit.WinUI.Controls.SettingsControls` - `CommunityToolkit.WinUI.Controls.Segmented` - `CommunityToolkit.WinUI.Controls.Sizers` - `CommunityToolkit.WinUI.Converters` - `CommunityToolkit.WinUI.Extensions` ### Hack removals (`SearchBar.xaml.cs`) All three hacks were in `SearchBar.xaml.cs` (`Controls/`), tagged `TODO GH #245`: - **`FilterBox_TextChanged` — "TERRIBLE HACK"**: Forced `DoFilterBoxUpdate()` immediately for any single-character input, then returned early—bypassing the debouncer entirely. Now the debouncer's `immediate: FilterBox.Text.Length <= 1` path handles this correctly. - **Escape key handler**: After `FilterBox.Text = string.Empty`, manually pushed the empty string to `CurrentPageViewModel.SearchTextBox`. The `TextChanged` event fires after the assignment and the debouncer (with `immediate: true` for length 0) now handles propagation. - **Backspace key handler (`else if (e.Key == VirtualKey.Back)` block)**: Pre-emptively set `CurrentPageViewModel.SearchTextBox` to the *pre-deletion* text in `FilterBox_KeyDown`. Entire block removed; `TextChanged` + debouncer handle the post-deletion update correctly. ## Validation Steps Performed Manually verified in CmdPal that: - Typing aliases (single-character triggers) still activates filtering immediately - Pressing Escape clears the search box and resets the filter - Pressing Backspace correctly updates search results after each deletion <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Update to the latest `CommunityToolkit.WinUI.Extensions` and remove hacks</issue_title> > <issue_description>_originally filed by @zadjii-msft_ > > See https://github.com/zadjii-msft/PowerToys/pull/236#discussion_r1887714771 > > I had to stick a couple of HACKs into `SearchBar.xaml.cs` to work around bugs in the toolkit debouncer. Those bugs have since been fixed upstream, hooray! We just need a new version of the package shipped and we can get rid of them. > > ref https://github.com/zadjii-msft/PowerToys/issues/236 > > ---- > > Also! > > Revert > > ``` > // TODO(stefan): REVERT THIS TO DASHBOARD PAGE!!!! SPELCHHHHEEK FAIL > ``` > > from https://github.com/zadjii-msft/PowerToys/issues/215</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@niels9001</author><body> > @zadjii-msft @michaeljolley I assume we are on a later version now? Do we still need to remove the hacks?</body></comment_new> > <comment_new><author>@zadjii-msft</author><body> > We sure do! > > There's the SearchBar.xaml.cs ones, and I also had to manually copy over the `TypedEventHandlerExtensions.cs`</body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes microsoft/PowerToys#38285 <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> Co-authored-by: Niels Laute <niels.laute@live.nl> |
||
|
|
565094abbe |
Fix SA1623: Fix property documentation summaries (#46717)
Update 29 property XML doc summaries to begin with Gets, Gets or sets, or Gets a value indicating whether as required by StyleCop SA1623. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
36a5b77e6c |
chore: Update to WIL 1.0.250325.1 (#43503)
## Summary of the Pull Request Updates the Windows Implementation Library (WIL) to version 1.0.250325.1. This fixes some static analysis warnings in C++ projects that use WIL. The version is now managed centrally via `Directory.Packages.props` (Central Package Management), replacing the previous per-project `packages.config` approach. ## 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 - Updated `Microsoft.Windows.ImplementationLibrary` from `1.0.231216.1` to `1.0.250325.1` in `Directory.Packages.props`. - The change is a single-line update since the codebase uses Central Package Management — all C++ projects reference WIL via `PackageReference` without specifying a version number directly. ## Validation Steps Performed - Verified `Directory.Packages.props` correctly reflects the new WIL version `1.0.250325.1`. - Merged latest `main` branch to resolve conflicts arising from the migration to Central Package Management. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> |
||
|
|
4ce451edd0 |
[ImageResizer] Fix the missing settings of png encoder (#46695)
- Apply codec-specific encoder properties (e.g. JPEG quality) in the transcode path when transforms are required, matching WPF behavior. - Apply PngInterlaceOption to the WinRT PNG encoder via the "InterlaceOption" BitmapPropertySet entry; previously the setting was persisted but never passed to the encoder. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
addebb8126 |
[QuickAccent] Add capitalization for Superscript Latin Small Letter N (#46571)
## Summary of the Pull Request Adds capitalization for ⁿ (U+207F Superscript Latin Small Letter N -> ᴺ (U+1D3A Modifier Letter Capital N). This technically isn't a Unicode case pair, however there isn't any official capitalization for ⁿ and also where else would a user expect ᴺ if not on Shift+N. ## PR Checklist - [x] Closes: #26060 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** No need - [x] **New binaries:** None - [x] **Documentation updated:** No need ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Manually tested |
||
|
|
ac28b1c29f |
Migrate ImageResizer to WinUI3 (#45288)
<!-- 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 Migrate WPF/WinForms utility to WinUI3 can give us many benefit. 1. Only WinUI3 support AOT. By this change, we can remove the blocker to make imageResizer publish with AOT enabled to improve the performance. Through the previous testing in CmdPal, it can improve about 1.5x to 3x perf. 2. WinUI 3 provides a modern UI and makes sure that our experiences fit in with the Windows 11 look and feel. 3. We can merge many redundant code to the same one and reduce more codebase and installed size in the future if we successfully migrate all remaining WPF/WinForms utility to WinUI3. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46465 <!-- - [ ] 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 - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Set up the ImageResizer as the startup project. 2. Start in visual studio. --------- Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
7cc4a16aa7 |
Add setting to select network speed units in Command Palette (#46320)
## Summary of the Pull Request Adds a unit selection setting to the Performance Monitor extension in Command Palette that allows users to choose how network transmission speed is displayed. The setting offers three options: bits per second (Kbps/Mbps/Gbps, the default), bytes per second (KB/s/MB/s/GB/s), and binary bytes per second using IEC prefixes (KiB/s/MiB/s/GiB/s). ## 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 The following files were changed: - **`NetworkSpeedUnit.cs`** (new): Enum defining the three supported unit modes — `BitsPerSecond`, `BytesPerSecond`, and `BinaryBytesPerSecond`. - **`SettingsManager.cs`** (new): A `JsonSettingsManager` subclass for the Performance Monitor extension. Defines a `ChoiceSetSetting` for `NetworkSpeedUnit` (default: `BitsPerSecond`), stored under the `performanceMonitor` namespace in the shared CmdPal `settings.json`. - **`PerformanceWidgetsPage.cs`**: - `PerformanceWidgetsPage` constructor now accepts `SettingsManager` and passes it to `SystemNetworkUsageWidgetPage`. - `SystemNetworkUsageWidgetPage` stores the settings manager and calls `SpeedToString()`, which dispatches via a switch expression to `FormatAsBitsPerSecString()` (e.g. `12.5 Mbps`), `FormatAsBytesPerSecString()` (e.g. `1.6 MB/s`), or `FormatAsBinaryBytesPerSecString()` (e.g. `1.5 MiB/s`) based on the selected unit. - **`PerformanceMonitorCommandsProvider.cs`**: Holds the `SettingsManager`, passes it to both the list page and dock band via `SetEnabledState()`, exposes `Settings` on the provider, and adds the settings page to the command's `MoreCommands`. The crash-recovery hardening from main (`ProviderCrashSentinel`, `TryReactivateImmediately`, `SetDisabledState`, thread-safe locking) is fully preserved and integrated with the settings manager. - **`Resources.resw`**: Updated `Network_Speed_Unit_Setting_Title` and `Network_Speed_Unit_Setting_Description` to neutral language; added three choice label strings (`Network_Speed_Unit_BitsPerSec`, `Network_Speed_Unit_BytesPerSec`, `Network_Speed_Unit_BinaryBytesPerSec`). Also includes the disabled-state strings merged from main. ## Validation Steps Performed - Manually verified that the setting appears in the Performance Monitor extension's settings page (accessible via the ⋯ context menu on the Performance Monitor command item). - Verified that network speed values display in Kbps/Mbps/Gbps by default, switch to KB/s/MB/s/GB/s when the bytes option is selected, and switch to KiB/s/MiB/s/GiB/s when the binary bytes option is selected. - Setting persists across Command Palette restarts via the shared CmdPal settings file. - Verified that the crash-recovery re-enable flow correctly restores pages with the settings manager wired up. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>[Command Palette] Allows network transmission speed units to be switched between bits per second and bytes per second</issue_title> > <issue_description>### Description of the new feature / enhancement > > Add a setting that allows network monitoring in the Command Palette Dock to be displayed in bytes per second. > > ### Scenario when this would be used? > > In everyday usage, byte units are more commonly used. > > ### Supporting information > > _No response_</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@niels9001</author><body> > @copilot Can you add a setting for this?</body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes microsoft/PowerToys#46271 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/microsoft/PowerToys/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> |
||
|
|
8c8c99c382 |
Add subscript & superscript characters for Quick Accent #41922 (#45540)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds subscript and superscript characters to the "Special Characters" set in Quick Accent. This addresses the request in issue #41922, allowing users to easily type common mathematical notations (e.g., x², H₂O) using the Quick Accent menu. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #41922 - [ ] **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 The following Unicode subscript and superscript variants were added to [GetDefaultLetterKeySPECIAL](cci:1://file:///c:/Users/user/Desktop/salehcode/opensource/contribution/Linuxcontrib/PowerToys/src/modules/poweraccent/PowerAccent.Core/Languages.cs:185:8-236:9) in [Languages.cs](cci:7://file:///c:/Users/user/Desktop/salehcode/opensource/contribution/Linuxcontrib/PowerToys/src/modules/poweraccent/PowerAccent.Core/Languages.cs:0:0-0:0): - **0**: ₀, ⁰, ⁾, ₎ - **9**: ₉, ⁹, ⁽, ₍ - **A**: ᵃ, ₐ - **E**: ᵉ, ₑ - **N**: ₙ - **X**: ˣ, ₓ - **Y**: ʸ - **Z**: ᶻ - **+**: ₌, ⁼ (equals signs) - **-**: ₋, ⁻ (minus signs) - *****: ˣ, ₓ (multiplication sign variants) <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Verified that the Unicode codepoints correspond to the correct subscript and superscript glyphs. This change only modifies the static data list used by Quick Accent and does not alter any logic. --------- Co-authored-by: saleh <saleh@interlandtech.com> |
||
|
|
feae285c40 |
CmdPal: Revert focus restoration on Extensions settings page (#46642)
<!-- 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 reverts focus restoration to the previously selected item in the
list on the Extensions page in the Settings window, as it
unintentionally caused the wrong item to open on click.
This reverts commit
|
||
|
|
c34fb7f953 |
CmdPal: Harden ListViewModel fetch synchronization (#46429)
## Summary of the Pull Request This PR improves fetching of list items in ListViewModel: - Fixes _vmCache concurrency with copy-on-write cache publication. - Preserves latest-fetch-wins behavior across overlapping RPC GetItems() calls. - Prevents stale or canceled fetches from publishing and makes them abort promptly. - Improves cancellation cleanup for abandoned item view models and replaced token sources. - Updates empty-state tracking to follow overlapping fetch activity correctly. - Reduces hot-path cache overhead by removing per-item cache locking and full cache rebuilds. - Adds guard against re-entry, to prevent situations like #46329: - Defers ItemsChanged-triggered fetches raised during GetItems() until the call unwinds; - Uses a thread-local reentry guard so unrelated cross-thread fetches are not delayed; - Adds a regression test covering recursive GetItems() refresh behavior. - Make sure we never invoke FetchItems on UI thread, and be loud in debug when we are. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46331 <!-- - [ ] 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 |
||
|
|
2d037c4e91 |
CmdPal: Fix bad merge (#46639)
## Summary of the Pull Request This PR fix merge inconsistency caused by concurrent changes ( |
||
|
|
0a69c93b87 |
PowerToys Extension: Include deps in Microsoft.CmdPal.Ext.PowerToys slnf (#46136)
<!-- 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 updates Microsoft.CmdPal.Ext.PowerToys solution filter (slnf) to include new dependencies. <!-- 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: vanzue <vanzue@outlook.com> |
||
|
|
a022a9f024 |
CmdPal: Make Dock stay on top of all other windows (#46163)
<!-- 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 makes Dock stay on top of all other windows: - Marks the Dock window as topmost when there is no full-screen window. - Adds a new option that allows the user to disable this behavior. - Adds a timer that polls the system API to determine whether a full-screen window is present. ## Pictures? Pictures! <img width="560" height="283" alt="image" src="https://github.com/user-attachments/assets/55346005-2fac-4357-88bd-60c899565fac" /> https://github.com/user-attachments/assets/b81bff6d-4616-4d17-a1b0-063d254022ed <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46161 <!-- - [ ] 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 |
||
|
|
0b7d780980 |
CmdPal: improve full-screen detection (#45891)
## Summary of the Pull Request
This PR improves fullscreen detection for the Command Palette activation
shortcut, adds a separate "busy state" guard, surfaces live notification
state diagnostics in Settings, and provides an opt-in rapid-press
breakthrough to bypass suppression.
The existing fullscreen guard lumped D3D fullscreen, presentation mode,
and the heuristic QUNS_BUSY state into a single check. This made it
impossible to opt into guarding against only true fullscreen while
ignoring false positives from apps like NVIDIA overlay. This PR splits
those concerns, adds diagnostic visibility, and gives users an escape
hatch.
The problem with the detection is that QUNS_RUNNING_D3D_FULL_SCREEN is
intended for exclusive D3D full-screen apps (some games), but it
overlaps with QUNS_BUSY for other games and apps.
- Splits the fullscreen guard into two separate settings
- IsWindowFullscreen() now only checks QUNS_RUNNING_D3D_FULL_SCREEN and
QUNS_PRESENTATION_MODE
- New IsAppBusy() handles the heuristic QUNS_BUSY state separately
- New IgnoreShortcutWhenBusy setting (off by default) so users aren't
silently blocked by false positives
- Migrates from hand-written P/Invoke (NativeMethods.cs, deleted) to
CsWin32-generated bindings
- Adds a live InfoBar in Activation settings when the shortcut is
limited
- Polls SHQueryUserNotificationState every 2 seconds via DispatcherTimer
- Displays a warning describing which state is active (D3D fullscreen,
presentation mode, or busy)
- New GetUserNotificationState() in WindowHelper exposes the raw state
for the UI
- Attributes QUNS_BUSY to known trigger apps
- New FindVisibleTriggerApps() enumerates windows by class name and
process name against a known-app list
- When NVIDIA Overlay (or other known apps) are detected, the InfoBar
message names the likely culprit
- Adds an opt-in rapid-press breakthrough to bypass suppression
- New AllowBreakthroughShortcut setting (off by default)
- Pressing the activation shortcut 3 times within 2 seconds overrides
the guard
- The suppression is automatically bypassed when the Command Palette is
visible - to allow dismissal
## Pictures? Pictures!
<img width="1112" height="769" alt="image"
src="https://github.com/user-attachments/assets/e1d64ace-cfb2-4ba1-a436-3d2d77c18c76"
/>
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] Closes: #45548
- [x] Closes: #41225
- [x] Closes: #42716
- [x] Closes: #45875
<!-- - [ ] 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
|
||
|
|
7685cd1226 |
CmdPal: Fix binary file corruption in Create Extension (#46490)
<!-- 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 fixes a problem with invisible icons in newly create Command Palette extensions, when created through built-in command: - Avoids modifying binary files during extension creation from the template to prevent corruption. - Refactors template expansion and physical extension creation into a separate ExtensionTemplateService. - Adds unit tests. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46448 <!-- - [ ] 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 |
||
|
|
72bdfb073b |
CmdPal: Fix exception when converting calc result to different bases (#46176)
<!-- 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 fixes an exception that prevents showing result for big items: - Uses `BigInteger` and custom base converter for secondary results menu items. - Adds extra error handler to prevent exception when creating a secondary menu item from showing the main result to the user. - Adds some unit tests for the new base converter. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46167 <!-- - [ ] 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 |
||
|
|
96f97064be |
CmdPal: Fix type rename missed during merge gap (#46599)
<!-- 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
See title
Regressed by:
|
||
|
|
75a0fe1d2f |
[CmdPal] Fix keyboard navigation double Tab stop in details panel (#46346)
<!-- 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 Fixes a keyboard accessibility issue in Command Palette where Tab navigation would stop twice on container elements in the details panel instead of navigating to details panel and then directly to interactive controls. The items in the Details Panel aren't really interactable anyways (the AllAppsPage & ClipBoard History just displays details) This is part of the a11y bug batch. User Impact: Keyboard-only and assistive-technology users may experience confusion, extra navigation effort, and reduced efficiency when interacting with the Search Apps pane. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed https://github.com/user-attachments/assets/0d5f0f20-040c-4d22-b769-3fe318c66697 |
||
|
|
5792d32d32 |
CmdPal: Make Window Walker Close window command respect "Keep open" option (#45721)
## Summary of the Pull Request This PR fixes the "Close window" command in the Window Walker built-in extension and makes it obey the "Keep open after closing window" option in the extension's settings. It also adds a message that forces Window Walker to refresh its list of windows, so that the closed window disappears from the list (and similarly for end task commands). <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #43256 <!-- - [ ] 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 |
||
|
|
4cb3359314 |
CmdPal: Plain text viewer and image viewer IContent (#43964)
<!-- 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 introduces new types of IContent: - Plain text content – simple and straightforward, with options to switch between UI and monospace fonts and toggle word wrap. - It's super safe to display any random text content without having to worry about escaping the pesky markdown. - Image viewer content – a more polished way to display images: - When placed in the ContentPage, the component automatically resizes to fit the viewport, ensuring the entire image is visible at once. - Images can be opened in a built-in mini-viewer that lets you view, pan, and zoom without leaving the Command Palette. (Doing this directly on the page proved to be a UX and development headache.) Fully keyboard-controllable, so there’s no need to take your hands off the keys. ## Pictures? Pictures! Plain text content: <img width="960" height="604" alt="image" src="https://github.com/user-attachments/assets/a4ec36f3-2f7f-4a2a-a646-53056c512023" /> Image viewer content: <img width="939" height="605" alt="image" src="https://github.com/user-attachments/assets/c87f5726-8cd0-4015-b2d9-f1457fa1ec96" /> https://github.com/user-attachments/assets/915cd9d2-e4e3-4baf-8df6-6a328a3592ba <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #41038 <!-- - [ ] 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 |
||
|
|
943c2a1ff5 |
CmdPal: Harden performance monitor and enable crash recovery (#46541)
<!-- 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 has two parts: 1. Hardens the managed paths in the Performance Monitor extension to catch everything we can. 1. Adds crash recovery for cases where something fails in a way we cannot handle. ## Pictures? Pictures! <img width="1060" height="591" alt="image" src="https://github.com/user-attachments/assets/ee91c610-32eb-4117-b9b8-6bbc40b9b426" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46522 <!-- - [ ] 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> |
||
|
|
f686155d9b |
CmdPal: Fix Dock context menu following active item in Command Bar (#46420)
## Summary of the Pull Request This PR decouples the Dock control context menu from the item selected in the Shell Page list / Command Bar. - Adds a new property to the context menu to control whether it should react to messages like `UpdateCommandBarMessage` - The `DockControl` context menu no longer follows those messages Additional changes: - Ensures the context menu for Dock-selected search box position reflects the Dock position (when the Dock is at the bottom, the search box is also at the bottom) - Consistently displays the dock item context menu even for items with a single context menu action (instead of showing the Dock menu, which was confusing) <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46404 - [x] Closes: #45892 <!-- - [ ] 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 |
||
|
|
9afa1ec71d |
CmdPal: Remove workaround for FontIconSource.CreateIconElement (#45790)
## Summary of the Pull Request This PR removes workaround for FontIconSource.CreateIconElement icon not being visible, as it looks like it was fixed in WASDK 1.8.4. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45788 <!-- - [ ] 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 |
||
|
|
4337f8e5ff |
CmdPal: Make settings and app state immutable (#46451)
## Summary This PR refactors CmdPal settings/state to be immutable end-to-end. ### Core changes - Convert model types to immutable records / init-only properties: - `SettingsModel` - `AppStateModel` - `ProviderSettings` - `DockSettings` - `RecentCommandsManager` - supporting settings types (fallback/hotkey/alias/top-level hotkey/history items, etc.) - Replace mutable collections with immutable equivalents where appropriate: - `ImmutableDictionary<,>` - `ImmutableList<>` - Move mutation flow to atomic service updates: - `ISettingsService.UpdateSettings(Func<SettingsModel, SettingsModel>)` - `IAppStateService.UpdateState(Func<AppStateModel, AppStateModel>)` - Update ViewModels/managers/services to use copy-on-write (`with`) patterns instead of in-place mutation. - Update serialization context + tests for immutable model graph compatibility. ## Why Issue #46437 is caused by mutable shared state being updated from different execution paths/threads, leading to race-prone behavior during persistence/serialization. By making settings/app state immutable and using atomic swap/update patterns, we remove in-place mutation and eliminate this class of concurrency bug. ## Validation - Built successfully: - `Microsoft.CmdPal.UI.ViewModels` - `Microsoft.CmdPal.UI` - `Microsoft.CmdPal.UI.ViewModels.UnitTests` - Updated unit tests for immutable update patterns. Fixes #46437 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
25f44bc6d9 |
Emulate ZoomIt _mm_cvtsi128_si64 with _mm_storel_epi64 for x86 (#46529)
<!-- 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 Added this to ensure that ZoomIt can still build for 32 bit, even though PowerToys doesn't ship such binaries. <!-- 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 Ensured that the ZoomIt subproject compiles fine for 32 bit, this inside the Sysinternals build process, also tested that the panoramic screenshot functionality works. This change is isolated through the preprocessor for AMD64 and ARM64. |
||
|
|
dc533fbdb3 |
[Keyboard Manager] Remove service enable/disable separate from module, fix editor clear shortcut (#46530)
Two changes to shortcuts here: 1) Remove toggling the KBM service with a shortcut or via command palette 2) Ensure that shortcut is disabled for editor when shortcut is cleared |
||
|
|
c05ba4e2c8 |
[Keyboard Manager] Allow whitespace-only TextRemappings (#46510)
Title. Closes #46453 |
||
|
|
c83dd972a0 |
Add ZoomIt panoramic screenshot functionality (#46506)
<!-- 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 adds several ZoomIt features: - Panorama / scrolling screenshots. The image reconstruction happens based on visual cues and accuracy depends on scroll speed during the capture. - Text extraction when snipping. - Break timer improvements (the break timer is now a screen saver, offering the possibility to lock the computer). - Functionality for standalone clip trimming is present but not exposed in the XAML UI. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed The build is successful both with PowerToys and as a standalone Sysinternals executable. We ensured that the features behave as expected and that no regressions are introduced. --------- Co-authored-by: Mark Russinovich <markruss@ntdev.microsoft.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: markrussinovich <markrussinovich@users.noreply.github.com> Co-authored-by: MarioHewardt <marioh@microsoft.com> |
||
|
|
c33053b26b |
Add missing Icelandic character í (VK_I) (#46424)
## Summary of the Pull Request The Icelandic language definition was missing `í` entirely. This adds it to `VK_I`. Closes: Add missing Icelandic character í (VK_I) #46423 ## Validation Steps Performed Code review only. The change is a single line addition to a data-only switch statement, consistent in structure with all other language entries in the file. No binaries, pipelines, or localization files are affected. |
||
|
|
2cf7d0f5ec |
Fix for duplicated dockbands (#46438)
<!-- 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 CommandProviderWrapper.PinDockBand had no duplicate check and it blindly called .Add() on the settings list every time. This allowed the same extension to be pinned multiple times to the dock. Once duplicates existed in settings, LoadTopLevelCommands would faithfully re-create all of them on every CommandsChanged reload, making edit-mode unpin appear broken (unpin removes one, reload brings them all back). **Fix** - CommandProviderWrapper.PinDockBand: Check all three band lists (Start/Center/End) for an existing (ProviderId, CommandId) match before adding; early-return if already pinned. - CommandProviderWrapper.LoadTopLevelCommands: Track seen command IDs in a HashSet when iterating AllPinnedCommands; skip duplicates so they never materialize in the UI even if present in settings. <!-- 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: Jiří Polášek <me@jiripolasek.com> |
||
|
|
7cb0f3861a |
CmdPal: Fix duplicate "Pin to..." context commands on top-level items (#46458)
Top-level commands on the home page showed duplicate pin context entries
— e.g., "Pin to Dock" appearing twice, or contradictory "Pin to Dock" +
"Unpin from dock" on the same command.
## Summary of the Pull Request
When the window is hidden while a sub-page is active,
`ShellViewModel.Receive(WindowHiddenMessage)` re-navigates to the root
page while `CurrentPage` still points to the sub-page.
`GetProviderContextForCommand` therefore returns the sub-page's
`ProviderContext` (which has `SupportsPinning = true`, `ProviderId =
<extension>`) for the new home-page `ListViewModel`.
With that wrong context, `UnsafeBuildAndInitMoreCommands` runs for each
`ListItemViewModel` wrapping a `TopLevelViewModel` and injects a second
set of pin commands — using the wrong provider's dock/top-level state —
on top of the ones `TopLevelViewModel.BuildContextMenu()` already
injected via `AddMoreCommandsToTopLevel` with the correct per-item
provider context.
**Changes:**
- **`ShellViewModel.cs` (root cause):** Move `isMainPage` evaluation
before `providerContext` is computed; use `CommandProviderContext.Empty`
when navigating to the root page, regardless of what `CurrentPage` is at
that moment.
```csharp
var isMainPage = command == _rootPage;
var providerContext = isMainPage
? CommandProviderContext.Empty
: _appHostService.GetProviderContextForCommand(message.Context,
CurrentPage.ProviderContext);
```
- **`CommandPaletteContextMenuFactory.cs` (defensive guard):** In
`UnsafeBuildAndInitMoreCommands`, bail early when the page context
supports pinning and `commandItem.Model.Unsafe is TopLevelViewModel`.
`BuildContextMenu()` on `TopLevelViewModel` already populates pin
commands via `AddMoreCommandsToTopLevel` with the item's own provider
context; adding them again here is always wrong regardless of how the
page context ended up. The `SupportsPinning` check is evaluated first to
skip the `.Unsafe` type-test in the common non-pinning case.
## 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
The two fixes are complementary: the `ShellViewModel` change prevents
the wrong `ProviderContext` from ever reaching the home-page
`ListViewModel`; the `CommandPaletteContextMenuFactory` guard ensures
`TopLevelViewModel`-backed items are never double-processed even if some
other future code path sets the page context incorrectly.
The guard in
`CommandPaletteContextMenuFactory.UnsafeBuildAndInitMoreCommands` is
ordered so that `providerContext.SupportsPinning` (a cheap bool property
read) is evaluated before `commandItem.Model.Unsafe is
TopLevelViewModel`. This means the field access and type check are
skipped entirely for the common non-pinning case, addressing reviewer
feedback about unnecessary work on the hot path.
## Validation Steps Performed
Manually reproduced by opening CmdPal, navigating into a sub-page (e.g.,
"Search the Web"), closing the window, reopening, and verifying the
context menu for top-level commands shows exactly one "Pin to Dock" (or
"Unpin from dock") entry and at most one top-level pin action — no
duplicates or contradictory pairs.
<!-- START COPILOT CODING AGENT TIPS -->
---
📍 Connect Copilot coding agent with [Jira](https://gh.io/cca-jira-docs),
[Azure Boards](https://gh.io/cca-azure-boards-docs) or
[Linear](https://gh.io/cca-linear-docs) to delegate work to Copilot in
one click without leaving your project management tool.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: michaeljolley <1228996+michaeljolley@users.noreply.github.com>
|
||
|
|
1106ac61f5 |
CmdPal: Guard Frame.GoBack to prevent crash (#46493)
## Summary of the Pull Request This PR adds a guard to the shell page that prevents navigating back with empty nav stack (which leads to exception, an ultimately to a crash). > You should check that the [CanGoBack](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.frame.cangoback?view=windows-app-sdk-1.8#microsoft-ui-xaml-controls-frame-cangoback) property is true before you call GoBack. If you call GoBack while CanGoBack is false, an exception is thrown. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #46492 <!-- - [ ] 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 |