Repository navigation
fix(Exploration): scroll chapter list the right way in open_expect_level - #1904
Enough1122 wants to merge 2 commits into
Conversation
open_expect_level swiped S_SWIPE_LEVEL_UP (finger top-to-bottom, y 328->444), which drags the list toward its top. The list always opens at chapters 1-4, so all 45 swipes (3 attempts x 15) were no-ops against the top bound and the task died with GameStuckError every time while targeting 第二十八章. Use the previously-unused S_SWIPE_LEVEL_DOWN (finger bottom-to-top, y 486->367) instead. Evidence: log/error/1791616956528 (and +88/+220) show the stuck loop with zero list movement; live run after the fix scrolled 11->24 across swipes, tapped 第二十八章, and farmed normally (battle win + rewards).
Top-to-28 needs ~17 swipes at ~2 chapters/swipe; the 15 cap (cut from 25 in 1943709) kills the first attempt at ch.22-24 even with the direction fix. 25 restores the previous known-good value. Kept local, no PR yet.
There was a problem hiding this comment.
嘿——我发现了 1 个问题
给 AI 代理的提示
请处理此次代码审查中的评论:
## 单独评论
### 评论 1
<location path="tasks/Exploration/base.py" line_range="172" />
<code_context>
debug_info = f"Swiped {swipeCount} times, current exploration level: {text1}"
logger.info(debug_info)
- if swipeCount >= 15:
+ if swipeCount >= 25:
raise GameStuckError(
f"Swiped too many times ({swipeCount}), seems stuck in exploration level selection"
</code_context>
<issue_to_address>
**可见章节被拒绝**
当目标章节恰好在滑动 25 次后首次变得可见时,`open_expect_level` 会在第 25 次滑动后立即抛出 `GameStuckError`,此时还未再次截图或检查目标章节是否可见,因此调用方会失败,而不是进入该章节。
请在滑动后检查截图,然后再执行滑动次数限制。
</issue_to_address>Sourcery 评估
等待批准。 请先处理 1 个发现的问题。
阻塞性发现:tasks/Exploration/base.py:172
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/Exploration/base.py" line_range="172" />
<code_context>
debug_info = f"Swiped {swipeCount} times, current exploration level: {text1}"
logger.info(debug_info)
- if swipeCount >= 15:
+ if swipeCount >= 25:
raise GameStuckError(
f"Swiped too many times ({swipeCount}), seems stuck in exploration level selection"
</code_context>
<issue_to_address>
**Visible chapter is rejected**
When the target chapter first becomes visible after exactly 25 swipes, `open_expect_level` raises `GameStuckError` immediately after the 25th swipe, before taking another screenshot or checking whether the target chapter is visible, so the caller fails instead of entering it.
Check the screenshot after the swipe before enforcing the swipe limit.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: tasks/Exploration/base.py:172
| debug_info = f"Swiped {swipeCount} times, current exploration level: {text1}" | ||
| logger.info(debug_info) | ||
| if swipeCount >= 15: | ||
| if swipeCount >= 25: |
There was a problem hiding this comment.
🟡 中等 · 可见章节被拒绝
当目标章节恰好在滑动 25 次后首次变得可见时,open_expect_level 会在第 25 次滑动后立即抛出 GameStuckError,此时还未再次截图或检查目标章节是否可见,因此调用方会失败,而不是进入该章节。
请在滑动后检查截图,然后再执行滑动次数限制。
给 AI 代理的提示
在 `tasks/Exploration/base.py` 第 172 行:
**可见章节被拒绝**
当目标章节恰好在滑动 25 次后首次变得可见时,`open_expect_level` 会在第 25 次滑动后立即抛出 `GameStuckError`,此时还未再次截图或检查目标章节是否可见,因此调用方会失败,而不是进入该章节。
请在滑动后检查截图,然后再执行滑动次数限制。Original comment in English
🟡 Medium · Visible chapter is rejected
When the target chapter first becomes visible after exactly 25 swipes, open_expect_level raises GameStuckError immediately after the 25th swipe, before taking another screenshot or checking whether the target chapter is visible, so the caller fails instead of entering it.
Check the screenshot after the swipe before enforcing the swipe limit.
Prompt for AI agents
In `tasks/Exploration/base.py` at line 172:
**Visible chapter is rejected**
When the target chapter first becomes visible after exactly 25 swipes, `open_expect_level` raises `GameStuckError` immediately after the 25th swipe, before taking another screenshot or checking whether the target chapter is visible, so the caller fails instead of entering it.
Check the screenshot after the swipe before enforcing the swipe limit.
Findings
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
|
这个问题确实存在,这两天挂困28的都应该碰到过这个问题,原因确实是描述的这样,困28正常刷取退出正常逻辑是会回到挑战困28界面,但是有时候会退出(卡出)这个界面,这个时候外面右侧的章节是在第一章开始,这时候就会触发脚本开始滑动,但是由于设置的逻辑问题滑动不到困28,,然后脚本就会卡死 |
|
#1912 这儿吗 |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
这样,在滑动之前先做一次ocr, 判断当前是什么的第几个章节,然后和目标章节判断一下看看选什么的方向,这里可以做三个或者两次尝试,避免滑过头。 让AI做的时候别拉一堆代码,要精简 |
|
等今晚0点我刷绘卷时候自测下 |


症状
Exploration 配了第二十八章,每次死在选关:
GameStuckError: Swiped too many times (15)。连续 3 轮共 45 次滑动,OCR 每次读到的都是第一/二/三章——列表零位移。截图(章节列表停在顶部,第一章到第四章):根因
open_expect_level里用的是S_SWIPE_LEVEL_UP,即手指从上往下(y 328→444),把列表内容往下拉——而列表打开时恒定停在顶部,每次滑动都是顶着上边界空转。要去下面的章节必须用一直闲置的S_SWIPE_LEVEL_DOWN(手指自下而上,y 486→367)。仓库里这个规则存在但没有任何调用,属接错线。修复(2 行,同一个函数)
S_SWIPE_LEVEL_UP→S_SWIPE_LEVEL_DOWN验证
Swiped N times, current exploration level: [...]逐次推进,而非原地踏步Unverified / please confirm:
Sourcery 摘要
通过向正确方向滚动并允许后续章节进行额外的滚动尝试,修复探索等级选择问题。
错误修复:
Original summary in English
Summary by Sourcery
Fix exploration level selection by scrolling in the correct direction and allowing additional scroll attempts for later chapters.
Bug Fixes: