fix(updater): 安装失败可见化 + 手动下载兜底 + 错误写日志 (#706)#708
Open
appergb wants to merge 1 commit into
Open
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit 068cb17)Here are some key observations to aid the review process:
|
下载完成后若 install() 抛错,旧代码把 status 置成 'error',而 UpdateDialog 不渲染 error 态 → 弹框消失、错误只 console.error,用户表现为「下载后无反应、重启仍旧版」(#706)。 - 新增独立状态 installError:仅下载/安装失败用它;'error' 仍表示「检查失败」,行为不变(CheckUpdateButton 按钮内轻提示、后台自动检查都不弹框,零回归)。 - 失败弹框留在原地显示真实错误 + 「手动下载」按钮直达 GitHub Releases 兜底。 - 新增 Rust IPC log_client_error,把前端更新错误写进 openless.log(webview console 不入文件日志),便于用户「导出日志」后定位真因。 - 5 个 i18n 文件补 updateDialog.installError / manualDownload。 注意:这是兜底(失败可见 + 可诊断),不解决 ad-hoc/quarantine 机器自动更新真正成功的问题——那需要 Apple Developer ID 签名 + 公证(本次暂缓)。
fb1889b to
068cb17
Compare
Contributor
|
Persistent review updated to latest commit 068cb17 |
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.
User description
背景
修复 #706:macOS/桌面自动更新「提示更新 → 下载中 → 下载完弹框消失 → 之后无反应、重启仍旧版」。
根因
AutoUpdate.tsx的installUpdate()里,update.download()/install()一旦抛错,catch把status置成'error'。但UpdateDialog只在available/downloading/installing/downloaded渲染——error态下弹框直接消失,错误只console.error(还不进openless.log),用户完全无感知。底层install()失败最可能是 ad-hoc 签名 +com.apple.quarantine→ App Translocation → 原地替换.app失败。改动
installError:仅「下载/安装失败」用它。'error'仍表示「检查失败」,行为完全不变——CheckUpdateButton仍是按钮内 2.5s 轻提示、后台 60min 自动检查失败也不弹框(零回归,避免网络波动时无故弹错误框)。log_client_error,把前端更新错误写进openless.log(webview console 不入文件日志),便于用户「关于 → 导出日志」后定位真因。updateDialog.installError/manualDownload(zh-CN/zh-TW/ja/en/ko)。影响面
AutoUpdate.tsx(状态机 + 弹框)、两处渲染点(AutoUpdateGate.tsx后台、CheckUpdateButton.tsx设置页)、lib/ipc(新增logClientError)、lib.rs(新增命令 + desktop/mobile 两处注册)、5 个 i18n。共 11 文件 +78/-9。验证
npx tsc --noEmit通过cargo check --manifest-path src-tauri/Cargo.toml通过(仅既有 warning)重要边界(非本 PR 范围)
这是兜底(失败可见 + 可诊断 + 手动路径),不让 ad-hoc/quarantine 机器的自动更新「真正成功」。根治需 Apple Developer ID 签名 + 公证(暂缓,无开发者账号)。后续 Phase 2 计划:自建更新服务器(3-backend axum)控版本/灰度/强更/kill-switch + 前端 OTA 热补丁。
Closes #706
PR Type
Bug fix, Enhancement
Description
Show install failure error dialog instead of disappearing
Add manual download button to GitHub Releases
Log client errors to openless.log via new Rust IPC
Add i18n strings for install error and manual download
Diagram Walkthrough
File Walkthrough
8 files
Add log_client_error Rust IPC commandAdd installError and manualDownload i18n keysAdd Japanese translation for install errorAdd Korean translation for install errorAdd Chinese translation for install errorAdd Traditional Chinese translationExport logClientError functionImplement logClientError with invoke3 files
Add installError status and manual downloadPass errorMessage to UpdateDialogPass errorMessage to UpdateDialog