Add archive and delete actions to the agents overview (#44433)

## What changed

- Add `Ctrl+E` to archive the selected task and its child agents, and `Delete` to permanently delete their history. Both actions require confirmation, with Cancel selected by default.
- Expose `agents.archive` and `agents.delete` in keymap configuration and the shortcut picker. Default bindings yield to existing custom bindings and chords.
- Show progress while requests run, keeping rendering responsive and blocking task switching. Refresh overview state afterward and keep the dashboard open when the current task is removed.
- Report failures and preserve the current attachment and draft when a rejected operation leaves the task loaded.

## Testing

Add coverage for confirmation and cancellation, active and background task removal, child-agent attachments, stale refresh invalidation, failure recovery, and draft preservation. Add progress input-isolation tests, shortcut conflict tests, and snapshots for confirmation, errors, progress, and keymap rendering.

GitOrigin-RevId: b327bb8834699d0058f9ffb903ace525ae270500
This commit is contained in:
Eric Traut
2026-09-10 06:06:21 +00:00
committed by copyberry
parent bf5ebd98c5
commit b348fc2667
32 changed files with 1095 additions and 46 deletions
+4
View File
@@ -218,6 +218,8 @@ pub(super) const KEYMAP_ACTIONS: &[KeymapActionDescriptor] = &[
action("agents", "Agents", "new_task", "Start composing a new agent task."),
action("agents", "Agents", "rename", "Rename the selected task."),
action("agents", "Agents", "stop", "Stop the selected running task."),
action("agents", "Agents", "archive", "Archive the selected task and its child agents."),
action("agents", "Agents", "delete", "Permanently delete the selected task and its child agents."),
action("agents", "Agents", "hide", "Hide the selected task until explicitly resumed."),
action("agents", "Agents", "toggle_grouping", "Group tasks by status or project."),
action("approval", "Approval", "open_fullscreen", "Open approval details fullscreen."),
@@ -396,6 +398,8 @@ pub(super) fn binding_slot<'a>(
("agents", "new_task") => Some(&mut keymap.agents.new_task),
("agents", "rename") => Some(&mut keymap.agents.rename),
("agents", "stop") => Some(&mut keymap.agents.stop),
("agents", "archive") => Some(&mut keymap.agents.archive),
("agents", "delete") => Some(&mut keymap.agents.delete),
("agents", "hide") => Some(&mut keymap.agents.hide),
("agents", "toggle_grouping") => Some(&mut keymap.agents.toggle_grouping),
("approval", "open_fullscreen") => Some(&mut keymap.approval.open_fullscreen),