- Document all approaches tried: Activity-based, ComposeView overlay, lifecycle solutions
- Detail specific issues encountered: positioning, transparency, lifecycle crashes
- Analyze three next-step options with pros/cons
- Record user requirements and current git state for easy resume
- Provide technical deep dive of what worked vs what failed
Ready for next conversation to pick up from Option A, B, or C.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove complex OverlayLifecycleOwner implementation
- Remove ViewTreeLifecycleOwner references (not available in this API level)
- Use basic ComposeView without explicit lifecycle management
- Let ComposeView handle its own lifecycle in overlay context
Some Android versions support ComposeView in overlay without explicit lifecycle.
If this still fails, we'll fall back to View-based FAB implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com)
- Create OverlayLifecycleOwner implementing LifecycleOwner and SavedStateRegistryOwner
- Set ViewTreeLifecycleOwner and ViewTreeSavedStateRegistryOwner on ComposeView
- Manage lifecycle states (onCreate, onStart, onResume, onDestroy) for overlay
- Fixes: ViewTreeLifecycleOwner not found exception when using ComposeView in overlay
Error: java.lang.IllegalStateException: ViewTreeLifecycleOwner not found
Solution: Provide custom lifecycle owner for overlay context
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename MenuFABItem to OverlayMenuFABItem in FloatingComposeOverlay
- Fixes overload resolution ambiguity between two files
- Both FloatingUIActivity and FloatingComposeOverlay had same function name
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create FloatingComposeOverlay using WindowManager for true system overlay
- Replace Activity-based approach with proper overlay window
- Add unrestricted drag support with WindowManager position updates
- Use transparent background to show underlying apps
- Integrate overlay directly into ScreenCaptureService
- Remove FloatingUIActivity dependency from MainActivity
Benefits:
- True floating behavior over all apps
- Unrestricted dragging anywhere on screen
- Transparent background shows underlying content
- Proper system overlay like CalcIV
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move setupTransparentOverlay() from onCreate to onResume to avoid null window
- Add try-catch block to handle WindowInsetsController access errors
- Add null-safety checks for window operations
- Prevent crash when accessing insetsController before window is ready
Fixes: NullPointerException when accessing WindowInsetsController
Error: 'getWindowInsetsController()' on a null object reference
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Make FAB truly draggable with detectDragGestures
- Add screen bounds checking to keep FAB visible
- Hide navigation bar and status bar for immersive overlay experience
- Support both Android R+ (WindowInsetsController) and legacy system UI flags
- FAB now floats anywhere on screen and can be repositioned by dragging
Fixes: Navigation bar and status bar no longer show during capture mode
Fixes: FAB is now truly floating and user can position it anywhere
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create FloatingUIActivity with true Material 3 FloatingActionButton
- Implement Binder communication between UI Activity and Service
- Remove UI handling from ScreenCaptureService (now pure background service)
- Add proper Material 3 animations and haptic feedback
- Update MainActivity to launch FloatingUIActivity on capture start
- Register FloatingUIActivity in AndroidManifest with transparent theme
Architecture: FloatingUIActivity (Compose UI) ↔ Binder ↔ ScreenCaptureService (Detection)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix NUM_DETECTIONS constant from 8400 to 300 for NMS-enabled ONNX model
- Completely remove DEBUG_DETECTION flag and all shiny debug logging blocks
- Clean up code for production readiness
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed critical color conversion issue where RGBA2RGB was causing red/blue
channel swap, preventing YOLO model from recognizing shiny icons. Changed
to RGBA2BGR conversion for proper OpenCV compatibility.
Key improvements:
- Fixed screen capture padding/cropping (1088→1080px width)
- Added comprehensive debug logging for capture pipeline
- Created comparative debugging scripts for .pt vs ONNX models
- Resolved color corruption preventing shiny icon detection
- Shiny icons now detected with 0.87+ confidence
Testing confirmed detection working for shiny icons and other UI elements.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add SHINY_ICON_DEBUG_REPORT.md with full investigation summary
- Root cause identified: NMS=True model filters out shiny icons from top 300 detections
- Added comprehensive debugging infrastructure in YOLOOnnxDetector.kt
- Confirmed model detects other classes but class 50 (shiny_icon) absent from NMS output
- Proposed solutions: hybrid model approach, NMS parameter tuning, or post-processing
Ready for next session with clear action plan and debugging tools in place.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Log raw output statistics including max values and non-zero counts
- Specifically check shiny icon class region (class 50) in raw model output
- Will reveal if model produces shiny predictions before post-processing
- Helps identify if issue is in model weights vs post-processing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add DEBUG_SHINY_DETECTION flag to track shiny_icon (class 50) processing
- Lower confidence threshold from 0.45f to 0.25f temporarily for debugging
- Add detailed logging for shiny icon candidates with confidence and coordinates
- Will help identify if shiny icons are being detected but filtered out
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove class-specific check and apply 5% expansion to all OCR detections
- Improves text extraction accuracy across all Pokemon info fields
- Stat values showed significant improvement, extending to all text classes
- No overlap issues expected due to Pokemon Home UI spacing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add extractPokemonInfoFromYOLOAsync call to triggerManualDetection()
- OCR extraction was missing after MVC refactor - only YOLO detection was running
- Now manual detection triggers both YOLO detection and OCR extraction
- Maintains full Pokemon analysis functionality in new MVC architecture
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 5% expansion to bounding boxes for hp_value, attack_value, defense_value, sp_atk_value, sp_def_value, speed_value
- Expansion applied before clipping to image boundaries
- Added debug logging to show bbox expansion transformations
- Should improve OCR accuracy for tight stat value detections
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update DetectionController.processDetection() to return Detection objects
- Add Detection import to controller
- Update ScreenCaptureService to show overlay using returned detections
- Improve FloatingOrbUI button text visibility with larger font and padding
The MVC refactor is now complete with fully working detection overlay.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace old UI code with FloatingOrbUI component
- Add DetectionController with callback system
- Implement convertImageToMat helper function
- Connect UI events to business logic through controller
- Remove direct YOLO detector calls from UI
Related todos: #24
- Add DetectionUIEvents and DetectionUICallbacks interfaces
- Create DetectionController for business logic separation
- Add FloatingOrbUI pure UI component with no business logic
- Establish clean event-driven communication pattern
Related todos: #24