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