diff --git a/autogpt_platform/frontend/src/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel.tsx b/autogpt_platform/frontend/src/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel.tsx index 99b8ff9049..4805508054 100644 --- a/autogpt_platform/frontend/src/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel.tsx +++ b/autogpt_platform/frontend/src/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel.tsx @@ -84,11 +84,26 @@ export function FloatingReviewsPanel({ } }, [executionDetails?.status, executionId, refetch]); + // Hide panel if: + // 1. No execution ID + // 2. No pending reviews and not in REVIEW status + // 3. Execution is RUNNING or QUEUED (hasn't paused for review yet) + if (!executionId) { + return null; + } + if ( - !executionId || - (!isLoading && - pendingReviews.length === 0 && - executionDetails?.status !== AgentExecutionStatus.REVIEW) + !isLoading && + pendingReviews.length === 0 && + executionDetails?.status !== AgentExecutionStatus.REVIEW + ) { + return null; + } + + // Don't show panel while execution is still running/queued (not paused for review) + if ( + executionDetails?.status === AgentExecutionStatus.RUNNING || + executionDetails?.status === AgentExecutionStatus.QUEUED ) { return null; }