diff --git a/backend/src/models/task_attempt.rs b/backend/src/models/task_attempt.rs index 53336f73..ba4cc3ad 100644 --- a/backend/src/models/task_attempt.rs +++ b/backend/src/models/task_attempt.rs @@ -181,9 +181,11 @@ pub enum ExecutionState { SetupRunning, SetupComplete, SetupFailed, + SetupStopped, CodingAgentRunning, CodingAgentComplete, CodingAgentFailed, + CodingAgentStopped, Complete, } @@ -1042,7 +1044,7 @@ impl TaskAttempt { ExecutionState::CodingAgentFailed } crate::models::execution_process::ExecutionProcessStatus::Killed => { - ExecutionState::CodingAgentFailed + ExecutionState::CodingAgentStopped } } } else { @@ -1053,7 +1055,7 @@ impl TaskAttempt { ExecutionState::SetupFailed } crate::models::execution_process::ExecutionProcessStatus::Killed => { - ExecutionState::SetupFailed + ExecutionState::SetupStopped } } } else if let Some(agent) = coding_agent_process { @@ -1069,7 +1071,7 @@ impl TaskAttempt { ExecutionState::CodingAgentFailed } crate::models::execution_process::ExecutionProcessStatus::Killed => { - ExecutionState::CodingAgentFailed + ExecutionState::CodingAgentStopped } } } else { diff --git a/frontend/src/components/tasks/TaskDetails/LogsTab.tsx b/frontend/src/components/tasks/TaskDetails/LogsTab.tsx index d0102311..0937ae5d 100644 --- a/frontend/src/components/tasks/TaskDetails/LogsTab.tsx +++ b/frontend/src/components/tasks/TaskDetails/LogsTab.tsx @@ -54,12 +54,15 @@ function LogsTab() { const isSetupRunning = executionState.execution_state === 'SetupRunning'; const isSetupComplete = executionState.execution_state === 'SetupComplete'; const isSetupFailed = executionState.execution_state === 'SetupFailed'; + const isSetupStopped = executionState.execution_state === 'SetupStopped'; const isCodingAgentRunning = executionState.execution_state === 'CodingAgentRunning'; const isCodingAgentComplete = executionState.execution_state === 'CodingAgentComplete'; const isCodingAgentFailed = executionState.execution_state === 'CodingAgentFailed'; + const isCodingAgentStopped = + executionState.execution_state === 'CodingAgentStopped'; const isComplete = executionState.execution_state === 'Complete'; const hasChanges = executionState.has_changes; @@ -73,8 +76,8 @@ function LogsTab() { ); } - // When setup failed, show error message and conversation - if (isSetupFailed) { + // When setup failed or was stopped + if (isSetupFailed || isSetupStopped) { const setupProcess = executionState.setup_process_id ? attemptData.runningProcessDetails[executionState.setup_process_id] : Object.values(attemptData.runningProcessDetails).find( @@ -84,12 +87,16 @@ function LogsTab() { return (
- Setup Script Failed -
-- The setup script encountered an error. Error details below: +
+ {isSetupFailed ? 'Setup Script Failed' : 'Setup Script Stopped'}
+ {isSetupFailed && ( ++ The setup script encountered an error. Error details below: +
+ )}- Coding Agent Failed -
-- The coding agent encountered an error. Error details below: +
+ {isCodingAgentFailed + ? 'Coding Agent Failed' + : 'Coding Agent Stopped'}
+ {isCodingAgentFailed && ( ++ The coding agent encountered an error. Error details below: +
+ )}