Alpha 0.2.0
MeshCore Open - Release Notes
New Features and Fixes
🎉 New Features
1. App Debug Logging System
Files: app_debug_log_service.dart, app_logger.dart, app_debug_log_screen.dart
- In-app debug log viewer with 3 levels (info, warning, error)
- Copy and clear functionality
- Configurable enable/disable via settings
- Max 1000 entries with automatic rotation
- Global
appLoggersingleton for easy use throughout codebase
2. Battery Indicator Widget
File: battery_indicator.dart
- Tappable battery display that toggles between percentage and voltage
- Color-coded battery status (red/orange/amber/green based on charge level)
- Material Design battery icons that change based on charge level
- Integrated into device/status screens
3. Advanced Path Management UI
Files: path_management_dialog.dart, path_selection_dialog.dart
- Visual path history with success rates and trip times
- Tap to select from recently successful paths
- Long-press to view full path details
- Remove individual path entries from history
- Custom path builder with contact selection
- Path validation (max 64 hops, hex format checking)
- Visual indicators for flood vs. routed paths
- Clear path / Force flood mode options
4. List Filtering & Sorting Widget
File: list_filter_widget.dart
- Reusable filter/sort menu component
- Multi-section support with dividers
- Checkbox menu items for filters
- Radio-style selection for sort options
- Used in contacts and channels screens
5. Contacts Screen Enhancements
- Sort options: Latest messages, Heard recently, A-Z
- Type filters: All, Users, Repeaters, Room servers
- "Unread only" filter
- "New group" action in filter menu
- Visual indicators for contact types
- Improved contact refresh logic
6. Channels Screen Improvements
- Channel sync progress indicator
- Better loading states during channel refresh
- Filter and sort options for channels
- Improved channel ordering persistence
7. Repeater Command ACK Tracking
- Track acknowledgments for CLI commands sent through repeaters
- Integrates with path history to record command delivery success
- Timeout handling for commands that don't get ACKed
- Path result recording (success/failure with trip time)
8. Path Override API Enhancements
preparePathForContactSend()- Prepares path selection before sendingverifyContactPathOnDevice()- Verifies path was set correctly on devicetrackRepeaterAck()- Track ACKs for repeater commandsrecordRepeaterPathResult()- Record path success/failure- Better separation of concerns between connector and services
9. App Settings Additions
appDebugLogEnabledsetting- Battery chemistry per-device configuration
- Theme mode persistence (system/light/dark)
- Auto route rotation toggle
10. Repeater Features
- Enhanced repeater login dialog with better error handling
- Repeater CLI screen improvements
- Repeater status screen with more details
- Repeater settings screen enhancements
🐛 Fixes
1. Channel Sync Race Conditions ⭐ Critical Fix
Issue: Parallel channel requests caused timeouts and missing channels
Fix:
- Switched to sequential channel syncing with retry logic
- Per-channel timeout (2 seconds) instead of bulk timeout
- Retry up to 3 times per channel before falling back to cache
- Progress tracking for better UX
- Proper cleanup on disconnection
2. Path Override Persistence
Issue: User path overrides could be lost when device sends contact updates
Fix:
- Explicitly preserve
pathOverrideandpathOverrideBytesduring contact merge - Added defensive logging to track path override state changes
3. Contact Path Bytes Handling
- Added
_pathsEqual()helper for proper path comparison - Fixed path resolution logic when both override and device path exist
- Better handling of empty path bytes vs. null paths
4. Protocol Attempt Field
Fix:
- Clamp attempt counter to 0-3 range in
buildSendCliCommandFrame - Prevents overflow in protocol's 2-bit attempt field
- Added optional
timestampSecondsparameter for deterministic testing
5. ACK Hash Computation for SMAZ
Issue: ACK hashes didn't match when SMAZ compression was applied
Fix:
- Exposed
prepareContactOutboundText()method to consistently apply SMAZ before hashing - Both message retry service and repeater command service now use same text transformation
6. Queue Sync State Management
- Fixed cleanup of queue sync state on disconnect
- Removed duplicate state reset code
- Proper timeout cancellation
7. Channel Info Handling During Sync
- Fixed handling of unsolicited channel updates during sync
- Prevent UI jumping during channel load
- Only notify listeners after sync completes
8. Message Retry Service Integration
- Added callbacks for better integration:
getSelfPublicKeyCallback,prepareContactOutboundTextCallback - Pass
AppDebugLogServiceto retry service for better logging - More robust error handling in retry logic
9. Background Service Cleanup
- Proper cleanup of pending repeater ACKs on disconnect
- Cancel all ACK timeouts when connection is lost
- Fixed potential memory leaks
10. iOS/macOS Build Configuration
- Removed codec2 pod dependency from iOS
- Added network client entitlement for macOS
- Updated Info.plist for macOS
11. Contact Settings Store
- Better handling of contact-specific settings
- Proper merge of last message timestamps
12. Map Screen Improvements
- Better error handling
- Improved tile caching
13. Chat Screen Refactoring
- Simplified chat screen logic (448 lines removed, cleaner code)
- Better separation of concerns
- Improved message display
📈 Statistics
| Metric | Value |
|---|---|
| Total files changed | 25 |
| New files added | 7 |
| Lines added | 1,721 |
| Lines removed | 846 |
| Net change | +875 lines |
Major Refactors:
- chat_screen.dart: -448 lines (simplified)
- meshcore_connector.dart: +410 lines (new features)
- channels_screen.dart: +346 lines (enhanced UI)
- contacts_screen.dart: -212 lines (cleaner code)
- app_settings_screen.dart: +205 lines (new options)
🎯 Impact Summary
User-Facing:
✅ Better debugging tools
✅ Improved path management and visualization
✅ More reliable channel syncing
✅ Battery info display
✅ Better contact filtering and sorting
✅ Enhanced repeater management
Developer-Facing:
✅ Comprehensive logging system
✅ Better API for path management
✅ Cleaner separation of concerns
✅ More maintainable state management
✅ Improved error handling patterns
Bug Fixes:
✅ Channel sync reliability
✅ Path override persistence
✅ ACK tracking accuracy
✅ Memory leak prevention
✅ State cleanup on disconnect