From 4a309a3ee482d0ce4fa592adeaea226edfc759e6 Mon Sep 17 00:00:00 2001 From: archipelago Date: Tue, 30 Jun 2026 22:54:51 -0400 Subject: [PATCH] feat(mesh): RSSI/SNR dBm tooltip on the existing signal-bars indicator The bars UI (signalBars/.mesh-signal-bars) was already built and wired to mp.primary_rssi -- it just needed real backend data, which the previous commit provides. Adds primary_snr alongside primary_rssi in MergedPeer and a hover tooltip showing exact dBm/SNR values. Co-Authored-By: Claude Sonnet 5 --- neode-ui/src/views/Mesh.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/neode-ui/src/views/Mesh.vue b/neode-ui/src/views/Mesh.vue index d1e75e30..f2d282c5 100644 --- a/neode-ui/src/views/Mesh.vue +++ b/neode-ui/src/views/Mesh.vue @@ -533,6 +533,7 @@ interface MergedPeer { primary_contact_id: number primary_pubkey_hex: string | null primary_rssi: number | null + primary_snr: number | null is_archy: boolean reachable: boolean // The original active-chat marker uses contact_id equality, so keep a @@ -669,6 +670,7 @@ const mergedPeers = computed(() => { primary_contact_id: peer.contact_id, primary_pubkey_hex: peer.pubkey_hex, primary_rssi: peer.rssi, + primary_snr: peer.snr, is_archy: isArchyNode(peer) || !!matchedFed, reachable: peer.reachable ?? true, primary: peer, @@ -719,6 +721,7 @@ const mergedPeers = computed(() => { primary_contact_id: synthCid, primary_pubkey_hex: fed.pubkey, primary_rssi: null, + primary_snr: null, is_archy: true, reachable: true, primary: placeholder, @@ -1017,6 +1020,14 @@ function signalBars(rssi: number | null): number { return 1 } +function signalTitle(rssi: number | null, snr: number | null): string { + if (rssi === null && snr === null) return 'No signal data yet' + const parts: string[] = [] + if (rssi !== null) parts.push(`${rssi} dBm`) + if (snr !== null) parts.push(`SNR ${snr.toFixed(1)} dB`) + return parts.join(' ยท ') +} + function timeAgo(iso: string): string { const diff = Date.now() - new Date(iso).getTime() const secs = Math.floor(diff / 1000) @@ -1823,7 +1834,7 @@ function isImageMime(mime?: string): boolean { {{ mergedUnreadCount(mp) }} -
+