From 28b67e7721ace7f7eea2e23aa53405c402ae9c3b Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 7 Apr 2026 09:42:15 +0200 Subject: [PATCH 1/2] Fix updater button stuck on "Checking for updates" when already up to date The update-not-available event handler only logged but never sent an IPC message to the renderer, so the checking state was never cleared. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/main/index.ts | 8 ++++++-- src/preload/index.ts | 2 +- src/renderer/src/components/SettingsView.tsx | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index e2ffd3c..7632cfd 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -426,9 +426,13 @@ app.whenReady().then(() => { version: info.version }) }) - autoUpdater.on('update-not-available', (info) => + autoUpdater.on('update-not-available', (info) => { log.info('updater', `Up to date (${info.version})`) - ) + mainWindow?.webContents.send('update-status', { + status: 'up-to-date', + version: info.version + }) + }) autoUpdater.on('download-progress', (p) => log.info('updater', `Downloading: ${Math.round(p.percent)}%`) ) diff --git a/src/preload/index.ts b/src/preload/index.ts index f15f432..891cba7 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -7,7 +7,7 @@ import type { WorktreeInfo, BranchDetail, BranchFile, PrInfo } from '../shared/t import type { GitHubRepo, GitHubPR, GitHubIssue } from '../shared/types' export type UpdateStatus = - | { status: 'available' | 'ready'; version: string } + | { status: 'available' | 'ready' | 'up-to-date'; version: string } | { status: 'error'; message: string } export interface LogEntry { diff --git a/src/renderer/src/components/SettingsView.tsx b/src/renderer/src/components/SettingsView.tsx index 03b811b..4978eec 100644 --- a/src/renderer/src/components/SettingsView.tsx +++ b/src/renderer/src/components/SettingsView.tsx @@ -115,6 +115,9 @@ export default function SettingsView({ onBack }: SettingsViewProps): React.JSX.E {updateStatus?.status === 'ready' && ( v{updateStatus.version} ready to install )} + {updateStatus?.status === 'up-to-date' && ( + Up to date (v{updateStatus.version}) + )} {updateStatus?.status === 'error' && ( {updateStatus.message} )} From 2f397229dd84e1d468dda48417a78fb16225a08d Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 7 Apr 2026 13:42:43 +0200 Subject: [PATCH 2/2] Use shared UpdateStatus type in Sidebar VersionIndicator Replace inline type duplicate with the imported UpdateStatus type to fix type error from the new 'up-to-date' status variant. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/renderer/src/components/Sidebar.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/Sidebar.tsx b/src/renderer/src/components/Sidebar.tsx index b772672..0fe6b14 100644 --- a/src/renderer/src/components/Sidebar.tsx +++ b/src/renderer/src/components/Sidebar.tsx @@ -1,4 +1,5 @@ import { useState, useEffect, useRef } from 'react' +import type { UpdateStatus } from '../../../preload/index' import type { Project, Session, ViewMode } from '../types' import logoSvg from '../assets/logo.svg' @@ -442,9 +443,7 @@ function EnvScriptSection({ } function VersionIndicator(): React.JSX.Element { - const [update, setUpdate] = useState< - { status: 'available' | 'ready'; version: string } | { status: 'error'; message: string } | null - >(null) + const [update, setUpdate] = useState(null) useEffect(() => { return window.konductorAPI.onUpdateStatus((info) => setUpdate(info))