persistedWindowLayout does not preserve tab titles #19877

Closed
opened 2026-01-31 06:56:07 +00:00 by claunia · 5 comments
Owner

Originally created by @Vampire on GitHub (May 15, 2023).

Windows Terminal version

1.16.10261.0

Windows build number

10.0.19045 Build 19045

Other Software

No response

Steps to reproduce

  • have firstWindowPreference set to persistedWindowLayout
  • have a state.json with some tabs defined that have custom manually set tab titles
  • start terminal, the tabs get properly restored
  • use the terminal for some time
  • have a look at state.json

Things that might maybe be relevant additionally:

  • the restored window is in quake-mode and after terminal restart I once disable focus mode manually
  • the profile I use for all those tabs is "Git Bash", but with tabTitle set to bash

Expected Behavior

The custom tab titles are preserved

Actual Behavior

All tab titles are reset to bash.

Originally created by @Vampire on GitHub (May 15, 2023). ### Windows Terminal version 1.16.10261.0 ### Windows build number 10.0.19045 Build 19045 ### Other Software _No response_ ### Steps to reproduce - have `firstWindowPreference` set to `persistedWindowLayout` - have a `state.json` with some tabs defined that have custom manually set tab titles - start terminal, the tabs get properly restored - use the terminal for some time - have a look at `state.json` Things that might maybe be relevant additionally: - the restored window is in quake-mode and after terminal restart I once disable focus mode manually - the profile I use for all those tabs is "Git Bash", but with `tabTitle` set to `bash` ### Expected Behavior The custom tab titles are preserved ### Actual Behavior All tab titles are reset to `bash`.
Author
Owner

@zadjii-msft commented on GitHub (May 17, 2023):

Could you share your settings.json file, and the state.json/?

My theory was that:

  • there's a profile.tabTitle,
  • but we for some reason preserve "tabTitle": "", like, because the runtime title is empty
  • when we go build the NewTerminalArgs for the state restore, use the tabTitle with the empty string from the state.json
  • we evaluate the NewTerminalArgs.TabTitle as an empty string then go use the profile.name instead of the profile.tabTitle

but looking at my state.json, I do have some tabTitles that match the profile's. Maybe your raw jsons will help figure this out.

@zadjii-msft commented on GitHub (May 17, 2023): Could you share your [settings.json file](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#where-can-i-find-the-settings-file), and the `state.json`/? My theory was that: * there's a `profile.tabTitle`, * but we for some reason preserve `"tabTitle": ""`, like, because the _runtime_ title is empty * when we go build the `NewTerminalArgs` for the state restore, use the `tabTitle` with the empty string from the state.json * we evaluate the `NewTerminalArgs.TabTitle` as an empty string then go use the profile.name instead of the `profile.tabTitle` but looking at my `state.json`, I do have some `tabTitle`s that match the profile's. Maybe your raw jsons will help figure this out.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 22, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19877