Skip to content

Conversation

@vitorhugods
Copy link
Member

@vitorhugods vitorhugods commented Aug 7, 2025

TaskWPB-18414 [Android] Send History Client Request message


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Add (de)serialization for History-Client messages.

Note

  • I moved the HistoryClient class to the :data module, as it is also gonna be part of the messages.
  • I left a TODO for 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

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Copy link
Contributor

Copilot AI left a 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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Test Results

3 867 tests  ±0   3 756 ✅ ±0   6m 5s ⏱️ -25s
  664 suites ±0     111 💤 ±0 
  664 files   ±0       0 ❌ ±0 

Results for commit d9769a0. ± Comparison against base commit 85ab4fc.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 3.27869% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.84%. Comparing base (85ab4fc) to head (d9769a0).

Files with missing lines Patch % Lines
...re/kalium/logic/data/message/ProtoContentMapper.kt 7.40% 20 Missing and 5 partials ⚠️
.../conversation/message/ApplicationMessageHandler.kt 0.00% 14 Missing and 1 partial ⚠️
...tlin/com/wire/kalium/logic/data/message/Message.kt 0.00% 7 Missing ⚠️
...m/wire/kalium/logic/data/message/MessageContent.kt 0.00% 5 Missing ⚠️
...kalium/logic/data/message/MessageContentLogging.kt 0.00% 3 Missing ⚠️
...kalium/logic/data/message/PersistMessageUseCase.kt 0.00% 3 Missing ⚠️
...om/wire/kalium/logic/data/history/HistoryClient.kt 0.00% 1 Missing ⚠️
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     
Files with missing lines Coverage Δ
...onversation/history/data/SQLiteHistoryClientDAO.kt 87.87% <ø> (-0.36%) ⬇️
...om/wire/kalium/logic/data/history/HistoryClient.kt 0.00% <0.00%> (ø)
...kalium/logic/data/message/MessageContentLogging.kt 0.00% <0.00%> (ø)
...kalium/logic/data/message/PersistMessageUseCase.kt 16.91% <0.00%> (-0.26%) ⬇️
...m/wire/kalium/logic/data/message/MessageContent.kt 0.00% <0.00%> (ø)
...tlin/com/wire/kalium/logic/data/message/Message.kt 0.00% <0.00%> (ø)
.../conversation/message/ApplicationMessageHandler.kt 39.54% <0.00%> (-1.03%) ⬇️
...re/kalium/logic/data/message/ProtoContentMapper.kt 54.92% <7.40%> (-2.42%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Copy link
Contributor

@Garzas Garzas left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@vitorhugods vitorhugods added this pull request to the merge queue Aug 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 8, 2025
@vitorhugods vitorhugods force-pushed the conversation-history/chore/serialize-messages branch from adb2105 to bd897ee Compare August 8, 2025 14:23
@vitorhugods vitorhugods enabled auto-merge August 8, 2025 14:23
@vitorhugods vitorhugods force-pushed the conversation-history/chore/serialize-messages branch from bd897ee to d9769a0 Compare August 8, 2025 14:24
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2025

@vitorhugods vitorhugods added this pull request to the merge queue Aug 8, 2025
Merged via the queue into develop with commit c456398 Aug 8, 2025
23 checks passed
@vitorhugods vitorhugods deleted the conversation-history/chore/serialize-messages branch August 8, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants