feat(ui): add reconcile tick to self-heal lost worker broadcasts
TasksIslandViewModel now runs a periodic tick that diffs the flat Items collection against SQLite and patches properties in place (capped at 500 rows, sharing the Phase 1 delta sequence guard so it never overtakes a fresher broadcast). Never rebuilds rows or triggers Regroup/LoadForList, so it stays decoupled from the parallel Phase 2b virtualization work. The same cadence now refreshes the long-lived Worktrees Overview, Log Visualizer, and Merge Helper selection overlays; short-lived modals are untouched.
This commit is contained in:
@@ -25,7 +25,11 @@ public partial class MainWindow : Window
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
if (change.Property == WindowStateProperty)
|
||||
{
|
||||
UpdateMaxIcon();
|
||||
if (DataContext is IslandsShellViewModel vm && vm.Tasks is not null)
|
||||
vm.Tasks.IsWindowVisible = WindowState != WindowState.Minimized;
|
||||
}
|
||||
if (change.Property == OffScreenMarginProperty)
|
||||
RootGrid.Margin = OffScreenMargin;
|
||||
}
|
||||
@@ -48,6 +52,8 @@ public partial class MainWindow : Window
|
||||
WindowState = WindowState.Normal;
|
||||
Activate();
|
||||
};
|
||||
if (vm.Tasks is not null)
|
||||
vm.Tasks.IsWindowVisible = WindowState != WindowState.Minimized;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,11 @@ public sealed class WindowDialogService : IDialogService
|
||||
{
|
||||
var dlg = new MergeHelperSelectionModal { DataContext = vm };
|
||||
vm.CloseAction = () => dlg.Close();
|
||||
dlg.Closed += (_, _) => vm.Result.TrySetResult(null); // native close counts as cancel
|
||||
dlg.Closed += (_, _) =>
|
||||
{
|
||||
vm.StopReconcileTick();
|
||||
vm.Result.TrySetResult(null); // native close counts as cancel
|
||||
};
|
||||
await dlg.ShowDialog(_owner);
|
||||
return await vm.Result.Task;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user