Repository: microsoft/terminal (language: cpp)

Issue:
We shouldn't have our own startup setting, we should just use the OS one
From MSFT:34529127



> Steps to repro:
> 1. Open Settings - App - Start up.
> 2. Enable start up setting for Windows Terminal.
> 3. Reboot.
>
> Expected results:
> Windows Terminal can launch automatically after enter desktop and App start up setting should be on for Windows Terminal.
> Actual results:
> Windows Terminal can launch automatically after enter desktop, but App start up setting become off for Windows Terminal.

----

More notes, circa Dec 2023:

Okay so we all re-read all the docs and I think we were wrong entirely here. 

We should have never had this setting in our settings JSON in the first place. It should have always just been backed by the OS setting. This probably dates back to us just having a JSON settings file. We should make the settings in the Terminal Settings UI reflect the OS settings. We shouldn't maintain our own _separate_ setting. 

> We need the Windows Settings Startup being Enabled to trigger Windows to start Terminal on next reboot.
And, we need the Terminal Settings Startup to be Enabled, to keep it in the Enabled state for Windows. If this is not enabled, when Windows launches Terminal after reboot, Terminal app itself disables the startup task here: https://github.com/microsoft/terminal/blob/306f31acf482ce84701aabee52981575277f16bb/src/cascadia/TerminalApp/AppLogic.cpp#L382
> 
> Quickly glancing through the Terminal code, Terminal Settings Startup relies on "`startOnUserLogin`" value and is saved in a default file. This value does not change if the user changes startup state in Windows Settings. 
>  
> I am not sure, why the startup task is disabled when `StartupTaskState::Enabled` in the above link. But in my opinion it shouldn't be disabled if the user has enabled it in Windows settings. and use the value returned by `StartupTask::GetAsync(StartupTaskName)` for "`startOnUserLogin`".

> [!Note]
> ## Walkthrough

I need to write a new one!

We need to:
* Ditch the old setting entirely. 
* Make the toggle in the Settings tab reflect the OS setting
* probably remove `Enabled="false"` from our manidest, ala #16244


Discussion / hints:
> From MSFT:34529127
> 
> 
> 
> > Steps to repro:
> > 1. Open Settings - App - Start up.
> > 2. Enable start up setting for Windows Terminal.
> > 3. Reboot.
> >
> > Expected results:
> > Windows Terminal can launch automatically after enter desktop and App start up setting should be on for Windows Terminal.
> > Actual results:
> > Windows Terminal can launch automatically after enter desktop, but App start up setting become off for Windows Terminal.
> 
> > **Note**
> > ## Walkthrough
> 
> ```xml
>         <uap5:Extension Category="windows.startupTask">
>           <uap5:StartupTask
>             TaskId="StartTerminalOnLoginTask"
>             Enabled="false"
>             DisplayName="ms-resource:AppName" />
>         </uap5:Extension>
> ```
> 
> That apparently can just be unset like:
> 
> ```xml
>         <uap5:Extension Category="windows.startupTask">
>           <uap5:StartupTask
>             TaskId="StartTerminalOnLoginTask"
>             DisplayName="ms-resource:AppName" />
>         </uap5:Extension>
> ```


I would love to take this up!
@Harsh-Avinash Go for it! Lemme know if you need any help ☺️ 

Fix patch:
diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json
index 315d103c537..8726d8303c3 100644
--- a/doc/cascadia/profiles.schema.json
+++ b/doc/cascadia/profiles.schema.json
@@ -2480,11 +2480,6 @@
           "minimum": 1,
           "type": "integer"
         },
