Skip to content

Commit 316b6ac

Browse files
committed
feat(logs): allow cancellation of pending (paused) executions
1 parent 03f6e74 commit 316b6ac

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export const LogRowContextMenu = memo(function LogRowContextMenu({
4848
}: LogRowContextMenuProps) {
4949
const hasExecutionId = Boolean(log?.executionId)
5050
const hasWorkflow = Boolean(log?.workflow?.id || log?.workflowId)
51-
const isRunning = log?.status === 'running' && hasExecutionId && hasWorkflow
51+
const isCancellable =
52+
(log?.status === 'running' || log?.status === 'pending') && hasExecutionId && hasWorkflow
5253

5354
return (
5455
<DropdownMenu open={isOpen} onOpenChange={(open) => !open && onClose()} modal={false}>
@@ -72,7 +73,7 @@ export const LogRowContextMenu = memo(function LogRowContextMenu({
7273
sideOffset={4}
7374
onCloseAutoFocus={(e) => e.preventDefault()}
7475
>
75-
{isRunning && (
76+
{isCancellable && (
7677
<>
7778
<DropdownMenuItem onSelect={onCancelExecution}>
7879
<X />

0 commit comments

Comments
 (0)