sessions: make session navigation work when editor part is open but unfocused#320005
Merged
Conversation
The Go Back (Ctrl+Shift+Tab) and Go Forward (Ctrl+Tab) session navigation keybindings were gated on EditorContextKeys.editorTextFocus.toNegated(), which also suppressed them in cases where the editor part is open but not focused. Switch to EditorAreaFocusContext.toNegated() so the chords work whenever keyboard focus is outside the editor area, and only defer to the editor's Ctrl+Tab quick-open when the editor area actually has focus. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes session navigation keybindings in the Agents window so Go Back (Ctrl+Shift+Tab) and Go Forward (Ctrl+Tab) continue to work when an editor is open but does not have focus, while still deferring to the editor’s own Ctrl+Tab behavior when the editor area is actually focused.
Changes:
- Switches the keybinding
whengate fromEditorContextKeys.editorTextFocustoEditorAreaFocusContext. - Keeps existing keybinding weights and chords unchanged to preserve precedence behavior.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/sessions/browser/sessionsActions.ts | Updates Go Back / Go Forward keybinding when clauses to use EditorAreaFocusContext negation so session navigation works when focus is outside the editor area (even if an editor is open). |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Yoyokrazy
approved these changes
Jun 4, 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.
What
The session navigation keybindings — Go Back (
Ctrl+Shift+Tab) and Go Forward (Ctrl+Tab) — in the Agents window were gated onEditorContextKeys.editorTextFocus.toNegated(). This switches the gate toEditorAreaFocusContext.toNegated().Why
editorTextFocusevaluates such that the navigation chords were suppressed even when the editor part is open but does not have keyboard focus. As a result,Ctrl+Shift+Tab/Ctrl+Tabdid not navigate between sessions whenever an editor was open.EditorAreaFocusContextistrueonly when keyboard focus is genuinely within the editor area (any editor part). Negating it means session navigation works whenever focus is outside the editor area — including when an editor is open but unfocused — while still deferring to the editor's ownCtrl+Tabquick-open when the editor area is actually focused.Notes for reviewers
whenclauses of the two navigation actions change; weights and key chords are untouched.EditorAreaFocusContextis bound ineditorPart.tsfor all editor parts (main, modal, auxiliary).Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com