feat(pills): ON-AIR armable signed-out; Start face reads Sign-In while armed signed-out (Good Dog 2026-09-20 ruling, ai.md updated same commit)
This commit is contained in:
@@ -20,7 +20,7 @@ public partial class MainViewModel
|
||||
// ON-AIR requires a sign-in; dropping the session turns the pill
|
||||
// off so the state can never offer a stream without an account.
|
||||
if (!value) OnAirPillOn = false;
|
||||
OnPropertyChanged(nameof(CanToggleOnAir));
|
||||
OnPropertyChanged(nameof(PrimaryStartButtonLabel));
|
||||
OnPropertyChanged(nameof(ShowPrimaryStartButton));
|
||||
OnPropertyChanged(nameof(AccountStatusLightToolTip));
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public partial class MainViewModel
|
||||
public string AccountStatusLightToolTip =>
|
||||
IsLive ? "Live on YouTube — the top bar is red to show the stream is on the air."
|
||||
: IsConnected ? "You're signed in to YouTube. The light is green; ON-AIR is available."
|
||||
: "Signed out — the light is red and the ON-AIR pill is greyed out. You can still record locally.";
|
||||
: "Signed out — the light is red. You can still record locally; arming ON-AIR arms intent, and Start turns that intent into a sign-in.";
|
||||
|
||||
// Restores the DPAPI-saved OAuth session so sign-in survives restarts.
|
||||
// Best-effort: refresh a near-expiry access token; a session that can no
|
||||
|
||||
@@ -36,6 +36,15 @@ public partial class MainViewModel : ViewModelBase
|
||||
BeginRecordOnly();
|
||||
return;
|
||||
}
|
||||
if (!IsConnected)
|
||||
{
|
||||
// ON-AIR armed signed-out: intent (the pill stayed lit) is reality-aware.
|
||||
// A signed-out go-live would dead-end in the account dialog {DASH} so Start
|
||||
// turns the intent into the sign-in face instead. Reality and intent meet
|
||||
// at the account connection; the pill keeps its light either way.
|
||||
_ = SignInAsync();
|
||||
return;
|
||||
}
|
||||
BeginGoLive(recording);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,17 +98,17 @@ public partial class MainViewModel : ViewModelBase
|
||||
get => _onAirPillOn;
|
||||
set
|
||||
{
|
||||
if (value && !CanToggleOnAir) return; // needs a sign-in
|
||||
// Armable signed-out (creator ruling 2026-09-20: a greyed pill was a
|
||||
// dead end — intent must be able to light while offline). The pill is
|
||||
// intent, not reality; the Start face turns this into a sign-in.
|
||||
if (!SetProperty(ref _onAirPillOn, value)) return;
|
||||
if (value && _recordPillOn) RecordPillOn = false; // record-OR-live — arming ON-AIR drops REC
|
||||
OnPropertyChanged(nameof(ShowPrimaryStartButton));
|
||||
OnPropertyChanged(nameof(CanStartSession));
|
||||
OnPropertyChanged(nameof(PrimaryStartButtonLabel));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The ON-AIR pill (and thus live streaming) needs a YouTube sign-in.</summary>
|
||||
public bool CanToggleOnAir => IsConnected;
|
||||
|
||||
/// <summary>Whether the session is actively recording — the REC status light
|
||||
/// turns green only when this is true (the pill is intent, this is reality).
|
||||
/// Internal setter is a test seam (same pattern as LayoutPathOverride) so the
|
||||
@@ -140,6 +140,16 @@ public partial class MainViewModel : ViewModelBase
|
||||
/// <summary>Either output selected makes the button actionable.</summary>
|
||||
public bool CanStartSession => RecordPillOn || OnAirPillOn;
|
||||
|
||||
/// <summary>Face of the primary Start button. The idle face is reality-aware:
|
||||
/// while the ON-AIR pill is armed signed-out it reads "Sign In" so intent-lit
|
||||
/// intent is never a dead-end Start (— the pill is intent, the account is
|
||||
/// reality, and a greyed face would be the dead end that failed to ship, creator
|
||||
/// ruling 2026-09-20-02). The face flips back to "Start" the moment a session
|
||||
/// connects; the armable signed-out pill gets to keep its intent through the
|
||||
/// sign-in.</summary>
|
||||
public string PrimaryStartButtonLabel =>
|
||||
IsConnected || !OnAirPillOn ? "Start" : "Sign In";
|
||||
|
||||
/// <summary>The End button shows while recording OR live.</summary>
|
||||
public bool ShowEndStreamButton => IsLive || IsRecording;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user