diff --git a/src/components/GroupedHistoryView/ProjectDialog.tsx b/src/components/GroupedHistoryView/ProjectDialog.tsx index 04d3748a5..fcd7e0937 100644 --- a/src/components/GroupedHistoryView/ProjectDialog.tsx +++ b/src/components/GroupedHistoryView/ProjectDialog.tsx @@ -189,12 +189,12 @@ export default function ProjectDialog({
- {t("layout.failed")} + {t("layout.ongoing")}
- + - {project.total_failed_tasks} + {project.total_ongoing_tasks}
diff --git a/src/components/GroupedHistoryView/ProjectGroup.tsx b/src/components/GroupedHistoryView/ProjectGroup.tsx index cfa07d033..6f08cefe0 100644 --- a/src/components/GroupedHistoryView/ProjectGroup.tsx +++ b/src/components/GroupedHistoryView/ProjectGroup.tsx @@ -110,10 +110,9 @@ export default function ProjectGroup({ return date.toLocaleDateString(); }; - // Calculate if project has issues (failed tasks or tasks requiring human in the loop) - const hasFailedTasks = project.total_failed_tasks > 0; + // Calculate if project has issues (requiring human in the loop) const hasHumanInLoop = project.ongoing_tasks?.some(task => task.status === 'pending') || false; - const hasIssue = hasFailedTasks || hasHumanInLoop; + const hasIssue = hasHumanInLoop; // Calculate agent count (placeholder - count unique agents from tasks if available) const agentCount = project.tasks?.length > 0 diff --git a/src/components/GroupedHistoryView/index.tsx b/src/components/GroupedHistoryView/index.tsx index d5ef0d95f..03d1c02df 100644 --- a/src/components/GroupedHistoryView/index.tsx +++ b/src/components/GroupedHistoryView/index.tsx @@ -207,7 +207,6 @@ export default function GroupedHistoryView({ tasks: [], ongoing_tasks: [], total_completed_tasks: 0, - total_failed_tasks: 0, total_ongoing_tasks: 0, average_tokens_per_task: 0 }; diff --git a/src/service/historyApi.ts b/src/service/historyApi.ts index 03c8fd3cb..1c5ac867f 100644 --- a/src/service/historyApi.ts +++ b/src/service/historyApi.ts @@ -17,7 +17,7 @@ const groupTasksByProject = (tasks: HistoryTask[]): ProjectGroup[] => { latest_task_date: task.created_at || new Date().toISOString(), tasks: [], total_completed_tasks: 0, - total_failed_tasks: 0, + total_ongoing_tasks: 0, average_tokens_per_task: 0, last_prompt: task.question || "", }); diff --git a/src/types/history.d.ts b/src/types/history.d.ts index 3abcbed0b..4eadac894 100644 --- a/src/types/history.d.ts +++ b/src/types/history.d.ts @@ -45,8 +45,7 @@ export interface ProjectGroup { ongoing_tasks?: OngoingTask[]; // Add ongoing tasks to the project group // Additional project-level metadata total_completed_tasks: number; - total_failed_tasks: number; - total_ongoing_tasks?: number; + total_ongoing_tasks: number; average_tokens_per_task: number; }