Skip to content

Default nightly desktop builds to the nightly update channel#2049

Merged
juliusmarminge merged 4 commits intomainfrom
t3code/57d1e545
Apr 16, 2026
Merged

Default nightly desktop builds to the nightly update channel#2049
juliusmarminge merged 4 commits intomainfrom
t3code/57d1e545

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Apr 15, 2026

Summary

  • Added shared update-channel helpers to पहचान nightly desktop versions and match incoming update artifacts to the selected channel.
  • Defaulted packaged nightly builds to the nightly update channel while keeping stable builds on latest.
  • Hardened desktop auto-update handling so update-available events are ignored when the published version does not match the active channel.
  • Updated desktop settings loading to preserve legacy nightly settings and added coverage for the new defaults and channel matching logic.

Testing

  • Added Vitest coverage in apps/desktop/src/updateChannels.test.ts for nightly version detection, default channel resolution, and channel/version matching.
  • Added Vitest coverage in apps/desktop/src/desktopSettings.test.ts for nightly defaults and legacy nightly settings without an explicit update track.
  • Not run: bun fmt
  • Not run: bun lint
  • Not run: bun typecheck
  • Not run: bun run test

Note

Medium Risk
Changes affect update-channel selection, settings migration, and auto-update event handling, which can alter upgrade/downgrade behavior for existing users (especially legacy nightly installs).

Overview
Nightly desktop builds now default to the nightly update channel based on the packaged version string, via new shared helpers in updateChannels.ts (also used for stage labeling in appBranding.ts).

Desktop settings loading is now version-aware (readDesktopSettings(settingsPath, appVersion)) and persists a new updateChannelConfiguredByUser flag to distinguish explicit user choice from defaults; legacy settings are migrated so nightly builds without an explicit choice roll onto nightly while explicit stable picks are preserved.

The auto-updater in main.ts is hardened to ignore update-available events whose info.version doesn’t match the currently selected channel, preventing stable/nightly cross-channel prompts; nightly release tooling/docs are also updated so nightly versions are derived from the next patch (e.g., 0.0.17 -> 0.0.18-nightly.*).

Reviewed by Cursor Bugbot for commit 93ce4e8. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Default nightly desktop builds to the nightly update channel

  • Nightly app versions (matching -nightly.YYYYMMDD.N suffix) now default to the nightly update channel; stable builds continue to default to latest. Logic is centralized in updateChannels.ts.
  • Adds updateChannelConfiguredByUser to DesktopSettings to distinguish explicit user preference from the version-derived default. Legacy settings without this flag are treated as user-configured only if they previously selected nightly.
  • The auto-updater now ignores available releases that don't match the selected channel, preventing cross-channel updates from surfacing.
  • Nightly release scripts now use the next patch version as the semver base (e.g. 0.0.170.0.18-nightly.*) via the new resolveNightlyTargetVersion function.
  • Behavioral Change: existing nightly users with a persisted latest channel and no explicit updateChannelConfiguredByUser flag will be migrated to the nightly channel on next launch.

Macroscope summarized 93ce4e8.

- Centralize desktop version/channel detection
- Prefer nightly settings for packaged nightly builds
- Ignore auto-update offers that do not match the selected channel
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 73db8c74-60cb-46f6-89b2-b68e8ff3e169

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/57d1e545

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Apr 15, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Periodic nightly checks fail after stable-to-nightly switch
    • Restored allowDowngrade = channel === "nightly" in applyAutoUpdaterChannel so that all update check paths (startup, poll, menu) correctly allow downgrades on the nightly channel, enabling discovery of semver-lower nightly pre-release versions.

Create PR

Or push these changes by commenting:

@cursor push bd53a5b84b
Preview (bd53a5b84b)
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -1139,9 +1139,9 @@
 function applyAutoUpdaterChannel(channel: DesktopUpdateChannel): void {
   autoUpdater.channel = channel;
   autoUpdater.allowPrerelease = channel === "nightly";
-  autoUpdater.allowDowngrade = false;
+  autoUpdater.allowDowngrade = channel === "nightly";
   console.info(
-    `[desktop-updater] Using update channel '${channel}' (allowPrerelease=${channel === "nightly"}, allowDowngrade=false).`,
+    `[desktop-updater] Using update channel '${channel}' (allowPrerelease=${channel === "nightly"}, allowDowngrade=${channel === "nightly"}).`,
   );
 }

You can send follow-ups to the cloud agent here.

Comment thread apps/desktop/src/main.ts Outdated
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 16, 2026

Approvability

Verdict: Needs human review

This PR changes runtime behavior for how nightly desktop builds determine their default update channel and adds filtering logic that gates which updates the auto-updater will apply. While well-tested and the author is an admin, changes to update channel selection and version filtering are significant behavior changes that warrant human review.

You can customize Macroscope's approvability policy. Learn more.

- Track whether the update channel was user-configured
- Keep nightly builds on nightly while allowing downgrade
- Add migration coverage for legacy settings

Co-authored-by: codex <codex@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Migration silently resets legacy explicit nightly preference
    • Legacy settings files lacking updateChannelConfiguredByUser now infer the flag as true when updateChannel is 'nightly', since the old default was always 'latest' and a saved 'nightly' value must have been an explicit user choice.
  • ✅ Fixed: Same-channel early return skips recording user preference
    • Moved the settings persistence (setDesktopUpdateChannelPreference + writeDesktopSettings) before the same-channel early return so updateChannelConfiguredByUser is always recorded when the user explicitly sets a channel.

