From fbeb04385b8a07ecb4c56ceb44b1664f365e9d21 Mon Sep 17 00:00:00 2001 From: gramps Date: Fri, 30 Oct 2026 11:14:33 -0700 Subject: [PATCH] =?UTF-8?q?feat(top=20bar):=20EDIT=20decides=20live=20vs?= =?UTF-8?q?=20test=20on=20the=20primary=20button=20=E2=80=94=20the=20TEST?= =?UTF-8?q?=20button=20is=20gone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creator ruling (2026-10-30): - EDIT off + ON-AIR armed → the primary button reads "Go Live" and runs the livestream. - EDIT on + ON-AIR armed → the same button reads "Test Stream" and runs the test broadcast. - REC armed (or nothing armed) → "Start Recording", whatever EDIT says; there is no test recording, and an unarmed start records locally rather than doing nothing. So the fifth button was redundant: `ShowTestButton` no longer feeds any control. The decision is a pure function (`Models/SessionStartDecision`) so the whole matrix is testable without a window; `PrimaryStartCommand` follows the same kind, so label and action cannot disagree. Guard: SessionStartDecisionTests pins the four cases, including the no-dead-ends fallback that my first version got wrong (unarmed returned Live instead of Record — the test caught it). Note for the v1 gate: the "hide TEST at v1" item is now satisfied by construction — the test path is a mode of the primary button, not a separate control. --- Controls/TopBar.xaml | 11 ++----- Models/SessionStartDecision.cs | 38 +++++++++++++++++++++++ ViewModels/MainViewModel.Scenes.cs | 8 +++-- ViewModels/MainViewModel.Streaming.cs | 26 ++++++++++++++-- ytLive.Tests/SessionStartDecisionTests.cs | 32 +++++++++++++++++++ 5 files changed, 103 insertions(+), 12 deletions(-) create mode 100644 Models/SessionStartDecision.cs create mode 100644 ytLive.Tests/SessionStartDecisionTests.cs diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml index 3699f6f..3c21218 100644 --- a/Controls/TopBar.xaml +++ b/Controls/TopBar.xaml @@ -100,15 +100,10 @@