fix(ui): dispatch WorkerLog events to UI thread

Worker log broadcasts arrive on a SignalR thread; raising the event
directly let UI subscribers touch bindable state off-thread.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-20 11:26:57 +02:00
parent e55367af67
commit 7d61d38a34

View File

@@ -139,7 +139,8 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
_hub.On<string, WorkerLogLevel, DateTime>("WorkerLog", (message, level, timestampUtc) => _hub.On<string, WorkerLogLevel, DateTime>("WorkerLog", (message, level, timestampUtc) =>
{ {
WorkerLogReceivedEvent?.Invoke(new WorkerLogEntry(message, level, timestampUtc)); Dispatcher.UIThread.Post(() =>
WorkerLogReceivedEvent?.Invoke(new WorkerLogEntry(message, level, timestampUtc)));
}); });
_hub.On<string, string>("PlanningMergeStarted", (planningTaskId, targetBranch) => _hub.On<string, string>("PlanningMergeStarted", (planningTaskId, targetBranch) =>