Skip to content

Automated PR 2026.10.16 - #1941

Open
github-actions[bot] wants to merge 33 commits into
masterfrom
dev
Open

github-actions[bot] wants to merge 33 commits into
masterfrom
dev

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR created by GitHub Actions. Merge dev into master

Sourcery 总结

提升战斗、探索、委托、登录和奖励处理等任务自动化流程的可靠性,并重新安排自动分支同步的时间。

Bug 修复:

  • 改进自动化任务对奖励溢出、确认对话框、导航状态、委托时机以及探索搜索边界的处理。
  • 防止在决斗准备、好友邀请、登录流程和悬赏任务好友选择过程中发生意外交互。

功能增强:

  • 优化探索导航和目标搜索,加入状态重置、有界重试;当目标或地图边界不可用时,提前退出。
  • 集中管理可复用的 UI 资源,并扩大页面检测区域,提高交互可靠性。
  • 添加通用的战斗开始日志,并改进战斗准备和完成处理。

CI:

  • 重新安排自动将 development 分支同步到 master 分支的工作流。

杂项:

  • 移除已弃用的重启和登录图像资源,并放宽任务名称不匹配校验。
Original summary in English

Summary by Sourcery

Improve task automation reliability across battles, exploration, delegation, login, and reward handling while rescheduling automatic branch synchronization.

Bug Fixes:

  • Improve handling of overflow rewards, confirmation dialogs, navigation states, delegation timing, and exploration search boundaries across automated tasks.
  • Prevent unintended interactions during duel setup, friend invitations, login flows, and wanted-quest friend selection.

Enhancements:

  • Refine exploration navigation and target searching with state resets, bounded retries, and earlier exits when targets or map boundaries are unavailable.
  • Centralize reusable UI assets and broaden page detection regions for more reliable interaction.
  • Add general battle start logging and improve battle preparation and completion handling.

CI:

  • Reschedule the automatic development-to-master synchronization workflow.

Chores:

  • Remove obsolete restart and login image assets and relax task-name mismatch validation.

VanityHuang and others added 30 commits October 11, 2026 00:37
1. 修复 search_fail_timer 未启动即触发及与 swipe(interval=3) 时序冲突吞掉滑动指令导致误判滑到底退出的问题;
2. 将单屏找怪观察时间从 3.2s 缩短至 1.0s,并在滑屏后立即调用 is_swipe_unchanged 检测中上部背景(250,140,800,90)像素差,避开顶部跑马灯与右侧浮动鬼火干扰,到底即退;
3. 退出/切换探索场景时清理 swipe_background_right 点击历史记录,避免多轮翻找累计触发 GameTooManyClickError;
4. 修复 search_up_fight 在特定 UP 模式下未匹配到挑战图标时向下穿透到 UpType.ALL 的问题。
…ge check

- Reset search_fail_timer and unchanged_swipe_cnt when clicking confirmation popups in Scene.MAIN
- Re-check screenshot after a delayed swipe, ignore popups/scene changes, and require 2 consecutive unchanged swipes before quitting exploration
- Clear S_SWIPE_BACKGROUND_RIGHT click records when swipes move the map or battles trigger to prevent false GameTooManyClickError during long searches
- 抽取 _reset_search_state 统一重置滑动计时器与刷新结算状态

- 抽取 _search_next_area 统一滑屏找怪与边界停滞检测判定

- 精简 run_solo 和 run_leader,去除重复实现,保持两处逻辑一致
1 点击御魂溢出的提示
2 测试过在interupt里面增加,无法生效。
- 特定UP模式(经验/金币/达摩):启用2次滑屏早退策略(MAX_SWIPE_COUNT = 2),覆盖前3屏无怪即早退重开

- 全部模式(UpType.ALL):不限制滑屏次数,支持滑至最右边缘以打完全部小怪并击杀首领

- 剔除失效的巡航常量与 current_swipe_interval 死代码,清理废弃的 _match_end.refresh()

- 缓存滑屏位移判定,避免单次检测内重复计算图像差分与输出日志

