- Added `read_lines` function to `detector.py` for OCR of multiple text lines in a specified region, improving the ability to dynamically locate text in the UI.
- Rewrote the gem shop task in `gem_shop.py` to utilize OCR for sidebar navigation and free card status checks, replacing fixed coordinates with dynamic text detection.
- Introduced helper functions `_find_sidebar_label`, `_on_general_products_tab`, `_ensure_general_products_tab`, `_read_card_lines`, `_read_free_card_status`, and `_find_buy_button` to streamline the OCR process and improve reliability against UI changes.
- Removed outdated color probe methods for checking the free card status, enhancing the robustness of the gem shop interaction flow.
- Live-calibrated the new OCR functionality to ensure accurate detection of UI elements and their states.
- Created ba_auto/tasks/bounty.py to handle the Bounty task, simplifying the original reference's per-call loop to a single area sweep based on date-ordinal-modulo rotation.
- Live-calibrated against nik-gpu on 2026-07-11, ensuring zero real tickets were spent during testing.
- Adjusted entry point to directly access the Work-hub card for Bounty, eliminating unnecessary navigation steps.
- Implemented logic to confirm the latest stage available in each area, ensuring all stages are SSS-cleared.
- Fixed bugs related to ticket count handling and result button detection, preventing unintended real-currency prompts.
- Updated ba_daily.py to include the new bounty task in the task flow.
- Documented the implementation and testing process in plan.md, detailing live tests and fixes applied.
- Added `find_template` and `template_visible` functions for template matching in screenshots.
- Introduced `read_int_white_on_dark` for OCR of bright text on dark backgrounds.
- Ported arena functionality from reference, including ticket management, opponent selection, and reward collection.
- Implemented safety checks for modal visibility and result confirmation to prevent unintended ticket spends.
- Live-tested the arena task, confirming functionality across multiple tickets with real fight outcomes.
- Updated mapping documentation to reflect new arena task implementation and its unique navigation requirements.
- Added `lesson.py` to handle the scheduling of lessons based on affection values.
- Integrated OCR functionality to read affection counts from heart badges.
- Updated `README.md` to include the new lesson task in the task status section.
- Enhanced `config.py` with necessary configurations for the lesson task.
- Modified `detector.py` to include a new function for reading heart badge values accurately.
- Updated `mapping.md` to reflect the new lesson task implementation.
- Adjusted `ba_daily.py` to include the lesson task in the command dispatch.
- Updated `plan.md` to document the completion of the lesson task and its testing outcomes.
- Modified `setup.sh` to include the lesson task in the run command instructions.
- Added `wait_for_state` function in `navigation.py` for state monitoring and reaction handling.
- Updated `mapping.md` to reflect changes in story sweep implementation and OCR usage.
- Refactored `story_sweep.py` to utilize OCR for region and stage identification, replacing random selection with configured targets.
- Enhanced modal handling and confirmation checks for AP usage in `story_sweep.py`.
- Updated setup script to require `tesseract` for OCR functionality and included installation instructions.
- Revised `plan.md` to document the transition from heuristic to OCR-based stage targeting and the associated findings from live testing.
- Changed references from './scratchpad' to '.scratchpad/' in graph.json and plan.md for consistency.
- Expanded Phase 6 follow-up section in plan.md to clarify changes made to the pat detection logic:
- Updated `find_cafe_sparkle()` to utilize multiple template scales for improved detection.
- Modified `_pat_room` to allow polling for maximum clicks instead of breaking on the first miss.
- Added mouse movement after each pat to prevent cursor occlusion of sparkles.
- Verified that room entry and modal state checks function correctly, but end-to-end pat success remains untested due to lack of available interactions.