+ This permanently removes {run.title} and its
+ durable state. This action cannot be undone.
+ >
+ }
+ confirmLabel="Delete run"
+ pendingLabel="Deleting…"
+ pending={deletePending}
+ onConfirm={() => void handleConfirmDelete()}
+ onCancel={() => setDeleteDialogOpen(false)}
+ />
+
void;
+ canDelete: boolean;
+ deletePending: boolean;
+ onDelete: () => void;
canCancel: boolean;
cancelPending: boolean;
onCancel: () => void;
@@ -468,16 +515,17 @@ function ActionsMenu(props: ActionsMenuProps) {
canPreview, previewPending, onPreview,
canArchive, archivePending, onArchive,
canUnarchive, unarchivePending, onUnarchive,
+ canDelete, deletePending, onDelete,
canCancel, cancelPending, onCancel,
} = props;
const hasOps =
canPreview || canSendInterrupt || canFocusSteer;
const hasLifecycle = canArchive || canUnarchive;
- const hasDestructive = canCancel;
+ const hasDestructive = canCancel || canDelete;
const hasAny = hasOps || hasLifecycle || hasDestructive;
const anyPending =
- previewPending || archivePending || unarchivePending || cancelPending || interruptPending;
+ previewPending || archivePending || unarchivePending || deletePending || cancelPending || interruptPending;
if (!hasAny) return null;
@@ -567,6 +615,18 @@ function ActionsMenu(props: ActionsMenuProps) {
)}
+ {canDelete && (
+
+ )}
);