feat(config): bump schema v20→v21 with ScreenshotMode field

Adds persisted ScreenshotMode flag to Configuration (was previously a
ChatLogWindow-instance field in v1.5.6). Schema bump is additive — no
breaking change. SelfTest renamed V20→V21 with matching version-gate
flip and new touch-test for the new field.

Pre-flight for v1.7.1 PayloadHandler-Pipeline Resurrection.
This commit is contained in:
2026-05-27 07:47:15 +02:00
parent ced22d73b2
commit f5f9a4e4da
3 changed files with 14 additions and 11 deletions
+3 -1
View File
@@ -35,7 +35,7 @@ public class ConfigKeyBind
[Serializable]
public class Configuration : IPluginConfiguration
{
internal const int LatestVersion = 20;
internal const int LatestVersion = 21;
public int Version { get; set; } = LatestVersion;
@@ -172,6 +172,7 @@ public class Configuration : IPluginConfiguration
public HashSet<Guid> InactivityHideExtraChatChannels = [];
public bool ShowHideButton = true;
public bool NativeItemTooltips = true;
public bool ScreenshotMode;
public bool PrettierTimestamps = true;
public bool MoreCompactPretty;
public bool HideSameTimestamps = true;
@@ -285,6 +286,7 @@ public class Configuration : IPluginConfiguration
InactivityHideExtraChatChannels = other.InactivityHideExtraChatChannels.ToHashSet();
ShowHideButton = other.ShowHideButton;
NativeItemTooltips = other.NativeItemTooltips;
ScreenshotMode = other.ScreenshotMode;
PrettierTimestamps = other.PrettierTimestamps;
MoreCompactPretty = other.MoreCompactPretty;
HideSameTimestamps = other.HideSameTimestamps;
+2 -2
View File
@@ -214,7 +214,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
+ "Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.10."
);
}
Config.Version = 20;
Config.Version = 21;
// Unpinned TempTabs are session-only and dropped on every load. Pinned
// TempTabs survive reload — Jin's tester feedback (v1.4.7).
@@ -347,7 +347,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
new SelfTests.SettingsWindowOpenStep(this),
new SelfTests.OnOpenMainUiRoutesMainWindowStep(this),
new SelfTests.TypingIpcStateStep(this),
new SelfTests.ConfigMigrationV20Step(this),
new SelfTests.ConfigMigrationV21Step(this),
new SelfTests.HoverSheenAllocStep(this),
new SelfTests.HonorificHeaderRenderStep(this),
new SelfTests.PerformanceBaselineStep(this),
@@ -3,27 +3,27 @@ using Dalamud.Plugin.SelfTest;
namespace HellionChat.SelfTests;
// Pins the post-migration shape of the v20 config. The plugin schema
// gate stamps Config.Version = 20 right after load, so by the time
// Pins the post-migration shape of the v21 config. The plugin schema
// gate stamps Config.Version = 21 right after load, so by the time
// /xlperf reaches this step the migration must already be complete
// and the five v20 fields must carry their declared defaults on a
// and the five v21 fields must carry their declared defaults on a
// fresh install (or the saved values on an existing one). The probe
// only verifies the version stamp and the field types — it does not
// rewrite the user's config.
internal sealed class ConfigMigrationV20Step : ISelfTestStep
internal sealed class ConfigMigrationV21Step : ISelfTestStep
{
public ConfigMigrationV20Step(Plugin plugin)
public ConfigMigrationV21Step(Plugin plugin)
{
_ = plugin;
}
public string Name => "Hellion Chat - Config v20 migration";
public string Name => "Hellion Chat - Config v21 migration";
public SelfTestStepResult RunStep()
{
if (Plugin.Config.Version != 20)
if (Plugin.Config.Version != 21)
{
ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 20");
ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 21");
return SelfTestStepResult.Fail;
}
@@ -54,6 +54,7 @@ internal sealed class ConfigMigrationV20Step : ISelfTestStep
// here is just a touch-test that the property is reachable.
_ = Plugin.Config.MainWindowOpen;
_ = Plugin.Config.SettingsWindowOpen;
_ = Plugin.Config.ScreenshotMode;
return SelfTestStepResult.Pass;
}