#39 - The app says when a newer version is out, and opens its download page #43

Merged
eliott merged 2 commits from feat/39-new-version-notice into main 2026-11-20 22:48:13 +01:00
Owner

When a newer Rollscan has been released, the app now says so: a Version X.Y.Z is out button shows up in the top bar, and pressing it opens that release's page in the browser, where the new installer is. Nothing is downloaded or installed by the app: you update the way you installed it.

Part of #39

How it works

  • The app asks Forgejo's API (/api/v1/repos/RollNote/rollscan/releases/latest) once a run, the first time the page asks for GET /api/new-version. The answer is kept until the app quits.
  • Only plain X.Y.Z tags count, compared as numbers (0.10.0 beats 0.9.0). Drafts, pre-releases and other tag names are ignored.
  • The page never sends a link: POST /api/new-version/open opens a URL built by the app (.../releases/tag/<tag>) with the same command as "Show scans in the file manager" (xdg-open, open, explorer.exe). folders::open_folder_command became open_command for that.
  • With no network, or if Forgejo is down, the page shows nothing and the app log gets a WARNING line.
  • New dependency: ureq (rustls with ring, Mozilla's root certificates built in), so there's no OpenSSL to install and nothing new is needed to build on Windows.
  • Downloading and installing updates automatically (the rest of #39) is left out on purpose: it needs signed builds and a latest.json put together at every release.

Tested

  • cargo test: 306 passed (4 new tests in updates.rs for comparing versions and ignoring releases that don't count).
  • On Arch Linux, --no-window against the real Forgejo: at 0.7.0 the answer is null. Built as 0.6.2 for the check only (not committed), the answer is {"version":"0.7.0", ...} and the button shows "Version 0.7.0 is out" in the bar (checked in a browser).
  • Forgejo out of reach (a proxy that refuses connections): the answer is null, the button doesn't show, and the log says can't tell whether a newer version is out: ... Connection refused.

Not tested

  • Pressing the button: it wasn't clicked, so opening the release page in the browser wasn't seen to work on any system.
  • Windows and macOS: not built or run. The ureq/rustls build on Windows (MSVC) is untested.
  • The app's own window (Tauri): only checked in a browser with --no-window.

Changes in behaviour

  • Each time it opens, the app now makes one HTTPS request to forgejo.eliottbidault.fr. docs/installation.md#updating says so.
When a newer Rollscan has been released, the app now says so: a **Version X.Y.Z is out** button shows up in the top bar, and pressing it opens that release's page in the browser, where the new installer is. Nothing is downloaded or installed by the app: you update the way you installed it. Part of #39 ## How it works - The app asks Forgejo's API (`/api/v1/repos/RollNote/rollscan/releases/latest`) once a run, the first time the page asks for `GET /api/new-version`. The answer is kept until the app quits. - Only plain `X.Y.Z` tags count, compared as numbers (`0.10.0` beats `0.9.0`). Drafts, pre-releases and other tag names are ignored. - The page never sends a link: `POST /api/new-version/open` opens a URL built by the app (`.../releases/tag/<tag>`) with the same command as "Show scans in the file manager" (`xdg-open`, `open`, `explorer.exe`). `folders::open_folder_command` became `open_command` for that. - With no network, or if Forgejo is down, the page shows nothing and the app log gets a `WARNING` line. - New dependency: `ureq` (rustls with ring, Mozilla's root certificates built in), so there's no OpenSSL to install and nothing new is needed to build on Windows. - Downloading and installing updates automatically (the rest of #39) is left out on purpose: it needs signed builds and a `latest.json` put together at every release. ## Tested - `cargo test`: 306 passed (4 new tests in `updates.rs` for comparing versions and ignoring releases that don't count). - On Arch Linux, `--no-window` against the real Forgejo: at `0.7.0` the answer is `null`. Built as `0.6.2` for the check only (not committed), the answer is `{"version":"0.7.0", ...}` and the button shows "Version 0.7.0 is out" in the bar (checked in a browser). - Forgejo out of reach (a proxy that refuses connections): the answer is `null`, the button doesn't show, and the log says `can't tell whether a newer version is out: ... Connection refused`. ## Not tested - Pressing the button: it wasn't clicked, so opening the release page in the browser wasn't seen to work on any system. - Windows and macOS: not built or run. The `ureq`/rustls build on Windows (MSVC) is untested. - The app's own window (Tauri): only checked in a browser with `--no-window`. ## Changes in behaviour - Each time it opens, the app now makes one HTTPS request to forgejo.eliottbidault.fr. `docs/installation.md#updating` says so.
feat(app): say in the top bar when a newer version is out
All checks were successful
website / build (pull_request) Successful in 43s
985d4948d4
The app asks Forgejo for the latest release once a run. When it is newer
than the running version, the top bar shows "Version X.Y.Z is out", which
opens the release page in the browser. Nothing is downloaded or installed.

Refs #39
chore(release): 0.8.0
All checks were successful
website / build (pull_request) Successful in 43s
932576fe1e
eliott merged commit 72450604a2 into main 2026-11-20 22:48:13 +01:00
eliott deleted branch feat/39-new-version-notice 2026-11-20 22:48:13 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollscan!43
No description provided.