From 2ed3dc37581f566b0173fc3b74d81479596d4581 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Thu, 19 Feb 2026 08:14:58 +0100 Subject: [PATCH] feat: Add unknown delivery status indicator + update docs Add clickable "?" icon on DMs without ACK, showing a popup explaining that delivery is unknown (mobile-friendly). Update README, user guide with new features (Analyzer links, DM delivery tracking). Co-Authored-By: Claude Opus 4.6 --- README.md | 4 ++++ app/static/css/style.css | 24 ++++++++++++++++++++++++ app/static/js/dm.js | 34 ++++++++++++++++++++++++++++------ docs/user-guide.md | 3 ++- 4 files changed, 58 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 429c7db..491817c 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ A lightweight web interface for meshcore-cli, providing browser-based access to - **Interactive Console** - Direct meshcli command execution via WebSocket - **@Mentions autocomplete** - Type @ to see contact suggestions with fuzzy search - **Echo tracking** - "Heard X repeats" with repeater IDs for sent messages, route path for incoming messages (persisted across restarts) +- **MeshCore Analyzer** - View packet details on analyzer.letsmesh.net directly from channel messages +- **DM delivery tracking** - ACK-based delivery confirmation with SNR and route info - **PWA support** - Browser notifications and installable app (experimental) - **Full offline support** - Works without internet (local Bootstrap, icons, emoji picker) @@ -308,6 +310,8 @@ sudo ~/mc-webui/scripts/updater/install.sh --uninstall - [x] Interactive Console - Direct meshcli access via WebSocket with command history - [x] Contact Map - View contacts with GPS coordinates on OpenStreetMap (Leaflet) - [x] Echo Tracking - "Heard X repeats" badge for sent channel messages +- [x] MeshCore Analyzer - Packet analysis links on channel messages (analyzer.letsmesh.net) +- [x] DM Delivery Tracking - ACK-based delivery checkmarks with SNR/route details ### Next Steps diff --git a/app/static/css/style.css b/app/static/css/style.css index 636336c..985ba2b 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -536,6 +536,30 @@ main { color: #dc3545; } +.dm-status.unknown { + color: #adb5bd; +} + +.dm-status-unknown { + cursor: pointer; + position: relative; +} + +.dm-delivery-popup { + position: absolute; + bottom: 100%; + right: 0; + background-color: #333; + color: #fff; + padding: 0.35rem 0.6rem; + border-radius: 0.375rem; + font-size: 0.7rem; + white-space: nowrap; + z-index: 1000; + pointer-events: none; + margin-bottom: 0.25rem; +} + /* DM Action Buttons */ .dm-actions { display: flex; diff --git a/app/static/js/dm.js b/app/static/js/dm.js index 89672d6..92e6f00 100644 --- a/app/static/js/dm.js +++ b/app/static/js/dm.js @@ -424,7 +424,7 @@ function displayMessages(messages) { // Status icon for own messages let statusIcon = ''; - if (msg.is_own && msg.status) { + if (msg.is_own) { if (msg.status === 'delivered') { let title = 'Delivered'; if (msg.delivery_snr !== null && msg.delivery_snr !== undefined) { @@ -432,12 +432,11 @@ function displayMessages(messages) { } if (msg.delivery_route) title += ` (${msg.delivery_route})`; statusIcon = ``; + } else if (msg.status === 'pending') { + statusIcon = ''; } else { - const icons = { - 'pending': '', - 'timeout': '' - }; - statusIcon = icons[msg.status] || ''; + // No ACK received — show clickable "?" with explanation + statusIcon = ``; } } @@ -630,6 +629,29 @@ function resendMessage(content) { input.focus(); } +/** + * Show delivery info popup (mobile-friendly, same pattern as showPathPopup) + */ +function showDeliveryInfo(element) { + const existing = document.querySelector('.dm-delivery-popup'); + if (existing) existing.remove(); + + const popup = document.createElement('div'); + popup.className = 'dm-delivery-popup'; + popup.textContent = 'Delivery unknown \u2014 no ACK received. Message may still have been delivered.'; + element.style.position = 'relative'; + element.appendChild(popup); + + const dismiss = () => popup.remove(); + setTimeout(dismiss, 5000); + document.addEventListener('click', function handler(e) { + if (!element.contains(e.target)) { + dismiss(); + document.removeEventListener('click', handler); + } + }); +} + /** * Setup emoji picker */ diff --git a/docs/user-guide.md b/docs/user-guide.md index 4689184..aaf1f78 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -166,8 +166,9 @@ Access the Direct Messages feature: ### Message Status Indicators +- ✓ **Delivered** (green checkmark) - Recipient confirmed receipt (ACK). Tap/hover for SNR and route details +- ? **Unknown** (gray question mark) - No ACK received. Message may still have been delivered — ACK packets are often lost over multi-hop routes. Tap the icon for details - ⏳ **Pending** (clock icon, yellow) - Message sent, awaiting delivery confirmation -- Note: Due to meshcore-cli limitations, we cannot track actual delivery status ### DM Notifications