Skip to content

emrg: upgrade-complete notification — GUI banner + one-click restart to apply - #894

Merged
argszero merged 1 commit into
masterfrom
feature/upgrade-notification-banner
Aug 20, 2026
Merged

emrg: upgrade-complete notification — GUI banner + one-click restart to apply#894
argszero merged 1 commit into
masterfrom
feature/upgrade-notification-banner

Conversation

@argszero

Copy link
Copy Markdown
Owner

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)

  1. daemon.py — pong response now carries current_version (reads ~/.emrg/install/version.txt; raw data only, zero judgment — GUI does the comparison). New _current_installed_version() helper.
  2. main.js / preload.jscurrent_version passed through init + status events; new emrg:restartDaemon IPC sends shutdown (source=gui-restart). Restart path = GUI sends shutdown → connManager restart-recovery (all-drop within window) → ensureDaemon respawns the new code — GUI is already the daemon lifecycle owner, no subprocess CLI.
  3. renderer app.js — tracks lastKnownVersion; maybeShowUpgradeBanner() compares each status pong and shows the banner on version change; restart button calls window.emrg.restartDaemon(); dismiss button hides.
  4. index.html / layout.css#upgrade-banner with message + restart button (reuses banner styles).
  5. i18n.js — zh/en keys for banner message, restart button, failure toast.
  6. Tests — daemon: pong includes current_version (+ missing-file → ""); GUI: banner shows on version change / stays hidden when unchanged / restart wiring asserts (renderer 125 pass).

Verification

Design notes

  • No auto-restart: only the user clicking the button restarts (per host design — notify + user action, upgraded from verbal prompt to one-click button).
  • The restart button is a product feature (user-initiated), NOT a test — it does not violate the ⛔ no-stop/restart-test red line (that covers test cases; a product restart button is normal functionality).

…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

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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)

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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)

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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)

@argszero
argszero merged commit 984b2cf into masterAug 20, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 20, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/upgrade-notification-banner branch August 23, 2026 02:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero