fix: skip_dialogs 加载帧误点右上角导致推图结算卡死#60
Conversation
📝 WalkthroughWalkthroughIn ChangesLoading Screen Guard in skip_dialogs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/tasks/BaseGfTask.py`:
- Around line 114-115: The empty OCR fallback in skip_dialogs() is too
aggressive because it treats a single no-box frame as loading, which blocks the
top-right dismissal path. Update BaseGfTask.skip_dialogs() so that one empty OCR
pass does not immediately return True; instead, only classify loading after
consecutive empty frames or when an explicit loading token is detected. Keep the
change localized to the skip_dialogs logic so callers like
ClearMapTask.skip_dialogs() and DailyTask.skip_dialogs() continue to dismiss
dialogs on transient OCR misses.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e07251ed-b6f5-4198-9b8b-f11fadbc4cef
📒 Files selected for processing (1)
src/tasks/BaseGfTask.py
| if not boxes: | ||
| return True |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Don't classify a single empty OCR pass as a loading frame.
skip_dialogs() uses the top-right fallback precisely when OCR found nothing actionable. Returning True on Line 114 turns every OCR miss into "loading", so the new guard at Lines 101-103 just sleeps and retries until timeout instead of dismissing the dialog. That can stall real flows such as ClearMapTask.skip_dialogs(...) and DailyTask.skip_dialogs(...) on transient OCR misses. Please gate empty OCR on consecutive frames or an adjacent explicit loading token instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/tasks/BaseGfTask.py` around lines 114 - 115, The empty OCR fallback in
skip_dialogs() is too aggressive because it treats a single no-box frame as
loading, which blocks the top-right dismissal path. Update
BaseGfTask.skip_dialogs() so that one empty OCR pass does not immediately return
True; instead, only classify loading after consecutive empty frames or when an
explicit loading token is detected. Keep the change localized to the
skip_dialogs logic so callers like ClearMapTask.skip_dialogs() and
DailyTask.skip_dialogs() continue to dismiss dialogs on transient OCR misses.
|
Closes #59 |
Summary by CodeRabbit