From a9116b58339c2175721f0fa314ba145a5d7cf74b Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 7 May 2026 12:34:45 +0200 Subject: [PATCH] fix(applicant-feedback): correct dashboard card scale + visible criterion bars - Dashboard summary card: globalScore is /10 (was /100) and DELIBERATION rounds skip the avg-score row (rank, not score) - Per-criterion progress bars on full evaluations page: bg-brand-dark is not a defined class and rendered invisible; switched to bg-brand-blue Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/(applicant)/applicant/evaluations/page.tsx | 2 +- src/app/(applicant)/applicant/page.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/(applicant)/applicant/evaluations/page.tsx b/src/app/(applicant)/applicant/evaluations/page.tsx index 8db12b1..94e2c8f 100644 --- a/src/app/(applicant)/applicant/evaluations/page.tsx +++ b/src/app/(applicant)/applicant/evaluations/page.tsx @@ -93,7 +93,7 @@ function CriterionBar({ value, max }: { value: number; max: number }) { return (
diff --git a/src/app/(applicant)/applicant/page.tsx b/src/app/(applicant)/applicant/page.tsx index 19ba69b..2e70a0b 100644 --- a/src/app/(applicant)/applicant/page.tsx +++ b/src/app/(applicant)/applicant/page.tsx @@ -439,13 +439,14 @@ export default function ApplicantDashboardPage() { {evaluations?.map((round) => { + const showScore = round.roundType !== 'DELIBERATION' const scores = round.evaluations .map((ev) => ev.globalScore) .filter((s): s is number => s !== null) - const avgScore = scores.length > 0 + const avgScore = showScore && scores.length > 0 ? scores.reduce((a, b) => a + b, 0) / scores.length : null - const maxScore = round.roundType === 'LIVE_FINAL' ? 10 : 100 + const maxScore = 10 const pct = avgScore !== null ? (avgScore / maxScore) * 100 : 0 const roundIcon = round.roundType === 'LIVE_FINAL' ?