Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(windows): keep automatic check failures silent on the check-only beta

reviewa98a383f5408
diff --git a/CLAUDE.md b/CLAUDE.md
index 3d49f566c..cb2700d17 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -9156,7 +9156,10 @@ only**: it builds `dist:win:release`, which stamps `nodeTermUpdates=manual` →
beside the installer + zip. The app checks the feed and shows the same "vX is available —
Download" card a Linux .deb gets; it never downloads, never installs on quit, and main refuses
`appRestartToUpdate` for any build that is not `self-install`/`dev` (`mayQuitAndInstall`), so
-`quitAndInstall` cannot run on the unsigned beta whatever the renderer sends. Local `dist:win`
+`quitAndInstall` cannot run on the unsigned beta whatever the renderer sends. A failed
+AUTOMATIC check on that marker build is logged, not carded (offline, or a mirror that does not
+serve `latest.yml` yet, must not raise an error card on every launch); a user-initiated check
+still reports its failure. Local `dist:win`
keeps `disabled` (never polls). Do not add `*.blockmap` (or a broad `*.yml`) to that job's
upload globs — differential downloads are the self-install leg, and it waits on signing; guarded
by `src/main/release-win-workflow.test.ts`. The nodeterm.dev/updates mirror serving `latest.yml`
diff --git a/src/main/updater.no-channel.test.ts b/src/main/updater.no-channel.test.ts
index 8c6a28f89..de5b715c1 100644
--- a/src/main/updater.no-channel.test.ts
+++ b/src/main/updater.no-channel.test.ts
@@ -248,6 +248,18 @@ describe('the unsigned Windows beta (manual marker)', () => {
expect(channels()).not.toContain(IPC.appUpdateNoChannel)
})
+ it('an automatic check failure stays silent; a user-initiated one still reports', async () => {
+ // electron-updater emits 'error' for the silent launch check too (offline, or a feed mirror
+ // that does not serve latest.yml yet) — that must not put an error card up on every launch.
+ updaterEvents['error']?.(new Error('HttpError: 404 latest.yml'))
+ expect(channels()).not.toContain(IPC.appUpdateError)
+ autoUpdater.checkForUpdates.mockImplementationOnce(() => Promise.reject(new Error('offline')))
+ check()
+ await Promise.resolve()
+ await Promise.resolve()
+ expect(channels()).toContain(IPC.appUpdateError)
+ })
+
it('refuses restart-to-update in main: quitAndInstall never runs', () => {
restart()
expect(autoUpdater.quitAndInstall).not.toHaveBeenCalled()
@@ -267,6 +279,14 @@ describe('restart-to-update elsewhere', () => {
expect(autoUpdater.quitAndInstall).toHaveBeenCalledTimes(1)
})
+ it('a Linux .deb still surfaces an update error event, as before', () => {
+ setPlatform('linux')
+ packageWith(undefined)
+ initUpdater()
+ updaterEvents['error']?.(new Error('boom'))
+ expect(channels()).toContain(IPC.appUpdateError)
+ })
+
it('a Linux .deb (manual-install) refuses it too', () => {
setPlatform('linux')
packageWith(undefined)
diff --git a/src/main/updater.ts b/src/main/updater.ts
index 349563068..264a958b9 100644
--- a/src/main/updater.ts
+++ b/src/main/updater.ts
@@ -11,7 +11,12 @@ import path from 'path'
// electron-vite v5's CJS interop.
import { autoUpdater } from 'electron-updater'
import { IPC } from '../shared/ipc'
-import { mayQuitAndInstall, toUpdateAvailablePayload, updateDelivery } from '../shared/update-platform'
+import {
+ MANUAL_UPDATE_MODE,
+ mayQuitAndInstall,
+ toUpdateAvailablePayload,
+ updateDelivery
+} from '../shared/update-platform'
import { getMainWindow, sendToMain } from './main-window'
import { retainUntilDismissed } from './notifications'
@@ -65,9 +70,10 @@ function packagedUpdateMode(): unknown {
export function initUpdater(onBeforeRestart?: () => void): void {
const send = (channel: string, payload?: unknown) => sendToMain(channel, payload)
+ const updateMode = packagedUpdateMode()
const delivery = updateDelivery({
isPackaged: app.isPackaged,
- updateMode: packagedUpdateMode(),
+ updateMode,
platform: process.platform,
hasAppImage: !!process.env.APPIMAGE
})
@@ -151,10 +157,18 @@ export function initUpdater(onBeforeRestart?: () => void): void {
autoUpdater.on('update-not-available', () => send(IPC.appUpdateNotAvailable))
+ // A check-only build (`nodeTermUpdates=manual`, the unsigned Windows beta) downloads nothing, so
+ // every 'error' event it can emit is a CHECK failure — and electron-updater emits one for the
+ // silent launch/6h checks too. The beta previously showed nothing at all; an error card on every
+ // launch (offline, or a feed mirror that does not serve latest.yml yet) would be a regression
+ // for exactly the users this notice exists for. So there the event is logged only; a
+ // user-initiated check still surfaces its failure through the catch below. Every other build
+ // keeps its historical behaviour.
+ const checkOnly = delivery === 'manual-install' && updateMode === MANUAL_UPDATE_MODE
autoUpdater.on('error', (err) => {
const message = err?.message ?? String(err)
console.error('[updater]', message)
- send(IPC.appUpdateError, message)
+ if (!checkOnly) send(IPC.appUpdateError, message)
})
// Manual check from Settings; surfaces failures to the card.