@@ -554,20 +554,23 @@ export function Run({ run }: { run: Run }) {
554554 return groups
555555 } , [ tasks , groupByStatus , getTaskStatusCategory ] )
556556
557- const statusLabels : Record < TaskStatusCategory , { label : string ; className : string ; count : number } > = {
558- failed : { label : "Failed" , className : "text-red-500" , count : groupedTasks ?. failed . length ?? 0 } ,
559- in_progress : {
560- label : "In Progress" ,
561- className : "text-yellow-500" ,
562- count : groupedTasks ?. in_progress . length ?? 0 ,
563- } ,
564- passed : { label : "Passed" , className : "text-green-500" , count : groupedTasks ?. passed . length ?? 0 } ,
565- not_started : {
566- label : "Not Started" ,
567- className : "text-muted-foreground" ,
568- count : groupedTasks ?. not_started . length ?? 0 ,
569- } ,
570- }
557+ const statusLabels = useMemo (
558+ ( ) : Record < TaskStatusCategory , { label : string ; className : string ; count : number } > => ( {
559+ failed : { label : "Failed" , className : "text-red-500" , count : groupedTasks ?. failed . length ?? 0 } ,
560+ in_progress : {
561+ label : "In Progress" ,
562+ className : "text-yellow-500" ,
563+ count : groupedTasks ?. in_progress . length ?? 0 ,
564+ } ,
565+ passed : { label : "Passed" , className : "text-green-500" , count : groupedTasks ?. passed . length ?? 0 } ,
566+ not_started : {
567+ label : "Not Started" ,
568+ className : "text-muted-foreground" ,
569+ count : groupedTasks ?. not_started . length ?? 0 ,
570+ } ,
571+ } ) ,
572+ [ groupedTasks ] ,
573+ )
571574
572575 const statusOrder : TaskStatusCategory [ ] = [ "failed" , "in_progress" , "passed" , "not_started" ]
573576
0 commit comments