diff --git a/src/renderer/components/team/TeamListView.tsx b/src/renderer/components/team/TeamListView.tsx index 373efa87..95495353 100644 --- a/src/renderer/components/team/TeamListView.tsx +++ b/src/renderer/components/team/TeamListView.tsx @@ -14,7 +14,7 @@ import { getTeamColorSet } from '@renderer/constants/teamColors'; import { useStore } from '@renderer/store'; import { buildTaskCountsByTeam, normalizePath } from '@renderer/utils/pathNormalize'; import { getBaseName } from '@renderer/utils/pathUtils'; -import { Copy, FolderOpen, Search, Trash2 } from 'lucide-react'; +import { CheckCircle, Clock, Copy, FolderOpen, Play, Search, Trash2 } from 'lucide-react'; import { useShallow } from 'zustand/react/shallow'; import { CreateTeamDialog } from './dialogs/CreateTeamDialog'; @@ -494,34 +494,54 @@ export const TeamListView = (): React.JSX.Element => { )} {(() => { const tc = taskCountsByTeam.get(team.teamName); - if ( - !tc || - (tc.pending === 0 && tc.inProgress === 0 && tc.completed === 0) - ) { - return ( - - Tasks: 0 - - ); - } + const pending = tc?.pending ?? 0; + const inProgress = tc?.inProgress ?? 0; + const completed = tc?.completed ?? 0; + const totalTasks = pending + inProgress + completed; + const completedRatio = totalTasks > 0 ? completed / totalTasks : 0; return ( - <> - {tc.inProgress > 0 && ( - - {tc.inProgress} active +
+
+
+
+
+ + {completed}/{totalTasks} +
+ {totalTasks > 0 && ( +
+ {inProgress > 0 && ( + + + {inProgress} in_progress + + )} + {pending > 0 && ( + + + {pending} pending + + )} + {completed > 0 && ( + + + {completed} completed + + )} +
)} - {tc.pending > 0 && ( - - {tc.pending} pending - - )} - {tc.completed > 0 && ( - - {tc.completed} done - - )} - +
); })()}
diff --git a/src/renderer/components/ui/tooltip.tsx b/src/renderer/components/ui/tooltip.tsx index 5513e36e..745ddd4a 100644 --- a/src/renderer/components/ui/tooltip.tsx +++ b/src/renderer/components/ui/tooltip.tsx @@ -29,4 +29,4 @@ const TooltipContent = React.forwardRef< TooltipContent.displayName = TooltipPrimitive.Content.displayName; export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger }; -/* eslint-enable react/jsx-props-no-spreading */ +/* eslint-enable react/jsx-props-no-spreading -- Standard Radix/shadcn pattern */