feat(37): keep a default layout snapshot beside the current layout

The matching-build persistence slice is in place: existing layouts are captured
once as defaults, first-run factory scenes are saved and captured before the
creator can edit, and same-build startup continues to load current rows. Default
asset references survive current-layout saves.

One integration test covers the current-layout roundtrip and immutable default.
609 tests green, clean build with 0 warnings.

Reference scan: OBS stores scene collections separately from output profiles;
this split keeps layout state independent in the same SQLite store:
https://obsproject.com/kb/scene-collections
This commit is contained in:
2026-11-10 17:45:39 -08:00
parent b093609ad3
commit 37791086ae
5 changed files with 248 additions and 0 deletions
+9
View File
@@ -514,9 +514,11 @@ public partial class MainViewModel : ViewModelBase
private void LoadLayout()
{
_isLoading = true;
var seededFactoryLayout = false;
try
{
AppLog.Write("LoadLayout begin");
_layoutStore.PrepareLayoutSnapshots(Helpers.BuildStamp.Id);
var scenes = _layoutStore.Load();
Scenes.Clear();
foreach (var scene in scenes)
@@ -526,6 +528,7 @@ public partial class MainViewModel : ViewModelBase
{
foreach (var name in SceneCatalog.All)
AddScene(name);
seededFactoryLayout = true;
}
ReorderScenesToCanonical();
HealBackgrounds();
@@ -582,6 +585,12 @@ public partial class MainViewModel : ViewModelBase
LoadClipSettings();
BroadcastForm.Load();
if (seededFactoryLayout)
{
SaveLayoutNow();
_layoutStore.CaptureDefaultsIfMissing();
}
ScheduleSave();
AppLog.Write("LoadLayout end");
}