Skip to content

Add delete icon to Hidden Terminals menu item#287133

Merged
meganrogge merged 5 commits intomainfrom
copilot/add-delete-icon-to-hidden-terminals
Jan 12, 2026
Merged

Add delete icon to Hidden Terminals menu item#287133
meganrogge merged 5 commits intomainfrom
copilot/add-delete-icon-to-hidden-terminals

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Adds a trash icon to the Hidden Terminals menu item that deletes all hidden chat terminals at once. Previously, users had to open each hidden terminal individually and delete them one by one.

Changes

  • Added delete button to TerminalTabsChatEntry

    • Trash icon (Codicon.trashcan) positioned after the label
    • Calls ITerminalService.safeDisposeTerminal() for each hidden terminal in parallel
    • Click handler stops propagation to prevent opening quick pick
    • Keyboard support (Enter/Space) with full ARIA labels
  • Styled delete button in terminal.css

    • 16x16px with hover opacity transition (0.8 → 1.0)
    • Hover background with 3px border-radius
    • Hidden in icon-only mode (no text labels)

UI

Before:  [💬] 2 Hidden Terminals
After:   [💬] 2 Hidden Terminals [🗑️]
         ^                       ^
         Opens quick pick        Deletes all
Original prompt

This section details on the original issue you should resolve

<issue_title>Add a delete icon to Hidden Terminals menu item</issue_title>
<issue_description>

Currently, in order to delete/clean up hidden terminals created by AI models I need to:

  1. Click the Hidden Terminals menu item in the terminal side bar
  2. Select a hidden terminal in the command palette to open it
  3. Click the trash icon in the terminal side bar for the given terminal menu item
  4. Repeat for every single hidden terminal

It would be great if the Hidden Terminal menu item also had a trash icon so I could clear them all in one swoop.</issue_description>

Comments on the Issue (you are @copilot in this section)

@Tyriar I'd use this too 👍

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Fixes #275235

Copilot AI and others added 2 commits January 12, 2026 16:54
- Added trash icon button to TerminalTabsChatEntry that deletes all hidden terminals
- Added CSS styling for the delete button with hover effects
- Injected ITerminalService to enable disposing of terminals
- Added keyboard navigation support for the delete button
- Prevented entry click handler from firing when clicking delete button

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a delete icon to Hidden Terminals menu item Add delete icon to Hidden Terminals menu item Jan 12, 2026
Copilot AI requested a review from meganrogge January 12, 2026 17:07
@meganrogge
Copy link
Copy Markdown
Collaborator

@Tyriar I changed it so it only shows on hover or keyboard focus. WDYT?

delete.mov

@meganrogge meganrogge requested a review from Tyriar January 12, 2026 17:37
@meganrogge meganrogge added this to the January 2026 milestone Jan 12, 2026
@meganrogge meganrogge marked this pull request as ready for review January 12, 2026 17:38
Copilot AI review requested due to automatic review settings January 12, 2026 17:38
@meganrogge meganrogge enabled auto-merge (squash) January 12, 2026 17:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a delete button to the Hidden Terminals menu item in the terminal tabs view, allowing users to delete all hidden chat terminals at once instead of opening and deleting them individually.

Changes:

  • Added a trash icon button to TerminalTabsChatEntry that deletes all hidden chat terminals in parallel
  • Implemented click and keyboard handlers with proper event propagation control
  • Styled the delete button with hover effects and visibility rules in CSS

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/terminal/browser/terminalTabsChatEntry.ts Added delete button DOM element, event handlers for click and keyboard interactions, and _deleteAllHiddenTerminals method with proper ARIA labels
src/vs/workbench/contrib/terminal/browser/media/terminal.css Added styling for delete button with hover states, display rules for when tabs have text, and visibility control

Tyriar
Tyriar previously requested changes Jan 12, 2026

.monaco-workbench .pane-body.integrated-terminal .terminal-tabs-chat-entry:hover .terminal-tabs-chat-entry-delete,
.monaco-workbench .pane-body.integrated-terminal .terminal-tabs-chat-entry:focus-within .terminal-tabs-chat-entry-delete {
display: flex;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the hidden terminals text stable, but do similar to hovering the other items?

Image

Maybe that should go with just moving it to be left aligned now too as we've had feedback to do that too.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Screenshot 2026-01-12 at 4 22 02 PM

@meganrogge meganrogge merged commit 5790ff8 into main Jan 12, 2026
22 checks passed
@meganrogge meganrogge deleted the copilot/add-delete-icon-to-hidden-terminals branch January 12, 2026 23:03
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a delete icon to Hidden Terminals menu item Finalize presentation of chat terminals UI

4 participants