- 成员化 search_fail_timer,消除 17 处冗余参数透传
邀请第二个队友时等待3s,解决邀请过快导致邀请失败的问题
章节列表滑动方向改为向下滑动,使能找到困28入口
- replace login cancel and mail confirmation assets with shared global UI assets
- remove obsolete Restart image rules, metadata entries, and PNG files
- update the main page hook to use the shared cancel asset
fix:修复3人组队“邀请频繁”问题、修复向上滑动无法找到困28入口问题
按维护者意见:删掉手搓的等待循环,改用已有的 ui_click(click, stop,
interval, timeout):
- 由 base_task.ui_click 负责「截图 → 判 stop → 点一次」的节奏,
  不再自己维护 Timer / sleep / 点击计数。
- interval=6 让两次点击之间留给开场动画加载,timeout=45 保留原超时;
  「手动」按钮点不到时 ui_click 会在超时后返回,不会触发同键 guard。
- 保留 is_battle_end 提前结算的兜底:ui_click 超时返回后走原有
  顶部结算分支,不再需要内联 break。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed commented code and added a reference link.
fix(Duel): 开战前等待增加超时与点击上限
fix(Exploration): 修复特定UP类型找怪提前退出及滑屏边缘检测问题
1 爬塔活动处理御魂溢出。
2 刷御魂处理御魂溢出。
- Raise OCR click debounce on task name from 1s to 3s so page-transition
  double-clicks do not hit the top-right finish-for-jade button.
- Prefer GlobalGame I_UI_CANCEL (default threshold) when the jade confirm
  modal appears, both while entering and while exiting an in-progress task.
- Replace ui_click_until_disappear(I_D_BACK) with a timed back loop that
  clears blocking cancel modals, avoiding GameTooManyClickError restarts.
- Add enter/start timeouts so stuck states fail closed instead of looping.

Refs: #1162
处理爬塔和御魂本的御魂溢出
fix(Delegation): 修复误触勾玉立即完成及返回按钮死循环
- close the buff panel before clicking the prepare button\n- enable the 50% experience buff for EvoZone battles

@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.

嗨,我发现了 2 个问题

给 AI 智能体的提示
请处理此次代码审查中的评论:

## 单条评论

### 评论 1
<location path="tasks/Exploration/solo.py" line_range="101-103" />
<code_context>
+            unchanged = self.is_swipe_unchanged(before_image, self.device.image)
+
+        if (self.get_current_scene() != Scene.MAIN
+                or self.appear(self.I_UI_CONFIRM)
+                or self.appear(self.I_UI_CONFIRM_SAMLL)):
+            self.search_fail_timer.reset()
+            return
+
</code_context>
<issue_to_address>
**探索点击历史不断累积**

当后台滑动反复被场景切换或确认弹窗打断时,`_search_next_area` 会在调用该滑动对应的 `click_record_remove` 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 `GameTooManyClickError` 并停止。

在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。
</issue_to_address>

### 评论 2
<location path="tasks/Exploration/solo.py" line_range="113" />
<code_context>
+            self.swipe(self.S_SWIPE_BACKGROUND_RIGHT)
+            sleep(0.3)
+            self.screenshot()
+            if self.is_swipe_unchanged(before_retry, self.device.image):
+                logger.info("Reached rightmost boundary (confirmed twice). Quitting exploration.")
+                self._reset_search_state(reset_swipe_cnt=True)
</code_context>
<issue_to_address>
**遇到弹窗时探索会退出**

如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,`_search_next_area` 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 `quit_explore()`,导致探索直接退出,而不是处理新的状态。

在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。
</issue_to_address>

Sourcery 评估

待批准。 请先处理 2 个问题。

阻塞性问题:tasks/Exploration/solo.py:103、tasks/Exploration/solo.py:113


