fix(ui): block delete on interactive-session tasks, clear ghost selection

Delete (row context menu + detail header) now gates on HasInteractiveSession
the same way SendToQueue already does, so an open ConPTY session's claude
process can't be orphaned by deleting its task out from under it.

Row removal (in-UI delete and the delta-refresh path for externally deleted
tasks) now clears SelectedTask via SelectFrom(null, "row-removed") when the
removed row was selected, so the detail pane no longer keeps showing a
deleted task with live buttons.
This commit is contained in:
Mika Kuns
2026-08-26 15:46:40 +02:00
parent bce0c9d897
commit c1ab042d0a
6 changed files with 159 additions and 5 deletions
@@ -98,7 +98,7 @@ public partial class TaskRowView : UserControl
menu.Items.Add(schedule);
menu.Items.Add(new Separator());
menu.Items.Add(MakeItem("tasks.ctxDeleteTask", OnDeleteTaskClick));
menu.Items.Add(MakeItem("tasks.ctxDeleteTask", OnDeleteTaskClick, reason: row.DeleteDisabledReason));
menu.Open(border);
e.Handled = true;