Skip to content

Preserve explicit tab title override on settings reload#19835

Open
ThanhNguyxn wants to merge 1 commit intomicrosoft:mainfrom
ThanhNguyxn:fix/19340-title-override
Open

Preserve explicit tab title override on settings reload#19835
ThanhNguyxn wants to merge 1 commit intomicrosoft:mainfrom
ThanhNguyxn:fix/19340-title-override

Conversation

@ThanhNguyxn
Copy link

Summary of the Pull Request

  • Preserve explicit runtime tab title overrides (for example from wt --title) when settings are reloaded.
  • Add a regression test that reproduces the reload path and verifies the title remains stable.

References and Relevant Issues

Closes #19340

Detailed Description of the Pull Request / Additional comments

During settings reload, TerminalPaneContent::UpdateSettings refreshes controls from profile-based cached settings. That flow can overwrite a runtime title override with the profile default title.

This patch keeps explicit overrides by detecting when the current control starting title differs from the profile-derived starting title and then rebuilding control settings with a NewTerminalArgs title override for that pane.

Validation Steps Performed

  • Added SettingsReloadPreservesExplicitTabTitleOverride in LocalTests_TerminalApp/TabTests.cpp.
  • Ran git diff --check for touched files (clean).
  • Attempted local diagnostics/build execution, but this environment lacks MSBuild (msbuild: command not found) and LSP startup is blocked on Windows+Bun 1.3.5 crash limitation.

PR Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows title set with "--title" parameter gets reset to be "Default" after some time

1 participant