Terminal: add move tab up/down and kill terminals below#309084
Open
iliazlobin wants to merge 9 commits intomicrosoft:mainfrom
Open
Terminal: add move tab up/down and kill terminals below#309084iliazlobin wants to merge 9 commits intomicrosoft:mainfrom
iliazlobin wants to merge 9 commits intomicrosoft:mainfrom
Conversation
- Add MoveTabUp/MoveTabDown actions to reorder terminal groups in the tab list - Add KillGroupsBelow action to kill all terminal groups below the active one - Expose in terminal tab context menu; precondition requires groupCount > 1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new terminal tab management commands to reorder terminal groups and to bulk-kill terminal groups “below” the current one, integrating them into terminal actions/menus and updating the group service API.
Changes:
- Added new command IDs: MoveTabUp, MoveTabDown, KillGroupsBelow.
- Extended
ITerminalGroupServiceand implemented group reordering + “groups below” lookup inTerminalGroupService. - Registered the new actions and added “Kill Terminals Below” to the terminal tab context menu.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/workbenchTestServices.ts | Updates TestTerminalGroupService to satisfy the expanded interface. |
| src/vs/workbench/contrib/terminal/common/terminal.ts | Adds new TerminalCommandId entries for the commands. |
| src/vs/workbench/contrib/terminal/browser/terminalMenus.ts | Adds the “Kill Terminals Below” tab context menu item. |
| src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts | Implements move up/down and groups-below helper methods. |
| src/vs/workbench/contrib/terminal/browser/terminalActions.ts | Registers MoveTabUp/Down and KillGroupsBelow actions. |
| src/vs/workbench/contrib/terminal/browser/terminal.ts | Extends ITerminalGroupService with the new methods. |
…efore dispose, add move commands to context menu Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…elow Move up/down are keyboard-only commands; context menu follows editor tabs pattern which only has a "close to the right" equivalent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
@microsoft-github-policy-service agree |
- Add terminalGroupService.test.ts with 16 unit tests covering moveGroupUp, moveGroupDown, getGroupsBelow (no-op edges, ordering, activeGroupIndex tracking) - Add terminalActiveGroupIsLast context key; use it to hide Kill Terminals Below when the right-clicked tab is the last one - Check both focusedArgs and allInstanceArgs when resolving context instance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 #309068
Summary
groupCount > 1)groupCount > 1)Changes
terminal.ts(common)MoveTabUp,MoveTabDown,KillGroupsBelowtoTerminalCommandIdterminal.ts(browser)moveGroupUp,moveGroupDown,getGroupsBelowtoITerminalGroupServiceterminalGroupService.tsterminalActions.tsterminalMenus.tsworkbenchTestServices.tsTestTerminalGroupServiceTest plan