Commit a4136d8
chore: release v1.0.4 — update banner clears after a successful self-update
The "Updating… Installing vX" banner stayed up forever after an update that
had already completed (the header showed the new version, the banner did not).
Cause: dpkg restarts the gateway *mid-install*, so the daemon reads
.update-status.json at boot while it still says "installing" — the value the
updater wrote before apt-get returned. The update oneshot (own cgroup) writes
the terminal "success"/"error" a moment later, but the WebSocket is gone and
the daemon never re-reads the file, so "success" is never broadcast and the
UI's `updating` flag never clears.
Fix: when the daemon boots into an in-flight (downloading/installing) state,
poll the status file once a second (up to 2 min) until it settles, then
broadcast the terminal status. The timer is unref()'d so it never holds the
process open, and it's a no-op on every normal boot.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1404e49 commit a4136d8
3 files changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
185 | 208 | | |
186 | 209 | | |
187 | 210 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments