135 lines
5.0 KiB
Markdown
135 lines
5.0 KiB
Markdown
# 2026-02-11 - Lemontropia Suite UI Redesign & Computer Vision
|
|
|
|
## Summary
|
|
|
|
Major UI redesign completed to focus on **Sessions** instead of "Project Management". Also added AI Computer Vision features with local GPU support.
|
|
|
|
## UI Changes Made
|
|
|
|
### 1. New File: `ui/setup_wizard.py`
|
|
- First-run setup wizard that guides users through:
|
|
- Setting avatar name (for global tracking)
|
|
- Configuring chat log file path
|
|
- Choosing default activity type (Hunting/Mining/Crafting)
|
|
- Optional: Downloading initial gear database (placeholder)
|
|
- Stores first-run complete flag in QSettings
|
|
- Can be re-run from Help menu
|
|
|
|
### 2. Redesigned: `ui/main_window.py`
|
|
**New Layout Structure:**
|
|
- **TOP**: Activity Setup panel
|
|
- Activity Type selector (🎯 Hunting, ⛏️ Mining, ⚒️ Crafting)
|
|
- Session Template selector with + button
|
|
- Loadout selector with prominent "Open Loadout Manager" button
|
|
|
|
- **MIDDLE**: Session Control panel
|
|
- Current activity/template display
|
|
- Status indicator
|
|
- Large START/STOP/PAUSE buttons
|
|
- Session info summary
|
|
|
|
- **BOTTOM**: Recent Sessions list
|
|
- Shows last 20 sessions with activity type, template, duration, costs, returns
|
|
- View Full History button
|
|
- Refresh button
|
|
|
|
**Key Changes:**
|
|
- Replaced "Project Management" with "Session Templates"
|
|
- ActivityType enum with display names and colors
|
|
- SessionTemplate dataclass (replaces Project)
|
|
- RecentSession dataclass for session history
|
|
- Prominent Loadout Manager button in Activity Setup panel
|
|
- "Run Setup Wizard Again" in Help menu
|
|
|
|
### 3. New Features Added
|
|
|
|
**Session History & Gallery (by sub-agent):**
|
|
- `ui/session_history.py` - Full session history viewer with export
|
|
- `ui/gallery_dialog.py` - Screenshot gallery for globals/HoFs
|
|
- Auto-screenshot capture on global/HoF events
|
|
- Screenshots saved to `data/screenshots/`
|
|
|
|
**Enhanced Loadout Manager:**
|
|
- Added weapon amplifier support
|
|
- Added armor plating support
|
|
- Added mindforce implant support
|
|
- Full cost calculations for all gear types
|
|
|
|
**Computer Vision AI (by sub-agent):**
|
|
- `modules/game_vision_ai.py` - GPU-accelerated OCR and icon detection
|
|
- `modules/icon_matcher.py` - Icon similarity matching
|
|
- `ui/vision_settings_dialog.py` - Vision settings panel
|
|
- `ui/vision_calibration_dialog.py` - Calibration wizard
|
|
- `ui/vision_test_dialog.py` - Test and debug dialog
|
|
- Features: OCR (PaddleOCR), icon detection, GPU auto-detection
|
|
|
|
## Bug Fixes
|
|
|
|
### Fixed Issues:
|
|
1. **Template loading error** - sqlite3.Row doesn't have `.get()` method
|
|
2. **Session loading error** - Missing `status` column in sessions table
|
|
3. **ActivityType enum** - Values now match database CHECK constraint ('hunt', 'mine', 'craft')
|
|
4. **Missing imports** - Added QCheckBox to PyQt6 imports
|
|
5. **Recursion errors** - Blocked signals during filter updates in Session History and Gallery
|
|
6. **Database methods** - Added `fetchall()` and `fetchone()` helper methods
|
|
7. **Plate selector** - Fixed method name `get_selected_plate()` → `selected_plate`
|
|
|
|
## Installation Issues
|
|
|
|
### PyTorch/PaddleOCR on Python 3.13
|
|
- Windows Store Python has compatibility issues with PyTorch CUDA libraries
|
|
- CPU-only versions work but PyMuPDF fails to build (requires Visual Studio)
|
|
- Created `verify_vision.py` and `install_vision_quick.bat` for easier installation
|
|
- Computer Vision features work without PyMuPDF
|
|
|
|
## Current Status
|
|
|
|
### Working Features:
|
|
- ✅ Hunting session tracking with HUD overlay
|
|
- ✅ Cost tracking (weapon, armor, healing)
|
|
- ✅ Loot tracking (shrapnel, regular loot)
|
|
- ✅ Global/HoF detection and counting
|
|
- ✅ Session History viewer
|
|
- ✅ Screenshot Gallery
|
|
- ✅ Loadout Manager with full gear support
|
|
- ✅ Pause/Resume functionality
|
|
- ✅ Settings persistence
|
|
|
|
### Partially Working:
|
|
- ⚠️ Computer Vision - Installation complex on Windows Store Python
|
|
|
|
### Known Issues:
|
|
- Computer Vision requires manual dependency installation
|
|
- Some users report socket buffer exhaustion after extended use (requires restart)
|
|
|
|
## Files Created/Modified Today
|
|
|
|
### New Files:
|
|
- `ui/setup_wizard.py` (20KB)
|
|
- `ui/session_history.py` (42KB)
|
|
- `ui/gallery_dialog.py` (29KB)
|
|
- `ui/amplifier_selector.py`
|
|
- `ui/vision_settings_dialog.py` (645 lines)
|
|
- `ui/vision_calibration_dialog.py` (628 lines)
|
|
- `ui/vision_test_dialog.py` (470 lines)
|
|
- `modules/game_vision_ai.py` (722 lines)
|
|
- `modules/icon_matcher.py` (614 lines)
|
|
- `docs/CODEBASE_AUDIT_REPORT.md` - Feature inventory
|
|
- `verify_vision.py` - Dependency checker
|
|
- `fix_pytorch.bat` / `fix_pytorch_python313.bat` / `install_vision_quick.bat`
|
|
|
|
### Modified Files:
|
|
- `ui/main_window.py` - Major restructuring
|
|
- `ui/loadout_manager_simple.py` - Enhanced gear support
|
|
- `core/database.py` - Added migrations and helper methods
|
|
- `core/schema.sql` - Added status column
|
|
- `gui_main.py` - First-run wizard integration
|
|
- `requirements.txt` - New dependencies
|
|
|
|
## Next Steps
|
|
|
|
1. Fix remaining Computer Vision installation issues
|
|
2. Test all features in production hunting sessions
|
|
3. Add more robust error handling for vision features
|
|
4. Consider alternative OCR libraries if PaddleOCR remains problematic
|