Skip to content

fix(ui): 「查看日志」按钮无法跳转 Release 页面 - #16

Merged
Gyanano merged 1 commit into
developfrom
bugfix/release-notes-link
Sep 2, 2026
Merged

fix(ui): 「查看日志」按钮无法跳转 Release 页面#16
Gyanano merged 1 commit into
developfrom
bugfix/release-notes-link

Conversation

@Gyanano

@Gyanano Gyanano commented Sep 2, 2026

Copy link
Copy Markdown
Owner

问题

设置 → 检查更新 → 发现新版本后,点击「查看日志」无任何反应。

根因

按钮是普通的 <a target="_blank"> 链接,Tauri webview 默认不处理外链跳转。项目里也没有注册 shell 插件或对应 capability。

修复

  • 新增 open_url 命令:Rust 侧把 http(s) URL 交给系统打开(macOS open / Windows rundll32 / Linux xdg-open),与启动安装器同一套机制,带协议白名单校验(拒绝 file:/javascript: 等)。
  • 前端按钮改为 invoke('open_url'),去掉无效的锚标签。
  • 新增非 http(s) 协议拒绝的单测;全套 43 个 Rust 测试绿,前端 typecheck + build 绿。

实测

本地以伪装旧版本触发「有更新」状态,点击按钮后系统浏览器打开对应 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 new open_url command 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 of file:, javascript:, and empty URLs.

Reviewed by Cursor Bugbot for commit 36241ce. Bugbot is set up for automated code reviews on this repo. Configure here.

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.
@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@Gyanano
Gyanano merged commit 0b587f0 into develop Sep 2, 2026
3 checks passed
@Gyanano
Gyanano deleted the bugfix/release-notes-link branch September 2, 2026 17:08
@Gyanano Gyanano mentioned this pull request Sep 3, 2026
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