Repository: microsoft/terminal (language: cpp)

Issue:
Move the window persistence velocity flag to enabled always
as in title, and https://github.com/microsoft/terminal/issues/9800#issuecomment-1032017078


Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp
index 630378a5d07..62444e2bf5c 100644
--- a/src/cascadia/TerminalApp/TerminalPage.cpp
+++ b/src/cascadia/TerminalApp/TerminalPage.cpp
@@ -297,8 +297,7 @@ namespace winrt::TerminalApp::implementation
     // - true if the ApplicationState should be used.
     bool TerminalPage::ShouldUsePersistedLayout(CascadiaSettings& settings) const
     {
-        return Feature_PersistedWindowLayout::IsEnabled() &&
-               settings.GlobalSettings().FirstWindowPreference() == FirstWindowPreference::PersistedWindowLayout;
+        return settings.GlobalSettings().FirstWindowPreference() == FirstWindowPreference::PersistedWindowLayout;
     }
 
     // Method Description:
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.cpp b/src/cascadia/TerminalSettingsEditor/Launch.cpp
index d5c232faa35..7280e7d746b 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.cpp
+++ b/src/cascadia/TerminalSettingsEditor/Launch.cpp
@@ -73,9 +73,4 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 
         return winrt::single_threaded_observable_vector(std::move(profiles));
     }
-
-    bool Launch::ShowFirstWindowPreference() const noexcept
-    {
-        return Feature_PersistedWindowLayout::IsEnabled();
-    }
 }
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.h b/src/cascadia/TerminalSettingsEditor/Launch.h
index c33a4351f79..1302808cd0a 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.h
+++ b/src/cascadia/TerminalSettingsEditor/Launch.h
@@ -29,8 +29,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         void CurrentDefaultProfile(const IInspectable& value);
         winrt::Windows::Foundation::Collections::IObservableVector<IInspectable> DefaultProfiles() const;
 
-        bool ShowFirstWindowPreference() const noexcept;
-
         WINRT_PROPERTY(Editor::LaunchPageNavigationState, State, nullptr);
 
         GETSET_BINDABLE_ENUM_SETTING(FirstWindowPreference, Model::FirstWindowPreference, State().Settings().GlobalSettings().FirstWindowPreference);
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.idl b/src/cascadia/TerminalSettingsEditor/Launch.idl
index 1dfc9e86bb5..e7ba647d1dc 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.idl
+++ b/src/cascadia/TerminalSettingsEditor/Launch.idl
@@ -20,9 +20,6 @@ namespace Microsoft.Terminal.Settings.Editor
         //   https://github.com/microsoft/microsoft-ui-xaml/issues/5395
         IObservableVector<IInspectable> DefaultProfiles { get; };
 
-
-        Boolean ShowFirstWindowPreference { get; };
-
         IInspectable CurrentFirstWindowPreference;
         IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> FirstWindowPreferenceList { get; };
 
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.xaml b/src/cascadia/TerminalSettingsEditor/Launch.xaml
index f52668f8b49..308ce6a10ab 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.xaml
+++ b/src/cascadia/TerminalSettingsEditor/Launch.xaml
@@ -138,8 +138,7 @@
 
                 <!--  First Window Behavior  -->
                 <local:SettingContainer x:Uid="Globals_FirstWindowPreference"
-                                        Style="{StaticResource ExpanderSettingContainerStyle}"
-                                        Visibility="{x:Bind ShowFirstWindowPreference}">
+                                        Style="{StaticResource ExpanderSettingContainerStyle}">
                     <muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
                                        ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
                                        ItemsSource="{x:Bind FirstWindowPreferenceList}"
diff --git a/src/features.xml b/src/features.xml
index 750b9db25f7..2a04dd1b0b0 100644
--- a/src/features.xml
+++ b/src/features.xml
@@ -57,15 +57,6 @@
         </alwaysEnabledBrandingTokens>
     </feature>
 
-    <feature>
-        <name>Feature_PersistedWindowLayout</name>
-        <description>Whether to allow the user to enable persisted window layout saving and loading</description>
-        <id>766</id>
-        <stage>AlwaysEnabled</stage>
-        <!-- This feature will not ship to Stable until it is complete. -->
-        <alwaysDisabledReleaseTokens />
-    </feature>
-
     <feature>
         <name>Feature_AtlasEngine</name>
         <description>If enabled, AtlasEngine and the experimental.useAtlasEngine setting are compiled into the project</description>


Test patch: