[PR #11153] Add the ability to interact with subtrees of panes #28453

Closed
opened 2026-01-31 09:28:37 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/11153

State: closed
Merged: Yes


This commit adds the ability to interact with subtrees of panes.

Have you ever thought that you don't have enough regression testing to
do? Boy do I have the PR for you! This breaks all kinds of assumptions
about what is or is not focused, largely complicated by the fact that a
pane is not a proper control. I did my best to cover as many cases as I
could, but I wouldn't be surprised if there are some things broken that
I am unaware of.

Done:

  • Add parent and child movement directions to move up and down the
    tree respectively
  • When a parent pane is selected it will have borders all around it in
    addition to any borders the children have.
  • Fix focus, swap, split, zoom, toggle orientation, resize, and move to
    all handle interacting with more than one pane.
  • Similarly the actions for font size changing, closing, read-only, clearing
    buffer, and changing color scheme will distribute to all children.
  • This technically leaves control focus on the original control in the
    focused subtree because panes aren't proper controls themselves. This
    is also used to make sure we go back down the same path with the
    child movement.
  • You can zoom a parent pane, and click between different zoomed
    sub-panes and it won't unzoom you until you use moveFocus or another
    action. This wasn't explicitly programmed behavior so it is probably
    buggy (I've quashed a couple at least). It is a natural consequence of
    showing multiple terminals and allowing you to focus a terminal and a
    parent separately, since changing the active pane directly does not
    unzoom. This also means there can be a disconnect between what pane is
    zoomed and what pane is active.

Validation Steps Performed

Tested focus movement, swapping, moving panes, and zooming.

Closes #10733

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11153 **State:** closed **Merged:** Yes --- This commit adds the ability to interact with subtrees of panes. Have you ever thought that you don't have enough regression testing to do? Boy do I have the PR for you! This breaks all kinds of assumptions about what is or is not focused, largely complicated by the fact that a pane is not a proper control. I did my best to cover as many cases as I could, but I wouldn't be surprised if there are some things broken that I am unaware of. Done: - Add `parent` and `child` movement directions to move up and down the tree respectively - When a parent pane is selected it will have borders all around it in addition to any borders the children have. - Fix focus, swap, split, zoom, toggle orientation, resize, and move to all handle interacting with more than one pane. - Similarly the actions for font size changing, closing, read-only, clearing buffer, and changing color scheme will distribute to all children. - This technically leaves control focus on the original control in the focused subtree because panes aren't proper controls themselves. This is also used to make sure we go back down the same path with the `child` movement. - You can zoom a parent pane, and click between different zoomed sub-panes and it won't unzoom you until you use moveFocus or another action. This wasn't explicitly programmed behavior so it is probably buggy (I've quashed a couple at least). It is a natural consequence of showing multiple terminals and allowing you to focus a terminal and a parent separately, since changing the active pane directly does not unzoom. This also means there can be a disconnect between what pane is zoomed and what pane is active. ## Validation Steps Performed Tested focus movement, swapping, moving panes, and zooming. Closes #10733
claunia added the pull-request label 2026-01-31 09:28:37 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28453