Skip to content

fix: 修复 Rust 更新取消闪烁并推荐 Rust 发布包 - #153

Merged
LevelDownRefine merged 2 commits into
mainfrom
codex/fix-update-cancel-flicker
Oct 3, 2026
Merged

LevelDownRefine merged 2 commits into
mainfrom
codex/fix-update-cancel-flicker

Conversation

@LevelDownRefine

@LevelDownRefine LevelDownRefine commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

更新检查或下载期间,后台每 400ms 轮询任务状态,取消按钮随请求 busy 状态反复禁用和启用,导致闪烁且可能漏掉点击。

取消按钮及关闭入口现在在更新任务期间保持可用。点击后记录取消意图,等当前请求返回、任务 ID 可用时发送一次取消请求,再继续轮询直到任务结束后关闭窗口;安装交接仍禁止取消。

验证:

  • Rust 全套 96 项测试通过;新增按钮颜色稳定、轮询期间点击取消、任务 ID 返回前取消及取消只发送一次的回归覆盖。
  • cargo clippy(all-features / all-targets)、cargo fmt --check、Ruff 检查与格式检查通过。
  • Python 后端全套运行 966 项:2 项失败、2 项错误、18 项跳过。剩余问题为 Windows 符号链接权限(2 项)、工作树未初始化 runner 子模块(1 项)、Windows 计时断言误差(1 项)。

发布说明:自动发布模板将 OneDragon-Helper-Rust.zip 标为推荐包,OneDragon-Helper.zip 标为备用包;已同步更新 v1.0.3 Release 页面。工作流 YAML 解析及 git diff --check 通过。

Summary by CodeRabbit

  • Bug Fixes
    • Update operations can now be cancelled more reliably, including when a cancellation is requested before the operation is ready. The cancel control remains available while an update is in progress.
  • Documentation
    • Release instructions now recommend downloading OneDragon-Helper-Rust.zip, list OneDragon-Helper.zip as a backup option, and clarify that the downloaded package should be extracted.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b20deb16-d7c6-4bd2-a35a-97e4efe09b3d
📥 Commits

Reviewing files that changed from the base of the PR and between 9ed7fca and 20a7a15.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • rust-gui/src/dialogs/update_dialog.rs
  • rust-gui/tests/dialogs/update_dialog.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The update dialog now queues cancellation for active operations and sends it through polling when a job ID is available. Release notes now recommend the Rust package, name a backup package, and instruct users to extract the package.

Changes

Update dialog cancellation

Layer / File(s) Summary
Queue and dispatch cancellation
rust-gui/src/dialogs/update_dialog.rs, rust-gui/tests/dialogs/update_dialog.rs
The dialog queues cancellation when closed during an active operation, then sends job.cancel through polling when a job ID is available. Tests cover cancellation before a job ID arrives, continued polling, and the busy-state cancel control.

Release package instructions

Layer / File(s) Summary
Update release package guidance
.github/workflows/release.yml
The release notes recommend OneDragon-Helper-Rust.zip, identify OneDragon-Helper.zip as the backup, and instruct users to extract the package.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 20a7a

Cancelling an update check or download is now queued and sent once the job is known, and the dialog closes when the job ends. The release notes now recommend the Rust package. No concrete defects remain, so the risk to merging is minimal.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题简洁且具体,准确概括了更新取消闪烁修复和 Rust 发布包推荐调整。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LevelDownRefine LevelDownRefine changed the title fix: 修复 Rust 更新取消按钮闪烁 fix: 修复 Rust 更新取消闪烁并推荐 Rust 发布包 Oct 3, 2026
@LevelDownRefine
LevelDownRefine merged commit 6479858 into main Oct 3, 2026
5 checks passed
@LevelDownRefine
LevelDownRefine deleted the codex/fix-update-cancel-flicker branch October 3, 2026 05:54
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