Repository navigation
testing: respect keybindings before type-to-filter - #344892
Merged
Connor Peet (connor4312) merged 2 commits intoOct 29, 2026
Merged
Connor Peet (connor4312) merged 2 commits into
Connor Peet (connor4312) merged 2 commits into
Conversation
Keep matching keybindings and chord prefixes from overwriting the Testing filter and moving focus before command dispatch. Unbound printable keys continue to start filtering. AI-assisted implementation and local validation.
Render TestingExplorerView and dispatch DOM keydown events with controlled keybinding resolutions. Cover j/k/o shortcuts, chord prefixes, unchanged filter text and tree focus, plus the unbound printable-key fallback. Four regression cases fail on the original code. The fixed view and related projection/filter suites pass all 31 tests. AI-assisted implementation and local validation.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change making Test Explorer honor matching keybindings before activating type-to-filter.
No open issues 🎉
What changed in this PR
Fixes #344598 by making Test Explorer respect matching keybindings before starting type-to-filter, preserving tree focus so custom shortcuts can execute.
Changes:
- Injects the keybinding service into the view model and starts filtering only when soft dispatch returns
NoMatchingKb. - Adds five DOM-level regression cases covering printable shortcuts, chord prefixes, preserved filter text and focus, and unbound-key filtering.
No actionable findings remain. The tests use controlled resolution results; they do not cover the full keybinding resolver or Windows-specific behavior.
| File | Description |
|---|---|
src/vs/workbench/contrib/testing/test/browser/testingExplorerView.test.ts |
Adds shortcut, chord-prefix, and unbound-key regression tests. |
src/vs/workbench/contrib/testing/browser/testingExplorerView.ts |
Checks keybinding resolution before activating type-to-filter. |
Review effort: Balanced
Connor Peet (connor4312)
enabled auto-merge
October 29, 2026 18:20
TylerLeonhardt
approved these changes
Oct 29, 2026
Martin Aeschlimann (aeschli)
approved these changes
Oct 29, 2026
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.
Fixes #344598.
The Test Explorer handles printable keydown events before normal command dispatch. Even when soft dispatch has found a user shortcut, its listener replaces the filter text and focuses the filter input, invalidating the shortcut's tree-focus context before the command can execute.
Inject
IKeybindingServiceinto the existing view model and start type-to-filter only whensoftDispatchreturnsNoMatchingKb. Matching commands and chord prefixes keep their current focus and filter text; unbound printable keys still start filtering.Five DOM-level cases render
TestingExplorerViewwith controlled keybinding-resolution results. They coverj/k/o, a chord prefix, unchanged existing filter text and tree focus, and the unbound printable-key fallback. The fixture reuses workbench test services and owns its created UI resources.Validation on Linux, Node 24.22.1, using the repository Electron runner:
npm run build-fast -- --client-only), changed-file ESLint, hygiene, andgit diff --checkpassed.The Electron flags are for the headless container. These tests exercise the actual view's DOM focus and filter behavior with stubbed resolution results; they do not exercise the full user-keybinding resolver or establish Windows manual coverage.
AI-assisted implementation and local validation.