fix(updater): show feedback when check-for-update hits a mid-release draft (#215)

During a mid-release (draft version on GitHub), clicking "Check for Updates"
would silently return to idle with no user feedback. Now shows "You're on the
latest version" when the fallback confirms no published update is available.
This commit is contained in:
Jinjing 2026-03-29 20:26:06 -07:00 committed by GitHub
parent d4ec4cd912
commit c625ce882e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -130,6 +130,16 @@ async function sendCheckFailureStatus(message: string, userInitiated?: boolean):
String((fallbackError as Error)?.message ?? fallbackError)
)
}
// The fallback confirmed there is no published version newer than the
// current one (the only "newer" entry is a draft mid-release). Tell
// the user they're up-to-date so clicking "Check for Updates" doesn't
// appear to silently do nothing.
if (userInitiated) {
clearAvailableUpdateContext()
sendStatus({ state: 'not-available', userInitiated: true })
return
}
}
console.warn('[updater] benign check failure:', message)