3 Commits

Author SHA1 Message Date
a3cea4d192 feat(login): implement faster stuck-loading detection with _loading_buffer_visible
- Added _loading_buffer_visible function to detect the loading spinner badge
- Updated _wait_for_home to utilize the new detection for early recovery
- Introduced configuration options for loading buffer detection parameters
- Improved handling of stuck loading state to reduce wait time

fix(cron): make ba_cron_run.sh executable

- Changed file mode of ba_cron_run.sh to 755 to ensure it is executable
- Verified that cron can now execute the script as intended

fix(navigation): prevent crash in return_to_home when window disappears

- Added guard to return_to_home to check if the game window exists before focusing
- Ensured robustness in cleanup path during game exit
2026-07-20 01:21:53 +09:00
d21aadbde8 fix(login): enhance connectivity checks to prevent false positives in home detection
- Implemented `_connectivity_confirmed` to verify session validity by opening the Mission panel, addressing two failure modes:
  1. Bright full-screen transition frames that could falsely satisfy home checks.
  2. Dead sessions due to server resets or concurrent logins, which appear as normal home screens until navigation is attempted.

- Improved detection logic by requiring a second verification of `_true_home` after a short wait, reducing the likelihood of coincidental false positives.
- Confirmed live against real scenarios, ensuring robust handling of session states during login.
2026-07-17 20:07:48 +09:00
a9f0bbe42f Implement login flow from title screen to home screen
- Added `login.py` to handle the login process, including detection of various states such as the title screen, network error notices, loading transitions, daily attendance cards, and the home screen.
- Integrated a recovery mechanism to relaunch the game if it gets stuck during loading.
- Updated `ba_daily.py` to include the login task in the default execution order, ensuring it runs first to navigate to the home screen before other tasks.
- Fixed a bug in the home detection logic to accurately identify when the user is on the true home screen.
- Live-tested and calibrated the login flow against real game states, confirming functionality and addressing any issues encountered during testing.
2026-07-16 11:07:43 +09:00