feat(ui): mission control detach/redock toggle, clear review panes, reorder helper

This commit is contained in:
Mika Kuns
2026-06-25 16:24:21 +02:00
parent 5f6e7480f2
commit fbcffce79c
7 changed files with 130 additions and 2 deletions

View File

@@ -59,8 +59,11 @@ public sealed partial class TaskMonitorViewModel : ViewModelBase, IDisposable
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(ShowRoadblockCard))]
[NotifyPropertyChangedFor(nameof(HasRoadblock))]
private string? _roadblocks;
public bool HasRoadblock => !string.IsNullOrWhiteSpace(Roadblocks);
public bool ShowRoadblockCard =>
!string.IsNullOrWhiteSpace(Roadblocks)
&& (IsWaitingForReview || IsDone || IsFailed || IsCancelled);
@@ -139,6 +142,16 @@ public sealed partial class TaskMonitorViewModel : ViewModelBase, IDisposable
Roadblocks = null;
}
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(DetachTooltip))]
private bool _isDetached;
// Localized tooltip for the detach/re-dock toggle button.
public string DetachTooltip => Loc.T(IsDetached ? "missionControl.redock" : "missionControl.detach");
// Set by the detached window so the re-dock action can close it.
public Action? CloseWindowRequested { get; set; }
// Set by the host (e.g. Mission Control) to navigate the main app to this task.
public Action<string>? OpenInAppRequested { get; set; }
@@ -146,7 +159,11 @@ public sealed partial class TaskMonitorViewModel : ViewModelBase, IDisposable
public Action<TaskMonitorViewModel>? DetachRequested { get; set; }
[RelayCommand]
private void Detach() => DetachRequested?.Invoke(this);
private void Detach()
{
if (IsDetached) CloseWindowRequested?.Invoke(); // re-dock: close the detached window
else DetachRequested?.Invoke(this); // detach: pop out to its own window
}
[RelayCommand]
private void OpenInApp()