diff --git a/HellionChat/Configuration.cs b/HellionChat/Configuration.cs index eff9477..c1291c5 100755 --- a/HellionChat/Configuration.cs +++ b/HellionChat/Configuration.cs @@ -227,7 +227,6 @@ public class Configuration : IPluginConfiguration public bool ShowTitleBar = true; public bool ShowPopOutTitleBar = true; public bool DatabaseBattleMessages; - public bool LoadPreviousSession; public bool FilterIncludePreviousSessions; public bool SortAutoTranslate; public bool CollapseDuplicateMessages; @@ -362,7 +361,6 @@ public class Configuration : IPluginConfiguration ShowTitleBar = other.ShowTitleBar; ShowPopOutTitleBar = other.ShowPopOutTitleBar; DatabaseBattleMessages = other.DatabaseBattleMessages; - LoadPreviousSession = other.LoadPreviousSession; FilterIncludePreviousSessions = other.FilterIncludePreviousSessions; SortAutoTranslate = other.SortAutoTranslate; CollapseDuplicateMessages = other.CollapseDuplicateMessages; diff --git a/HellionChat/SelfTests/WizardStateSmokeStep.cs b/HellionChat/SelfTests/WizardStateSmokeStep.cs index f815314..61ba2b9 100644 --- a/HellionChat/SelfTests/WizardStateSmokeStep.cs +++ b/HellionChat/SelfTests/WizardStateSmokeStep.cs @@ -62,11 +62,11 @@ internal sealed class WizardStateSmokeStep : ISelfTestStep // Variant 2: skip Step 3 explicitly. Picks Roleplay on Step 2, // jumps straight to Step 4 (no Step-3 entry → no seed for - // LoadPreviousSession / FilterIncludePreviousSessions), commits, - // and asserts the two coupled history toggles remained on their - // pre-test value. Pins the null-semantics from Spec Z.176 so a - // regression in CommitPending that started writing seeded - // recommendations unconditionally would surface here. + // FilterIncludePreviousSessions), commits, and asserts the history + // toggle remained on its pre-test value. Pins the null-semantics + // from Spec Z.176 so a regression in CommitPending that started + // writing seeded recommendations unconditionally would surface + // here. // CommitPending → ApplyRoleplay overwrites six privacy / // retention fields, so snapshot them first and let CleanUp // restore them after the assert. Keeps /xlperf idempotent. @@ -79,17 +79,11 @@ internal sealed class WizardStateSmokeStep : ISelfTestStep this.snapshotRetentionDefaultDays = Plugin.Config.RetentionDefaultDays; this.snapshotRetentionPerChannelDays = Plugin.Config.RetentionPerChannelDays; - var loadPrevBefore = Plugin.Config.LoadPreviousSession; var filterPrevBefore = Plugin.Config.FilterIncludePreviousSessions; wizard.TestOnly_AdvanceTo(2); wizard.TestOnly_SetPendingProfile(FirstRunWizard.PrivacyProfile.Roleplay); wizard.TestOnly_AdvanceTo(4); wizard.CommitPending(); - if (Plugin.Config.LoadPreviousSession != loadPrevBefore) - { - ImGui.Text("Skip-Step-3 path overwrote LoadPreviousSession"); - return SelfTestStepResult.Fail; - } if (Plugin.Config.FilterIncludePreviousSessions != filterPrevBefore) { ImGui.Text("Skip-Step-3 path overwrote FilterIncludePreviousSessions"); diff --git a/HellionChat/Ui/FirstRunWizard.cs b/HellionChat/Ui/FirstRunWizard.cs index da28c30..240badf 100644 --- a/HellionChat/Ui/FirstRunWizard.cs +++ b/HellionChat/Ui/FirstRunWizard.cs @@ -341,17 +341,16 @@ public sealed class FirstRunWizard : Window private void DrawStepPowerSettings() { - // Seed only the two recommendation fields here. Other fields remain - // null until the user touches the corresponding control. - // Spec FR-4: the wizard explicitly recommends LoadPreviousSession = - // true and FilterIncludePreviousSessions = true (Config defaults are - // false). The other four fields (AutoTellTabsHistoryPreload, - // UseCompactDensity, PrettierTimestamps, Theme) follow the generic - // null-semantics from Spec Z.176: a null pending means the user did - // not touch that control, so CommitPending must not write back. They - // are read live from Plugin.Config below for the ImGui ref-binding - // but never seeded into Pending* without a user gesture. - _state.PendingLoadPreviousSession ??= true; + // Seed only the recommendation field here. Other fields remain null + // until the user touches the corresponding control. + // Spec FR-4: the wizard explicitly recommends + // FilterIncludePreviousSessions = true (the Config default is false). + // The other four fields (AutoTellTabsHistoryPreload, UseCompactDensity, + // PrettierTimestamps, Theme) follow the generic null-semantics from + // Spec Z.176: a null pending means the user did not touch that control, + // so CommitPending must not write back. They are read live from + // Plugin.Config below for the ImGui ref-binding but never seeded into + // Pending* without a user gesture. _state.PendingFilterIncludePreviousSessions ??= true; ImGui.TextUnformatted(HellionStrings.Wizard_Step3_Title); @@ -361,20 +360,11 @@ public sealed class FirstRunWizard : Window using (ImRaii.PushColor(ImGuiCol.Text, ForgeBronze)) ImGui.TextUnformatted(HellionStrings.Wizard_Step3_Section_History); - var loadPrev = _state.PendingLoadPreviousSession ?? true; - if (ImGui.Checkbox(HellionStrings.Wizard_Step3_LoadPreviousSession_Label, ref loadPrev)) - { - _state.PendingLoadPreviousSession = loadPrev; - // Mirror the DataAndPrivacy coupling: turning load-previous on - // also turns filter-include on (otherwise old messages bypass - // the filter chain), and turning filter-include off forces - // load-previous off. The settings tab that used to hold the same - // pairing was removed in May; the coupling lives here alone until - // the two checkboxes are reachable again. - if (loadPrev) - _state.PendingFilterIncludePreviousSessions = true; - } - + // One checkbox, not two. LoadPreviousSession was asked for here, shown + // as applied in the summary and written to the config, and no code in + // the plugin has ever read it -- so the wizard was collecting a + // decision and reporting an effect that never happened. Its partner + // does the work on its own. var filterPrev = _state.PendingFilterIncludePreviousSessions ?? true; if ( ImGui.Checkbox( @@ -384,8 +374,6 @@ public sealed class FirstRunWizard : Window ) { _state.PendingFilterIncludePreviousSessions = filterPrev; - if (!filterPrev) - _state.PendingLoadPreviousSession = false; } ImGui.Spacing(); @@ -496,8 +484,8 @@ public sealed class FirstRunWizard : Window ); var historyLabel = - (_state.PendingLoadPreviousSession ?? false) - ? HellionStrings.Wizard_Step3_LoadPreviousSession_Label + (_state.PendingFilterIncludePreviousSessions ?? false) + ? HellionStrings.Wizard_Step3_FilterIncludePreviousSessions_Label : HellionStrings.Wizard_Step4_Summary_Unchanged; ImGui.TextWrapped( string.Format(HellionStrings.Wizard_Step4_Summary_History, historyLabel) @@ -573,9 +561,6 @@ public sealed class FirstRunWizard : Window break; } - if (_state.PendingLoadPreviousSession.HasValue) - Plugin.Config.LoadPreviousSession = _state.PendingLoadPreviousSession.Value; - if (_state.PendingFilterIncludePreviousSessions.HasValue) Plugin.Config.FilterIncludePreviousSessions = _state .PendingFilterIncludePreviousSessions @@ -675,7 +660,6 @@ public sealed class FirstRunWizard : Window { public int CurrentStep { get; set; } = 1; public PrivacyProfile? PendingProfile { get; set; } - public bool? PendingLoadPreviousSession { get; set; } public bool? PendingFilterIncludePreviousSessions { get; set; } public int? PendingAutoTellTabsHistoryPreload { get; set; } public bool? PendingUseCompactDensity { get; set; }