Skip to content

Commit 4a4e337

Browse files
alecperkinsclaude
andcommitted
feat: show additional inbound relay count as "(+N)" in message details
Inbound messages now track how many extra nodes relayed a copy to us (MessageEntity.relays). Surface that on the Relay line of the Message Details popover as a "(+N)" suffix, e.g. "Relay: NodeName (+2)". The existing "Relayed by N nodes" line is gated to outbound messages, matching its original effective behavior and avoiding a redundant second line for inbound. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 78479b9 commit 4a4e337

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Meshtastic/Views/Messages/MessageContextMenuItems.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ struct MessageContextMenuItems: View {
8989

9090
if let relayDisplay {
9191
let prefix = message.realACK ? "Ack Relay: " : "Relay: "
92-
Text(prefix + relayDisplay)
92+
// For inbound messages, relays counts the additional relayers we overheard beyond the one
93+
// named. Surface that as a "(+N)" suffix.
94+
let additionalRelays = (!isCurrentUser && message.relays > 0) ? " (+\(message.relays))" : ""
95+
Text(prefix + relayDisplay + additionalRelays)
9396
.foregroundColor(relayDisplay.contains("Node ") ? .gray : .primary)
9497
.font(relayDisplay.contains("Node ") ? .caption : .body)
9598
}
@@ -104,7 +107,8 @@ struct MessageContextMenuItems: View {
104107
Text("Hops Away \(message.fromUser?.userNode?.hopsAway ?? 0)")
105108
}
106109
}
107-
if message.relays != 0 && message.realACK == false {
110+
// Outbound only: how many nodes we heard relay our own (non-realACK) message.
111+
if message.relays != 0 && message.realACK == false && isCurrentUser {
108112
Text("Relayed by \(message.relays) \(message.relays == 1 ? "node" : "nodes")")
109113
}
110114
if isCurrentUser && message.receivedACK {

docs/user/messages.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ The following errors may appear on a message bubble (red unless noted):
114114
115115
---
116116

117+
## Message Details
118+
119+
Long press any message and open **Message Details** to see delivery and routing information:
120+
121+
- **Relay** — the node that relayed the message. For received messages, a **(+N)** suffix means that N additional nodes were also heard relaying the same message.
122+
- **SNR / RSSI** — signal quality, shown for direct (0-hop) neighbours.
123+
- **Hops Away** — hop count for messages received indirectly.
124+
- **Relayed by N nodes** — for your own broadcast messages, how many nodes were heard rebroadcasting it.
125+
- **Ack** indicators, error reasons, and timestamps for delivery confirmation.
126+
127+
---
128+
117129
## Link Appearance
118130

119131
Links in message bubbles — including URLs, Meshtastic channel links, and markdown `[text](url)` links — are styled with an underline and the design standards Link color (Blue 400). This makes links visually distinct from regular message text in both light and dark mode. Tapping a link opens it in the browser, or for Meshtastic channel/contact URLs, opens the appropriate in-app handler.

0 commit comments

Comments
 (0)