From 48d4a96a62fecde105f58bd68ca130571ef0daa4 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Mon, 5 Jan 2026 13:21:31 -0500 Subject: [PATCH] fix(ui): update/downgrade button now installs correct version The button was incorrectly calling handleRestart (pure restart) instead of triggering version install. Now correctly installs latestVersion for updates or maxStableVersion for downgrades. --- .../components/monitoring/proxy-status-widget.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ui/src/components/monitoring/proxy-status-widget.tsx b/ui/src/components/monitoring/proxy-status-widget.tsx index ea42c35a..b7cd0a09 100644 --- a/ui/src/components/monitoring/proxy-status-widget.tsx +++ b/ui/src/components/monitoring/proxy-status-widget.tsx @@ -172,14 +172,6 @@ export function ProxyStatusWidget() { })() : null; - // Restart = stop then start - const handleRestart = async () => { - await stopProxy.mutateAsync(); - // Small delay to ensure port is released - await new Promise((r) => setTimeout(r, 500)); - startProxy.mutate(); - }; - // Remote mode: show remote server info if (isRemoteMode) { return ( @@ -303,7 +295,12 @@ export function ProxyStatusWidget() { : hasUpdate && 'bg-sidebar-accent hover:bg-sidebar-accent/90 text-sidebar-accent-foreground' )} - onClick={handleRestart} + onClick={() => { + const targetVersion = isUnstable + ? updateCheck?.maxStableVersion || versionsData?.latestStable + : updateCheck?.latestVersion; + if (targetVersion) handleInstallVersion(targetVersion); + }} disabled={isActioning || (!hasUpdate && !isUnstable)} title={ isUnstable