fix(mission-control): show post-merge verify as Verifying instead of In review
Derived from the VerifyMerge entry in RunningOperations (no new TaskStatus). The Running now row stays, reworded to 'Verifying after merge'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
5dae5ff679
commit
46e9303da6
@@ -157,10 +157,12 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
try
|
||||
{
|
||||
var snapshot = await _worker.GetActiveOperationsAsync();
|
||||
var hadVerify = RunningOperations.Any(IsVerifyMerge);
|
||||
RunningOperations.Clear();
|
||||
foreach (var op in snapshot.Where(o => !_endedOperationIds.Contains(o.Id)).OrderBy(o => o.StartedAt))
|
||||
RunningOperations.Add(new RunningOperationViewModel(op));
|
||||
NotifyOperationsChanged();
|
||||
if (hadVerify || RunningOperations.Any(IsVerifyMerge)) _ = RefreshQueueAsync();
|
||||
}
|
||||
catch (Exception ex) { ErrorReported?.Invoke(Loc.T("missionControl.operationsRefreshFailed", ex.Message)); }
|
||||
}
|
||||
@@ -171,8 +173,10 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
private void AddOperation(RunningOperationDto op)
|
||||
{
|
||||
if (_endedOperationIds.Contains(op.Id) || RunningOperations.Any(r => r.Id == op.Id)) return;
|
||||
RunningOperations.Add(new RunningOperationViewModel(op));
|
||||
var row = new RunningOperationViewModel(op);
|
||||
RunningOperations.Add(row);
|
||||
NotifyOperationsChanged();
|
||||
if (IsVerifyMerge(row)) _ = RefreshQueueAsync();
|
||||
}
|
||||
|
||||
private void RemoveOperation(string id)
|
||||
@@ -182,8 +186,12 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
if (row is null) return;
|
||||
RunningOperations.Remove(row);
|
||||
NotifyOperationsChanged();
|
||||
if (IsVerifyMerge(row)) _ = RefreshQueueAsync();
|
||||
}
|
||||
|
||||
/// <summary>A post-merge verify keeps its task in WaitingForReview, so only this op marks the activity row "Verifying".</summary>
|
||||
private static bool IsVerifyMerge(RunningOperationViewModel r) => r.Kind == OperationKinds.VerifyMerge;
|
||||
|
||||
private void NotifyOperationsChanged()
|
||||
{
|
||||
OnPropertyChanged(nameof(HasRunningOperations));
|
||||
@@ -220,7 +228,8 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
{
|
||||
var id = r.Id;
|
||||
var running = r.Status == ClaudeDo.Data.Models.TaskStatus.Running;
|
||||
var (tint, colorKey, labelKey) = Decorate(r.Status, r.RoadblockCount, r.BlockedByTaskId != null);
|
||||
var (tint, colorKey, labelKey) = Decorate(r.Status, r.RoadblockCount, r.BlockedByTaskId != null,
|
||||
RunningOperations.Any(o => o.Kind == OperationKinds.VerifyMerge && o.TaskId == id));
|
||||
Queued.Add(new QueuedTaskViewModel
|
||||
{
|
||||
Id = id,
|
||||
@@ -243,12 +252,14 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
// Row tint + status label for the activity strip. Keys are resolved to brushes by
|
||||
// DotBrushConverter ("<key>Brush"), so they must match tokens in Tokens.axaml.
|
||||
private static (string? Tint, string? ColorKey, string? LabelKey) Decorate(
|
||||
ClaudeDo.Data.Models.TaskStatus status, int roadblockCount, bool blocked)
|
||||
ClaudeDo.Data.Models.TaskStatus status, int roadblockCount, bool blocked, bool verifying)
|
||||
=> status switch
|
||||
{
|
||||
ClaudeDo.Data.Models.TaskStatus.Failed => ("ErrorTint", "StatusError", "missionControl.failed"),
|
||||
ClaudeDo.Data.Models.TaskStatus.WaitingForReview when roadblockCount > 0
|
||||
=> ("RoadblockTint", "Amber", "missionControl.roadblock"),
|
||||
ClaudeDo.Data.Models.TaskStatus.WaitingForReview when verifying
|
||||
=> ("RunningTint", "StatusRunning", "missionControl.verifying"),
|
||||
ClaudeDo.Data.Models.TaskStatus.WaitingForReview => ("DoneTint", "StatusReview", "missionControl.review"),
|
||||
ClaudeDo.Data.Models.TaskStatus.Running => ("RunningTint", "StatusRunning", "missionControl.running"),
|
||||
_ when blocked => (null, "Amber", "missionControl.blocked"),
|
||||
@@ -890,7 +901,11 @@ public sealed partial class RunningOperationViewModel : ObservableObject
|
||||
private readonly DateTime _startedAtUtc;
|
||||
|
||||
public string Id { get; }
|
||||
/// <summary>Localized operation kind ("Verify (merge)", "Rebasing", ...).</summary>
|
||||
/// <summary>Wire kind token (<see cref="OperationKinds"/>).</summary>
|
||||
public string Kind { get; }
|
||||
/// <summary>The task the operation runs for; null for a batch verify.</summary>
|
||||
public string? TaskId { get; }
|
||||
/// <summary>Localized operation kind ("Verifying after merge", "Rebasing", ...).</summary>
|
||||
public string KindLabel { get; }
|
||||
/// <summary><c>#Number Title</c> for a task operation, the list name for a batch verify.</summary>
|
||||
public string Subject { get; }
|
||||
@@ -900,6 +915,8 @@ public sealed partial class RunningOperationViewModel : ObservableObject
|
||||
public RunningOperationViewModel(RunningOperationDto op)
|
||||
{
|
||||
Id = op.Id;
|
||||
Kind = op.Kind;
|
||||
TaskId = op.TaskId;
|
||||
_startedAtUtc = op.StartedAt;
|
||||
KindLabel = op.Kind switch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user