Commit Graph

8 Commits

Author SHA1 Message Date
Mikkeli Matlock 1dcfe60b4d feat(04-02): add staleness detection to main speed display
- Add staleness check timer (1s interval) with proper disposal
- Speed/heading dim at 3s, show dashes at 10s (matching overlay)
- Apply staleness opacity to both speed and heading displays
- Remove WakelockPlus management (now in GpsDataManager)
- Remove WidgetsBindingObserver (now in GpsDataManager)
- Simplify background heartbeat (removed _isInBackground check)
- Wire overlay provider into GpsDataManager via initState
- Add haptic feedback to theme/unit cycling
- Update _buildSpeedDisplay to accept opacity parameter
2026-02-12 09:09:10 +09:00
Mikkeli Matlock cc11a3d31a feat(03-02): add staleness detection to overlay screen and error surfacing to SpeedometerScreen
Overlay screen staleness:
- Add _lastUpdateTime field to track GPS data freshness
- Add _stalenessCheckTimer for periodic staleness monitoring (1s interval)
- Update _lastUpdateTime from message.timestamp in _listenToMainAppMessages
- Start staleness monitoring in initState, cancel in dispose
- Calculate staleness opacity in build() (0.5 alpha after 3s)
- Apply staleness dimming to speed text, unit text, heading icon, and heading text
- Show "--" for speed after 10s of no data (setState in timer callback)
- Immediate snap-back when fresh data arrives (no AnimatedOpacity)

SpeedometerScreen error surfacing:
- Import permission_handler for openAppSettings
- Register error callback on OverlayProvider in initState postFrameCallback
- Implement _handleOverlayError to show snackbars for overlay errors
- Permission error: snackbar with "Settings" action button that opens app settings
- Creation failure: snackbar with error message (no action button)
- Communication degraded: snackbar with error message (no action button)
- Clean up error callback in dispose (try-catch for disposed provider)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:24:05 +09:00
Mikkeli Matlock 7d111ca202 feat(02-02): migrate SpeedometerScreen from setState to Provider
- Remove all shared state variables (unit, theme, GPS data, overlay status)
- Keep only local widget state (_errorMessage, _isInBackground, timer)
- Replace GPS initialization with context.read<GpsDataManager>().initialize()
- Replace overlay show/close/toggle with OverlayProvider methods
- Replace theme/unit cycling with SettingsProvider.cycleTheme/Unit()
- Remove isOverlayMode parameter (not used, overlay runs in separate isolate)
- Wrap build with Selector<SettingsProvider, ColorTheme> for scaffold background
- Use Selector<GpsDataManager, double> for speed display (rebuilds only on speed change)
- Use Selector<SettingsProvider, String> for unit label (rebuilds only on unit change)
- Use Selector<GpsDataManager, (heading, displayHeading)> for compass (rebuilds only on heading change)
- Use context.read<> for event handlers (non-rebuilding access)
- Simplify dispose() - only cancel background heartbeat timer and disable wakelock
- Background heartbeat uses OverlayProvider.pushCurrentData() instead of inline logic
- setState remains ONLY for _errorMessage (purely local error UI state)
- Remove unused imports (speed_unit.dart, processed_gps_data.dart)
- Portrait and landscape layouts both use Provider pattern
2026-02-10 22:18:34 +09:00
Mikkeli Matlock ad077d1f32 feat(01-02): extract OverlaySpeedometer to screens/overlay_screen.dart
- Created lib/screens/overlay_screen.dart with OverlaySpeedometer and _OverlaySpeedometerState
- All state, methods, gesture handling preserved exactly
- main.dart imports screens/overlay_screen.dart
- OverlaySpeedometer removed from main.dart
- main.dart slimmed to 39 lines (under 60 line target)
- main.dart now contains only: main(), overlayMain(), SpeedoApp class
- Zero analyzer errors (except intentional SCREAMING_SNAKE warnings)
2026-02-09 21:45:56 +09:00
Mikkeli Matlock bc36076134 feat(01-02): extract SpeedometerScreen to screens/speedometer_screen.dart
- Created lib/screens/speedometer_screen.dart with SpeedometerScreen and _SpeedometerScreenState
- All state, methods, layout builders preserved exactly
- main.dart imports screens/speedometer_screen.dart
- SpeedometerScreen removed from main.dart
- Zero analyzer errors (except intentional SCREAMING_SNAKE warnings)
2026-02-09 21:43:41 +09:00
Mikkeli Matlock bab90a9830 Complete v2.0 ultra-lightweight rebuild with premium color themes
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 22:35:20 +09:00
Mikkeli Matlock 71b7611a48 Implement v1.1 enhancements: auto-rotate, interactive gauge, and extended units
Features added:
- Auto-rotate support for portrait/landscape orientations
- Interactive gauge: tap to switch between digital and analog modes
- Extended speed units: added knots with quick selector buttons
- New SpeedUnitSelector widget for convenient unit switching

Known issues identified:
- 10 package dependencies need updates to latest compatible versions
- Orientation switching needs to override system auto-rotate toggle
- Background color customization moved back to TODO (build issues)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 01:58:46 +09:00
Mikkeli Matlock f5239d4a2a Implement complete GPS speedometer functionality
Features implemented:
- Real-time GPS speed tracking with permission handling
- Customizable speed units (km/h, mph) with persistent settings
- Digital and analog speedometer display styles
- Dark/light theme support with system integration
- Optional metrics: coordinates, distance, trip time, GPS accuracy
- Trip reset functionality and error handling
- Modular architecture with Provider state management

Technical details:
- Added dependencies: geolocator, permission_handler, provider, shared_preferences
- Configured Android location permissions (FINE_LOCATION, COARSE_LOCATION)
- Portrait orientation lock for mobile-first experience
- Extensible settings system for future customization options
- Clean separation of concerns: providers, screens, widgets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 23:30:14 +09:00