From db970ce78037f64c12d0cf7e34c250e91698401f Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 9 Aug 2026 20:23:26 +0200 Subject: [PATCH] Added a settings field storing user values before configuration plugins take them over --- app/MindWork AI Studio/Settings/DataModel/Data.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/MindWork AI Studio/Settings/DataModel/Data.cs b/app/MindWork AI Studio/Settings/DataModel/Data.cs index 5efec71c..9909b3af 100644 --- a/app/MindWork AI Studio/Settings/DataModel/Data.cs +++ b/app/MindWork AI Studio/Settings/DataModel/Data.cs @@ -68,6 +68,18 @@ public sealed class Data /// public Dictionary ManagedLockedConfigurations { get; set; } = []; + /// + /// The value each managed setting had before a configuration plugin took it over, as JSON. + /// + /// + /// A configuration plugin might be removed later, e.g. when a test configuration ends or when an + /// organization withdraws its configuration. The value the user had chosen before belongs to the + /// user, so we keep it here and restore it instead of falling back to the app's default value. + /// The snapshot is taken once, when a setting becomes managed, and is consumed when no + /// configuration plugin manages that setting anymore. + /// + public Dictionary ManagedUserValueSnapshots { get; set; } = []; + /// /// Cached audit results for assistant plugins. ///