Skip to content

feat: support message editing in offline (WPB-25295)#4943

Open
sbakhtiarov wants to merge 1 commit into
developfrom
feat/offline-message-editing
Open

feat: support message editing in offline (WPB-25295)#4943
sbakhtiarov wants to merge 1 commit into
developfrom
feat/offline-message-editing

Conversation

@sbakhtiarov

@sbakhtiarov sbakhtiarov commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-25295

https://wearezeta.atlassian.net/browse/WPB-25295

What's new in this PR?

Allow editing messages when no Internet connection is available.
The following scenarios are covered:

  1. Online, message status = sent: no changes, current edit feature.
  2. Online, message status = pending: edit not allowed to avoid race conditions, message is supposed to be sent shortly.
  3. Offline, message status = sent: editing already sent message. Edit will be sent once connected.
  4. Offline, message status = pending: editing pending message, only update the message content, message will be sent as regular message once connected.

Key changes in app code:
Enable "Edit" menu for pending messages

Key changes in kalium code:
SendEditTextMessageUseCase - support Pending and Regular message edit flows.
EditMessageBuilder - reuse TextEdited message builder between use case and worker.
MessageDAO \ Repository - new updateTextMessage() function to update only the contents without edit status for pending message editing.

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.15%. Comparing base (72cc855) to head (210c15b).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4943      +/-   ##
===========================================
+ Coverage    49.14%   49.15%   +0.01%     
===========================================
  Files          650      650              
  Lines        22989    22995       +6     
  Branches      3518     3518              
===========================================
+ Hits         11297    11303       +6     
  Misses       10645    10645              
  Partials      1047     1047              
Files with missing lines Coverage Δ
...nversations/edit/MessageOptionsModalSheetLayout.kt 0.00% <ø> (ø)
...rsations/messages/ConversationMessagesViewModel.kt 70.50% <100.00%> (+0.75%) ⬆️
...rsations/messages/ConversationMessagesViewState.kt 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72cc855...210c15b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant