fix(desktop): isolate update feed from CLI releases#5139
Conversation
|
Thanks for the PR! Template looks good ✓ On direction: this fixes a real, concrete bug — electron-updater hitting 404 on On approach: the scope is tight and feels right. Four files, +70/-29, each change directly supports the goal. The discriminated union ( Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 方向:修复了一个真实的问题——electron-updater 因为仓库级 latest release 是 CLI tag(不含 desktop artifacts)而 404。改用固定 方案:范围紧凑合理。四个文件,+70/-29,每处改动都直接服务于目标。discriminated union 类型( 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
|
Qwen Code review did not complete successfully: Qwen review aborted with an API error before posting comments. See workflow logs. |
Code ReviewThe approach is clean and matches what I'd do independently. Discriminated union on No bugs, no security issues, no regressions found. The One note: the typecheck error ( Test Resultsqwen-code brand (changed path)✅ Matches the expected generic feed URL exactly. openwork brand (regression check)✅ No regression — openwork still uses the GitHub provider. Workflow YAML✅ Valid YAML. What wasn't testedTmux-based interactive testing isn't applicable here — this PR changes build configuration and CI workflow, not CLI behavior. The actual update flow (electron-updater checking 中文说明代码审查方案简洁,和我独立设计的方案一致。 无 bug、无安全问题、无回归。 备注:typecheck 报错( 测试结果
tmux 交互测试不适用——本 PR 改的是构建配置和 CI workflow,不是 CLI 行为。完整 E2E 更新流需要等 — Qwen Code · qwen3.7-max |
|
All three stages clean. The fix targets a real problem (macOS desktop users getting 404 on update checks), the scope is minimal and well-justified, and the implementation is straightforward — discriminated union for the type, simple if/else in the config script, clean clobber step in the workflow. Config generation verified for both brands with no regressions. The migration concern for already-installed builds using the old GitHub provider is real but correctly flagged in Risk & Scope. It's a one-time release-process issue, not a code problem. Approving. ✅ 中文说明三个阶段全部通过。修复针对一个真实问题(macOS 桌面用户更新检查 404),范围最小且合理,实现简洁——类型用 discriminated union,配置脚本用简单 if/else,workflow 的 clobber 步骤清晰。两个品牌的配置生成均已验证,无回归。 已安装构建使用旧 GitHub provider 的迁移问题是真实的,但已在 Risk & Scope 中正确标注。这是一次性的发布流程问题,不是代码问题。 批准 ✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
What this PR does
This PR moves Qwen Code Desktop auto-updates away from the repository-wide GitHub latest release and onto a fixed desktop update feed. Packaged Qwen Code builds now use a generic update URL at the
desktop-latestrelease download path, while the desktop release workflow continues to publish versioneddesktop-v*releases and refreshes the fixed feed release only for non-draft, non-prerelease desktop releases.It also updates the desktop auto-update design note so the documented release policy matches the new feed shape.
Why it's needed
Desktop update checks currently ask electron-updater for the repository-wide latest release. In this repository that latest release can be a CLI release such as
v0.18.0, which does not contain Electron updater metadata likelatest-mac.yml. That makes macOS desktop update checks fail with a 404 even when the actual desktop release, such asdesktop-v0.0.4, has the correct updater artifacts.Using a fixed desktop feed separates desktop update metadata from CLI release ordering. Desktop releases can remain versioned for history without requiring every desktop release to become the GitHub latest release for the whole repository, and draft or prerelease desktop builds will not replace the stable update feed.
Reviewer Test Plan
How to verify
Confirm that a packaged Qwen Code Desktop build generated from this branch writes a generic updater feed pointing at
https://github.com/QwenLM/qwen-code/releases/download/desktop-latestrather than the repository-wide GitHub latest endpoint. Confirm that the desktop release workflow still creates or updates the versioneddesktop-v*release, and that it only creates or clobbers thedesktop-latestfeed release whendraft=falseandprerelease=false.Local checks run:
CRAFT_BRAND=qwen-code bun run electron:builder-configgenerated a publish config of{"provider":"generic","url":"https://github.com/QwenLM/qwen-code/releases/download/desktop-latest"}..github/workflows/desktop-release.ymlparsed successfully as YAML after the stable-only feed guard was added.cd packages/desktop && bun run typecheck:sharedcompleted successfully.git diff --checkcompleted successfully.Evidence (Before & After)
N/A for UI. Release evidence before the fix: GitHub reports
v0.18.0as repository-wide latest whiledesktop-v0.0.4is not latest, so electron-updater builds a URL underv0.18.0and misseslatest-mac.yml. After the fix, generated desktop update config targets the fixeddesktop-latestdownload path, and the workflow skips that feed for draft or prerelease desktop releases.Tested on
Environment (optional)
Local Codex workspace on macOS with Bun and GitHub CLI.
Risk & Scope
desktop-latestrelease becomes a mutable update feed for stable desktop releases, so the workflow must keep clobbering it with the latest stable desktop assets.Linked Issues
N/A
中文说明
What this PR does
这个 PR 将 Qwen Code Desktop 自动更新从仓库级 GitHub latest release 切换到固定的 desktop 更新 feed。打包后的 Qwen Code 现在使用
desktop-latestrelease 下载路径上的 generic update URL;desktop release workflow 仍然发布带版本的desktop-v*release,并且只会在非 draft、非 prerelease 的 desktop release 中刷新固定 feed release。同时,这个 PR 更新了 desktop auto-update 的设计说明,让文档里的发布策略和新的 feed 形态一致。
Why it's needed
当前 desktop 检查更新时,electron-updater 会读取仓库级 latest release。这个仓库的 latest 可能是
v0.18.0这样的 CLI release,而 CLI release 不包含latest-mac.yml这类 Electron updater metadata。结果就是即使真正的 desktop release,比如desktop-v0.0.4,已经有正确的 updater artifacts,macOS desktop 检查更新仍然会因为访问 CLI release 下的latest-mac.yml而 404。使用固定 desktop feed 可以把 desktop 更新 metadata 和 CLI release 的排序分开。desktop release 仍然可以保留带版本的历史记录,但不再要求每次 desktop release 都成为整个仓库的 GitHub latest release,并且 draft 或 prerelease 的 desktop 构建不会替换稳定更新 feed。
Reviewer Test Plan
How to verify
确认从这个分支生成的 Qwen Code Desktop 打包配置会写入 generic updater feed,目标是
https://github.com/QwenLM/qwen-code/releases/download/desktop-latest,而不是仓库级 GitHub latest endpoint。确认 desktop release workflow 仍然创建或更新带版本的desktop-v*release,并且只有在draft=false且prerelease=false时才会创建或覆盖desktop-latestfeed release。本地已运行检查:
CRAFT_BRAND=qwen-code bun run electron:builder-config生成的 publish config 是{"provider":"generic","url":"https://github.com/QwenLM/qwen-code/releases/download/desktop-latest"}。添加 stable-only feed guard 后,.github/workflows/desktop-release.yml可以成功按 YAML 解析。cd packages/desktop && bun run typecheck:shared成功完成。git diff --check成功完成。Evidence (Before & After)
UI 不适用。修复前的 release 证据:GitHub 当前把
v0.18.0标为仓库级 latest,而desktop-v0.0.4不是 latest,所以 electron-updater 会拼出v0.18.0下的 URL 并找不到latest-mac.yml。修复后,生成的 desktop update config 指向固定的desktop-latest下载路径,并且 workflow 会跳过 draft 或 prerelease desktop release 的 feed 更新。Tested on
Environment (optional)
本地 macOS Codex workspace,使用 Bun 和 GitHub CLI。
Risk & Scope
desktop-latestrelease 会成为稳定 desktop release 的可变 update feed,因此 workflow 必须持续用最新稳定 desktop assets 覆盖它。Linked Issues
N/A