fix(ui): 「查看日志」按钮无法跳转 Release 页面 - #16
Merged
Merged
Conversation
Plain <a target="_blank"> is a no-op inside the Tauri webview, so the "view release notes" button in Settings did nothing. Add a small open_url command that hands http(s) URLs to the OS opener (macOS open / Windows rundll32 / Linux xdg-open) — the same mechanism the installer launcher already uses — and wire the button through it.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a8d2f127-a969-496a-9b13-031a65aa9846) |
Merged
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.
问题
设置 → 检查更新 → 发现新版本后,点击「查看日志」无任何反应。
根因
按钮是普通的
<a target="_blank">链接,Tauri webview 默认不处理外链跳转。项目里也没有注册 shell 插件或对应 capability。修复
open_url命令:Rust 侧把 http(s) URL 交给系统打开(macOSopen/ Windowsrundll32/ Linuxxdg-open),与启动安装器同一套机制,带协议白名单校验(拒绝 file:/javascript: 等)。invoke('open_url'),去掉无效的锚标签。实测
本地以伪装旧版本触发「有更新」状态,点击按钮后系统浏览器打开对应 Release 页面 ✅(用户确认)
Note
Low Risk
Small, localized change to external-link handling in the update UI with http(s)-only validation; no auth or data-path changes.
Overview
Fixes 「查看日志 / View release notes」 doing nothing after an update is found: Tauri’s webview does not follow normal
target="_blank"links, so the settings UI now calls a newopen_urlcommand instead of an anchor tag.The Rust side adds
updater::open_url, exposed as a Tauri command, which opens http(s) URLs via the OS default handler (open/rundll32/xdg-open) and rejects other schemes. A unit test covers rejection offile:,javascript:, and empty URLs.Reviewed by Cursor Bugbot for commit 36241ce. Bugbot is set up for automated code reviews on this repo. Configure here.