Add per-pane title header for split panes (#4717)#20068
Open
sagarbhure-msft wants to merge 2 commits intomicrosoft:mainfrom
Open
Add per-pane title header for split panes (#4717)#20068sagarbhure-msft wants to merge 2 commits intomicrosoft:mainfrom
sagarbhure-msft wants to merge 2 commits intomicrosoft:mainfrom
Conversation
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.
Member
carlos-zamora
left a comment
There was a problem hiding this comment.
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:
- Would it be possible for this to be a setting?
- Most of the boilerplate gets added in via the macros here: https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalSettingsModel/MTSMSettings.h
- In the
TerminalSettingsEditor, it would best go in https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalSettingsEditor/GlobalAppearance.xaml - Something simple like
"displayPaneHeaders"should work, imo
- Accessibility:
- I'm curious if the headers are read out by screen readers automatically? They're just set up to be the title of the content, so I suspect that it'll be a very clean and accessible experience, but I want to double check.
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!
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.
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.
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
Screenshots
Screenshots (6 panes, focus cycling through each)
Focus: Dev • Backend API ⚙️

Focus: Dev • Frontend UI 🎯

Focus: Dev • Database 🏗

Focus: Dev • Build & CI 🔧

Focus: Dev • Experiments 🧪

Focus: My Dev Session 🚀
