Tell people when a newer release is out (#1100)

At start, and at most once a day, a background thread asks GitHub for the latest stable
release (one HTTPS GET to releases/latest, nothing else sent; 15 s timeout; silent when
offline; GitHub's rate limit respected). When it is newer than this build, an Update button
appears next to Report a bug. It opens a window with the version, the release notes and
Download (the asset that fits this installation), Skip this version and Remind me later.

- Versions compare as semver; a nightly counts as the release it was built after, so it is
  offered only a newer stable release.
- The installation is detected (AppImage, Flatpak, Snap from the store or a file, deb, rpm,
  tar.gz, Windows MSI/portable/exe, macOS app); Download picks the fixed-name asset.
  Development builds and the Flatpak (no network permission) never check.
- Preferences > General > Updates: Check for updates automatically (on) and Check now.
- HTTP via ureq + rustls with the operating system's certificates (desktop app only).
- docs: Updates and privacy page.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-14 10:36:56 -04:00
1 parent 88432d226a
commit a6928abf48
21 files changed
+2969 -51

No files matched your search

+8
View File
@@ -131,6 +131,7 @@ pub mod titlebar;
pub mod toolbar;
pub mod toolbar_custom;
pub mod tools;
pub mod update;
pub mod viewport;
mod viewport_layout;
pub mod workspace;
@@ -212,6 +213,8 @@ pub struct Services {
pub show_in_folder: Option<Box<dyn Fn(&str)>>,
/// Where the host reads the anti-aliasing preference at start (a small JSON file).
pub graphics_path: Option<String>,
/// HTTPS GET for the update check (`update`); None: never check (browser, tests).
pub http_get: Option<update::HttpGet>,
}
pub struct SolveApp {
@@ -248,6 +251,8 @@ pub struct SolveApp {
pub issue_report: issue_report::ReportState,
/// The Crash Reports window.
pub crashes: crash_ui::CrashUi,
/// The update check and its window (`update`).
pub updater: update::Updater,
/// Toolbar buttons the user pinned, removed or reordered.
pub toolbar_custom: toolbar_custom::ToolbarCustom,
pub sketch_choices: sketch_families::Choices,
@@ -328,6 +333,7 @@ impl SolveApp {
help: help::HelpState::default(),
issue_report: issue_report::ReportState::default(),
crashes: crash_ui::CrashUi::default(),
updater: update::Updater::default(),
toolbar_custom: toolbar_custom::ToolbarCustom::default(),
sketch_choices: sketch_families::Choices::default(),
preferences: prefs::Prefs::default(),
@@ -1029,6 +1035,7 @@ impl SolveApp {
toolbar::shortcuts(self, ctx);
}
recovery_ui::tick(self);
update::tick(self, ctx);
if self.issue_report.draft.is_none() {
for f in ctx.input(|i| i.raw.dropped_files.clone()) {
let p = f.path().to_string_lossy().to_string();
@@ -1092,6 +1099,7 @@ impl SolveApp {
issue_report::CadInput::block(self, ui, report_input);
file_load::show(self, ui.ctx());
documents::prompt(self, ui.ctx());
update::show(self, ui.ctx());
if self.home.open {
home::show(self, ui);
if self.home.open {