Skip to content

fix(desktop): 为更新错误横幅添加关闭按钮#3708

Closed
whale-fall-ouo wants to merge 1 commit into
esengine:main-v2from
whale-fall-ouo:fix/update-banner-dismiss
Closed

fix(desktop): 为更新错误横幅添加关闭按钮#3708
whale-fall-ouo wants to merge 1 commit into
esengine:main-v2from
whale-fall-ouo:fix/update-banner-dismiss

Conversation

@whale-fall-ouo

Copy link
Copy Markdown
Contributor

问题描述

当桌面应用启动时如果没有网络连接,自动更新检查会失败并显示错误横幅。该横幅无法关闭——只有"重试"按钮,没有关闭/取消选项。横幅会持续显示在所有标签页和会话中,直到网络连接恢复。

复现步骤

  1. 断开网络(或屏蔽 GitHub 访问)
  2. 启动 Reasonix 桌面应用
  3. 更新检查失败,显示错误横幅
  4. 无法关闭横幅

修复方案

UpdateBanner 组件的 error case 中添加 dismiss 按钮,使用已有的 reset() 函数将状态重置为 idle。与 available case 中的关闭按钮行为一致。

改动

  • desktop/frontend/src/components/UpdateBanner.tsx:解构时加入 reset,在 Retry 按钮后添加 dismiss 按钮

Fixes #3699
image

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 9, 2026
@whale-fall-ouo whale-fall-ouo force-pushed the fix/update-banner-dismiss branch from 5218575 to b0801d3 Compare June 9, 2026 12:46
@esengine

Copy link
Copy Markdown
Owner

Thanks for this — your diagnosis was exactly right, and reusing the existing reset() to dismiss the error banner was the correct approach. You actually got here first.

Unfortunately #3888 (a larger update-controls PR that bundled the same dismiss button along with a startup-check setting) just landed and covers this same fix, so I'm closing this one to avoid a conflict-only rebase. Sorry for the overlap — that's on our queue ordering, not your patch.

Your other banner/popover fixes (#3637, #3641, #3644) are still in my review queue and I'll get to them shortly. Please keep these focused quality-of-life fixes coming — they're appreciated.

@esengine

Copy link
Copy Markdown
Owner

main-v2 absorbed a large batch of merges today and this branch now conflicts. Could you rebase onto the latest main-v2? The change itself is still wanted — once it's green I'll review promptly (fork CI gets approved as soon as you push).

在 UpdateBanner 的 error case 中添加 dismiss 按钮,使用已有的 reset() 函数
将状态重置为 idle。网络异常时用户可以关闭错误横幅,不再被强制显示。

Fixes esengine#3699
@whale-fall-ouo whale-fall-ouo force-pushed the fix/update-banner-dismiss branch from b0801d3 to 7a18ac7 Compare June 11, 2026 05:35
@esengine

Copy link
Copy Markdown
Owner

Thanks 鈥?your diagnosis and fix were right. The dismiss button landed on main-v2 in the meantime via the update-check controls work (UpdateBanner.tsx now ships onClick={reset} on the error banner), and #3699 is closed, so nothing of this diff remains to merge. Closing as superseded 鈥?sorry for the race, and please keep them coming.

@esengine esengine closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update error banner has no dismiss button — stuck on screen when offline

3 participants