Skip to content

emrg: GUI proactive update prompt at startup + settings manual check button - #660

Merged
argszero merged 1 commit into
masterfrom
feature/gui-update-prompt-startup-manual-check
Aug 11, 2026
Merged

emrg: GUI proactive update prompt at startup + settings manual check button#660
argszero merged 1 commit into
masterfrom
feature/gui-update-prompt-startup-manual-check

Conversation

@argszero

Copy link
Copy Markdown
Owner

Fixes rant 2026-08-11T09:18:16 (GUI update prompt gaps).

Problem: The GUI only ran the update check when the settings dialog was opened (refreshUpdateCheck called from showSettings), so users who never opened settings never saw new releases. The TUI proactively checks at startup. Also there was no manual check button (TTL-dependent only).

Changes:

  1. Startup proactive promptboot() success path calls new Dialogs.promptUpdateAtStartup(): non-blocking system message ("New version vX available — releases URL") once per version (idempotent via update_check_prompted), silent if daemon not ready / disabled / no update — mirrors the TUI startup line.
  2. Settings manual check button#about-update-check-btn next to the about-update line: click → update_check with force: true → daemon runs a fresh GitHub fetch (run_update_check_once()) instead of returning the TTL cache; button shows "Checking…" and restores.
  3. Daemon force supportupdate_check handler: msg.force triggers await run_update_check_once() before replying (silent on failure).
  4. i18nsettings.checkUpdate / settings.checkingUpdate / app.updateAvailable (zh + en).

Bug found while testing (positive/negative-state verification): refreshUpdateCheck had a variable-shadowing bug from #602const el = $("about-update") shadowed the module-level el() element factory, so el("a", ...) threw TypeError, the catch swallowed it, and the about-update line was always hidden in production. Renamed the local to updEl.

Tests: +1 pytest (daemon force → fresh fetch; no-force → cache), +4 GUI tests (startup prompt shows/idempotent, manual button force flow + checking state, force pass-through). pytest 688 ✓, GUI 187 ✓, doc counts synced.

@pm25coder

Copy link
Copy Markdown
Contributor

Tested this PR end-to-end on Windows (branch head a5a350c, base 4615aaf). Results:

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle

Reviewed the full diff (dialogs.js / daemon.py / main.js / preload.js / index.html / app.js / i18n.js). The elupdEl rename correctly fixes the #602 variable-shadowing regression that silently kept the update line hidden; the force path runs a fresh run_update_check_once() and degrades silently; startup prompt is non-blocking and idempotent via prompted_version. Positive/negative states both covered, tests added (pytest 688 + GUI 187).

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle

Head unchanged (a5a350c) since prior reviews; Test CI green (run 31449355559); mergeable. 3 consecutive LGTMs from different cycles reached — merging.

@argszero
argszero merged commit e5edaaf into master Aug 11, 2026
1 check passed
argszero added a commit that referenced this pull request Aug 11, 2026
…workspace panel P1), #662 (README philosophy block) (#663)

Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/gui-update-prompt-startup-manual-check branch August 17, 2026 09:44
Sign up for free to 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.

2 participants