fix: 前置程序后所有控制器类型统一等待设备就绪并重试连接#219
Merged
MistEO merged 1 commit intoMay 24, 2026
Merged
Conversation
fix MistEO#218 - 所有控制器类型(Adb/Win32/WlRoots/Gamepad/PlayCover)前置程序后均等待设备/窗口就绪 - 设备就绪后先稳定等待再发起连接,避免模拟器未完全启动 - 连接失败时自动重试(最多 3 次,间隔 2 秒) - 连接成功后再等待 preActionConnectDelaySec 秒,让应用完成启动
Contributor
There was a problem hiding this comment.
Hey - 我给了一些整体性的反馈:
- 重试相关的日志/文案看起来有「差一」的问题:当前循环总共会运行
maxRetries次尝试(初始尝试 + 重试),但retry从 0 开始,所以t('...retryConnect', { attempt: retry + 1 })和最终日志已重试 ${maxRetries} 次实际上描述的是「总尝试次数」,而不是「真正的重试次数」。建议要么将文案中的概念改成 attempts(尝试),要么调整计数逻辑,使面向用户的文案能准确反映真实的重试次数。
给 AI Agents 的提示
Please address the comments from this code review:
## Overall Comments
- The retry logging/messages appear off by one: the loop runs `maxRetries` total attempts (initial + retries), but `retry` starts at 0, so `t('...retryConnect', { attempt: retry + 1 })` and the final log `已重试 ${maxRetries} 次` both describe the number of attempts rather than actual *retries*; consider either renaming to attempts or adjusting the counters so the user-facing text matches the true retry count.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈不断改进审查质量。
Original comment in English
Hey - I've left some high level feedback:
- The retry logging/messages appear off by one: the loop runs
maxRetriestotal attempts (initial + retries), butretrystarts at 0, sot('...retryConnect', { attempt: retry + 1 })and the final log已重试 ${maxRetries} 次both describe the number of attempts rather than actual retries; consider either renaming to attempts or adjusting the counters so the user-facing text matches the true retry count.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The retry logging/messages appear off by one: the loop runs `maxRetries` total attempts (initial + retries), but `retry` starts at 0, so `t('...retryConnect', { attempt: retry + 1 })` and the final log `已重试 ${maxRetries} 次` both describe the number of attempts rather than actual *retries*; consider either renaming to attempts or adjusting the counters so the user-facing text matches the true retry count.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Owner
|
冲突了~ |
Owner
|
@copilot resolve the merge conflicts in this pull request |
Contributor
Author
|
看起来没有正确执行 |
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.
fix #218
Summary by Sourcery
确保控制器在连接之前等待设备或窗口就绪,引入控制器连接的重试逻辑,并调整连接延迟以实现更稳定的启动顺序。
New Features:
Enhancements:
Original summary in English
Summary by Sourcery
Ensure controllers wait for devices or windows to become ready before connecting, add retry logic for controller connections, and adjust connection delays for more stable startup sequencing.
New Features:
Enhancements: