fix(web): show duel-stage lane in live banner when parallel lanes array is empty
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Showing 1 changed file with +6 and −1
modified
apps/web/components/LiveLeaderboard.tsx
+6 −1
@@ -65,7 +65,12 @@ function ProgressBanner({ progress }: { progress: Progress }) { | ||
| 65 | 65 | const nFailed = progress.failed?.length ?? 0; |
| 66 | 66 | const done = nDone + nFailed; |
| 67 | 67 | const overallPct = total > 0 ? Math.round((100 * done) / total) : 0; |
| 68 | − const lanes = progress.currents ?? (progress.current ? [progress.current] : []); | |
| 68 | + const lanes = | |
| 69 | + progress.currents && progress.currents.length > 0 | |
| 70 | + ? progress.currents | |
| 71 | + : progress.current | |
| 72 | + ? [progress.current] | |
| 73 | + : []; | |
| 69 | 74 | const runningModels = new Set(lanes.map((l) => l.model)).size; |
| 70 | 75 | const recent = (progress.completed ?? []).slice(-5).reverse(); |
| 71 | 76 | const remaining = Math.max(0, total - done - runningModels); |
| 72 | 77 | |