Merge claudedo/c52ba287db6e4a7c9bac38c30bcc21ec

This commit is contained in:
mika kuns
2026-08-06 13:50:41 +02:00
9 changed files with 299 additions and 8 deletions
@@ -330,16 +330,22 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
// Submit a task's hand-driven ConPTY work for review, then close the pane (the interactive
// session is finished). The worker commits the worktree and moves the task to WaitingForReview.
// Guarded by the pane's IsSubmitPending flag — a rapid double-click would otherwise race two
// SubmitTaskForReviewAsync calls, with the loser flashing a spurious footer error.
private async void OnPaneSubmitForReview(string taskId)
{
if (ConPtySessions.FirstOrDefault(s => s.TaskId == taskId) is not { } pane || pane.IsSubmitPending)
return;
pane.IsSubmitPending = true;
try
{
await _worker.SubmitTaskForReviewAsync(taskId);
if (ConPtySessions.FirstOrDefault(s => s.TaskId == taskId) is { } pane)
CloseConPtySession(pane);
CloseConPtySession(pane);
}
catch (Exception ex)
{
pane.IsSubmitPending = false;
ErrorReported?.Invoke(Loc.T("missionControl.submitForReviewFailed", ex.Message));
}
}
@@ -349,6 +355,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
if (!ConPtySessions.Contains(pane)) return;
pane.ErrorReported -= OnConPtyPaneError;
pane.CloseRequested -= CloseConPtySession;
pane.SubmitForReviewRequested -= OnPaneSubmitForReview;
ConPtySessions.Remove(pane);
pane.Dispose();
}
@@ -398,6 +405,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
{
c.ErrorReported -= OnConPtyPaneError;
c.CloseRequested -= CloseConPtySession;
c.SubmitForReviewRequested -= OnPaneSubmitForReview;
c.Dispose();
}
ConPtySessions.Clear();