feat: add SNR/RSSI or Hops Away metrics to the reaction dialog
Description
This change adds metrics to the reaction dialog, next to the emoji which a user reacted with. The metrics include 'Hops Away' for messages that went though hops or 'SNR/RSSI' for messages received directly – this is the same behavior you see with normal messages.
Below is the reaction dialog before:
and after:
Motivation
Our mesh network uses bots for testing connectivity. When a user sends a ping message to a specific channel, bots automatically reply with a message that includes 'Hops Away' or 'SNR/RSSI' values, so that the user could see which end-points received their message along with the aforementioned metrics on the way to those end-points. They can also see metrics on the way back in the message history.
To reduce clutter, I made a bot that sends a reaction with hop count (e.g. 1️⃣) or signal quality (e.g. 🟨 for fair quality). This way the user can still see the metrics towards my end-point, but no additional messages visible in channel are generated. However, they cannot see metrics on the way back, although they are technically available.
This change adds those missing metrics, at a cost of storing those within the database.
This can also be useful for networks without bots, as it can provide additional insights and the behavior is consistent with normal messages.
Additional Notes
I'm new to Kotlin, so I might have done something wrong. I have run Spotless and Detekt to check for errors.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
@jamesarich Hi, do I need to take further steps to mark this PR for review?
@jamesarich Hi, do I need to take further steps to mark this PR for review?
Just patience. We're volunteers and busy 😅
Codecov Report
:x: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 0.56%. Comparing base (8d858de) to head (ef68ada).
:warning: Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...in/java/com/geeksville/mesh/service/MeshService.kt | 0.00% | 9 Missing :warning: |
| ...meshtastic/feature/messaging/component/Reaction.kt | 0.00% | 7 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #3964 +/- ##
========================================
- Coverage 0.56% 0.56% -0.01%
========================================
Files 402 402
Lines 23884 23893 +9
Branches 3061 3061
========================================
Hits 136 136
- Misses 23727 23736 +9
Partials 21 21
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jamesarich I have updated the code for two-row layout, and added time string as well. I also slightly reduced spacing between entries, so that more could be seen on the same screen.
@1nv just wanted to say thanks again for the contribution 🤝.
If you're interested in contributing more regularly, feel free to reach out on discord - I'm @olm3c. We can get you better looped in to conversations and processes there ➰ .
@jamesarich Thank you for quick review and constructive feedback!
Small follow-up fix: https://github.com/meshtastic/Meshtastic-Android/pull/4024