feat(updater): in-app nightly release channel#497
Conversation
… can return to stable
A prerelease sorts below its own base in SemVer, so `0.15.0-nightly.<ts>` would be seen as older than stable 0.15.0 and never offered. Bake the NEXT patch as the base (`0.15.1-nightly.<ts>`) so a nightly always supersedes the current stable, and any real next release (patch/minor/major) supersedes the nightly. A stable cut promotes the channel by shipping that base without the `-nightly.<ts>` suffix.
| /// Defaults to the built-in instance when unset. | ||
| pub tabularium_registry_url: Option<String>, | ||
| /// Update channel: "stable" (default) or "nightly". None ⇒ stable. | ||
| pub release_channel: Option<String>, |
There was a problem hiding this comment.
CRITICAL: release_channel is not persisted by save_config
The save_config function explicitly merges every field with if config.X.is_some(), but release_channel has no corresponding block. When the frontend calls updateSetting("releaseChannel", "nightly"), the backend receives an AppConfig where only release_channel is Some, and the field is silently dropped. The channel selector appears to work in the UI but resets on app restart.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| echo "Patched version to $v" | ||
|
|
||
| - uses: tauri-apps/tauri-action@v0.6.1 | ||
| env: |
There was a problem hiding this comment.
WARNING: sed -i fails on macOS BSD sed
This step runs on all platforms including macOS runners, but sed -i without a backup extension is a GNU-ism. BSD sed on macOS requires sed -i '' or sed -i.bak, causing the macOS build to fail.
| env: | |
| sed -i.bak "0,/^version = \".*\"/s//version = \"$v\"/" src-tauri/Cargo.toml && rm -f src-tauri/Cargo.toml.bak |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (8 files)
Fix these issues in Kilo Cloud Reviewed by kimi-k2.6 · Input: 143K · Output: 34.2K · Cached: 1.9M |
What
Adds an in-app release channel selector (Stable / Nightly) so users on direct installs can opt into nightly builds and receive in-app updates from the newest
nightly-*prerelease. Default stays stable — nothing changes for users who never touch the setting.Follow-up to #419 (nightly workflow) and #490 (glibc container).
How it works
AppConfig.release_channel("stable"default |"nightly"), persisted like the other update settings. Single source of truth — the channel never crosses the IPC boundary.updater.rs): for the nightly channel,check_for_updates/download_and_install_updateresolve the newestnightly-*prerelease at runtime (GitHub/releases→ newest bypublished_at), read itslatest.jsonasset URL, and override thetauri-plugin-updaterendpoint with it. Stable path is untouched. Nightlies are signed with the same key, so the existingtauri.conf.jsonpubkey validates them — no key work.InfoTab.tsx): segmented Stable/Nightly control in the Updates section, only for direct installs (installationSource == null); managed installs (AUR/Snap/Flatpak) keep the existing "managed by package manager" note. Nightly shows a warning banner.Versioning (the important part)
The updater compares via SemVer, where a prerelease sorts below its base — so a naive
0.15.0-nightly.<ts>would be seen as older than stable0.15.0and never offered. To fix this, the nightly build bakes the next patch as its base:mainversion bump needed; the base auto-trackstauri.conf.json.A stable release then "promotes" the channel by shipping that same base without the
-nightly.<ts>suffix (convention on the release cut for now; automating it in the release path is a follow-up, since it touches the production release process).Also hardens
is_newer_versionwith a SemVer fallback so a user running a nightly build can still be offered the stable release when switching back to the stable channel (the old 3-part-only parser returnedfalsefor prerelease versions, stranding them).Testing
select_newest_nightly,nightly_latest_json_url) and the prerelease version comparison (is_newer_versionnightly↔stable ordering).cargo test updater::→ 25 pass.InfoTabtests — selector renders on direct install, persists the channel, hidden for managed installs. 4 pass.nightly-20260718-e8e729crelease (its signedlatest.jsonvalidates against the pubkey).Notes / out of scope
-nightlysuffix cleanly. Documented here; release-path automation is a follow-up.