Expand description
Update awareness and (where permitted) self-update.
On launch the app asks GitHub whether a newer stable kimun-notes-v* exists
and surfaces the result; on self-update-eligible channels it can also swap
the binary in place. All network and filesystem work here is blocking —
callers run it on tokio::task::spawn_blocking so the TUI never stalls.
Design: adr/0013 (channel restriction) and adr/0014 (hand-rolled mechanics).
User-owned config (update_check) lives in config.toml; machine-managed
state (throttle, last-known version, dismissals) lives in update_state.toml.
Structs§
- Latest
Release - The newest stable app release and everything needed to download it.
- Update
State - Update
Status - The outcome of an update check, ready to drive the UI.
Enums§
- Install
Channel - Update
Error - Anything that can go wrong during an update check or self-update.
Constants§
- CURRENT_
VERSION - The version compiled into this binary.
Traits§
- Release
Provider - Source of release information for the self-updater. Implement this and swap
the constructor in [
super::provider] to change backends without touching any caller.
Functions§
- apply
- Download, verify, and install
latest, replacing the running binary. Blocking — prefer the asyncinstall. - check
- Check for an update (blocking — prefer the async
check_now). - check_
now - Async
check— runs on the blocking pool so the caller’s runtime is never stalled. - dismiss
- Record that the user dismissed
version, suppressing the notification until a newer release appears. Writes onlyupdate_state.toml. - fetch_
latest - Fetch the full latest release (with downloadable assets), needed before
apply. Blocking — prefer the asynclatest_release. - install
- Async
apply— consumeslatestso it can move onto the blocking pool. - latest_
release - Async
fetch_latest. - releases_
url - Human-facing releases page for the active provider (shown when self-update isn’t available on the current install channel).
- status_
for - Compute the
UpdateStatusfor an already-fetchedlatestrelease and persist the check timestamp/version. Lets a caller that already holds aLatestRelease(the apply path) avoid a second GitHub round-trip.