fix(electron): preserve changelog on download + reliable restart-to-update

- useUpdateStore: keep sidecar-sourced body when merging fresh desktopInfo
  (electron-updater returns 'See release notes at ...' which clobbered it)
- main.mjs: defer quitAndInstall/relaunch via setImmediate so IPC reply
  flushes first; wire update-downloaded and error events; log restart path
This commit is contained in:
Bohdan Triapitsyn
2026-04-22 00:57:58 +03:00
parent 2a0aef89d5
commit be65a9bd1f
2 changed files with 34 additions and 7 deletions
+4
View File
@@ -244,6 +244,10 @@ export const useUpdateStore = create<UpdateStore>()((set, get) => ({
? {
...state.info,
...desktopInfo,
// Keep the richer sidecar-sourced changelog; desktopInfo.body is
// often the bare "See release notes at..." fallback from the
// updater and would otherwise clobber the nice changelog.
body: state.info.body || desktopInfo.body,
available: state.info.available,
}
: desktopInfo,