Commit ca36927
fix(updater): surface download failures and dev-mode no-op in UI
Two symptoms collapsed into the same report: "click Download, button
disables briefly, re-enables, nothing happens."
1. In dev mode `app.isPackaged` is false and `downloadUpdate` silently
returned a snapshot. The renderer saw no state change and gave up.
Now we emit a state='error' with a human message explaining updates
require a packaged build.
2. In prod, if electron-updater's `downloadUpdate()` rejects (network,
signature check, missing platform yml), the catch set state='error'
but never surfaced the error to the foreground toast. Now the
renderer inspects the returned snapshot and toasts whatever error
string came back.
3. Optimistically transition state → 'downloading' the moment
downloadUpdate is called, and → 'ready' on promise resolution —
some platforms race the `update-downloaded` event past our await.
Added main-side console.log around downloadUpdate so future reports
show what actually happened.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4032f11 commit ca36927
2 files changed
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
163 | 183 | | |
| 184 | + | |
164 | 185 | | |
165 | 186 | | |
166 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
0 commit comments