From 4dc7c4b1c989c79babb0e222c6ae9c0c8e73fbf1 Mon Sep 17 00:00:00 2001 From: minhn4 Date: Tue, 11 Aug 2026 21:39:05 +0700 Subject: [PATCH 1/3] feat(desktop): auto-update from the CoDev storage bucket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desktop updater pointed at `quickbeard/codev-code` releases, which could never have worked: the repo is private and `GitHubProvider` requests `/releases/latest` unauthenticated, and no desktop asset has ever been published there. Point it at the fork's MinIO server instead, where the installers actually land. Both channels now share one `generic` publish config. Two of its fields are load-bearing rather than cosmetic: - `channel: "latest"` — `detectUpdateChannel` is on by default, so without it electron-builder takes the channel from the version's first semver prerelease component ("8" for 1.18.4-8) and writes 8.yml/8-mac.yml while the app requests latest.yml. A permanent ERR_UPDATER_CHANNEL_FILE_NOT_FOUND. - `useMultipleRangeRequest: false` — MinIO answers a multipart range request with the whole object. electron-updater hardcodes the same false for its own s3 provider citing minio/minio#5285, but defaults it true for generic URLs. `allowDowngrade` goes false: a mutable bucket path, unlike an immutable release tag, would otherwise let a stale latest.yml walk every client backwards on the next poll. The two finalize-latest-* scripts and their call in script/publish.ts are gone. Both uploaded into a GitHub release the fork does not use, and finalize-latest-json.ts built a Tauri-style latest.json — signed with the tauri CLI, read by nothing — against artifact names this fork never produces. Also surfaces the update check off macOS. "Check for Updates..." lived only in the macOS app menu, and neither `createMenu` (darwin-only) nor `WindowsAppMenu` (filters on "windows", which the app menu group excludes) offered it anywhere else, leaving Settings as the only manual path on Windows and Linux. It joins the Help menu there. `WindowsAppMenu` also ignored `enabled: "updater"` outright — only command entries could be disabled — so the new item would have shown enabled in dev builds; it now reads the updater's own disabled status. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 21 ++ DIVERGENCES.md | 7 +- .../app/src/components/windows-app-menu.tsx | 10 +- packages/app/src/desktop-menu.test.ts | 22 +- packages/app/src/desktop-menu.ts | 11 + .../desktop/electron-builder.config.test.ts | 37 +++ packages/desktop/electron-builder.config.ts | 31 ++- .../desktop/scripts/finalize-latest-json.ts | 219 ------------------ .../desktop/scripts/finalize-latest-yml.ts | 124 ---------- packages/desktop/src/main/updater.ts | 4 +- script/publish.ts | 7 +- 11 files changed, 139 insertions(+), 354 deletions(-) delete mode 100644 packages/desktop/scripts/finalize-latest-json.ts delete mode 100644 packages/desktop/scripts/finalize-latest-yml.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 080b92faaa..f72b1fd70b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,27 @@ file is the human-readable summary of what changed and why. ## Unreleased +### Desktop + +- **The desktop app now checks for updates against the CoDev storage bucket + instead of GitHub releases** — "Check for Updates…" and the automatic check + that runs at launch and every ten minutes read their metadata from the fork's + own MinIO server. Nothing changes in how updates are presented: an available + version still downloads in the background and offers a restart when it is + ready. Two behavioural notes. Updates no longer roll backwards — previously + any version on the feed that differed from the installed one was applied, and + now only a newer one is, so republishing an older build will not pull clients + back down with it. And on Linux, applying an update installs a `.deb` through + the system package manager, which asks for your password; the AppImage build + updates without prompting if you would rather avoid that. + +- **"Check for Updates…" is now in the Help menu on Windows and Linux** — it + had only ever appeared in the macOS app menu, so everywhere else the single + way to ask for an update was Settings → General. That still works; the menu + is simply the more obvious place to look. Unlike the Settings button, it + tells you the outcome either way, with a dialog for "you're up to date" and + for a failed check. macOS is unchanged, and keeps the item where it is. + ## 1.18.4-8 ### Desktop / Web UI diff --git a/DIVERGENCES.md b/DIVERGENCES.md index f715247788..7c4cc3d484 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -179,14 +179,17 @@ from the squash message first, or use a plain merge. | `packages/app/src/pages/layout.tsx`, `packages/app/src/pages/layout-new.tsx` | Dropped the `` mount and its import from both layouts (added upstream in v1.17.18; since v1.18.3 upstream itself removed the sibling `HelpButton`, so nothing is imported from `help-button` anymore) | `TabsInfoPopup` is a dev-channel-only "Introducing Tabs" promo whose `muted autoplay loop` `