Sestriere 1.4 "Granito"
Solid as Alpine granite — a stability and code quality release.
No flashy new features this time. Instead, we went deep under the hood to rebuild the foundations for what comes next.
Architecture
- Protocol parsing extracted from MainWindow into a dedicated ProtocolHandler class
- Common utilities consolidated into Utils.h: FormatUptime, FormatTimeAgo, ParseHexPrefix, FormatContactKey
- All magic numbers replaced with named constants across the entire codebase
- Dead code removed: legacy MqttSettingsWindow, StatusBarView, unused message codes
Security
- Hardcoded credentials removed from source
- All database queries migrated to parameterized prepared statements
- User input validated before all protocol operations
- Bounds checks on every incoming protocol frame
Thread Safety
- DatabaseManager singleton protected with mutex
- Child window access guarded by new _LockIfVisible() helper
- MQTT connect/disconnect race condition fixed
- BMessageRunner lifecycle hardened: always NULL after delete, no use-after-free
Protocol Bug Fixes
- CMD_REMOVE_CONTACT and CMD_RESET_PATH now send full 32-byte public key (was 6-byte, causing silent failures)
- CMD_SET_RADIO_PARAMS sends frequency in kHz as V3 spec requires (was Hz)
- Packet Analyzer V3 message text offsets corrected
- localtime() replaced with reentrant localtime_r() throughout
- strtok() replaced with thread-safe strtok_r()
- Blocking snooze() removed from LoginWindow UI thread
UX Polish
- All windows centered on screen (or on parent) instead of hardcoded pixel positions
- Mission Control cards gracefully truncate long text in narrow windows
- MQTT password field with show/hide toggle
- Theme-aware Stats Window using system colors
- Reduced minimum sizes for Telemetry and Packet Analyzer to fit smaller screens
- Unified battery percentage formula across all views