Sourcery 对开源项目免费——如果您喜欢我们的审查,请考虑分享 ✨
Original comment in English

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tasks/Exploration/solo.py" line_range="101-103" />
<code_context>
+            unchanged = self.is_swipe_unchanged(before_image, self.device.image)
+
+        if (self.get_current_scene() != Scene.MAIN
+                or self.appear(self.I_UI_CONFIRM)
+                or self.appear(self.I_UI_CONFIRM_SAMLL)):
+            self.search_fail_timer.reset()
+            return
+
</code_context>
<issue_to_address>
**Exploration click history accumulates**

When a background swipe is repeatedly interrupted by a scene change or confirmation popup, `_search_next_area` returns before calling `click_record_remove` for the swipe, leaving entries in the device click history until exploration raises `GameTooManyClickError` and stops.

Remove the swipe from the device click history before returning from this interruption path.
</issue_to_address>

### Comment 2
<location path="tasks/Exploration/solo.py" line_range="113" />
<code_context>
+            self.swipe(self.S_SWIPE_BACKGROUND_RIGHT)
+            sleep(0.3)
+            self.screenshot()
+            if self.is_swipe_unchanged(before_retry, self.device.image):
+                logger.info("Reached rightmost boundary (confirmed twice). Quitting exploration.")
+                self._reset_search_state(reset_swipe_cnt=True)
</code_context>
<issue_to_address>
**Exploration exits on popup**

When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, `_search_next_area` treats the unchanged retry image as a map boundary and calls `quit_explore()` without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.

Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: tasks/Exploration/solo.py:103, tasks/Exploration/solo.py:113


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

Comment thread tasks/Exploration/solo.py
Comment on lines +101 to +103
or self.appear(self.I_UI_CONFIRM)
or self.appear(self.I_UI_CONFIRM_SAMLL)):
self.search_fail_timer.reset()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 中 · 探索点击历史不断累积

当后台滑动反复被场景切换或确认弹窗打断时,_search_next_area 会在调用该滑动对应的 click_record_remove 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 GameTooManyClickError 并停止。

在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。

给 AI 智能体的提示
在 `tasks/Exploration/solo.py` 第 101-103 行:

**探索点击历史不断累积**

当后台滑动反复被场景切换或确认弹窗打断时,`_search_next_area` 会在调用该滑动对应的 `click_record_remove` 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 `GameTooManyClickError` 并停止。

在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。
Original comment in English

🟡 Medium · Exploration click history accumulates

When a background swipe is repeatedly interrupted by a scene change or confirmation popup, _search_next_area returns before calling click_record_remove for the swipe, leaving entries in the device click history until exploration raises GameTooManyClickError and stops.

Remove the swipe from the device click history before returning from this interruption path.

Prompt for AI agents
In `tasks/Exploration/solo.py` at lines 101-103:

**Exploration click history accumulates**

When a background swipe is repeatedly interrupted by a scene change or confirmation popup, `_search_next_area` returns before calling `click_record_remove` for the swipe, leaving entries in the device click history until exploration raises `GameTooManyClickError` and stops.

Remove the swipe from the device click history before returning from this interruption path.

Comment thread tasks/Exploration/solo.py
self.swipe(self.S_SWIPE_BACKGROUND_RIGHT)
sleep(0.3)
self.screenshot()
if self.is_swipe_unchanged(before_retry, self.device.image):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 中 · 遇到弹窗时探索会退出

如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,_search_next_area 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 quit_explore(),导致探索直接退出,而不是处理新的状态。

在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。

给 AI 智能体的提示
在 `tasks/Exploration/solo.py` 第 113 行:

**遇到弹窗时探索会退出**

如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,`_search_next_area` 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 `quit_explore()`,导致探索直接退出,而不是处理新的状态。

在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。
Original comment in English

🟡 Medium · Exploration exits on popup

When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, _search_next_area treats the unchanged retry image as a map boundary and calls quit_explore() without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.

Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.

Prompt for AI agents
In `tasks/Exploration/solo.py` at line 113:

**Exploration exits on popup**

When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, `_search_next_area` treats the unchanged retry image as a map boundary and calls `quit_explore()` without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.

Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants