mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-10 04:20:23 +02:00
Addresses correctness, robustness, and round-trip issues found while reviewing the CLI-command-template work: - Required-parameter validation: gate Save on IsAllValid and bubble parameter changes to the host (previously could save "--open-settings="). - FFI read-back: carry templateId/templateParameters back to C# so a template mapping survives a rebuild from default.json (struct + both GetShortcutRemap[ByType] + KeyboardMappingService projection). - Catalog load: wrap menu build in try/catch so a malformed catalog degrades gracefully instead of crashing the editor at startup. - Install location: retarget the per-user PowerToys.exe path to a machine-wide install when the LOCALAPPDATA path is absent. - Missing-template "Keep as plain command": preserve the resolved command instead of leaving an empty, unsavable OpenApp form. - TemplateResolver: single-pass substitution + CommandLineToArgvW quoting (prevents substitution-injection and arg-splitting). - C++ load: type-check templateParameters before reading so malformed optional metadata no longer drops the whole mapping; dedupe GetObjectW. - schemaVersion: accept forward-compatible (>=1) catalogs; honor iconGlyph. - Fix SelectionChanged/AppSpecificCheckBox handler re-subscription leak. - Add KeyboardManagerEditorUI.UnitTests (resolver + catalog model); 15 tests, wired into PowerToys.slnx. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>