Skip to content
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

feat: search inside conversation (WPB-4915) #2137

Merged
merged 16 commits into from
Oct 17, 2023

Conversation

alexandreferris
Copy link
Contributor


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?

Issues

There was no way to search for messages in a conversation

Causes (Optional)

Not implemented yet.

Solutions

Create usecase GetConversationMessagesFromSearchQueryUseCase and its respective repository and DAO functions to search for messages containing the specified search term.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Currently there is no way to test this, it will be available when AR PR is raised.

# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageRepository.kt
#	logic/src/commonTest/kotlin/com/wire/kalium/logic/data/message/MessageRepositoryTest.kt
#	persistence/src/commonMain/db_user/com/wire/kalium/persistence/Messages.sq
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageDAO.kt
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageDAOImpl.kt
@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2023

Unit Test Results

   376 files   -   79     376 suites   - 79   24s ⏱️ - 3m 30s
2 180 tests  - 352  2 114 ✔️  - 316  66 💤  - 36  0 ±0 

Results for commit d029323. ± Comparison against base commit a438129.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Oct 16, 2023

Datadog Report

All test runs c540091 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2114 66 8m 10.1s Link
kalium-jvm 0 0 0 2435 102 10m 41.01s Link

@alexandreferris alexandreferris removed WIP work in progress DO NOT MERGE labels Oct 16, 2023
@alexandreferris alexandreferris requested review from a team and typfel and removed request for a team October 16, 2023 13:45
Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

Looks solid.

Feel free to ignore my comment about pagination/performance. It's a worry I have, but I don't think it needs to be present from the beginning, and I guess it will only be proportionally slow as the search query is broad. So it's kinda expected?

Just testing the DAO tho. We should make sure the query works and will continue to work in the future.

@codecov-commenter
Copy link

Codecov Report

Merging #2137 (d029323) into develop (a438129) will decrease coverage by 0.11%.
The diff coverage is 82.60%.

@@              Coverage Diff              @@
##             develop    #2137      +/-   ##
=============================================
- Coverage      57.65%   57.54%   -0.11%     
  Complexity        24       24              
=============================================
  Files           1052     1053       +1     
  Lines          39960    40180     +220     
  Branches        3725     3747      +22     
=============================================
+ Hits           23038    23122      +84     
- Misses         15334    15447     +113     
- Partials        1588     1611      +23     
Files Coverage Δ
...ire/kalium/logic/data/message/MessageRepository.kt 44.91% <100.00%> (+1.68%) ⬆️
...e/GetConversationMessagesFromSearchQueryUseCase.kt 100.00% <100.00%> (ø)
.../wire/kalium/persistence/dao/message/MessageDAO.kt 100.00% <ø> (ø)
...e/kalium/persistence/dao/message/MessageDAOImpl.kt 61.75% <85.71%> (+0.79%) ⬆️
.../wire/kalium/logic/feature/message/MessageScope.kt 0.00% <0.00%> (ø)

... and 4 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 a438129...d029323. Read the comment docs.

Copy link
Contributor

@gongracr gongracr left a comment

Choose a reason for hiding this comment

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

🔍 🧙 GA & GJ, great addition and great job! 🍓

@alexandreferris alexandreferris added this pull request to the merge queue Oct 17, 2023
Merged via the queue into develop with commit a71fb6d Oct 17, 2023
15 checks passed
@alexandreferris alexandreferris deleted the feat/search_inside_conversation branch October 17, 2023 07:38
@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. 🚨 Potential breaking changes 👕 size: L type: feature ✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants