emrg: upgrade-complete notification — GUI banner + one-click restart to apply - #894
Conversation
…to apply (rant 2026-08-20T18:30:57) - daemon pong now carries current_version (reads ~/.emrg/install/version.txt, raw data, zero judgment) - main.js init + status events pass current_version through; new emrg:restartDaemon IPC sends shutdown (source=gui-restart) - renderer: tracks lastKnownVersion, shows upgrade banner on version change, restart button triggers daemon restart (connManager restart-recovery respawns new code) - i18n keys zh/en; index.html + CSS banner; tests: daemon pong current_version + GUI banner pos/neg + restart wiring
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 1 (10 files +195/−3: daemon pong carries current_version raw data; GUI compares lastKnownVersion → upgrade banner + one-click restart via shutdown + connManager respawn; tests: daemon current_version + GUI banner pos/neg + restart wiring; pytest 982 + GUI 247 green, test + test-windows CI PASS)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 2 (independent re-review: daemon pong current_version + GUI upgrade banner + one-click restart; pytest 982 + GUI 247 green; test + test-windows CI PASS)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 3 (independent re-review of the full diff: daemon pong current_version is raw data only; GUI maybeShowUpgradeBanner compares against lastKnownVersion with no-repeat guard; one-click restart via shutdown + connManager respawn is clean; daemon test covers present/missing file + pong payload; banner smoke tests cover pos/neg. pytest 982 + GUI 247 green, test + test-windows CI PASS)
Summary
Host decision rant 2026-08-20T18:30:57: after auto-upgrade (#882) the user must be notified and able to apply the new version with one click (restart the daemon process — GUI restart does NOT restart the daemon; the daemon process must be restarted to load new code).
Changes (10 files, +195/−3)
current_version(reads~/.emrg/install/version.txt; raw data only, zero judgment — GUI does the comparison). New_current_installed_version()helper.current_versionpassed through init + status events; newemrg:restartDaemonIPC sendsshutdown(source=gui-restart). Restart path = GUI sends shutdown → connManager restart-recovery (all-drop within window) →ensureDaemonrespawns the new code — GUI is already the daemon lifecycle owner, no subprocess CLI.lastKnownVersion;maybeShowUpgradeBanner()compares each status pong and shows the banner on version change; restart button callswindow.emrg.restartDaemon(); dismiss button hides.#upgrade-bannerwith message + restart button (reuses banner styles).Verification
Design notes