Skip to content

Commit ebdef7a

Browse files
committed
PM-3089 - handle run failure
1 parent cdd9899 commit ebdef7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/apps/review/src/pages/reviews/components/AiReviewViewer/AiReviewViewer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const AiReviewViewer: FC = () => {
3636
challengeInfo,
3737
}: ChallengeDetailContextModel = useChallengeDetailsContext()
3838
const navigate = useAppNavigate()
39+
const workflowRunIsFailed = [AiWorkflowRunStatusEnum.FAILURE].includes(workflowRun?.status as AiWorkflowRunStatusEnum);
3940

4041
const tabItems: SelectOption[] = [
4142
{
@@ -56,7 +57,7 @@ const AiReviewViewer: FC = () => {
5657
label: 'Scorecard',
5758
value: 'scorecard',
5859
},
59-
{ label: `Attachments (${totalCount ?? 0})`, value: 'attachments' },
60+
{ label: `Attachments${workflowRunIsFailed ? '' : ` (${totalCount ?? 0})`}`, value: 'attachments' },
6061
]
6162
const isFailedRun = useMemo(() => (
6263
workflowRun && [

0 commit comments

Comments
 (0)