Skip to content

feat(updater): in-app nightly release channel - #497

Merged
debba merged 14 commits into
TabularisDB:mainfrom
NewtTheWolf:feat/nightly-update-channel
Jul 26, 2026
Merged

feat(updater): in-app nightly release channel#497
debba merged 14 commits into
TabularisDB:mainfrom
NewtTheWolf:feat/nightly-update-channel

Conversation

@NewtTheWolf

Copy link
Copy Markdown
Collaborator

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

  • Config: new AppConfig.release_channel ("stable" default | "nightly"), persisted like the other update settings. Single source of truth — the channel never crosses the IPC boundary.
  • Backend (updater.rs): for the nightly channel, check_for_updates / download_and_install_update resolve the newest nightly-* prerelease at runtime (GitHub /releases → newest by published_at), read its latest.json asset URL, and override the tauri-plugin-updater endpoint with it. Stable path is untouched. Nightlies are signed with the same key, so the existing tauri.conf.json pubkey validates them — no key work.
  • UI (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 stable 0.15.0 and never offered. To fix this, the nightly build bakes the next patch as its base:

0.15.0 (stable)  →  nightly = 0.15.1-nightly.<UTC-ts>
0.15.0  <  0.15.1-nightly.<ts₁>  <  0.15.1-nightly.<ts₂>  <  0.15.1 (next stable)
  • A nightly always supersedes the current stable.
  • Any real next release (patch/minor/major) supersedes the nightly.
  • No manual main version bump needed; the base auto-tracks tauri.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_version with 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 returned false for prerelease versions, stranding them).

Testing

  • Rust: unit tests for nightly resolution (select_newest_nightly, nightly_latest_json_url) and the prerelease version comparison (is_newer_version nightly↔stable ordering). cargo test updater:: → 25 pass.
  • Frontend: InfoTab tests — selector renders on direct install, persists the channel, hidden for managed installs. 4 pass.
  • The channel resolution was verified end-to-end against the real nightly-20260718-e8e729c release (its signed latest.json validates against the pubkey).

Notes / out of scope

  • Version bump convention: when cutting a stable release, bump to the current nightly base so it drops the -nightly suffix cleanly. Documented here; release-path automation is a follow-up.
  • Channel-scoped update cache (nightly path currently skips the cache) and deduping the stable check onto the plugin-updater are left as follow-ups.

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.
Comment thread src-tauri/src/config.rs
Comment thread .github/workflows/build.yml
@kilo-code-bot

kilo-code-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src-tauri/src/config.rs 67 release_channel not persisted by save_config

WARNING

File Line Issue
.github/workflows/build.yml 147 sed -i fails on macOS BSD sed
Files Reviewed (8 files)
  • .github/workflows/build.yml - 1 issue
  • .github/workflows/nightly.yml - 0 issues
  • src-tauri/src/config.rs - 1 issue
  • src-tauri/src/updater.rs - 0 issues
  • src/components/settings/InfoTab.tsx - 0 issues
  • src/contexts/SettingsContext.ts - 0 issues
  • src/i18n/locales/en.json - 0 issues
  • tests/components/settings/InfoTab.test.tsx - 0 issues

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit 65b7155)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 65b7155)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src-tauri/src/config.rs 67 release_channel not persisted by save_config

WARNING

File Line Issue
.github/workflows/build.yml 147 sed -i fails on macOS BSD sed
Files Reviewed (8 files)
  • .github/workflows/build.yml - 1 issue
  • .github/workflows/nightly.yml - 0 issues
  • src-tauri/src/config.rs - 1 issue
  • src-tauri/src/updater.rs - 0 issues
  • src/components/settings/InfoTab.tsx - 0 issues
  • src/contexts/SettingsContext.ts - 0 issues
  • src/i18n/locales/en.json - 0 issues
  • tests/components/settings/InfoTab.test.tsx - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit d26a884)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src-tauri/src/config.rs 67 release_channel not persisted by save_config

WARNING

File Line Issue
.github/workflows/build.yml 147 sed -i fails on macOS BSD sed
Files Reviewed (8 files)
  • .github/workflows/build.yml - 1 issue
  • .github/workflows/nightly.yml - 0 issues
  • src-tauri/src/config.rs - 1 issue
  • src-tauri/src/updater.rs - 0 issues
  • src/components/settings/InfoTab.tsx - 0 issues
  • src/contexts/SettingsContext.ts - 0 issues
  • src/i18n/locales/en.json - 0 issues
  • tests/components/settings/InfoTab.test.tsx - 0 issues

Fix these issues in Kilo Cloud


Reviewed by ling-3.0-flash-free · Input: 83.6K · Output: 22.1K · Cached: 461.1K

debba and others added 7 commits July 20, 2026 15:08
- release_channel was missing from the save_config merge block, so the
  nightly channel selection was silently dropped on every save
- skip package-manager detection in debug builds: the AUR check inspects
  the system-wide pacman database and matched a tabularis-bin package
  installed alongside the dev environment
- log channel, current version and resolved release on every update
  check to make channel issues diagnosable
Tauri's MSI (WiX) and NSIS bundlers reject non-numeric or multi-part
prerelease identifiers (tauri-apps/tauri#8038, #5286), so `0.15.1-nightly.<ts>`
would fail the Windows build entirely. Switch to `<next-patch>-<run_number>`
(single numeric, monotonic, small) which orders correctly and is bundler-safe.
Readable date/sha stays in the tag + release name.
…sion override

detect_installation_source returned early on debug_assertions, which also
short-circuited the env-based snap/flatpak checks — so the snap/flatpak
tests always saw None. Scope the guard to just the AUR pacman-db lookup
(the only part that misbehaves in dev), leaving env detection intact.

Also make the Cargo.toml version sed portable (sed -i.bak + rm) so the
nightly version override doesn't fail on macOS BSD sed.
@debba
debba merged commit 1327328 into TabularisDB:main Jul 26, 2026
2 checks passed
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.

2 participants