Add HUD notification system for phone calls, SMS, and image display#7
Conversation
Config-driven notification popups with fade in/out, auto-dismiss, and contact photo display from base64 MQTT payloads. - Notification state machine (HIDDEN/SHOWING/VISIBLE/COMPACT/HIDING) with two independent slots (phone + image) - 6 dynamic text sources: CALLER_NAME, CALLER_NUMBER, CALL_STATUS, SMS_PREVIEW, NOTIFICATION_TITLE, NOTIFICATION_SOURCE - notification_photo special element with lazy-loaded placeholder - notification_group integer enum resolved at parse time (O(1) render) - Mutex-protected phone state (MQTT writer, render thread reader) - Base64 photo decode via OpenSSL BIO, texture on render thread - Ring event resets incoming_call TTL (keeps notification alive) - 9 config.json elements (phone bg, photo, 4 labels, image bg, 2 labels) - Notification panel PNG assets (angular beveled, Iron Man aesthetic) - Added new original SVG directory.
Review Summary by QodoAdd HUD notification system for phone calls, SMS, and image display
WalkthroughsDescription• Notification system for phone calls, SMS, and image display with state machine • Config-driven elements linked to notification groups via notification_group field • Base64 photo decoding from MQTT payloads with lazy-loaded placeholder textures • Mutex-protected phone state for thread-safe MQTT writer and render thread reader • Six dynamic text sources for caller info, call status, SMS preview, and image metadata • Auto-dismiss with TTL, fade in/out animations, and compact mode for active calls Diagramflowchart LR
MQTT["MQTT Events<br/>phone/image"] -->|notification_handle_phone_event| PhoneSlot["Phone Slot<br/>State Machine"]
MQTT -->|notification_handle_image_request| ImageSlot["Image Slot<br/>State Machine"]
PhoneSlot -->|notification_update| StateTransition["State Transitions<br/>SHOWING→VISIBLE→COMPACT→HIDING"]
ImageSlot -->|notification_update| StateTransition
StateTransition -->|notification_get_alpha| Renderer["Element Renderer<br/>apply_notification_alpha"]
Renderer -->|notification_get_text| TextElements["Text Elements<br/>CALLER_NAME, CALL_STATUS, etc."]
Renderer -->|notification_get_photo_texture| PhotoElement["Photo Element<br/>notification_photo special type"]
ConfigParser["Config Parser<br/>notification_group field"] -->|notif_group_resolve| ElementLink["Element→Notification Group<br/>O(1) dispatch"]
ElementLink -->|notification_is_active| RenderSkip["Skip rendering<br/>when group inactive"]
File Changes1. include/config/config_parser.h
|
Code Review by Qodo
1.
|
- Save device_str before tmpstr reuse to prevent wrong notification routing when device field is overwritten by format/other parsing - Add image_mutex protection to s_image state machine update and text source reads (matches s_phone mutex pattern) - Cap base64 decode at 512KB input to prevent OOM from rogue payloads - Add braces to single-statement if bodies in BIO error path Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Config-driven notification popups with fade in/out, auto-dismiss, and contact photo display from base64 MQTT payloads.