fix(stream): keep recovery notifications and stop on the dispatcher

The FFmpeg ProcessFailed event arrives off-thread. Start recovery on the UI
dispatcher, publish retry status there, and route StopStream back to the
dispatcher before changing bound state or alert collections. This prevents a
recovery exception from becoming an unhandled WPF CollectionView crash.

AttentionAlertStackTests covers worker-thread recovery reporting and stop.
616 tests green, clean build with 0 warnings.
This commit is contained in:
2026-11-11 09:57:26 -08:00
parent 24077e58cf
commit 9621db29c9
4 changed files with 93 additions and 20 deletions
@@ -406,6 +406,13 @@ public partial class MainViewModel : ViewModelBase
private async void StopStream()
{
var dispatcher = Application.Current?.Dispatcher;
if (dispatcher != null && !dispatcher.CheckAccess())
{
_ = dispatcher.BeginInvoke(new Action(StopStream));
return;
}
CancelStreamRecovery(); // a stop wins over a relaunch in flight
StopStepDownWatch();
StopClipRing();