Repository navigation
fix(GeneralInvite): invite_again 勾选框 interval 改为 3 - #1980
allesgutefy wants to merge 1 commit into
Conversation
Fixes occasional checkbox recognition issue in the re-invite dialog, matching the same fix already applied in check_and_invite. Fixes runhey#1881
There was a problem hiding this comment.
嗨——我发现了 1 个问题
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tasks/Component/GeneralInvite/general_invite.py" line_range="510" />
<code_context>
if self.appear(self.I_UI_CHECK):
break
- if self.appear_then_click(self.I_UI_UNCHECK, interval=1):
+ if self.appear_then_click(self.I_UI_UNCHECK, interval=3):
continue
else:
</code_context>
<issue_to_address>
**Default invitation remains enabled**
When `default_invite` is false and the dialog takes more than one second to reflect a checkbox click, the `default_invite=False` branch calls `appear_then_click(self.I_UI_CHECK, interval=1)`, so a stale checked image is clicked again before the UI updates and the checkbox ends in the wrong state.
Increase the interval for the `I_UI_CHECK` click in the `default_invite=False` branch so the UI can update before it is checked again.
</issue_to_address>Sourcery 评估
待批准。 请先处理 1 条发现。
阻塞性发现:tasks/Component/GeneralInvite/general_invite.py:510
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tasks/Component/GeneralInvite/general_invite.py" line_range="510" />
<code_context>
if self.appear(self.I_UI_CHECK):
break
- if self.appear_then_click(self.I_UI_UNCHECK, interval=1):
+ if self.appear_then_click(self.I_UI_UNCHECK, interval=3):
continue
else:
</code_context>
<issue_to_address>
**Default invitation remains enabled**
When `default_invite` is false and the dialog takes more than one second to reflect a checkbox click, the `default_invite=False` branch calls `appear_then_click(self.I_UI_CHECK, interval=1)`, so a stale checked image is clicked again before the UI updates and the checkbox ends in the wrong state.
Increase the interval for the `I_UI_CHECK` click in the `default_invite=False` branch so the UI can update before it is checked again.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: tasks/Component/GeneralInvite/general_invite.py:510
| if self.appear(self.I_UI_CHECK): | ||
| break | ||
| if self.appear_then_click(self.I_UI_UNCHECK, interval=1): | ||
| if self.appear_then_click(self.I_UI_UNCHECK, interval=3): |
There was a problem hiding this comment.
🟡 中等 · 默认邀请仍处于启用状态
当 default_invite 为 false,且对话框需要超过一秒才会反映复选框点击操作时,default_invite=False 分支会调用 appear_then_click(self.I_UI_CHECK, interval=1),因此在界面更新之前,过时的已勾选图像会再次被点击,导致复选框最终处于错误状态。
请增大 default_invite=False 分支中 I_UI_CHECK 点击操作的间隔,以便界面有时间更新后再进行下一次检查。
面向 AI 代理的提示
在 `tasks/Component/GeneralInvite/general_invite.py` 第 510 行:
**默认邀请仍处于启用状态**
当 `default_invite` 为 false,且对话框需要超过一秒才会反映复选框点击操作时,`default_invite=False` 分支会调用 `appear_then_click(self.I_UI_CHECK, interval=1)`,因此在界面更新之前,过时的已勾选图像会再次被点击,导致复选框最终处于错误状态。
请增大 `default_invite=False` 分支中 `I_UI_CHECK` 点击操作的间隔,以便界面有时间更新后再进行下一次检查。Original comment in English
🟡 Medium · Default invitation remains enabled
When default_invite is false and the dialog takes more than one second to reflect a checkbox click, the default_invite=False branch calls appear_then_click(self.I_UI_CHECK, interval=1), so a stale checked image is clicked again before the UI updates and the checkbox ends in the wrong state.
Increase the interval for the I_UI_CHECK click in the default_invite=False branch so the UI can update before it is checked again.
Prompt for AI agents
In `tasks/Component/GeneralInvite/general_invite.py` at line 510:
**Default invitation remains enabled**
When `default_invite` is false and the dialog takes more than one second to reflect a checkbox click, the `default_invite=False` branch calls `appear_then_click(self.I_UI_CHECK, interval=1)`, so a stale checked image is clicked again before the UI updates and the checkbox ends in the wrong state.
Increase the interval for the `I_UI_CHECK` click in the `default_invite=False` branch so the UI can update before it is checked again.
修复 invite_again 中勾选框识别的时序问题
问题背景
check_and_invite中I_UI_UNCHECK的interval已改为 3(PR #1930),但invite_again方法中仍然是interval=1,存在同样的时序风险:点击勾选框后 UI 未及时刷新,导致循环重复点击或跳过勾选步骤。修复内容
tasks/Component/GeneralInvite/general_invite.py→invite_again方法:I_UI_UNCHECK的appear_then_click参数由interval=1改为interval=3与
check_and_invite中已合并的修复保持一致。验证
本地实测
interval=3可解决勾选弹窗识别不及时的问题。Fixes #1881
Sourcery 摘要
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: