emrg: GUI proactive update prompt at startup + settings manual check button - #660
Merged
Merged
Conversation
…button (rant 2026-08-11T09:18:16)
Contributor
argszero
commented
Aug 11, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle
Reviewed the full diff (dialogs.js / daemon.py / main.js / preload.js / index.html / app.js / i18n.js). The el → updEl 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (
refreshUpdateCheckcalled fromshowSettings), 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:
boot()success path calls newDialogs.promptUpdateAtStartup(): non-blocking system message ("New version vX available — releases URL") once per version (idempotent viaupdate_check_prompted), silent if daemon not ready / disabled / no update — mirrors the TUI startup line.#about-update-check-btnnext to the about-update line: click →update_checkwithforce: true→ daemon runs a fresh GitHub fetch (run_update_check_once()) instead of returning the TTL cache; button shows "Checking…" and restores.forcesupport —update_checkhandler:msg.forcetriggersawait run_update_check_once()before replying (silent on failure).settings.checkUpdate/settings.checkingUpdate/app.updateAvailable(zh + en).Bug found while testing (positive/negative-state verification):
refreshUpdateCheckhad a variable-shadowing bug from #602 —const el = $("about-update")shadowed the module-levelel()element factory, soel("a", ...)threw TypeError, the catch swallowed it, and the about-update line was always hidden in production. Renamed the local toupdEl.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.