diff --git a/ViewModels/MainViewModel.Streaming.Operations.cs b/ViewModels/MainViewModel.Streaming.Operations.cs index ac1ca12..7261c15 100644 --- a/ViewModels/MainViewModel.Streaming.Operations.cs +++ b/ViewModels/MainViewModel.Streaming.Operations.cs @@ -96,13 +96,25 @@ public partial class MainViewModel : ViewModelBase } } - private void BeginGoLive(bool alsoRecord) + /// Builds the Start Stream dialog's model from the Stream Info tab. Re-reads the store + /// first: the form is loaded once at startup, and a second LlamaCasty on the same profile (the dev + /// instance, or Release recording while Debug goes live) writes its edits straight to the store, so + /// this process's copy can be empty while the tab the creator filled in is not (2026-11-06). + internal GoLiveViewModel CreateGoLiveDialog() { + BroadcastForm.Load(); var dialog = new GoLiveViewModel(() => SignInAsync(), _youtubeAuth.CurrentChannel) { StreamTitle = BroadcastForm.Title, StreamDescription = BroadcastForm.Description, }; + AppLog.Write($"Go Live dialog: title='{dialog.StreamTitle}' description={dialog.StreamDescription.Length} chars"); + return dialog; + } + + private void BeginGoLive(bool alsoRecord) + { + var dialog = CreateGoLiveDialog(); var window = new ytLive.GoLiveWindow(dialog) { Owner = System.Windows.Application.Current.MainWindow }; if (window.ShowDialog() != true) return; diff --git a/ytLive.Tests/BroadcastPullOutTests.cs b/ytLive.Tests/BroadcastPullOutTests.cs index 40b6cce..10cd222 100644 --- a/ytLive.Tests/BroadcastPullOutTests.cs +++ b/ytLive.Tests/BroadcastPullOutTests.cs @@ -76,6 +76,21 @@ public sealed class BroadcastPullOutTests vm.BroadcastForm.Load(); Assert.Equal("Hello", vm.BroadcastForm.Title); + // Go Live must read what the STORE holds, not this process's copy. Two instances share the + // real profile (Release recording while Debug goes live), and the other one's edits never + // reach this process's in-memory form — that is how the creator got an empty dialog while + // the Stream Info tab was filled in (2026-11-06). + using (var otherInstance = new LayoutStore(tempDb)) + otherInstance.SaveBroadcastMetadata(new BroadcastMetadata + { + Title = "Written by the other instance", + Description = "And its description", + }); + + var dialog = vm.CreateGoLiveDialog(); + Assert.Equal("Written by the other instance", dialog.StreamTitle); + Assert.Equal("And its description", dialog.StreamDescription); + Assert.False(vm.BroadcastForm.IsDrawerOpen); vm.BroadcastForm.ToggleDrawerCommand.Execute(null); Assert.True(vm.BroadcastForm.IsDrawerOpen);