[Keyboard Manager] UI tests for remapping search, filters and bulk delete - #50352
Open
takahashi (MasaYan24) wants to merge 1 commit into
Open
[Keyboard Manager] UI tests for remapping search, filters and bulk delete#50352takahashi (MasaYan24) wants to merge 1 commit into
takahashi (MasaYan24) wants to merge 1 commit into
Conversation
…lete Adds KeyboardManagerSearchFilterTests to the existing KeyboardManager.UITests project (already on the Microsoft.PowerToys.UITest.Next / winappcli harness), covering the list features that shipped in microsoft#49287: - Ctrl+F focuses the title-bar search box and the typed text filters the list - Clear filters restores the full list from the filter flyout - The Ctrl and Alt modifier toggles each narrow the list to their own mapping - The application filter hides app-specific mappings in "Global only" - A search with no matches shows the dedicated no-results state, and its Clear filters button recovers from it - Searching and filtering never touch the persisted profile - Selection mode + "Delete selected (n)" removes exactly the selected rows, leaves selection mode, and the deletion survives an editor restart The seeded profile uses function keys (F13-F17) as trigger keys so the running Keyboard Manager engine cannot rewrite the letters the test types into the search box. Requested by @khmyznikov as a follow-up to microsoft#49287. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJG9NHHEkEgFmp9W7djrnt
7 tasks
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
🧭 PR intakeVisual evidence: Not needed — The changed files do not indicate a visible UI change. No visual evidence is expected. Recommendation
✅ Ready for reviewThis PR passed the automated intake checks and is ready for maintainer review. Automated PR intake; PowerToys maintainers make final decisions. |
Niels Laute (niels9001)
requested review from
Gleb Khmyznikov (khmyznikov)
and
a balanced review from Copilot
September 3, 2026 09:14
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The profile-integrity assertion can miss persisted shortcut mutations.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Keyboard Manager UI tests for remapping-list search, filtering, selection, and bulk deletion.
Changes:
- Tests search/filter behavior and no-results recovery.
- Tests bulk deletion and persistence across restart.
File summaries
| File | Description |
|---|---|
KeyboardManagerSearchFilterTests.cs |
Adds search, filter, and bulk-delete UI scenarios. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+200
to
+206
| private static bool ProfileContainsSeededMappings() => | ||
| SingleKeyMappings().Count == 1 && | ||
| SingleKeyMappings().Any(mapping => | ||
| mapping?["originalKeys"]?.GetValue<string>() == F13.ToString(System.Globalization.CultureInfo.InvariantCulture) && | ||
| mapping?["newRemapKeys"]?.GetValue<string>() == F14.ToString(System.Globalization.CultureInfo.InvariantCulture)) && | ||
| GlobalShortcutMappings().Count == 2 && | ||
| AppSpecificShortcutMappings().Count == 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #49287, requested by Gleb Khmyznikov (@khmyznikov): UI tests for the remapping-list search, filters and bulk delete that shipped in that PR.
KeyboardManager.UITestsis already on theMicrosoft.PowerToys.UITest.Next/ winappcli harness, so this adds a test class to the existing project rather than scaffolding a new one. No product code changes.What the tests cover
KeyboardManager.Editor.SearchAndFilterKeyboardManager.Editor.BulkDeleteDelete selected (2)label on an enabled bulk-delete buttonNote on the seeded profile
The seeded mappings deliberately use function keys (F13-F17) as their trigger keys. The Keyboard Manager engine is live while these tests run, so a remap on an ordinary letter would rewrite the characters the test types into the search box.
Validation
KeyboardManager.UITestsbuilds clean (x64 Debug); the new file produces no analyzer warnings.%LOCALAPPDATA%\Microsoft\PowerToysKeyboard Manager configuration and take over the interactive desktop, and I do not have an isolated desktop/VM available on this machine. Could a maintainer kick off/azp runso theResolve affected UI test projectsjob picks them up? Happy to iterate on anything that comes back red.Checklist