From 63de1fe54277b8dc4ab46b5433b2b5c2db1703ef Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Sun, 22 Jun 2025 21:41:02 +0100 Subject: [PATCH] Open in same window --- .../src/components/tasks/TaskDetailsPanel.tsx | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/tasks/TaskDetailsPanel.tsx b/frontend/src/components/tasks/TaskDetailsPanel.tsx index 649f1846..7b147340 100644 --- a/frontend/src/components/tasks/TaskDetailsPanel.tsx +++ b/frontend/src/components/tasks/TaskDetailsPanel.tsx @@ -140,7 +140,9 @@ export function TaskDetailsPanel({ const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false); const [selectedExecutor, setSelectedExecutor] = useState("claude"); const [isStopping, setIsStopping] = useState(false); - const [expandedOutputs, setExpandedOutputs] = useState>(new Set()); + const [expandedOutputs, setExpandedOutputs] = useState>( + new Set() + ); const { config } = useConfig(); // Available executors @@ -159,10 +161,15 @@ export function TaskDetailsPanel({ // Group activities by execution_process_id and get the latest one for each const latestActivitiesByProcess = new Map(); - + attemptActivities.forEach((activity) => { - const existing = latestActivitiesByProcess.get(activity.execution_process_id); - if (!existing || new Date(activity.created_at) > new Date(existing.created_at)) { + const existing = latestActivitiesByProcess.get( + activity.execution_process_id + ); + if ( + !existing || + new Date(activity.created_at) > new Date(existing.created_at) + ) { latestActivitiesByProcess.set(activity.execution_process_id, activity); } }); @@ -380,7 +387,7 @@ export function TaskDetailsPanel({ }; const toggleOutputExpansion = (processId: string) => { - setExpandedOutputs(prev => { + setExpandedOutputs((prev) => { const newSet = new Set(prev); if (newSet.has(processId)) { newSet.delete(processId); @@ -612,8 +619,6 @@ export function TaskDetailsPanel({