Skip to content

fix(desktop): preserve Electron to Tauri upgrades - #83

Open
yiliang114 wants to merge 2 commits into
cx/openwork-tauri-pr2from
cx/openwork-electron-tauri-bridge
Open

fix(desktop): preserve Electron to Tauri upgrades#83
yiliang114 wants to merge 2 commits into
cx/openwork-tauri-pr2from
cx/openwork-electron-tauri-bridge

Conversation

@yiliang114

Copy link
Copy Markdown
Collaborator

What this PR does

This stacked PR gives existing OpenWork Electron installations a direct upgrade path to the Tauri desktop on macOS, Windows, and Linux. Stable bridge releases publish Electron-compatible manifests and Tauri payloads alongside the signed Tauri updater feed, use versioned 0.2.x installer names, and expose the stable versioned release as GitHub Latest for the legacy GitHub updater.

The default desktop version is now 0.2.0, matching the first Tauri release line. On Windows, the Tauri installer removes the matching per-user Electron installation in update mode before writing new files, preserving user data and preventing duplicate uninstall entries. The bridge remains enabled by default during the legacy support window; when it is intentionally disabled, later Tauri releases do not replace the last bridge as GitHub Latest.

Why it's needed

OpenWork Electron 0.1.4 discovers updates through GitHub's latest stable release and platform YAML files, while the Tauri desktop reads a fixed latest.json feed. Publishing only desktop-latest/latest.json would strand every existing Electron installation. This PR keeps both updater generations valid without retaining Electron build tooling and makes the release usage explicit.

Reviewer Test Plan

How to verify

  1. Run the desktop release contract check and confirm the default desktop version is 0.2.0, the release workflow defaults the bridge on, and all three Electron manifests contain the expected SHA-512 and size fields.
  2. Run a dry release for 0.2.0 with electron_bridge=true and confirm the artifact set includes versioned arm64/x64 ZIPs and DMGs, the Windows NSIS installer, the Linux AppImage, all three Electron manifests, and the signed Tauri update manifest.
  3. On disposable machines with OpenWork Electron 0.1.4, verify each platform installs the signed bridge and then receives a newer Tauri update. On Windows, confirm user data remains and only one OpenWork uninstall entry exists after migration.
  4. Confirm a later stable run with the bridge disabled updates the fixed Tauri feed without marking that Tauri-only release as GitHub Latest.

Evidence (Before & After)

N/A — release infrastructure, version metadata, and installer migration only; no UI change.

Tested on

OS Status
🍏 macOS ✅ release-contract checks
🪟 Windows ⚠️ signed installer rehearsal required before release
🐧 Linux ⚠️ published AppImage rehearsal required before release

Environment (optional)

macOS arm64, Node.js 22.22.0. npm run test:release --prefix packages/desktop-shell --workspaces=false, actionlint on both desktop workflows, and git diff --check passed.

Risk & Scope

  • Main risk or tradeoff: GitHub Latest is intentionally reserved for the Electron bridge while legacy clients remain supported; Tauri clients are independent because they use the fixed JSON feed.
  • Not validated / out of scope: Real signed/notarized Electron → Tauri → newer Tauri installation on all three platforms; it is a release-time gate.
  • Breaking changes / migration notes: This PR is stacked on feat(desktop): complete OpenWork Tauri parity #82. Merge feat(desktop): complete OpenWork Tauri parity #82 first, then this PR. Publish the first stable bridge as 0.2.0 with electron_bridge=true, dry_run=false, draft=false, and prerelease=false.

Linked Issues

Follow-up to #81 and #82. Related upstream tracking: QwenLM/qwen-code#9074.

中文说明

这个 PR 做了什么

这个叠加 PR 为现有 OpenWork Electron 安装提供 macOS、Windows 和 Linux 上直接升级到 Tauri 桌面端的路径。稳定桥接版会在签名的 Tauri 更新源旁同时发布 Electron 兼容清单和 Tauri 载荷,使用包含 0.2.x 版本号的安装包名称,并把稳定的版本化 Release 标记为 GitHub Latest,供旧 GitHub updater 发现。

默认桌面版本现在是 0.2.0,与第一条 Tauri 发行线一致。在 Windows 上,Tauri 安装器会在写入新文件前以更新模式移除同一应用的当前用户 Electron 安装,保留用户数据并防止出现重复卸载项。在旧版支持窗口内,桥接默认保持开启;当明确关闭桥接后,后续仅 Tauri Release 不会替换最后一个桥接版的 GitHub Latest 状态。

为什么需要

OpenWork Electron 0.1.4 通过 GitHub 的最新稳定 Release 和平台 YAML 文件发现更新,而 Tauri 桌面端读取固定的 latest.json feed。若只发布 desktop-latest/latest.json,所有现有 Electron 安装都会被留在旧版本。这个 PR 无需保留 Electron 构建工具链即可同时维持两代 updater,并明确声明发布使用方式。

Reviewer 测试计划

如何验证

  1. 运行桌面发布契约检查,确认默认桌面版本为 0.2.0、release workflow 默认开启桥接,且三个 Electron 清单都包含预期的 SHA-512 与文件大小字段。
  2. 使用 electron_bridge=true0.2.0 做 dry release,确认资产包含带版本号的 arm64/x64 ZIP 和 DMG、Windows NSIS 安装器、Linux AppImage、三份 Electron 清单以及签名的 Tauri 更新清单。
  3. 在安装 OpenWork Electron 0.1.4 的一次性机器上,逐平台验证可安装签名桥接版并继续收到更新的 Tauri 版本。Windows 上还需确认用户数据保留且迁移后仅存在一个 OpenWork 卸载项。
  4. 确认后续关闭桥接的稳定版会更新固定 Tauri feed,但不会把这个仅 Tauri 的 Release 标记为 GitHub Latest。

证据(Before & After)

N/A——仅涉及发布基础设施、版本元数据和安装器迁移,没有 UI 变化。

测试平台

OS 状态
🍏 macOS ✅ 发布契约检查
🪟 Windows ⚠️ 发布前需完成签名安装器演练
🐧 Linux ⚠️ 发布前需完成已发布 AppImage 演练

环境(可选)

macOS arm64,Node.js 22.22.0。npm run test:release --prefix packages/desktop-shell --workspaces=false、两个桌面 workflow 的 actionlintgit diff --check 均通过。

风险与范围

  • 主要风险或取舍:在仍支持旧 Electron 客户端期间,GitHub Latest 会刻意保留给 Electron 桥接;Tauri 客户端使用固定 JSON feed,因此不受影响。
  • 未验证 / 范围外:三个平台上真实签名/公证的 Electron → Tauri → 更新 Tauri 安装链路;这是发布时门禁。
  • 破坏性变更 / 迁移说明:本 PR 叠加在 feat(desktop): complete OpenWork Tauri parity #82 上。先合并 feat(desktop): complete OpenWork Tauri parity #82,再合并本 PR。第一个稳定桥接版使用 0.2.0electron_bridge=truedry_run=falsedraft=falseprerelease=false 发布。

关联 Issue

#81#82 的后续。相关上游追踪:QwenLM/qwen-code#9074

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 205ba60b35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +351 to +355
if [[ "$ELECTRON_BRIDGE" == 'true' ]]; then
for manifest in macos:latest-mac.yml windows:latest.yml linux:latest-linux.yml; do
platform="${manifest%%:*}"
output="${manifest#*:}"
node .github/scripts/create-electron-bridge-manifest.mjs --assets release-assets --platform "$platform" --version "$RELEASE_VERSION" --output "release-assets/$output"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Generate bridge manifests during dry runs

When desktop-release.yml takes the dry_run=true path, it calls this workflow with publish: false, so the entire publish job is skipped and this newly added manifest loop never runs. Consequently, dry releases cannot produce or inspect latest-mac.yml, latest.yml, or latest-linux.yml, even though they are intended to rehearse the bridge artifact set; move artifact aggregation and manifest generation into a job that also runs for dry builds, and gate only the GitHub publication steps.

Useful? React with 👍 / 👎.

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.

1 participant