diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml
index 0f267a8..cb3c008 100644
--- a/Controls/TopBar.xaml
+++ b/Controls/TopBar.xaml
@@ -107,6 +107,15 @@
+
+
diff --git a/Services/BroadcastTitle.cs b/Services/BroadcastTitle.cs
new file mode 100644
index 0000000..486befd
--- /dev/null
+++ b/Services/BroadcastTitle.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Text.RegularExpressions;
+
+namespace ytLive.Services;
+
+///
+/// TASK 32·3 — naming the broadcast that resumes a dropped show. A resumed stream is a NEW broadcast
+/// with a new VOD (YouTube cannot resume a completed one), so the title has to say so; otherwise the
+/// channel grows two identically named videos and the creator has to explain it.
+/// Pure, because the interesting cases are the boring ones: a title already marked, a second drop
+/// in the same session, and YouTube's 100-character limit.
+///
+public static class BroadcastTitle
+{
+ public const int MaxLength = 100;
+
+ private static readonly Regex ResumeMarker =
+ new(@"\s*\(resumed(?: \d+)?\)\s*$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
+
+ /// The title for resume number (1 = first re-air).
+ /// Any existing marker is replaced rather than stacked, and the base is truncated so the whole
+ /// title fits YouTube's limit.
+ public static string ForResume(string? title, int resumeCount)
+ {
+ var baseTitle = ResumeMarker.Replace(title ?? string.Empty, string.Empty).Trim();
+ if (baseTitle.Length == 0) baseTitle = "LlamaCasty";
+
+ var marker = resumeCount <= 1 ? " (resumed)" : $" (resumed {Math.Max(2, resumeCount)})";
+ var room = MaxLength - marker.Length;
+ if (baseTitle.Length > room) baseTitle = baseTitle[..room].TrimEnd();
+ return baseTitle + marker;
+ }
+}
diff --git a/TASKS/task-32-stream-resilience.md b/TASKS/task-32-stream-resilience.md
index bafdb4d..714a705 100644
--- a/TASKS/task-32-stream-resilience.md
+++ b/TASKS/task-32-stream-resilience.md
@@ -39,9 +39,14 @@ the API — creator ruling 2026-09-01): no lying in the copy.
Test: a fake status provider drives the sign through live → reconnecting → off air; a `chatEndedEvent`
triggers an immediate status check rather than a decision of its own.
-3. ☐ **One-click Back on air** — the relabeled button fires the existing go-live path with saved
+3. ✅ **One-click Back on air** (shipped 2026-11-05) — the relabeled button fires the existing go-live path with saved
`Broadcast.*` + cached stream, dialog skipped: new broadcast, new VOD (accepted cost, stated
in-product). Test: seeded saved form + fake stream service → click creates + pushes, no dialog.
+ **Shipped:** `Services/BroadcastTitle.cs` (pure — resume marker replaces rather than stacks, base
+ truncated to YouTube's 100 characters) and `MainViewModel.BackOnAirCommand`, which reuses the ordinary
+ go-live path with the saved details and the cached stream: new broadcast, new VOD, no dialog. The
+ button appears only after a drop ended the session, in place of the normal start button, and the
+ ordinary start button steps aside so there is exactly one way forward. Tests: `BackOnAirTests`.
4. ✅ **Crash-safe recording** (shipped 2026-11-05) — fragmented MP4 on the record block (`-movflags
frag_keyframe+empty_moov+default_base_moof`): plain MP4's trailing moov atom means a power loss
kills the WHOLE file. Rename-on-stop unchanged. Closes the TASK 18 "MKV as an option" design-note
diff --git a/ViewModels/MainViewModel.Recovery.cs b/ViewModels/MainViewModel.Recovery.cs
index 9e01884..966036e 100644
--- a/ViewModels/MainViewModel.Recovery.cs
+++ b/ViewModels/MainViewModel.Recovery.cs
@@ -34,6 +34,63 @@ public partial class MainViewModel
private bool _isReconnecting;
+ /// True after a drop ended the session with the broadcast gone: the show is over and the
+ /// only honest action left is a new broadcast. Drives the red OFF AIR line and the
+ /// "Back on air" button (TASK 32·3).
+ public bool IsOffAirAfterDrop
+ {
+ get => _isOffAirAfterDrop;
+ private set
+ {
+ if (!SetProperty(ref _isOffAirAfterDrop, value)) return;
+ RaiseTopBarModes();
+ OnPropertyChanged(nameof(ShowPrimaryStartButton));
+ OnPropertyChanged(nameof(BackOnAirLabel));
+ }
+ }
+
+ private bool _isOffAirAfterDrop;
+
+ public string BackOnAirLabel => "● Back on air";
+
+ private RelayCommand? _backOnAirCommand;
+
+ /// One click: build a new broadcast from the saved details and push — no dialog, and the
+ /// title carries the resume marker so the channel shows what happened.
+ public RelayCommand BackOnAirCommand =>
+ _backOnAirCommand ??= new RelayCommand(_ => BackOnAir(), _ => IsOffAirAfterDrop && IsOffline);
+
+ /// How many times this session has been resumed — the title marker counts.
+ private int _resumeCount;
+
+ /// The title the dropped show was using, kept so the resumed broadcast is named after it
+ /// rather than after whatever the form happens to hold now.
+ private string? _lastLiveTitle;
+
+ private void BackOnAir()
+ {
+ if (!IsOffAirAfterDrop) return;
+
+ _resumeCount++;
+ StreamTitle = BroadcastTitle.ForResume(_lastLiveTitle ?? StreamTitle, _resumeCount);
+ WindowTitle = $"{StreamTitle} — LlamaCasty";
+
+ // Clear the state BEFORE starting: the go-live path reuses the primary-button gate, and a
+ // session that starts while this flag is set would show two ways to start at once.
+ IsOffAirAfterDrop = false;
+
+ AppLog.Write($"RECONNECT: back on air as a new broadcast — '{StreamTitle}'");
+ OnAirPillOn = true;
+ StartStreamingSession(alsoRecord: false); // the ordinary path: new broadcast, same cached stream
+ }
+
+ /// Test seam: puts the view-model in the post-drop state without a live session.
+ internal void MarkOffAirAfterDropForTest(string? title)
+ {
+ _lastLiveTitle = title;
+ IsOffAirAfterDrop = true;
+ }
+
/// The attempt currently in flight (0 when idle).
public int ReconnectAttempt
{
@@ -184,9 +241,14 @@ public partial class MainViewModel
default:
// Gave up, or the broadcast was already complete: this session is over. The alert
// stack keeps the reason; the normal stop path clears pills, audio and recording.
+ // Then the honest next step is offered as one click — a NEW broadcast (TASK 32·3),
+ // which is the only way back on air once YouTube has completed this one.
AppLog.Write("RECONNECT: session ended — the broadcast could not be recovered",
AppLogMessageType.Error, AppLogErrorClass.Class1);
+ var droppedTitle = StreamTitle;
StopStream();
+ MarkOffAirAfterDropForTest(null);
+ _lastLiveTitle = droppedTitle;
break;
}
}
diff --git a/ViewModels/MainViewModel.Streaming.cs b/ViewModels/MainViewModel.Streaming.cs
index cf9d14c..cdc3b75 100644
--- a/ViewModels/MainViewModel.Streaming.cs
+++ b/ViewModels/MainViewModel.Streaming.cs
@@ -175,7 +175,7 @@ public partial class MainViewModel : ViewModelBase
/// and the old gate needed a sign-in or a lit pill — signed-out creators found a
/// blank bar). No dead ends: an unarmed Start records (local needs no account);
/// sign-in lives in the Start context menu.
- public bool ShowPrimaryStartButton => IsOffline && !IsRecording;
+ public bool ShowPrimaryStartButton => IsOffline && !IsRecording && !IsOffAirAfterDrop;
/// Either output selected makes the button actionable.
public bool CanStartSession => RecordPillOn || OnAirPillOn;
diff --git a/ytLive.Tests/BackOnAirTests.cs b/ytLive.Tests/BackOnAirTests.cs
new file mode 100644
index 0000000..b34bc2b
--- /dev/null
+++ b/ytLive.Tests/BackOnAirTests.cs
@@ -0,0 +1,65 @@
+using System;
+using System.IO;
+using Microsoft.Data.Sqlite;
+using Xunit;
+using ytLive.Services;
+using ytLive.ViewModels;
+
+namespace ytLive.Tests;
+
+///
+/// TASK 32·3 — Back on air. Once YouTube completes a broadcast it cannot be resumed, so the only honest
+/// route back is a NEW broadcast: one click, saved details, no dialog, and a title that says it is a
+/// resume (otherwise the channel grows two identically named videos).
+///
+public class BackOnAirTests
+{
+ [Fact]
+ public void ResumeTitle_MarksTheFirstReAir()
+ => Assert.Equal("Friday Night Show (resumed)", BroadcastTitle.ForResume("Friday Night Show", 1));
+
+ [Fact]
+ public void ResumeTitle_CountsASecondDrop_InsteadOfStackingMarkers()
+ => Assert.Equal("Friday Night Show (resumed 2)", BroadcastTitle.ForResume("Friday Night Show (resumed)", 2));
+
+ [Fact]
+ public void ResumeTitle_FitsYouTubesHundredCharacterLimit()
+ {
+ var longTitle = new string('x', 140);
+ var resumed = BroadcastTitle.ForResume(longTitle, 1);
+
+ Assert.Equal(BroadcastTitle.MaxLength, resumed.Length);
+ Assert.EndsWith(" (resumed)", resumed);
+ }
+
+ [Fact]
+ public void ResumeTitle_HandlesAnEmptyTitle()
+ => Assert.Equal("LlamaCasty (resumed)", BroadcastTitle.ForResume(" ", 1));
+
+ [Fact]
+ public void AfterADrop_TheCreatorIsOfferedOneClickBackOnAir()
+ {
+ var tempDb = Path.Combine(Path.GetTempPath(), $"ytLlive-backonair-{Guid.NewGuid():N}.db");
+ MainViewModel.LayoutPathOverride = tempDb;
+ var vm = new MainViewModel();
+ try
+ {
+ Assert.False(vm.IsOffAirAfterDrop);
+ Assert.False(vm.BackOnAirCommand.CanExecute(null));
+
+ vm.MarkOffAirAfterDropForTest("Friday Night Show");
+
+ Assert.True(vm.IsOffAirAfterDrop);
+ Assert.True(vm.BackOnAirCommand.CanExecute(null));
+ Assert.Equal("● Back on air", vm.BackOnAirLabel);
+ // The ordinary start button steps aside so there is exactly one way forward.
+ Assert.False(vm.ShowPrimaryStartButton);
+ }
+ finally
+ {
+ MainViewModel.LayoutPathOverride = null;
+ SqliteConnection.ClearAllPools();
+ try { File.Delete(tempDb); } catch { /* best-effort cleanup */ }
+ }
+ }
+}