feat(updater): manual-download Beta opt-in in Settings → About#332
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
added 3 commits
May 7, 2026 21:58
接入 PR-B-2:客户端「加入 Beta 渠道」开关 + 文档完善。
为什么不走 auto-update 切 endpoint:
tauri-plugin-updater 2.10 的 Builder 不暴露 endpoints() 运行时 API,
endpoints 只能从 tauri.conf.json 编译期读,不能跑时切。继续用 plugin
自带 check 路径意味着 Beta 包会被推到所有用户,违背「Beta 不溢出正式
版」原则。fork plugin 或自实现 update flow ~500 行高风险,本轮采用
最稳路径:plugin 永远只读正式版 manifest(旧文件名),Beta 改成手动
下载——Settings 里展示最新 prerelease 的下载入口,用户点了跳浏览器。
Rust 端:
- types.rs:UpdateChannel enum (Stable | Beta) + UserPreferences::update_channel
字段;UserPreferencesWire / Default / Deserialize 全套兼容(旧 prefs 反序列化
默认 Stable,迁移无痛)。
- commands.rs:三个新命令——
- get_update_channel:读 prefs
- set_update_channel:写 prefs,复用 persist_settings + emit prefs:changed
- fetch_latest_beta_release:reqwest 调 GitHub Releases API,过滤
prerelease=true 且 tag 以 -beta-tauri 结尾的最新一条
- lib.rs:三个命令注册到 invoke_handler
前端:
- ipc.ts:UpdateChannel + LatestBetaRelease 类型 + 三个 invoke 包装
- SettingsModal.tsx:在 AboutMini 末尾加 BetaChannelControl 组件——
Toggle 切换渠道;切到 beta 时拉一次最新 prerelease 信息,展示
「最新 Beta:v1.x.x-beta-tauri」+「前往下载」按钮(openExternal 跳
GitHub release 页面)+ 重新查询按钮。切回 stable 立即清空状态。
- Settings.tsx:把 Toggle 组件 export,让 SettingsModal 复用同一开关样式。
- i18n 五个 locale(zh-CN / zh-TW / en / ja / ko)的 settings.about 都补
齐 betaChannel* 9 个 key(zh-CN 是 source of truth)。
文档:
- README.md / README.zh.md:把 PR-A 的「opt-in,尚未接入」占位换成
manual-download 路径的说明 + tag 约定。
- CLAUDE.md:把「Channel distribution (in progress)」整段重写为已接入
状态,含 tag 约定 / wiring 位置 / 新加的 release verification checklist
(5 条,发版后一定要走一遍,含 stable/beta 双向 cross-check 与 endpoint
采样验证)。
cargo check + npm run build 本地都过。本 PR base = chore/branching-workflow
(PR-A),等 PR-A merge 后会自动指向 beta;与 PR-B-1(CI 端)解耦,可独立
review / merge。
…klist 把 README 的产品/发版描述更新到当前真实状态,配合 PR-A / PR-B 系列工作流改造: Status (v1.2) 章节: - 把云端 ASR / 本地 ASR / 润色 provider 三类拆开列;本地 ASR 提及内置 Qwen3-ASR + Windows Foundry Local Whisper 两条线 - 加翻译热键、QA 浮窗、Beta 渠道 opt-in、Homebrew Cask 分发渠道四个要点 - 把「中英双语」改成多语言 UI(实际已支持 zh-CN / zh-TW / en / ja / ko) Architecture 顶句: - 由「Auto-updates ride on Tauri updater plugin」改为双渠道描述:Stable (v<v>-tauri) 自动推送,Beta (v<v>-beta-tauri) 手动下载 Maintainer release checklist: - 完全重写为双渠道流程:通用准备(5 处版本号 + 冒烟 + secrets)+ Beta 流程(在 beta 分支打 v<v>-beta-tauri tag)+ 正式版流程 (beta→main 后在 main 打 v<v>-tauri tag) - 把 CI 的 Verify version sync 5-file 校验显式提一次,避免维护者 漏改 Cargo.lock / package-lock 撞 CI 红灯 - 末尾引用 CLAUDE.md 的 5 步 release verification checklist Roadmap 章节保持原样(多个项目实际状态我无法在不引入回归的前提下 确认,避免误判)。
5b35daa to
99c7995
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR-B-2 / 客户端 + 文档收尾。和 PR-B-1(CI 端,#330)一起完成 Beta opt-in 闭环。
Base = `chore/branching-workflow`(PR-A,#327)——这样能一次性替换 PR-A 文档里的 "尚未接入" 占位。PR-A merge 后本 PR 的 base 会自动指向 `beta`。与 PR-B-1 解耦、可独立 review / merge。
为什么不走 auto-update 切 endpoint
调研发现 `tauri-plugin-updater` 2.10 的 `Builder` 不暴露 `endpoints()` 运行时 API——endpoints 只能从 `tauri.conf.json` 编译期读,不能跑时切。
可选路径:
最终选 A:plugin 自带 "检查更新" 路径完全不动,stable 用户行为零变化;Beta 用户主动 opt-in 后看到独立的下载入口。
改动
Rust 端
前端
文档
本地验证
```
cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml ✅ 0 新 warnings
npm run build ✅ tsc + vite build 干净
```
与现有自动更新的关系
两条路径互不干扰,stable 用户即使误点 Beta toggle 又关回去也不会被推 Beta 包。
Test plan