Show 100% progress for closed/archived rounds in Round Pipeline
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m23s

Closed and archived rounds now always display a full progress bar instead
of relying on the computed completionRate which is 0 for non-evaluation rounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 21:07:18 +01:00
parent 91563f3f47
commit 230347005c

View File

@@ -1000,6 +1000,8 @@ function RoundPipelineTab() {
<div className="space-y-3"> <div className="space-y-3">
{rounds.map((round, idx) => { {rounds.map((round, idx) => {
const stats = comparisonMap.get(round.id) as any const stats = comparisonMap.get(round.id) as any
const isClosed = round.status === 'ROUND_CLOSED' || round.status === 'ROUND_ARCHIVED'
const progressValue = isClosed ? 100 : (stats?.completionRate ?? 0)
return ( return (
<div key={round.id} className="flex items-center gap-4"> <div key={round.id} className="flex items-center gap-4">
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-medium"> <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-medium">
@@ -1014,14 +1016,12 @@ function RoundPipelineTab() {
<div className="flex items-center gap-4 text-sm"> <div className="flex items-center gap-4 text-sm">
<span className="tabular-nums">{stats?.projectCount ?? 0} projects</span> <span className="tabular-nums">{stats?.projectCount ?? 0} projects</span>
<span className="tabular-nums">{stats?.evaluationCount ?? 0} evals</span> <span className="tabular-nums">{stats?.evaluationCount ?? 0} evals</span>
<Badge variant={round.status === 'ROUND_ACTIVE' ? 'default' : round.status === 'ROUND_CLOSED' ? 'secondary' : 'outline'}> <Badge variant={round.status === 'ROUND_ACTIVE' ? 'default' : isClosed ? 'secondary' : 'outline'}>
{round.status?.replace('ROUND_', '') ?? 'DRAFT'} {round.status?.replace('ROUND_', '') ?? 'DRAFT'}
</Badge> </Badge>
</div> </div>
</div> </div>
{stats?.completionRate != null && ( <Progress value={progressValue} className="mt-2 h-2" />
<Progress value={stats.completionRate} className="mt-2 h-2" />
)}
</div> </div>
</div> </div>
) )