-        "startOnUserLogin": {
-          "default": false,
-          "description": "When set to true, this enables the launch of Terminal at startup. Setting this to false will disable the startup task entry. If the Terminal startup task entry is disabled either by org policy or by user action this setting will have no effect.",
-          "type": "boolean"
-        },
         "firstWindowPreference": {
           "default": "defaultProfile",
           "description": "Defines what behavior the terminal takes when it starts. \"defaultProfile\" will have the terminal launch with one tab of the default profile, and \"persistedWindowLayout\" will cause the terminal to save its layout on close and reload it on open.",
diff --git a/src/cascadia/TerminalApp/AppLogic.cpp b/src/cascadia/TerminalApp/AppLogic.cpp
index c1c56ca9af2..a022be1e6a2 100644
--- a/src/cascadia/TerminalApp/AppLogic.cpp
+++ b/src/cascadia/TerminalApp/AppLogic.cpp
@@ -81,8 +81,6 @@ static winrt::hstring _GetErrorText(SettingsLoadErrors error)
     return _GetMessageText(static_cast<uint32_t>(error), settingsLoadErrorsLabels);
 }
 
-static constexpr std::wstring_view StartupTaskName = L"StartTerminalOnLoginTask";
-
 namespace winrt::TerminalApp::implementation
 {
     // Function Description:
@@ -353,40 +351,6 @@ namespace winrt::TerminalApp::implementation
     }
     CATCH_LOG()
 
-    safe_void_coroutine AppLogic::_ApplyStartupTaskStateChange()
-    try
-    {
-        // First, make sure we're running in a packaged context. This method
-        // won't work, and will crash mysteriously if we're running unpackaged.
-        if (!IsPackaged())
-        {
-            co_return;
-        }
-
-        const auto tryEnableStartupTask = _settings.GlobalSettings().StartOnUserLogin();
-        const auto task = co_await StartupTask::GetAsync(StartupTaskName);
-
-        switch (task.State())
-        {
-        case StartupTaskState::Disabled:
-            if (tryEnableStartupTask)
-            {
-                co_await task.RequestEnableAsync();
-            }
-            break;
-        case StartupTaskState::DisabledByUser:
-            // TODO: GH#6254: define UX for other StartupTaskStates
-            break;
-        case StartupTaskState::Enabled:
-            if (!tryEnableStartupTask)
-            {
-                task.Disable();
-            }
-            break;
-        }
-    }
-    CATCH_LOG();
-
     // Method Description:
     // - Reloads the settings from the settings.json file.
     // - When this is called the first time, this initializes our settings. See
@@ -446,7 +410,6 @@ namespace winrt::TerminalApp::implementation
         // TerminalSettings object.
 
         _ApplyLanguageSettingChange();
-        _ApplyStartupTaskStateChange();
         _ProcessLazySettingsChanges();
 
         auto warnings{ winrt::multi_threaded_vector<SettingsLoadWarnings>() };
@@ -473,7 +436,6 @@ namespace winrt::TerminalApp::implementation
         // Both LoadSettings and ReloadSettings are supposed to call this function,
         // but LoadSettings skips it, so that the UI starts up faster.
         // Now that the UI is present we can do them with a less significant UX impact.
-        _ApplyStartupTaskStateChange();
         _ProcessLazySettingsChanges();
 
         FILETIME creationTime, exitTime, kernelTime, userTime, now;
diff --git a/src/cascadia/TerminalApp/AppLogic.h b/src/cascadia/TerminalApp/AppLogic.h
index 8960a476f2a..0b769399926 100644
--- a/src/cascadia/TerminalApp/AppLogic.h
+++ b/src/cascadia/TerminalApp/AppLogic.h
@@ -76,7 +76,6 @@ namespace winrt::TerminalApp::implementation
         TerminalApp::ContentManager _contentManager{ winrt::make<implementation::ContentManager>() };
 
         void _ApplyLanguageSettingChange() noexcept;
-        safe_void_coroutine _ApplyStartupTaskStateChange();
 
         [[nodiscard]] HRESULT _TryLoadSettings() noexcept;
         void _ProcessLazySettingsChanges();
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.cpp b/src/cascadia/TerminalSettingsEditor/Launch.cpp
index 15ed5bee124..286ed7c814b 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.cpp
+++ b/src/cascadia/TerminalSettingsEditor/Launch.cpp
@@ -5,6 +5,7 @@
 #include "Launch.h"
 #include "Launch.g.cpp"
 #include "EnumEntry.h"
