[PR #12073] [MERGED] Persist Runtime TabTitle and Maximize/Focus/Fullscreen states #28827

Open
opened 2026-01-31 09:31:01 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12073
Author: @Rosefield
Created: 12/31/2021
Status: ✅ Merged
Merged: 1/10/2022
Merged by: @undefined

Base: main ← Head: feature/gh11878-11426-runtime-tabtitle-maximize-focus-states


📝 Commits (5)

  • f70126b Save the runtime tab title if it exists.
  • 9f98052 Adds more state to the persisted layouts
  • b089426 spellchecker bot didnt like my variable name
  • d43bd9b schema
  • 2408085 Code review changes, fix the settings ui

📊 Changes

25 files changed (+354 additions, -23 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+63 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+30 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+25 -11)
📝 src/cascadia/TerminalApp/AppLogic.h (+2 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+2 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+29 -3)
📝 src/cascadia/TerminalApp/TerminalPage.h (+5 -2)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+11 -0)
📝 src/cascadia/TerminalSettingsEditor/Launch.cpp (+5 -0)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+12 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+6 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+30 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+29 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+19 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+6 -0)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.cpp (+3 -0)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+6 -5)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+18 -0)

...and 5 more files

📄 Description

This commit adds additional information to the persisted window layouts.

  • Runtime tab titles
  • Focus, Maximized, and Fullscreen modes.

Also,

  • Adds actions for Set{Focus,FullScreen} that take a boolean
    to work in addition to the current Toggle{Focus, Fullscreen} actions.
  • Adds SetMaximized that takes a boolean.
    This adds the capability to maximize (resp restore) a window using
    standard terminal actions.
    This also involves hooking up a good amount of state tracking between
    the terminal page and the window to see when maximize state has changed
    so that it can be persisted.
  • These actions are not added to the default settings, but they could be.
    The intention is that they could assist with automation (and was originally)
    how I planned on persisting the state instead of augmenting the LaunchMode.
  • The fullscreen/maximized saving isn't perfect because we don't have a
    way to save the non-maximized/fullscreen size, so exiting the modes
    won't restore whatever the previous size was.

References #9800
Closes #11878
Closes #11426


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/12073 **Author:** [@Rosefield](https://github.com/Rosefield) **Created:** 12/31/2021 **Status:** ✅ Merged **Merged:** 1/10/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `feature/gh11878-11426-runtime-tabtitle-maximize-focus-states` --- ### 📝 Commits (5) - [`f70126b`](https://github.com/microsoft/terminal/commit/f70126bd690a9c069e9bcdecbb96ed50fb5c213b) Save the runtime tab title if it exists. - [`9f98052`](https://github.com/microsoft/terminal/commit/9f98052d9982293c964ff02bba4abbd1d4894fdd) Adds more state to the persisted layouts - [`b089426`](https://github.com/microsoft/terminal/commit/b0894263e9e3b44ddaffb556e4c9c75174f480a1) spellchecker bot didnt like my variable name - [`d43bd9b`](https://github.com/microsoft/terminal/commit/d43bd9b7114cb4f430bb1b9051a202b5a9fc1f29) schema - [`2408085`](https://github.com/microsoft/terminal/commit/24080851054deb3f20b1526b8c7b7fc0a0dbdee8) Code review changes, fix the settings ui ### 📊 Changes **25 files changed** (+354 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+63 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+30 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+25 -11) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+2 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+2 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+29 -3) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+5 -2) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+11 -0) 📝 `src/cascadia/TerminalSettingsEditor/Launch.cpp` (+5 -0) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+12 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+30 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+29 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+19 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.cpp` (+3 -0) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+6 -5) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+18 -0) _...and 5 more files_ </details> ### 📄 Description This commit adds additional information to the persisted window layouts. - Runtime tab titles - Focus, Maximized, and Fullscreen modes. Also, - Adds actions for Set{Focus,FullScreen} that take a boolean to work in addition to the current Toggle{Focus, Fullscreen} actions. - Adds SetMaximized that takes a boolean. This adds the capability to maximize (resp restore) a window using standard terminal actions. This also involves hooking up a good amount of state tracking between the terminal page and the window to see when maximize state has changed so that it can be persisted. - These actions are not added to the default settings, but they could be. The intention is that they could assist with automation (and was originally) how I planned on persisting the state instead of augmenting the LaunchMode. - The fullscreen/maximized saving isn't perfect because we don't have a way to save the non-maximized/fullscreen size, so exiting the modes won't restore whatever the previous size was. References #9800 Closes #11878 Closes #11426 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:31:01 +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#28827