Default nightly desktop builds to the nightly update channel#2049
Default nightly desktop builds to the nightly update channel#2049juliusmarminge merged 4 commits intomainfrom
Conversation
- Centralize desktop version/channel detection - Prefer nightly settings for packaged nightly builds - Ignore auto-update offers that do not match the selected channel
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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"inapplyAutoUpdaterChannelso that all update check paths (startup, poll, menu) correctly allow downgrades on the nightly channel, enabling discovery of semver-lower nightly pre-release versions.
- Restored
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.
ApprovabilityVerdict: 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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
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.
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.
…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
…gg#2049) Co-authored-by: codex <codex@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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


Summary
nightlyupdate channel while keeping stable builds onlatest.update-availableevents are ignored when the published version does not match the active channel.Testing
apps/desktop/src/updateChannels.test.tsfor nightly version detection, default channel resolution, and channel/version matching.apps/desktop/src/desktopSettings.test.tsfor nightly defaults and legacy nightly settings without an explicit update track.bun fmtbun lintbun typecheckbun run testNote
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
nightlyupdate channel based on the packaged version string, via new shared helpers inupdateChannels.ts(also used for stage labeling inappBranding.ts).Desktop settings loading is now version-aware (
readDesktopSettings(settingsPath, appVersion)) and persists a newupdateChannelConfiguredByUserflag to distinguish explicit user choice from defaults; legacy settings are migrated so nightly builds without an explicit choice roll ontonightlywhile explicit stable picks are preserved.The auto-updater in
main.tsis hardened to ignoreupdate-availableevents whoseinfo.versiondoesn’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.YYYYMMDD.Nsuffix) now default to thenightlyupdate channel; stable builds continue to default tolatest. Logic is centralized in updateChannels.ts.updateChannelConfiguredByUsertoDesktopSettingsto distinguish explicit user preference from the version-derived default. Legacy settings without this flag are treated as user-configured only if they previously selectednightly.0.0.17→0.0.18-nightly.*) via the newresolveNightlyTargetVersionfunction.latestchannel and no explicitupdateChannelConfiguredByUserflag will be migrated to thenightlychannel on next launch.Macroscope summarized 93ce4e8.