-
Notifications
You must be signed in to change notification settings - Fork 6
chore(conversation-history): serialize history client messages [WPB-18414] [WPB-18416] #3569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(conversation-history): serialize history client messages [WPB-18414] [WPB-18416] #3569
Conversation
There was a problem hiding this comment.
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 serialization and deserialization support for History-Client messages in the protobuf system. The implementation introduces three new message types for history client management and updates the codebase to handle these messages throughout the system.
Key changes:
- Adds protobuf definitions for three new history client message types (Available, Request, Response)
- Moves HistoryClient class from conversation-history module to data module for broader accessibility
- Implements serialization/deserialization logic in ProtoContentMapper with TODO placeholder for message handling
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| protobuf-codegen/src/main/proto/messages.proto | Adds protobuf definitions for HistoryClient messages |
| logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/ProtoContentMapper.kt | Implements serialization/deserialization for history client messages |
| data/src/commonMain/kotlin/com/wire/kalium/logic/data/history/HistoryClient.kt | Moves and refactors HistoryClient class, removing conversationId field |
| persistence/src/commonMain/db_user/com/wire/kalium/persistence/HistoryClient.sq | Updates SQL queries to exclude conversation_id field |
| Multiple files | Updates imports and adds message content types for history client messages |
data/src/commonMain/kotlin/com/wire/kalium/logic/data/message/Message.kt
Outdated
Show resolved
Hide resolved
...kotlin/com/wire/kalium/logic/sync/receiver/conversation/message/ApplicationMessageHandler.kt
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3569 +/- ##
=============================================
- Coverage 49.90% 49.84% -0.07%
+ Complexity 51 46 -5
=============================================
Files 1707 1709 +2
Lines 63844 64083 +239
Branches 5615 5653 +38
=============================================
+ Hits 31862 31942 +80
- Misses 29808 29959 +151
- Partials 2174 2182 +8
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
| Branch | conversation-history/chore/serialize-messages |
| Testbed | ubuntu-latest |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (µs) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot | 684.96 µs |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot | 454,234.45 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot | 1,478,545.57 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot | 28,700.68 µs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
data/src/commonMain/kotlin/com/wire/kalium/logic/data/message/Message.kt
Outdated
Show resolved
Hide resolved
adb2105 to
bd897ee
Compare
bd897ee to
d9769a0
Compare
|



PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Add (de)serialization for History-Client messages.
Note
HistoryClientclass to the:datamodule, as it is also gonna be part of the messages.TODOfor handling the new message types. The handled is gonna be implemented in:conversation-history.Important
The protobuf messages are also being updated in the generic-message-proto repo:
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.