feat #14740: check for updates from the settings

Adds a "Nach Updates suchen" button to the settings' new Updates section,
next to the app's own version. It runs check_for_update_now, the very same
feed check the background loop uses (one implementation, shared via
UpdateSchedule), so a manual check counts as an attempt for the same
scheduler: success resets the 6 h interval and the failure count, a failure
advances the backoff by one step, and a manual and a background check never
run at the same time (serialized).

An available update leaves the same state the background check does, so the
main window's banner still shows it; the settings also show it inline with
the existing "Installieren & neu starten" button and busy guard/hint. "None"
and "error" results are shown inline (unlike the background check, which
never surfaces its errors). On Linux (can_self_update) the button still asks
the feed but offers no install, since Debian builds never self-update.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 15:38:35 +01:00
co-authored by Claude Sonnet 5
parent 1735f431dd
commit 96eec22971
7 changed files with 337 additions and 36 deletions
+6 -1
View File
@@ -209,7 +209,12 @@ impl AppState {
pending_prompts: Mutex::new(VecDeque::new()),
processing: Mutex::new(HashSet::new()),
devices_busy: AtomicBool::new(false),
backend_url: crate::backend::BACKEND_URL.to_string(),
// Defensive: BACKEND_URL itself must never have a trailing
// slash (see backend::tests::backend_urls_have_no_trailing…),
// but a stored key's base_url is compared against this field.
backend_url: crate::backend::BACKEND_URL
.trim_end_matches('/')
.to_string(),
backend_key_lock: Mutex::new(()),
uploading: Mutex::new(HashSet::new()),
}