Skip to content

fix(Mall): Refresh mall confirm template and add back-to-mall timeout - #1817

Open
m123711 wants to merge 1 commit into
runhey:devfrom
m123711:dev
Open

m123711 wants to merge 1 commit into
runhey:devfrom
m123711:dev

Conversation

@m123711

@m123711 m123711 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Problem

After the 2026-09-09 game update, page_check_mall.png (I_CHECK_MALL, the confirm template for the mall page) no longer matches the current UI - measured similarity dropped to 0.033 (threshold 0.8). When returning from store sub-pages (DailyTrifles store sign, RichMan mall), the script never confirmed it was back on the mall page, kept clicking the back button, and raised GameStuckError: Wait too long after the 60s stuck timer, forcing an unnecessary app restart.

Fix

  • Replace page_check_mall.png with the room-gift entrance icon (measured similarity 0.955 on current UI) and update I_CHECK_MALL ROI to (1138,658,52,40) / (1119,621,103,94)
  • DailyTrifles.run_store: confirm with I_ROOM_GIFT and add a 10s timeout
  • RichMan.back_mall: add a 10s timeout fallback so a missed confirm logs a warning and continues instead of looping clicks / triggering the 60s stuck restart

Verification

  • Template similarity re-measured with cv2 on a current mall screenshot: 0.955 (threshold 0.8)
  • py_compile passes for all changed files

Sourcery 总结

通过刷新页面识别并添加超时回退机制,在更新后的游戏界面中恢复可靠的商城导航。

错误修复:

  • 更新当前 UI 的商城页面识别逻辑,并防止在未检测到确认操作时商店导航陷入循环或强制进行不必要的应用重启。

功能增强:

  • 从 DailyTrifles 和 RichMan 商店返回商城时,添加有界的确认超时机制,并在超时后通过警告继续执行。
Original summary in English

Summary by Sourcery

Restore reliable mall navigation after the updated game UI by refreshing page recognition and adding timeout fallbacks.

Bug Fixes:

  • Update mall page recognition for the current UI and prevent store navigation from looping or forcing an unnecessary app restart when confirmation is missed.

Enhancements:

  • Add bounded confirmation timeouts with warning-based continuation when returning to the mall from DailyTrifles and RichMan stores.

page_check_mall.png was based on pre-2026-09-09 UI; after the game
update its matching score dropped to 0.033, so returning from store
sub-pages (DailyTrifles store sign, RichMan mall) never confirmed the
mall page, kept clicking back, and triggered GameStuckError after the
60s stuck timer.

- Replace page_check_mall.png with the room-gift entrance icon
  (matching 0.955) and update I_CHECK_MALL ROI to (1138,658,52,40)
- DailyTrifles.run_store: use I_ROOM_GIFT as confirm and add 10s timeout
- RichMan.back_mall: add 10s timeout fallback so a missed confirm logs a
  warning and continues instead of looping/restarting

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

嘿——我已经审查了你的更改,看起来很棒!

Sourcery 评估

已批准。


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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


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

@github-actions

Copy link
Copy Markdown
Contributor

Change Summary

  • 更新 page_check_mall.png,并将 I_CHECK_MALL 的识别区域移到当前 UI 的礼屋入口图标。
  • DailyTrifles 返回商城时改用 I_ROOM_GIFT 确认,并将等待上限设为 10 秒。
  • RichMan 返回商城时将等待上限设为 10 秒,超时后记录 warning 并继续返回。

Reconstructed Intent

点击此处展开 - 这次改动最可能是为了适配 2026-09-09 更新后的商城界面,恢复商城页识别,并避免返回商城确认失败时触发长时间卡死或应用重启。 - 隐含的行为目标是:返回商城失败应当有界,同时后续流程能够在可接受的页面状态下继续。

Observed Constraints

