Skip to content

feat: retry message/reaction dialog#4195

Merged
jamesarich merged 4 commits into
meshtastic:mainfrom
mdecourcy:feat/retry-confirmation-dialog
Jan 15, 2026
Merged

feat: retry message/reaction dialog#4195
jamesarich merged 4 commits into
meshtastic:mainfrom
mdecourcy:feat/retry-confirmation-dialog

Conversation

@mdecourcy

@mdecourcy mdecourcy commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a user-interactive retry mechanism for failed message and reaction sends, replacing the previous automatic retry logic. Now, when a message or reaction fails to send, the user is prompted with a dialog to confirm or cancel the retry, with a countdown for automatic retry if no response is given. The maximum number of retry attempts has also been reduced from 5 to 2. The most important changes are as follows:

User-Interactive Retry Mechanism:

  • Added a RetryEvent sealed class and related logic in ServiceRepository to emit retry events and handle user responses for message and reaction retries. The service now waits for user input (or times out) before retrying failed sends. [1] [2] [3] [4]
  • Integrated retry event handling into the messaging UI (MessageScreen), displaying a confirmation dialog with options to retry immediately, cancel, or wait for auto-retry. [1] [2] [3] [4] [5] [6]

Configuration and Limits:

  • Reduced the maximum retry attempts for both messages and reactions from 5 to 2, updating constants and UI to reflect this new limit. [1] [2] [3]

User Experience Enhancements:

  • Added new string resources for the retry dialog, including titles, messages, and button labels to improve user feedback during retry scenarios.

General Maintenance:

  • Updated copyright years in affected files. [1] [2]

These changes provide a more robust and user-friendly approach to handling message delivery failures, giving users more control over retry attempts.

@github-actions github-actions Bot added the enhancement New feature or request label Jan 13, 2026
@codecov

codecov Bot commented Jan 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (99c7989) to head (0fc75ad).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4195   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         23      23           
  Branches       7       7           
=====================================
  Misses        23      23           

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

@jamesarich

Copy link
Copy Markdown
Collaborator

Description pls.

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 pull request introduces a user-interactive retry mechanism for failed message and reaction sends in the Meshtastic Android application. Instead of automatically retrying failed sends, the system now prompts users with a dialog that displays a countdown timer and allows them to confirm, cancel, or wait for automatic retry. The maximum retry attempts have been reduced from 5 to 2.

Changes:

  • Added RetryEvent sealed class and retry management infrastructure in ServiceRepository with user response handling via CompletableDeferred and ConcurrentHashMap
  • Created new RetryConfirmationDialog Compose component with countdown timer showing message preview and retry attempt information
  • Updated MeshDataHandler to emit retry events and wait for user confirmation before retrying messages/reactions
  • Integrated retry event observation and dialog display into MessageScreen
  • Reduced MAX_RETRY_ATTEMPTS constant from 5 to 2 across the codebase
  • Added localized string resources for retry dialog UI elements

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
core/service/src/main/kotlin/org/meshtastic/core/service/ServiceRepository.kt Adds RetryEvent sealed class and retry management methods (requestRetry, respondToRetry, cancelPendingRetries) using CompletableDeferred for user response coordination
app/src/main/java/com/geeksville/mesh/service/MeshDataHandler.kt Modifies message/reaction retry logic to emit retry events and wait for user response before proceeding, removes automatic delay-based retry
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/component/RetryConfirmationDialog.kt New dialog component displaying retry confirmation with countdown timer, message/emoji preview, and action buttons
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/Message.kt Integrates retry event observation and dialog display in MessageScreen with handlers for user confirmation/cancellation
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/MessageViewModel.kt Exposes retryEvents flow and adds respondToRetry method to forward user responses to ServiceRepository
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/MessageListPaged.kt Updates maxRetries constant from 5 to 2 for message retry count display
feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/component/Reaction.kt Updates maxRetries constant from 5 to 2 for reaction retry count display
core/strings/src/commonMain/composeResources/values/strings.xml Adds 5 new string resources for retry dialog title, messages, and button labels

Comment thread feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/Message.kt Outdated
Comment thread core/service/src/main/kotlin/org/meshtastic/core/service/ServiceRepository.kt Outdated
Comment thread app/src/main/java/com/geeksville/mesh/service/MeshDataHandler.kt
@jamesarich

Copy link
Copy Markdown
Collaborator

@mdecourcy sounds like the robot has some issues with this, i kinda agree - we need to make sure this is done carefully. Tests would be good.

@jamesarich jamesarich added this pull request to the merge queue Jan 15, 2026
Merged via the queue into meshtastic:main with commit afeff9a Jan 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants