feat(settings): make slide-out alerts persist until dismissed

Add a persisted global App Settings switch. Off keeps the existing per-severity
lifetimes (errors remain sticky); on makes every alert non-expiring and closes
it when its body is clicked. The NotificationService supplies the current
setting to each toast request.

StickyNotificationIntegrationTests covers persistence and both request modes.
618 tests green, clean build with 0 warnings.

Reference: Notification.Wpf exposes a CloseOnClick request option:
https://github.com/G-Stas/Notification.Wpf
This commit is contained in:
2026-11-11 10:19:20 -08:00
parent ff5c005bd9
commit 9c0c40c688
11 changed files with 125 additions and 18 deletions
+4 -1
View File
@@ -32,7 +32,7 @@ public partial class MainViewModel : ViewModelBase
// Toasts (TASK 24): non-blocking user-facing messages. Parameterless ctor
// news up the real service; the VM is built from XAML so no DI seam exists.
private readonly INotificationService _notifications = new NotificationService();
private readonly INotificationService _notifications;
// Live frame pipeline (TASK 4 ship step 5): composites the active scene at the
// tier's FPS and paces frames into the encoder. The RTMP URL seam stays null
@@ -216,6 +216,8 @@ public partial class MainViewModel : ViewModelBase
public MainViewModel()
{
_notifications = new NotificationService(System.Windows.Application.Current?.Dispatcher,
() => StickyAlertsUntilDismissed);
AppLog.Write("MainViewModel ctor begin");
InitializeCurrentLaunchLogs();
IsAppOwned = _entitlement.IsAppOwned;
@@ -344,6 +346,7 @@ public partial class MainViewModel : ViewModelBase
_layoutStore = new LayoutStore(LayoutPathOverride ?? DefaultLayoutPath);
_activeLayoutPath = _layoutStore.ActivePath;
_toastPosition = _layoutStore.LoadNotificationPosition();
_stickyAlertsUntilDismissed = _layoutStore.LoadStickyAlertsUntilDismissed();
_recordFolder = _layoutStore.LoadRecordFolder();
// Load saved hotkey bindings (filled with defaults for any unbound actions).