Create PR

Or push these changes by commenting:

@cursor push 10938abe86
Preview (10938abe86)
diff --git a/apps/desktop/src/desktopSettings.ts b/apps/desktop/src/desktopSettings.ts
--- a/apps/desktop/src/desktopSettings.ts
+++ b/apps/desktop/src/desktopSettings.ts
@@ -64,7 +64,10 @@
       parsed.updateChannel === "nightly" || parsed.updateChannel === "latest"
         ? parsed.updateChannel
         : null;
-    const updateChannelConfiguredByUser = parsed.updateChannelConfiguredByUser === true;
+    const isLegacySettings = parsed.updateChannelConfiguredByUser === undefined;
+    const updateChannelConfiguredByUser =
+      parsed.updateChannelConfiguredByUser === true ||
+      (isLegacySettings && parsedUpdateChannel === "nightly");
 
     return {
       serverExposureMode:

diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -1802,13 +1802,14 @@
     }
 
     const nextChannel = rawChannel as DesktopUpdateChannel;
-    if (nextChannel === desktopSettings.updateChannel) {
-      return updateState;
-    }
 
     desktopSettings = setDesktopUpdateChannelPreference(desktopSettings, nextChannel);
     writeDesktopSettings(DESKTOP_SETTINGS_PATH, desktopSettings);
 
+    if (nextChannel === updateState.channel) {
+      return updateState;
+    }
+
     const enabled = shouldEnableAutoUpdates();
     setUpdateState(createBaseUpdateState(nextChannel, enabled));

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 76d6ea4. Configure here.

Comment thread apps/desktop/src/desktopSettings.ts
Comment thread apps/desktop/src/desktopSettings.ts
@juliusmarminge
Copy link
Copy Markdown
Member Author

@cursor push 10938ab

cursoragent and others added 2 commits April 16, 2026 01:51
…pping user preference flag

- In readDesktopSettings, infer updateChannelConfiguredByUser=true for legacy
  settings files that have updateChannel='nightly', since the old default was
  always 'latest' and seeing 'nightly' implies an explicit user choice.

- In the UPDATE_SET_CHANNEL_CHANNEL IPC handler, persist the settings (including
  updateChannelConfiguredByUser) before the same-channel early return, so that
  confirming the current channel still records the explicit user preference.

Applied via @cursor push command
- Bump nightly metadata generation and smoke tests
- Document the new nightly base version rule
@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Apr 16, 2026
@juliusmarminge juliusmarminge merged commit f9580ff into main Apr 16, 2026
12 checks passed
@juliusmarminge juliusmarminge deleted the t3code/57d1e545 branch April 16, 2026 04:31
smraikai pushed a commit to smraikai/t3code that referenced this pull request Apr 16, 2026
…gg#2049)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Apr 16, 2026
Integrates upstream/main (d22c6f5) into the fork while preserving all
multi-provider support (codex, claudeAgent, copilot, cursor, opencode,
geminiCli, amp, kilo) and fork UI/UX additions.

Highlights adopted from upstream:
- Nightly release channel + update channel selector (pingdotgg#2012, pingdotgg#2049, pingdotgg#1969)
- Filesystem browse API + command palette project picker (pingdotgg#2024)
- Launch Args setting for Claude provider (pingdotgg#1971)
- Kiro editor support in open picker (pingdotgg#1974)
- Claude plan events for TodoWrite during input streaming (pingdotgg#1541)
- Lost provider session recovery (pingdotgg#1938)
- Cache provider status and gate desktop startup (pingdotgg#1962)
- LegendList migration for chat scrolling and branch lists (pingdotgg#1953)
- Shell snapshot queries + backfill migration (pingdotgg#1973, pingdotgg#2004)
- PATH hydration + fallback detection (pingdotgg#1799)
- Warm sidebar thread subscriptions (pingdotgg#2001)
- Full thread title tooltip (pingdotgg#1994)
- Markdown file link UX (pingdotgg#1956), composer polish (pingdotgg#1944, pingdotgg#1992, pingdotgg#1985)
- Worktree/branch state + draft reuse fixes (pingdotgg#2005, pingdotgg#2003, pingdotgg#1995, pingdotgg#1936)
- Window controls overlay for Windows/Linux (pingdotgg#1969)
- Backend readiness timeout 10s→30s (pingdotgg#1979)
- Clear tracked RPCs on reconnect, live stream subscriptions (pingdotgg#2000, pingdotgg#1972)
- Various misc fixes (pingdotgg#2051, pingdotgg#2052, pingdotgg#2025, pingdotgg#2027, pingdotgg#2049, pingdotgg#1997, pingdotgg#1975)

Fork features preserved and reconciled:
- All 8 provider adapters + conformance tests
- Extended ProviderKind union across contracts/model/settings/provider
- appearance/accentColor/themeConfig/ProviderLogo UI system
- customModels + gitTextGeneration + providerModelOptions
- Migration IDs 23 (NormalizeLegacyProviderKinds) and 24
  (RepairProjectionThreadProposedPlanImplementationColumns) kept; new
  upstream migrations registered at IDs 25-26 to avoid breaking deployed
  fork databases
- DesktopBridge: log directory channels (LOG_DIR/LIST/READ/OPEN_DIR)
  retained; getWsUrl replaced by upstream's getAppBranding
- PROVIDER_CACHE_IDS extended to all 8 providers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants