Skip to content

Commit e2ac03b

Browse files
beautyfreeclaude
andcommitted
feat(updater): show progress bar while download is running
The percentage was already in the subtitle, but a thin primary-coloured bar gives actual visual feedback — installer bundles are ~200 MB so the download takes minutes on slow networks. Indeterminate pulse when progress is null (TLS handshake / no event yet). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f799df7 commit e2ac03b

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/mainview/pages/Settings.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,33 @@ export default function SettingsPage() {
560560
)}
561561
</div>
562562
</div>
563+
{/* Download progress bar — the percentage is already in the
564+
* subtitle, but a visual bar gives actual feedback on long
565+
* downloads (200+ MB DMG can take minutes on slow networks).
566+
* Indeterminate stripe when progress is null (handshake phase). */}
567+
{updateStatus?.state === 'downloading' && (
568+
<div className="space-y-1">
569+
<div className="h-1.5 w-full overflow-hidden rounded-full bg-muted">
570+
<div
571+
className={`h-full bg-primary transition-[width] duration-300 ${
572+
typeof updateStatus.progress !== 'number'
573+
? 'animate-pulse w-1/3'
574+
: ''
575+
}`}
576+
style={
577+
typeof updateStatus.progress === 'number'
578+
? { width: `${updateStatus.progress}%` }
579+
: undefined
580+
}
581+
/>
582+
</div>
583+
{typeof updateStatus.progress === 'number' && (
584+
<p className="text-[10px] tabular-nums text-muted-foreground">
585+
{updateStatus.progress}%
586+
</p>
587+
)}
588+
</div>
589+
)}
563590
{/* Persistent error surface — the inline muted paragraph above was
564591
* too easy to miss. Errors from autoUpdater (signature, disk full,
565592
* network) stay visible here with an explicit destructive style

0 commit comments

Comments
 (0)