Skip to content

Add per-pane title header for split panes (#4717)#20068

Open
sagarbhure-msft wants to merge 2 commits intomicrosoft:mainfrom
sagarbhure-msft:feature/pane-title
Open

Add per-pane title header for split panes (#4717)#20068
sagarbhure-msft wants to merge 2 commits intomicrosoft:mainfrom
sagarbhure-msft:feature/pane-title

Conversation

@sagarbhure-msft
Copy link
Copy Markdown
Contributor

@sagarbhure-msft sagarbhure-msft commented Apr 4, 2026

Summary of the Pull Request

Adds a per-pane title header bar that appears above each leaf pane when multiple panes are open, allowing users to see all pane titles at a glance without switching focus. Shows a thin title bar above each pane when multiple panes are open. Headers display the pane title, update dynamically via Dispatcher when the shell changes the title (e.g. via escape sequences), and use the focus-state border color as background. Hidden when only one pane exists.

References and Relevant Issues

Closes #4717

Detailed Description of the Pull Request / Additional comments

When two or more panes are visible, a thin header bar appears at the top of each pane displaying its current title. The header updates dynamically when the shell changes the title via escape sequences (e.g. $Host.UI.RawUI.WindowTitle in PowerShell). The focused pane's header uses the focus border color as its background; unfocused panes use the default border color. When a pane is closed and only one remains, headers are automatically hidden.

The header is placed directly in the pane's root Grid as row 0 (auto-sized), with the content border in row 1 (star-sized). This avoids wrapping the TermControl in an extra Grid, which would break SwapChainPanel rendering. A _SetupLeafLayout() helper deduplicates the leaf UI setup between the constructor and the _CloseChild reassembly path.

Validation Steps Performed

  • Split panes with Alt+Shift++ (vertical) and Alt+Shift+- (horizontal) — headers appear on all panes
  • Set custom titles via $Host.UI.RawUI.WindowTitle — headers update dynamically to show custom titles with emoji
  • Clicked between panes — focused pane header highlights blue, others stay dark
  • Closed panes until one remains — header disappears automatically
  • Tested with up to 6 simultaneous panes — all headers render correctly with proper layout
  • Verified terminal content renders without transparency or artifacts after splittin

Screenshots

Screenshots (6 panes, focus cycling through each)

Focus: Dev • Backend API ⚙️
Screenshot 2026-04-04 093209

Focus: Dev • Frontend UI 🎯
Screenshot 2026-04-04 093219

Focus: Dev • Database 🏗
Screenshot 2026-04-04 093228

Focus: Dev • Build & CI 🔧
Screenshot 2026-04-04 093239

Focus: Dev • Experiments 🧪
Screenshot 2026-04-04 093306

Focus: My Dev Session 🚀
Screenshot 2026-04-04 093318

PR Checklist

Shows a thin title bar above each pane when multiple panes are open.
Headers display the pane title, update dynamically via Dispatcher when
the shell changes the title (e.g. via escape sequences), and use the
focus-state border color as background. Hidden when only one pane exists.

The header is placed directly in the pane root Grid (row 0, auto-sized)
with the content border in row 1 (star-sized), keeping the TermControl
as the direct child of the border so SwapChainPanel renders correctly.
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Apr 4, 2026
Copy link
Copy Markdown
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Wow! Thanks for doing this! The demo photos look great and it doesn't look like a complex diff.

There's a few notes I want to discuss:

Aside from that, I think this is pretty much ready to go. I'm adding Needs-Discussion just to touch base with the team on it since it's a decently big UI change, but I'm excited to see this land!

@carlos-zamora carlos-zamora added the Needs-Discussion Something that requires a team discussion before we can proceed label Apr 6, 2026
Adds a 'showPaneHeaders' boolean setting (default: true) to control
whether per-pane title headers are displayed when multiple panes are
open. The setting is available in Settings > Appearance as a toggle
and persists via settings.json.

Headers are refreshed live when the setting is changed — toggling off
hides headers on all existing panes immediately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Discussion Something that requires a team discussion before we can proceed Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add title to split window

2 participants