点击此处展开 - 新模板必须在实际分辨率和当前 UI 下稳定匹配;其 ROI 与模板文件需要保持一致。 - `I_ROOM_GIFT` 既被用作商城页的页面确认条件,也被用于 DailyTrifles 返回商城后的确认。 - 超时分支不能只缩短等待,还必须保证调用方不会把“仍在商店子页”误认为“已经回到商城”。 - DailyTrifles 超时后会重新识别页面并调用 `ui_goto(page_main)`,具备一定的后续路径恢复;RichMan 的 `back_mall()` 超时后没有同等的状态确认或恢复动作。

Intent Alignment

  • 结论:只部分覆盖推断出的 intent。
  • 模板刷新与两处有界等待基本符合修复方向;但 RichMan 超时后直接返回,execute_mall() 随即结束,当前页可能仍是商店子页,因而“继续执行”并不等同于“已安全返回商城”。

Release Risk

  • 风险等级:中
  • RichMan 的超时 fallback 可能留下 ui_current 与实际页面不一致,后续任务若依赖商城或主页面状态,可能出现误操作、页面识别重试或跨任务链路异常。
  • 新商城模板使用单一入口图标作为页面确认;若该图标在动画、遮挡或其他商城相关界面中短暂出现,可能造成过早确认。当前未见跨场景误匹配验证。
  • PR 状态中的 Run check 已失败,且其余 agent checks 仍在进行中;不能仅以描述中的 py_compile 通过作为行为验证依据。

Validation Gaps

点击此处展开 - 需要在当前 UI 上分别验证:DailyTrifles 礼屋/杂货铺返回商城、RichMan 各商店返回商城,以及 10 秒内未识别到确认时的实际页面状态。 - 需要覆盖 RichMan 超时后的调用方行为,确认不会在未回到商城时继续执行后续任务;至少应有重新识别目标页或明确回退到主页面的验证。 - 需要确认新 PNG 的尺寸、内容与 `(1138,658,52,40)/(1119,621,103,94)` ROI 在所有支持的截图分辨率下匹配。 - 应调查并修复或解释当前失败的 `Run` check。

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by PR Review Intent for #1817 · codex · gpt56 · 14.6 AIC · ⌖ 2.95 AIC · ⊞ 12.4K ·

@github-actions

Copy link
Copy Markdown
Contributor

Findings

  • C2 [风险]
    位置:tasks/RichMan/mall/navbar.py:93,MallNavbar.back_mall
    原因:超时后仅记录日志并继续返回调用方,后续商城操作仍可能在未确认商城页面时执行,退出条件不等于状态已满足。
    修改:超时后重新识别页面;若仍未确认商城,停止当前商城流程或走明确的恢复路径。
  • C4 [风险]
    位置:tasks/DailyTrifles/script_task.py:225,ScriptTask.run_store
    原因:返回确认失败后仍无条件执行 ui_get_current_page() 和 ui_goto(page_main),可能把未回到商城的中间页面当作可继续导航的状态。
    修改:根据 ui_click 返回值分支处理;失败时先确认当前页或显式终止本次任务,避免错误状态继续流转。
  • C7 [不确定]
    位置:tasks/DailyTrifles/script_task.py:225;tasks/RichMan/mall/navbar.py:93
    原因:PR 描述仅提供 py_compile 和模板相似度验证,未见覆盖两个超时分支及超时后的页面状态验证。
    修改:补充可重复的超时场景测试或运行日志证据,验证成功、超时和仍停留子页面三种路径。

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by PR Review Checklist for #1817 · codex · gpt56 · 28.4 AIC · ⌖ 2.61 AIC · ⊞ 12.2K ·

@runhey

runhey commented Sep 15, 2026

Copy link
Copy Markdown
Owner

tasks/GameUi/page/page_check_mall.png 这个图我给你验一下,贴出你游戏的截图,我看看下,按理说是没有问题的。
然后上一个pr和你提了,不能单独改assets

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.

2 participants