feat(ui): "Worktree öffnen" im Kontextmenü der Task-Zeile

Group 1 of the task-row context menu gets a fourth gated entry, right
after "Open interactive session": it opens the task's worktree folder
via Process.Start/UseShellExecute, mirroring ListsIslandViewModel's
OpenInExplorer. Missing worktree greys the item out with a tooltip
reason instead of hiding it, keeping Group 1's fixed length. Failures
report through TasksIslandViewModel.ErrorReported (footer strip), not
a silent catch.
This commit is contained in:
mika kuns
2026-08-21 17:58:31 +02:00
parent 93be76a144
commit ac9b0dab29
6 changed files with 92 additions and 2 deletions
@@ -61,6 +61,7 @@ public partial class TaskRowView : UserControl
menu.Items.Add(removeFromQueueItem);
menu.Items.Add(MakeItem("tasks.ctxCancelExecution", OnCancelExecutionClick, reason: row.CancelDisabledReason));
menu.Items.Add(MakeItem("tasks.ctxOpenConPtySession", OnOpenConPtySessionClick, reason: row.QuickSessionDisabledReason));
menu.Items.Add(MakeItem("tasks.ctxOpenWorktree", OnOpenWorktreeClick, reason: row.OpenWorktreeDisabledReason));
menu.Items.Add(MakeItem("tasks.ctxRefineTask", OnRefineTaskClick, reason: row.RefineDisabledReason));
menu.Items.Add(new Separator());
@@ -169,6 +170,12 @@ public partial class TaskRowView : UserControl
vm.OpenConPtySessionCommand.Execute(row);
}
private void OnOpenWorktreeClick(object? sender, RoutedEventArgs e)
{
if (DataContext is TaskRowViewModel row && FindTasksVm() is { } vm)
vm.OpenTaskWorktreeCommand.Execute(row);
}
// The status chip is only actionable while a ConPTY session is open; the open command dedupes
// by task id, so it surfaces Mission Control and focuses the existing pane.
private void OnStatusChipTapped(object? sender, RoutedEventArgs e)