feat(mission-control): show running Worker operations in a Running now section
Registry of active verify/merge/rebase/worktree-creation operations in the Worker, GetActiveOperations snapshot + OperationStarted/OperationEnded hub events, and a Running now section in Mission Control with ticking elapsed time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
488c28a9d5
commit
2dbec543df
@@ -40,6 +40,24 @@ public partial class MissionControlView : UserControl
|
||||
OverviewGrid.AddHandler(PointerReleasedEvent, OnTilePointerReleased);
|
||||
}
|
||||
|
||||
// Ticks the "Running now" elapsed times while the view is on screen.
|
||||
private Avalonia.Threading.DispatcherTimer? _elapsedTimer;
|
||||
|
||||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
_elapsedTimer = new Avalonia.Threading.DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
|
||||
_elapsedTimer.Tick += (_, _) => _vm?.TickOperations();
|
||||
_elapsedTimer.Start();
|
||||
}
|
||||
|
||||
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
_elapsedTimer?.Stop();
|
||||
_elapsedTimer = null;
|
||||
base.OnDetachedFromVisualTree(e);
|
||||
}
|
||||
|
||||
private const double DragThreshold = 4;
|
||||
|
||||
/// <summary>Tile presenter whose header was pressed; null when no tile drag is pending.</summary>
|
||||
@@ -199,7 +217,7 @@ public partial class MissionControlView : UserControl
|
||||
{
|
||||
if (e.PropertyName == nameof(MissionControlViewModel.ColumnCount))
|
||||
RebuildOverviewGrid();
|
||||
else if (e.PropertyName == nameof(MissionControlViewModel.HasQueued))
|
||||
else if (e.PropertyName == nameof(MissionControlViewModel.HasActivity))
|
||||
UpdateQueueColumn();
|
||||
else if (e.PropertyName == nameof(MissionControlViewModel.IsFocusMode))
|
||||
// The now-visible layout's hosts must re-steal their pane views from the hidden
|
||||
@@ -221,7 +239,7 @@ public partial class MissionControlView : UserControl
|
||||
private void UpdateQueueColumn()
|
||||
{
|
||||
var queueColumn = BodyGrid.ColumnDefinitions[2];
|
||||
if (_vm?.HasQueued == true)
|
||||
if (_vm?.HasActivity == true)
|
||||
{
|
||||
queueColumn.MinWidth = MinQueueWidth;
|
||||
queueColumn.Width = _queueWidth;
|
||||
|
||||
Reference in New Issue
Block a user