Skip to content

Conversation

@Kongkon06
Copy link

What it does

Fixes #16758

This PR improves Terminal Manager behavior when terminal.grouping.mode is set to tree by:

  • Preventing the creation of a new empty page when the last terminal page is deleted.
  • Ensuring a remaining page is automatically selected after a page deletion.
  • Fixing the Reset Layout command to properly clear and reset the terminal layout.

To support this, the PR introduces a small internal flag isResetingLayout and helper method resetView in
terminal-manager-widget to distinguish between explicit layout resets and user-initiated page deletions, ensuring correct
lifecycle handling without changing public APIs.

How to test

Ensure terminal.grouping.mode is set to tree in your preferences.

Test 1: Delete the last page

  1. Open the Terminal Manager with a single terminal page.
  2. Delete the page.

Expected result:

  • The Terminal Manager widget closes.
  • No new empty page is created.

Test 2: Auto-selection after page deletion

  1. Open the Terminal Manager with at least two terminal pages.
  2. Delete one page.

Expected result:

  • A remaining page is automatically selected.
  • A terminal remains visible.

Test 3: Reset Layout

  1. Open the Terminal Manager and create multiple terminal pages.
  2. Run Terminal Manager: Reset Layout and confirm.

Expected result:

  • All terminal pages are cleared.
  • The terminal layout is reset correctly (Also creates a fresh page).

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review.

Attribution

Review checklist

Reminder for reviewers

  • As a reviewer, I agree to behave in accordance with the review guidelines

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jan 8, 2026
@ndoschek ndoschek self-requested a review January 9, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

terminal-manager: terminal page deletion and reset behavior is inconsistent

1 participant