+#include "LaunchViewModel.h"
 
 #include <LibraryResources.h>
 
@@ -40,5 +41,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
     void Launch::OnNavigatedTo(const NavigationEventArgs& e)
     {
         _ViewModel = e.Parameter().as<Editor::LaunchViewModel>();
+        auto innerViewModel{ winrt::get_self<Editor::implementation::LaunchViewModel>(_ViewModel) };
+        /* coroutine dispatch */ innerViewModel->PrepareStartOnUserLoginSettings();
     }
 }
diff --git a/src/cascadia/TerminalSettingsEditor/Launch.xaml b/src/cascadia/TerminalSettingsEditor/Launch.xaml
index 67e79ba43ed..8aeca2f92b3 100644
--- a/src/cascadia/TerminalSettingsEditor/Launch.xaml
+++ b/src/cascadia/TerminalSettingsEditor/Launch.xaml
@@ -163,8 +163,11 @@
             </local:SettingContainer>
 
             <!--  Start on User Login  -->
-            <local:SettingContainer x:Uid="Globals_StartOnUserLogin">
-                <ToggleSwitch IsOn="{x:Bind ViewModel.StartOnUserLogin, Mode=TwoWay}"
+            <local:SettingContainer x:Uid="Globals_StartOnUserLogin"
+                                    HelpText="{x:Bind ViewModel.StartOnUserLoginStatefulHelpText, Mode=OneWay}"
+                                    Visibility="{x:Bind ViewModel.StartOnUserLoginAvailable, Mode=OneTime}">
+                <ToggleSwitch IsEnabled="{x:Bind ViewModel.StartOnUserLoginConfigurable, Mode=OneWay}"
+                              IsOn="{x:Bind ViewModel.StartOnUserLogin, Mode=TwoWay}"
                               Style="{StaticResource ToggleSwitchInExpanderStyle}" />
             </local:SettingContainer>
 
diff --git a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
index 7b37863ef3a..440f43211a4 100644
--- a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
+++ b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.cpp
@@ -14,6 +14,8 @@ using namespace winrt::Windows::Foundation;
 using namespace winrt::Microsoft::Terminal::Settings::Model;
 using namespace winrt::Windows::UI::Xaml::Data;
 
