diff --git a/frontend/src/components/panels/TaskAttemptPanel.tsx b/frontend/src/components/panels/TaskAttemptPanel.tsx index 125928bc..00d327a8 100644 --- a/frontend/src/components/panels/TaskAttemptPanel.tsx +++ b/frontend/src/components/panels/TaskAttemptPanel.tsx @@ -25,12 +25,10 @@ const TaskAttemptPanel = ({ } return ( - + {children({ - logs: ( - - ), + logs: , followUp: ( ), diff --git a/frontend/src/components/tasks/TaskFollowUpSection.tsx b/frontend/src/components/tasks/TaskFollowUpSection.tsx index a8deac8c..5ea50471 100644 --- a/frontend/src/components/tasks/TaskFollowUpSection.tsx +++ b/frontend/src/components/tasks/TaskFollowUpSection.tsx @@ -563,14 +563,8 @@ export function TaskFollowUpSection({ refetchAttemptBranch, ]); - if (!selectedAttemptId) return null; - - if (isScratchLoading) { - return ( -
- -
- ); + if (!selectedAttemptId) { + return null; } return ( diff --git a/frontend/src/hooks/useTaskAttempt.ts b/frontend/src/hooks/useTaskAttempt.ts index 43dcd789..0a465226 100644 --- a/frontend/src/hooks/useTaskAttempt.ts +++ b/frontend/src/hooks/useTaskAttempt.ts @@ -6,5 +6,6 @@ export function useTaskAttempt(attemptId?: string) { queryKey: ['taskAttempt', attemptId], queryFn: () => attemptsApi.get(attemptId!), enabled: !!attemptId, + placeholderData: (previousData) => previousData, }); } diff --git a/frontend/src/pages/ProjectTasks.tsx b/frontend/src/pages/ProjectTasks.tsx index aa237411..86898dc3 100644 --- a/frontend/src/pages/ProjectTasks.tsx +++ b/frontend/src/pages/ProjectTasks.tsx @@ -287,7 +287,7 @@ export function ProjectTasks() { }, [projectId, taskId, isLoading, selectedTask, navigate]); const effectiveAttemptId = attemptId === 'latest' ? undefined : attemptId; - const isTaskView = !!taskId && !effectiveAttemptId; + const isTaskView = !!taskId && !effectiveAttemptId && attemptId !== 'latest'; const { data: attempt } = useTaskAttempt(effectiveAttemptId); const { data: branchStatus } = useBranchStatus(attempt?.id);