refactor(ui): remove pick-up-in-terminal, keep ConPTY as the single session entry

Two context-menu entries opened a Claude session for the same task via different
mechanisms (embedded ConPTY vs. an external wt terminal). Drop the external-terminal
path entirely, including its worker hub method, launcher plumbing, and localization
keys, since the embedded ConPTY session already covers every case it did.
This commit is contained in:
mika kuns
2026-08-05 09:05:46 +02:00
parent 63d8b5c28d
commit 87de53e052
21 changed files with 27 additions and 278 deletions
@@ -813,7 +813,6 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
Merge.SyncTaskContext(Task?.Id, Task?.Title, Task?.IsPlanningParent == true);
NotifySessionSections();
OnPropertyChanged(nameof(CanAcceptDrop));
OnPropertyChanged(nameof(CanPickUpInTerminal));
}
[RelayCommand]
@@ -955,24 +954,6 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
catch { /* offline */ }
}
// Pick up in a terminal only where a session + worktree reliably still exist (parked
// for review or failed mid-run); the worker reports a clear error otherwise.
public bool CanPickUpInTerminal => Task is not null
&& Task.Status is ClaudeDo.Data.Models.TaskStatus.WaitingForReview
or ClaudeDo.Data.Models.TaskStatus.Failed;
[RelayCommand]
private async System.Threading.Tasks.Task PickUpInTerminalAsync()
{
if (Task is null) return;
ClaudeDo.Ui.Services.ForegroundHelper.AllowAny();
try { await _worker.ResumeTaskInTerminalAsync(Task.Id); }
catch (System.Exception ex)
{
if (ShowErrorAsync != null) await ShowErrorAsync(ex.Message);
}
}
[RelayCommand(CanExecute = nameof(CanEnqueue))]
private async System.Threading.Tasks.Task EnqueueAsync()
{
@@ -74,11 +74,6 @@ public sealed partial class TaskRowViewModel : ViewModelBase
&& !IsManual;
public bool CanResumeOrDiscardPlanning => PlanningPhase == PlanningPhase.Active;
// Pick up in a terminal only where a session + worktree reliably still exist: a task
// parked for review, or one that failed mid-run. The worker validates and reports a
// clear error if there's no resumable session/worktree.
public bool CanPickUpInTerminal => Status is TaskStatus.WaitingForReview or TaskStatus.Failed;
public string? PlanningBadge => PlanningPhase switch
{
PlanningPhase.Active => Loc.T("vm.planningBadge.active"),
@@ -177,7 +172,6 @@ public sealed partial class TaskRowViewModel : ViewModelBase
OnPropertyChanged(nameof(ShowStatusChip));
OnPropertyChanged(nameof(IsRunning));
OnPropertyChanged(nameof(IsWaitingForReview));
OnPropertyChanged(nameof(CanPickUpInTerminal));
OnPropertyChanged(nameof(IsParked));
OnPropertyChanged(nameof(IsQueued));
OnPropertyChanged(nameof(IsWaiting));
@@ -966,15 +966,6 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
OpenConPtySessionRequested?.Invoke(row.Id);
}
[RelayCommand]
private async Task PickUpInTerminalAsync(TaskRowViewModel? row)
{
if (row is null || _worker is null) return;
ForegroundHelper.AllowAny();
try { await _worker.ResumeTaskInTerminalAsync(row.Id); }
catch (Exception ex) { ErrorReported?.Invoke(Loc.T("vm.tasksIsland.pickUpInTerminalFailed", ex.Message)); }
}
[RelayCommand]
private async Task ResumePlanningSessionAsync(TaskRowViewModel? row)
{