Skip to content

fix: 补充修复组队邀请UI状态识别问题 (#1881) - #1928

Closed
allesgutefy wants to merge 1 commit into
runhey:masterfrom
allesgutefy:fix/invite-default-checkbox-v4
Closed

allesgutefy wants to merge 1 commit into
runhey:masterfrom
allesgutefy:fix/invite-default-checkbox-v4

Conversation

@allesgutefy

@allesgutefy allesgutefy commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Issue #1881 补充修复

问题背景

PR #1886 合入 master 后,经本地实测发现:

  • 仅完成 I_I_NO_DEFAULT → interval=3 仍无法解决组队邀请确认弹窗无法关闭的问题
  • 同时完成 I_GI_SURE → interval=3 后问题解决

另外,PR #1886 未合入 dev 分支。

修复内容

  1. 代码修改(仅队长端 check_and_invite 函数):

    • I_I_NO_DEFAULT 的 appear_then_click 改为 interval=3
    • I_GI_SURE 的 appear_then_click 改为 interval=3
    • 队员端 check_then_accept 不需修改
  2. 素材更新:适配10月10日游戏UI更新

    • gi_i_default.png(已勾选状态)
    • gi_i_no_default.png(未勾选状态)
    • gi_gi_sure.png(确定按钮)
    • gi_cancel.png(取消按钮)

本地验证

  • 不加 I_GI_SURE interval=3:点击确认按钮后弹窗无法关闭
  • 加 I_GI_SURE interval=3 后:流程正常

Fixes #1881

Sourcery 总结

改进团队邀请对话框的处理,以便在游戏界面更新后可靠地完成队长端的邀请流程。

错误修复:

  • 通过改进对未勾选的邀请选项和确认按钮的识别及点击时机,修复团队队长邀请对话框无法关闭的问题。
  • 更新通用邀请 UI 图片资源,以匹配游戏于 10 月 10 日进行的界面更改。
Original summary in English

Summary by Sourcery

Improve team invitation dialog handling to reliably complete the leader-side invitation flow after the game UI update.

Bug Fixes:

  • Fix team leader invitation dialogs failing to close by improving recognition and clicking timing for the unchecked invitation option and confirmation button.
  • Update general invitation UI image assets to match the game's October 10 UI changes.

Summary by CodeRabbit

  • 修复
    • 调整邀请流程中的点击间隔,减少操作过快的情况。

- I_I_NO_DEFAULT interval=3 in check_and_invite
- I_GI_SURE interval=3 in check_and_invite
- Update 4 GI assets for new UI
- Fixes runhey#1881

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好——我发现了 1 个问题

给 AI 代理的提示
请处理本次代码审查中的评论:

## 个别评论

### 评论 1
<location path="tasks/Component/GeneralInvite/general_invite.py" line_range="552" />
<code_context>
             if not self.appear(self.I_GI_SURE):
                 break
-            if self.appear_then_click(self.I_GI_SURE, interval=1):
+            if self.appear_then_click(self.I_GI_SURE, interval=3):
                 continue

</code_context>
<issue_to_address>
**Bondling 邀请确认仍然会卡住**

当队长运行 Bondling Fairyland 并在战斗结束后看到邀请确认弹窗时,`tasks/BondlingFairyland/general_invite.py` 定义了自己的 `check_and_invite`,因此 Bondling Fairyland 的队长会绕过这次更新后的实现,继续以 `interval=1` 的间隔点击 `I_GI_SURE`;更新后的确认提示仍会保持打开状态,导致队长卡住。

请将相同的间隔修改应用到 Bondling Fairyland 的 `check_and_invite` 覆盖实现中,或者让它使用更新后的共享实现。
</issue_to_address>

Sourcery 评估

等待批准。 需要先处理 1 个发现的问题。

阻塞性发现:tasks/Component/GeneralInvite/general_invite.py:552


Sourcery 对开源项目免费——如果您喜欢我们的审查结果,请考虑分享它们 ✨
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="552" />
<code_context>
             if not self.appear(self.I_GI_SURE):
                 break
-            if self.appear_then_click(self.I_GI_SURE, interval=1):
+            if self.appear_then_click(self.I_GI_SURE, interval=3):
                 continue

</code_context>
<issue_to_address>
**Bondling invite confirmation still hangs**

When a leader runs Bondling Fairyland and gets the post-battle invite confirmation popup, `tasks/BondlingFairyland/general_invite.py` defines its own `check_and_invite`, so Bondling Fairyland leaders bypass this updated implementation and continue clicking `I_GI_SURE` at `interval=1`; the updated confirmation prompt remains open and the leader gets stuck.

Apply the same interval changes to the Bondling Fairyland `check_and_invite` override, or make it use the updated shared implementation.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: tasks/Component/GeneralInvite/general_invite.py:552


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

if not self.appear(self.I_GI_SURE):
break
if self.appear_then_click(self.I_GI_SURE, interval=1):
if self.appear_then_click(self.I_GI_SURE, interval=3):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 中等 · Bondling 邀请确认仍然会卡住

当队长运行 Bondling Fairyland 并在战斗结束后看到邀请确认弹窗时,tasks/BondlingFairyland/general_invite.py 定义了自己的 check_and_invite,因此 Bondling Fairyland 的队长会绕过这次更新后的实现,继续以 interval=1 的间隔点击 I_GI_SURE;更新后的确认提示仍会保持打开状态,导致队长卡住。

请将相同的间隔修改应用到 Bondling Fairyland 的 check_and_invite 覆盖实现中,或者让它使用更新后的共享实现。

给 AI 代理的提示
在 `tasks/Component/GeneralInvite/general_invite.py` 的第 552 行:

**Bondling 邀请确认仍然会卡住**

当队长运行 Bondling Fairyland 并在战斗结束后看到邀请确认弹窗时,`tasks/BondlingFairyland/general_invite.py` 定义了自己的 `check_and_invite`,因此 Bondling Fairyland 的队长会绕过这次更新后的实现,继续以 `interval=1` 的间隔点击 `I_GI_SURE`;更新后的确认提示仍会保持打开状态,导致队长卡住。

请将相同的间隔修改应用到 Bondling Fairyland 的 `check_and_invite` 覆盖实现中,或者让它使用更新后的共享实现。
Original comment in English

🟡 Medium · Bondling invite confirmation still hangs

When a leader runs Bondling Fairyland and gets the post-battle invite confirmation popup, tasks/BondlingFairyland/general_invite.py defines its own check_and_invite, so Bondling Fairyland leaders bypass this updated implementation and continue clicking I_GI_SURE at interval=1; the updated confirmation prompt remains open and the leader gets stuck.

Apply the same interval changes to the Bondling Fairyland check_and_invite override, or make it use the updated shared implementation.

Prompt for AI agents
In `tasks/Component/GeneralInvite/general_invite.py` at line 552:

**Bondling invite confirmation still hangs**

When a leader runs Bondling Fairyland and gets the post-battle invite confirmation popup, `tasks/BondlingFairyland/general_invite.py` defines its own `check_and_invite`, so Bondling Fairyland leaders bypass this updated implementation and continue clicking `I_GI_SURE` at `interval=1`; the updated confirmation prompt remains open and the leader gets stuck.

Apply the same interval changes to the Bondling Fairyland `check_and_invite` override, or make it use the updated shared implementation.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0c2bea03-8e23-4ca6-bcbf-4a379fa0685d

📥 Commits

Reviewing files that changed from the base of the PR and between fc68a2a and 340467d.


⛔ Files ignored due to path filters (4)
  • tasks/Component/GeneralInvite/gi/gi_cancel.png is excluded by !**/*.png
  • tasks/Component/GeneralInvite/gi/gi_gi_sure.png is excluded by !**/*.png
  • tasks/Component/GeneralInvite/gi/gi_i_default.png is excluded by !**/*.png
  • tasks/Component/GeneralInvite/gi/gi_i_no_default.png is excluded by !**/*.png

📒 Files selected for processing (1)
  • tasks/Component/GeneralInvite/general_invite.py

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



Walkthrough

check_and_invite 中,点击 I_I_NO_DEFAULT 和 I_GI_SURE 的间隔从 1 秒改为 3 秒。判断条件和循环流程未变。

Objective Addressed Explanation
[#1881] 默认邀请选项无法识别已勾选状态时,避免 check_and_invite 无限循环卡住 ❌ 仅调整两处点击间隔,未改变已勾选状态的识别条件,也未为循环添加退出上限。

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 34046

Users may wait longer between the two invitation clicks. Available evidence indicates the button-disappearance check remains immediate, and no concrete merge-blocking behavior is identified.

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/invite-default-checkbox-v4

  • Autofix · 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.

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.

八岐大蛇组队:默认邀请勾选后识别不到已勾选状态,check_and_invite 死循环卡死

1 participant