+static constexpr std::wstring_view StartupTaskName = L"StartTerminalOnLoginTask";
+
 namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 {
     // For ComboBox an empty SelectedItem string denotes no selection.
@@ -365,4 +367,86 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
     {
         return _Settings.DefaultTerminals();
     }
+
+    bool LaunchViewModel::StartOnUserLoginAvailable()
+    {
+        return IsPackaged();
+    }
+
+    safe_void_coroutine LaunchViewModel::PrepareStartOnUserLoginSettings()
+    {
+        if (!StartOnUserLoginAvailable())
+        {
+            co_return;
+        }
+
+        auto strongThis{ get_strong() };
+        auto task{ co_await winrt::Windows::ApplicationModel::StartupTask::GetAsync(StartupTaskName) };
+        _startOnUserLoginTask = std::move(task);
+        _NotifyChanges(L"StartOnUserLoginConfigurable", L"StartOnUserLoginStatefulHelpText", L"StartOnUserLogin");
+    }
+
+    bool LaunchViewModel::StartOnUserLoginConfigurable()
+    {
+        if (!_startOnUserLoginTask)
+        {
+            return false;
+        }
+        namespace WAM = winrt::Windows::ApplicationModel;
+        const auto state{ _startOnUserLoginTask.State() };
+        // Terminal cannot change the state of the login task if it is any of the "ByUser" or "ByPolicy" states.
+        return state == WAM::StartupTaskState::Disabled || state == WAM::StartupTaskState::Enabled;
+    }
+
+    winrt::hstring LaunchViewModel::StartOnUserLoginStatefulHelpText()
+    {
+        if (_startOnUserLoginTask)
+        {
+            namespace WAM = winrt::Windows::ApplicationModel;
+            switch (_startOnUserLoginTask.State())
+            {
+            case WAM::StartupTaskState::EnabledByPolicy:
+            case WAM::StartupTaskState::DisabledByPolicy:
+                return winrt::hstring{ L"\uE72E " } /*lock icon*/ + RS_(L"Globals_StartOnUserLogin_UnavailableByPolicy");
+            case WAM::StartupTaskState::DisabledByUser:
+                return RS_(L"Globals_StartOnUserLogin_DisabledByUser");
+            case WAM::StartupTaskState::Enabled:
+            case WAM::StartupTaskState::Disabled:
+            default:
+                break; // fall through to the common case (no task, not configured, etc.)
+            }
+        }
+        return RS_(L"Globals_StartOnUserLogin/HelpText");
+    }
+
+    bool LaunchViewModel::StartOnUserLogin()
+    {
+        if (!_startOnUserLoginTask)
+        {
+            return false;
+        }
+        namespace WAM = winrt::Windows::ApplicationModel;
+        const auto state{ _startOnUserLoginTask.State() };
+        return state == WAM::StartupTaskState::Enabled || state == WAM::StartupTaskState::EnabledByPolicy;
+    }
+
+    safe_void_coroutine LaunchViewModel::StartOnUserLogin(bool enable)
+    {
+        if (!_startOnUserLoginTask)
+        {
+            co_return;
+        }
+
+        auto strongThis{ get_strong() };
+        if (enable)
+        {
+            co_await _startOnUserLoginTask.RequestEnableAsync();
+        }
+        else
+        {
+            _startOnUserLoginTask.Disable();
+        }
+        // Any of these could have changed in response to an attempt to enable (e.g. it was disabled in task manager since our last check)
+        _NotifyChanges(L"StartOnUserLoginConfigurable", L"StartOnUserLoginStatefulHelpText", L"StartOnUserLogin");
+    }
 }
diff --git a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.h b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.h
index bd6df9299d3..d96046524f4 100644
--- a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.h
+++ b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.h
@@ -6,6 +6,7 @@
 #include "LaunchViewModel.g.h"
 #include "ViewModelHelpers.h"
 #include "Utils.h"
+#include <cppwinrt_utils.h>
 
 namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 {
@@ -51,10 +52,16 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         GETSET_BINDABLE_ENUM_SETTING(WindowingBehavior, Model::WindowingMode, _Settings.GlobalSettings().WindowingBehavior);
 
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(_Settings.GlobalSettings(), CenterOnLaunch);
-        PERMANENT_OBSERVABLE_PROJECTED_SETTING(_Settings.GlobalSettings(), StartOnUserLogin);
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(_Settings.GlobalSettings(), InitialRows);
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(_Settings.GlobalSettings(), InitialCols);
 
+        bool StartOnUserLoginAvailable();
+        safe_void_coroutine PrepareStartOnUserLoginSettings();
+        bool StartOnUserLoginConfigurable();
+        winrt::hstring StartOnUserLoginStatefulHelpText();
+        bool StartOnUserLogin();
+        safe_void_coroutine StartOnUserLogin(bool enable);
+
     private:
         Model::CascadiaSettings _Settings;
         winrt::Windows::Foundation::Collections::IObservableVector<winrt::hstring> _languageList;
@@ -63,6 +70,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 
         winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::Terminal::Settings::Editor::EnumEntry> _LaunchModeList;
         winrt::Windows::Foundation::Collections::IMap<Model::LaunchMode, winrt::Microsoft::Terminal::Settings::Editor::EnumEntry> _LaunchModeMap;
+
+        winrt::Windows::ApplicationModel::StartupTask _startOnUserLoginTask{ nullptr };
     };
 };
 
diff --git a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.idl b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.idl
index ffe2b6b4821..3781c24b876 100644
--- a/src/cascadia/TerminalSettingsEditor/LaunchViewModel.idl
+++ b/src/cascadia/TerminalSettingsEditor/LaunchViewModel.idl
@@ -9,8 +9,6 @@ namespace Microsoft.Terminal.Settings.Editor
 {
     runtimeclass LaunchViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
     {
-        LaunchViewModel(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
-
         static String LanguageDisplayConverter(String tag);
         Boolean LanguageSelectorAvailable { get; };
         Windows.Foundation.Collections.IObservableVector<String> LanguageList { get; };
@@ -41,8 +39,12 @@ namespace Microsoft.Terminal.Settings.Editor
         IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> WindowingBehaviorList { get; };
 
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, CenterOnLaunch);
-        PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, StartOnUserLogin);
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(Int32, InitialRows);
         PERMANENT_OBSERVABLE_PROJECTED_SETTING(Int32, InitialCols);
+
+        Boolean StartOnUserLogin { get; set; };
+        Boolean StartOnUserLoginAvailable { get; };
+        Boolean StartOnUserLoginConfigurable { get; };
+        String StartOnUserLoginStatefulHelpText { get; };
     }
 }
diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
index 227c93e9b50..5d98ce728ef 100644
--- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
+++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
@@ -2332,4 +2332,12 @@
     <value>None</value>
     <comment>Text displayed when the tab title is not defined.</comment>
   </data>
+  <data name="Globals_StartOnUserLogin_DisabledByUser" xml:space="preserve">
+    <value>Automatic startup has been disabled in the Startup Apps section of Windows settings.</value>
+    <comment>{Locked="Windows"}This is displayed in concordance with Globals_StartOnUserLogin if the user has disabled the setting outside of the application.</comment>
+  </data>
+  <data name="Globals_StartOnUserLogin_UnavailableByPolicy" xml:space="preserve">
+    <value>This option is managed by enterprise policy and cannot be changed here.</value>
+    <comment>This is displayed in concordance with Globals_StartOnUserLogin if the enterprise administrator has taken control of this setting.</comment>
+  </data>
 </root>
\ No newline at end of file
diff --git a/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp b/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
index d197475e02a..2ab16141237 100644
--- a/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
+++ b/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
@@ -46,7 +46,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
                     L"HelpText",
                     xaml_typename<hstring>(),
                     xaml_typename<Editor::SettingContainer>(),
-                    PropertyMetadata{ box_value(L"") });
+                    PropertyMetadata{ box_value(L""), PropertyChangedCallback{ &SettingContainer::_OnHelpTextChanged } });
         }
         if (!_FontIconGlyphProperty)
         {
@@ -126,48 +126,15 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         get_self<SettingContainer>(obj)->_UpdateOverrideSystem();
     }
 
-    void SettingContainer::OnApplyTemplate()
+    void SettingContainer::_OnHelpTextChanged(const DependencyObject& d, const DependencyPropertyChangedEventArgs& /*args*/)
     {
-        if (const auto& child{ GetTemplateChild(L"ResetButton") })
-        {
-            if (const auto& button{ child.try_as<Controls::Button>() })
-            {
-                // Apply click handler for the reset button.
-                // When clicked, we dispatch the bound ClearSettingValue event,
-                // resulting in inheriting the setting value from the parent.
-                button.Click([=](auto&&, auto&&) {
-                    ClearSettingValue.raise(*this, nullptr);
-
-                    // move the focus to the child control
-                    if (const auto& content{ Content() })
-                    {
-                        if (const auto& control{ content.try_as<Controls::Control>() })
-                        {
-                            control.Focus(FocusState::Programmatic);
-                            return;
-                        }
-                        else if (const auto& panel{ content.try_as<Controls::Panel>() })
-                        {
-                            for (const auto& panelChild : panel.Children())
-                            {
-                                if (const auto& panelControl{ panelChild.try_as<Controls::Control>() })
-                                {
-                                    panelControl.Focus(FocusState::Programmatic);
-                                    return;
-                                }
-                            }
-                        }
-                        // if we get here, we didn't find something to reasonably focus to.
-                    }
-                });
-
-                // apply name (automation property)
-                Automation::AutomationProperties::SetName(child, RS_(L"SettingContainer_OverrideMessageBaseLayer"));
-            }
-        }
-
-        _UpdateOverrideSystem();
+        // update visibility for override message and reset button
+        const auto& obj{ d.try_as<Editor::SettingContainer>() };
+        get_self<SettingContainer>(obj)->_UpdateHelpText();
+    }
 
+    void SettingContainer::_UpdateHelpText()
+    {
         // Get the correct base to apply automation properties to
         std::vector<DependencyObject> base;
         base.reserve(2);
@@ -215,6 +182,50 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         }
     }
 
+    void SettingContainer::OnApplyTemplate()
+    {
+        if (const auto& child{ GetTemplateChild(L"ResetButton") })
+        {
+            if (const auto& button{ child.try_as<Controls::Button>() })
+            {
+                // Apply click handler for the reset button.
+                // When clicked, we dispatch the bound ClearSettingValue event,
+                // resulting in inheriting the setting value from the parent.
+                button.Click([=](auto&&, auto&&) {
+                    ClearSettingValue.raise(*this, nullptr);
+
+                    // move the focus to the child control
+                    if (const auto& content{ Content() })
+                    {
+                        if (const auto& control{ content.try_as<Controls::Control>() })
+                        {
+                            control.Focus(FocusState::Programmatic);
+                            return;
+                        }
+                        else if (const auto& panel{ content.try_as<Controls::Panel>() })
+                        {
+                            for (const auto& panelChild : panel.Children())
+                            {
+                                if (const auto& panelControl{ panelChild.try_as<Controls::Control>() })
+                                {
+                                    panelControl.Focus(FocusState::Programmatic);
+                                    return;
+                                }
+                            }
+                        }
+                        // if we get here, we didn't find something to reasonably focus to.
+                    }
+                });
+
+                // apply name (automation property)
+                Automation::AutomationProperties::SetName(child, RS_(L"SettingContainer_OverrideMessageBaseLayer"));
+            }
+        }
+
+        _UpdateOverrideSystem();
+        _UpdateHelpText();
+    }
+
     void SettingContainer::SetExpanded(bool expanded)
     {
         if (const auto& child{ GetTemplateChild(L"Expander") })
diff --git a/src/cascadia/TerminalSettingsEditor/SettingContainer.h b/src/cascadia/TerminalSettingsEditor/SettingContainer.h
index 862d3e8660e..9c77a838e0e 100644
--- a/src/cascadia/TerminalSettingsEditor/SettingContainer.h
+++ b/src/cascadia/TerminalSettingsEditor/SettingContainer.h
@@ -47,9 +47,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         static void _InitializeProperties();
         static void _OnCurrentValueChanged(const Windows::UI::Xaml::DependencyObject& d, const Windows::UI::Xaml::DependencyPropertyChangedEventArgs& e);
         static void _OnHasSettingValueChanged(const Windows::UI::Xaml::DependencyObject& d, const Windows::UI::Xaml::DependencyPropertyChangedEventArgs& e);
+        static void _OnHelpTextChanged(const Windows::UI::Xaml::DependencyObject& d, const Windows::UI::Xaml::DependencyPropertyChangedEventArgs& e);
         static hstring _GenerateOverrideMessage(const IInspectable& settingOrigin);
         hstring _GenerateAccessibleName();
         void _UpdateOverrideSystem();
+        void _UpdateHelpText();
         void _UpdateCurrentValueAutoProp();
     };
 }
diff --git a/src/cascadia/TerminalSettingsEditor/SettingContainerStyle.xaml b/src/cascadia/TerminalSettingsEditor/SettingContainerStyle.xaml
index 5ef4acd978d..c4d3c7a5809 100644
--- a/src/cascadia/TerminalSettingsEditor/SettingContainerStyle.xaml
+++ b/src/cascadia/TerminalSettingsEditor/SettingContainerStyle.xaml
@@ -176,6 +176,7 @@
         <Setter Property="LineHeight" Value="16" />
         <Setter Property="Foreground" Value="{ThemeResource SubgroupHeaderBrush}" />
         <Setter Property="TextWrapping" Value="WrapWholeWords" />
+        <Setter Property="FontFamily" Value="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets" />
     </Style>
 
     <DataTemplate x:Key="ExpanderSettingContainerStringPreviewTemplate">
diff --git a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
index cee08a2656d..9bf52677331 100644
--- a/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
+++ b/src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
@@ -84,7 +84,6 @@ namespace Microsoft.Terminal.Settings.Model
         INHERITABLE_SETTING(Microsoft.Terminal.Control.TextMeasurement, TextMeasurement);
         INHERITABLE_SETTING(Boolean, UseBackgroundImageForWindow);
         INHERITABLE_SETTING(Boolean, DebugFeaturesEnabled);
-        INHERITABLE_SETTING(Boolean, StartOnUserLogin);
         INHERITABLE_SETTING(Boolean, AlwaysOnTop);
         INHERITABLE_SETTING(Boolean, AutoHideWindow);
         INHERITABLE_SETTING(TabSwitcherMode, TabSwitcherMode);
diff --git a/src/cascadia/TerminalSettingsModel/MTSMSettings.h b/src/cascadia/TerminalSettingsModel/MTSMSettings.h
index 070792d149b..eb195f26951 100644
--- a/src/cascadia/TerminalSettingsModel/MTSMSettings.h
+++ b/src/cascadia/TerminalSettingsModel/MTSMSettings.h
@@ -51,7 +51,6 @@ Author(s):
     X(Model::LaunchMode, LaunchMode, "launchMode", LaunchMode::DefaultMode)                                                                                                                           \
     X(bool, SnapToGridOnResize, "snapToGridOnResize", true)                                                                                                                                           \
     X(bool, DebugFeaturesEnabled, "debugFeatures", debugFeaturesDefault)                                                                                                                              \
-    X(bool, StartOnUserLogin, "startOnUserLogin", false)                                                                                                                                              \
     X(bool, AlwaysOnTop, "alwaysOnTop", false)                                                                                                                                                        \
     X(bool, AutoHideWindow, "autoHideWindow", false)                                                                                                                                                  \
     X(Model::TabSwitcherMode, TabSwitcherMode, "tabSwitcherMode", Model::TabSwitcherMode::InOrder)                                                                                                    \
diff --git a/src/cascadia/TerminalSettingsModel/defaults.json b/src/cascadia/TerminalSettingsModel/defaults.json
index 7ae1a80235c..d03b8cbc2ae 100644
--- a/src/cascadia/TerminalSettingsModel/defaults.json
+++ b/src/cascadia/TerminalSettingsModel/defaults.json
@@ -25,7 +25,6 @@
 
     // Miscellaneous
     "confirmCloseAllTabs": true,
-    "startOnUserLogin": false,
     "theme": "dark",
     "snapToGridOnResize": true,
     "disableAnimations": false,
diff --git a/src/cascadia/UnitTests_SettingsModel/SerializationTests.cpp b/src/cascadia/UnitTests_SettingsModel/SerializationTests.cpp
index a6feec86cd2..d3d6586479e 100644
--- a/src/cascadia/UnitTests_SettingsModel/SerializationTests.cpp
+++ b/src/cascadia/UnitTests_SettingsModel/SerializationTests.cpp
@@ -117,7 +117,6 @@ namespace SettingsModelUnitTests
                 "tabWidthMode": "equal",
                 "tabSwitcherMode": "mru",
 
-                "startOnUserLogin": false,
                 "theme": "system",
                 "snapToGridOnResize": true,
                 "disableAnimations": false,


Test patch: