Skip to content

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

Merged
sbakhtiarov merged 1 commit into
developfrom
feat/offline-message-editing
Jun 15, 2026
Merged

feat: support message editing in offline (WPB-25295)#4943
sbakhtiarov merged 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.

@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 48.86%. Comparing base (cc5d88a) to head (1f00345).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4943      +/-   ##
===========================================
+ Coverage    48.85%   48.86%   +0.01%     
===========================================
  Files          643      643              
  Lines        23022    23028       +6     
  Branches      3519     3519              
===========================================
+ Hits         11247    11253       +6     
  Misses       10730    10730              
  Partials      1045     1045              
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 cc5d88a...1f00345. Read the comment docs.

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

@sbakhtiarov sbakhtiarov force-pushed the feat/offline-message-editing branch 2 times, most recently from 29e2868 to 4719035 Compare June 12, 2026 13:53
@sbakhtiarov sbakhtiarov force-pushed the feat/offline-message-editing branch from 4719035 to 1f00345 Compare June 12, 2026 19:13
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

@sbakhtiarov looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
32a101719684eb1677b4dd4c8733d1b0dd987bb3 3a39fb17538cef4c96eee5459cf9707924889a24

Is this intentional?

@sbakhtiarov sbakhtiarov added this pull request to the merge queue Jun 15, 2026
Merged via the queue into develop with commit 85c2529 Jun 15, 2026
19 of 20 checks passed
@sbakhtiarov sbakhtiarov deleted the feat/offline-message-editing branch June 15, 2026 07:00
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.

3 participants