Skip to content

feat(update): add in-app update checker (GitHub releases) - #59

Open
hikaps wants to merge 1 commit into
developfrom
auto-update
Open

feat(update): add in-app update checker (GitHub releases)#59
hikaps wants to merge 1 commit into
developfrom
auto-update

Conversation

@hikaps

@hikaps hikaps commented Aug 20, 2026

Copy link
Copy Markdown
Owner

What

In-app update check against api.github.com/repos/hikaps/couchplay/releases/latest. No self-updater — the app only checks and informs; users update by re-running the README install command (per install method).

Why

Users had no in-app way to learn a new release exists. Distribution stays GitHub releases + install.sh; a bespoke updater would need root to replace the helper/sysext (attack surface), and Flathub is incompatible with the root-helper architecture — so a thin check + guidance is the right scope.

Changes

  • UpdateChecker (new QML_ELEMENT manager): version normalize/compare, latest-tag JSON parse, install-method detection (/.flatpak-info, /etc/os-release ID=steamos), QNetworkAccessManager request with UA + Accept: application/vnd.github+json, 10s transfer timeout, silent Error state (offline-safe), checkFinished(automatic, updateAvailable, latestVersion).
  • SettingsManager: persisted checkForUpdatesAutomatically (default on, group General).
  • Main.qml: startup auto-check (gated by the toggle) + one passive notification per launch when a stable release is newer.
  • SettingsPage: new "Software Update" section — status row, latest release, "Check Now", auto-check toggle, per-method guidance InlineMessage + "Open Releases Page" action.
  • tests/test_updatechecker: version compare (v-prefix, missing components), parse, state transitions, setting default.
  • appiumtests/test_settings.py: test_update_section_visible presence guard.
  • CMake: Qt6::Network for app + test targets.

Verification

  • test_updatechecker + full 18-binary suite pass in CI (ci.yml runs on this PR).
  • Live endpoint sanity: GET /releases/latestv0.4.0 (= current build → app reports "up to date").
  • e2e settings guard runs on push to develop (e2e.yml).
  • Note: guidance says "re-run the install command" — flatpak update is deliberately not mentioned because the bundle install has no working origin remote. install.sh untouched; if flatpak bundle reinstall over an existing install ever proves to be a no-op, switch install_flatpak() to flatpak install --user --or-update -y.

Checks api.github.com/repos/hikaps/couchplay/releases/latest on startup
(toggleable via Settings, default on) and via a manual 'Check Now' button
in a new Settings 'Software Update' section. Compares versions, shows a
passive notification once per launch when a stable release is newer, and
guides the user per install method (flatpak / steamos / native) to re-run
the README install command. App never downloads or executes anything.

- UpdateChecker manager (QML_ELEMENT): parse/compare/install-method
  helpers, QNetworkAccessManager request with UA + Accept headers,
  10s transfer timeout, silent error state
- SettingsManager: persisted checkForUpdatesAutomatically (default true)
- SettingsPage: status row, latest release, Check Now, auto-check toggle,
  per-method guidance InlineMessage with releases-page action
- tests/test_updatechecker: version compare/parse/state/setting-default
- appiumtests: update-section visibility guard
- CMake: Qt6::Network wired for app and test targets
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.

1 participant