fix(client-ui): resolve Medium code-review finding (Client.UI-001)

Route the synchronous IsLoading = true write through _dispatcher.Post so
both IsLoading assignments use the same dispatch path as Results.Clear()
and the final IsLoading = false, eliminating the ordering hazard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-05-22 07:25:18 -04:00
parent 40f06314fb
commit 2816c76c2b

View File

@@ -73,7 +73,7 @@ public partial class HistoryViewModel : ObservableObject
{ {
if (string.IsNullOrEmpty(SelectedNodeId)) return; if (string.IsNullOrEmpty(SelectedNodeId)) return;
IsLoading = true; _dispatcher.Post(() => IsLoading = true);
_dispatcher.Post(() => Results.Clear()); _dispatcher.Post(() => Results.Clear());
try try