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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user