Conversation
… auto-update scheduling - Add check_tauri_update Tauri command that fetches the latest.json manifest from GitHub releases and delegates to the updater plugin, bypassing the hardcoded endpoint limitation - Persist server JAR release version in a sidecar version file so the displayed version survives JAR upgrades that strip metadata - Replace one-shot server auto-update flag with a proper interval scheduler (24h, persisted via localStorage) - Move update status alerts inline with their respective settings sections; show current app/JAR versions next to each heading - Fix Maven release build to pass -Drevision so the packaged JAR carries the correct version string Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🤖 Augment PR SummarySummary: This PR reworks desktop and server update handling for the Tauri app to be driven by GitHub release metadata, while improving server auto-update scheduling and UI status display. Changes:
Technical notes: GitHub Releases are queried once and reused for both server JAR and Tauri manifest discovery; the updater command returns metadata plus a resource handle ( 🤖 Was this summary useful? React with 👍 or 👎 |
| } | ||
|
|
||
| serverAutoUpdateInFlightRef.current = true; | ||
| recordCheckAttempt(); |
There was a problem hiding this comment.
app/tauri/src/App.tsx:226 recordCheckAttempt() runs after setting serverAutoUpdateInFlightRef.current = true; if localStorage.setItem throws (quota/disabled), the in-flight flag never resets and scheduled auto-updates can be skipped until restart. Consider ensuring the flag reset/scheduling is robust against storage exceptions.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| const update = await check(); | ||
| const metadata = await invoke<TauriUpdateMetadata | null>("check_tauri_update"); | ||
| const update = metadata ? new Update(metadata) : null; | ||
| updateRef.current = update; |
There was a problem hiding this comment.
app/tauri/src/App.tsx:428 updateRef.current is overwritten without closing any previously-held Update; with check_tauri_update storing updates in the Rust resources_table, repeated checks (or checking and not installing) can leak resources for the lifetime of the webview. Consider ensuring prior updates are close()d when replaced/abandoned.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| let _ = std::fs::remove_file(&backup_path); | ||
| } | ||
|
|
||
| std::fs::write(&version_path, format!("{}\n", release.version)).map_err(|e| e.to_string())?; |
There was a problem hiding this comment.
app/tauri/src-tauri/src/lib.rs:466 If persisting huntly-server.version fails after the JAR has already been swapped in, install_server_update returns an error even though the update itself succeeded, which can leave UI/state inconsistent. Consider whether failure to write the sidecar version should be treated as non-fatal or surfaced separately from install success.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| let version = tag_name.strip_prefix(TAURI_RELEASE_TAG_PREFIX)?; | ||
| let version_parts: Vec<&str> = version.split('.').collect(); | ||
| if version_parts.len() < 3 | ||
| || !version_parts.iter().take(3).all(|part| { |
There was a problem hiding this comment.
app/tauri/src-tauri/src/lib.rs:538 tauri_release_version only checks that the first character of each of the first 3 dot-separated components is a digit, so tags like tauri/v1.2.3-rc1 would be treated as valid stable versions if the GitHub release isn't marked prerelease. That could cause latest.json selection to include unintended tags.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Summary
check_tauri_updateTauri command that fetches thelatest.jsonmanifest from GitHub releases and uses the updater plugin, removing the dependency on a hardcoded update endpoint.versionfile so the displayed version survives in-place JAR upgrades that strip embedded metadatalocalStorage, with correct cleanup on unmount/toggle-Drevisionso the packaged JAR carries the correct version stringTest plan
huntly-server.versionfile is written to app data dir after a successful server JAR install./mvnw clean verifypasses and the packaged JAR name includes the correct version🤖 Generated with Claude Code