fix(okww): 返回登录等待超时时不再静默处理,显式弹出失败 - #526
Merged
AthenaHibou merged 1 commit intoSep 2, 2026
Merged
Conversation
审查者指南(小型 PR 中默认折叠)审查者指南修复 OK-WW 账号切换返回登录阶段的误成功路径:登录页 OCR 等待超时现在立即报错并提供明确提示,防止流程在过渡或游戏内错误画面继续选号,同时更新版本信息。 OK-WW 登录返回超时显式失败的时序图sequenceDiagram
participant Switch as _switch_to_login
participant OCR as _wait_ocr_text
participant Logger as on_log
Switch->>OCR: _wait_ocr_text(hwnd, _LOGIN_PAGE_TEXTS, timeout=60)
alt 检测到登录页
OCR-->>Switch: 登录页文本
Switch->>Logger: on_log(已返回登录界面)
else 超时 60 秒
OCR-->>Switch: None
Switch-->>Switch: raise RuntimeError
end
文件级变更
可能关联的问题
提示和命令与 Sourcery 交互
自定义使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's Guide修复 OK-WW 账号切换返回登录阶段的误成功路径:登录页 OCR 等待超时现在立即报错并提供明确提示,防止流程在过渡或游戏内错误画面继续选号,同时更新版本信息。 Sequence diagram for explicit OK-WW login return timeout failuresequenceDiagram
participant Switch as _switch_to_login
participant OCR as _wait_ocr_text
participant Logger as on_log
Switch->>OCR: _wait_ocr_text(hwnd, _LOGIN_PAGE_TEXTS, timeout=60)
alt Login page detected
OCR-->>Switch: login page text
Switch->>Logger: on_log(已返回登录界面)
else 60s timeout
OCR-->>Switch: None
Switch-->>Switch: raise RuntimeError
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
嘿——我已经审阅了你的更改,看起来很棒!
Sourcery 评估
已批准。
请帮助我变得更有用!请点击每条评论上的 👍 或 👎,我会利用这些反馈来改进你的评审。
Original comment in English
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Approved.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
改动摘要
Sourcery 摘要
确保 OK-WW 账号切换只有在确认返回登录界面后才继续,并在超时时明确中止流程。
Bug 修复:
功能增强:
维护:
Original summary in English
Summary by Sourcery
确保 OK-WW 账号切换只有在确认返回登录界面后才继续,并在超时时明确中止流程。
Bug Fixes:
Enhancements:
Chores: