diff --git a/frontend/src/components/tasks/TaskDetailsPanel.tsx b/frontend/src/components/tasks/TaskDetailsPanel.tsx index 4a8598a7..866af837 100644 --- a/frontend/src/components/tasks/TaskDetailsPanel.tsx +++ b/frontend/src/components/tasks/TaskDetailsPanel.tsx @@ -473,8 +473,8 @@ export function TaskDetailsPanel({ // Determine what content to show based on execution state const renderMainContent = (): JSX.Element => { - if (!executionState) { - // Still loading execution state, show loading + // Show loading spinner only when we're actually loading data + if (loading) { return (
@@ -483,6 +483,28 @@ export function TaskDetailsPanel({ ); } + // If no attempt is selected, show message + if (!selectedAttempt) { + return ( +
+
+

No attempt selected

+
+
+ ); + } + + // If no execution state, execution hasn't started yet + if (!executionState) { + return ( +
+
+

Task execution not started yet

+
+
+ ); + } + const isSetupRunning = executionState.execution_state === 'SetupRunning'; const isSetupFailed = executionState.execution_state === 'SetupFailed'; const isCodingAgentRunning = @@ -901,11 +923,11 @@ export function TaskDetailsPanel({ ); } - // Default case - execution hasn't started or no specific state + // Default case - unexpected state return (
-

Task execution not started yet

+

Unknown execution state

);