Skip to content

Added relays count#3773

Merged
jamesarich merged 10 commits into
meshtastic:mainfrom
RCGV1:relay-node-improvements
Nov 25, 2025
Merged

Added relays count#3773
jamesarich merged 10 commits into
meshtastic:mainfrom
RCGV1:relay-node-improvements

Conversation

@RCGV1

@RCGV1 RCGV1 commented Nov 21, 2025

Copy link
Copy Markdown
Member

Show how many nodes we hear relay our message.
For now, disable the relay node field shown, since this is not as useful and doesn't show the full list of relayers.
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to display the count of relay nodes that were heard relaying a message, replacing the previous single relay node display with a count-based approach.

Key Changes:

  • Added relays field to DataPacket and Message models to track relay count
  • Modified DeliveryInfoDialog to display relay count using pluralized strings instead of a single relay node name
  • Implemented relay counting logic in MeshService.handleAckNak() by incrementing the count each time an ACK/NAK is received

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core/model/src/main/kotlin/org/meshtastic/core/model/DataPacket.kt Added relays: Int = 0 field to track relay count
core/database/src/main/kotlin/org/meshtastic/core/database/model/Message.kt Added relays: Int = 0 field to Message model
core/database/src/main/kotlin/org/meshtastic/core/database/entity/Packet.kt Updated PacketEntity to include relays field mapping
app/src/main/java/com/geeksville/mesh/service/MeshService.kt Added relay count increment logic in handleAckNak function
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/MessageList.kt Passed relays count to DeliveryInfo dialog
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/DeliveryInfoDialog.kt Updated UI to display relay count with plural strings instead of single relay node name
core/strings/src/commonMain/composeResources/values/strings.xml Added pluralized string resource for relay count display

Comment thread app/src/main/java/com/geeksville/mesh/service/MeshService.kt Outdated
Comment on lines +40 to 46
@Suppress("UnusedParameter")
@Composable
fun DeliveryInfo(
title: StringResource,
resendOption: Boolean,
text: StringResource? = null,
relayNodeName: String? = null,

Copilot AI Nov 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @Suppress("UnusedParameter") annotation is overly broad as it suppresses warnings for all parameters. The relayNodeName parameter is actually unused (it was replaced with the relays parameter). Consider removing the unused parameter instead of suppressing the warning, or make the suppression more specific to only that parameter.

Suggested change
@Suppress("UnusedParameter")
@Composable
fun DeliveryInfo(
title: StringResource,
resendOption: Boolean,
text: StringResource? = null,
relayNodeName: String? = null,
@Composable
fun DeliveryInfo(
title: StringResource,
resendOption: Boolean,
text: StringResource? = null,

Copilot uses AI. Check for mistakes.
Comment thread core/strings/src/commonMain/composeResources/values/strings.xml Outdated
RCGV1 and others added 3 commits November 23, 2025 22:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 24, 2025
@jamesarich jamesarich enabled auto-merge November 24, 2025 23:43
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Nov 25, 2025
Merged via the queue into meshtastic:main with commit 022652e Nov 25, 2025
5 checks passed
@codecov

codecov Bot commented Nov 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@0d00c83). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...meshtastic/feature/messaging/DeliveryInfoDialog.kt 0.00% 3 Missing ⚠️
...in/java/com/geeksville/mesh/service/MeshService.kt 0.00% 2 Missing ⚠️
...ain/kotlin/org/meshtastic/core/model/DataPacket.kt 0.00% 1 Missing ⚠️
...g/meshtastic/feature/messaging/MessageListPaged.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main   #3773   +/-   ##
======================================
  Coverage        ?   0.54%           
======================================
  Files           ?     386           
  Lines           ?   22470           
  Branches        ?    2815           
======================================
  Hits            ?     122           
  Misses          ?   22327           
  Partials        ?      21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants