Skip to content

Commit f799df7

Browse files
beautyfreeclaude
andcommitted
fix(updater): show update errors as a persistent destructive panel
Previously updateStatus.error only appeared in the muted-foreground paragraph next to the title — easy to miss. With signature failures and disk-full errors visible only there, users saw the button re-enable and nothing else and concluded the click did nothing. Now errors render in a dedicated AlertTriangle-prefixed panel with destructive styling, showing the raw message in monospace so the actual cause (ditto, codesign, ENOTFOUND) is copy-pastable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7b43a21 commit f799df7

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/mainview/i18n/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ const en = {
305305
updateStateDownloading: "Downloading update…",
306306
updateStateReady: "Update ready — restart to install",
307307
updateStateError: "Update check failed",
308+
updateErrorTitle: "Update failed",
308309
updateCheckNow: "Check for updates",
309310
updateDownload: "Download update",
310311
updateRestart: "Restart & install",

src/mainview/pages/Settings.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ExternalLink,
1111
Download,
1212
RotateCw,
13+
AlertTriangle,
1314
} from 'lucide-react'
1415
import { openUrl, invoke, listen } from '@/mainview/lib/native'
1516
import type {
@@ -559,6 +560,24 @@ export default function SettingsPage() {
559560
)}
560561
</div>
561562
</div>
563+
{/* Persistent error surface — the inline muted paragraph above was
564+
* too easy to miss. Errors from autoUpdater (signature, disk full,
565+
* network) stay visible here with an explicit destructive style
566+
* until the user runs a successful check/download that clears the
567+
* state. */}
568+
{updateStatus?.error && (
569+
<div className="flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs">
570+
<AlertTriangle className="mt-0.5 size-3.5 shrink-0 text-destructive" />
571+
<div className="min-w-0 flex-1">
572+
<p className="font-medium text-destructive">
573+
{t('settings.updateErrorTitle')}
574+
</p>
575+
<p className="mt-0.5 text-muted-foreground break-words font-mono">
576+
{updateStatus.error}
577+
</p>
578+
</div>
579+
</div>
580+
)}
562581
</section>
563582

564583

0 commit comments

Comments
 (0)