Skip to content

fix(persistence): use conversation type for group kinds [WPB-27024]#4286

Merged
MohamadJaara merged 3 commits into
developfrom
mo/fix-conversation-group-types
Jul 13, 2026
Merged

fix(persistence): use conversation type for group kinds [WPB-27024]#4286
MohamadJaara merged 3 commits into
developfrom
mo/fix-conversation-group-types

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented Jul 10, 2026

Copy link
Copy Markdown
Member

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

Intent

the #4277 with the new group type column will cause the app to hand when parsing 1:1s since the gorup type is empty string and the app will fail to map it and throw
Use the existing persisted conversation type to distinguish regular groups, channels, and meetings instead of introducing a separate non-null group_type column.

Changes

  • extend the persisted conversation type with CHANNEL and MEETING
  • correct unreleased migration 136 in place so legacy channel groups become CHANNEL while 1:1, self, connection-pending, and regular group types are preserved
  • remove empty-string group subtype persistence and obsolete group type adapter usage
  • update conversation queries and group-family behavior for regular groups, channels, and meetings
  • keep meetings excluded from the normal conversation list
  • add migration and regression coverage for type conversion, filtering, cells, and mappings

Root cause

The original migration replaced is_channel with a second discriminator and populated missing group subtype values with an empty string, including non-group conversations. This duplicated the existing conversation type and created invalid persisted state.

@MohamadJaara MohamadJaara marked this pull request as ready for review July 10, 2026 22:04
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Test Results

0 tests   - 4 253   0 ✅  - 4 243   0s ⏱️ - 3m 29s
0 suites  -     6   0 💤  -    10 
0 files    -     6   0 ❌ ±    0 

Results for commit b2f66be. ± Comparison against base commit 898e728.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.75000% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.30%. Comparing base (898e728) to head (b2f66be).

Files with missing lines Patch % Lines
...lium/logic/data/conversation/ConversationMapper.kt 47.91% 14 Missing and 11 partials ⚠️
...m/wire/kalium/logic/data/call/mapper/CallMapper.kt 0.00% 0 Missing and 3 partials ⚠️
...persistence/dao/conversation/ConversationEntity.kt 50.00% 0 Missing and 1 partial ⚠️
...re/kalium/persistence/dao/message/MessageMapper.kt 0.00% 0 Missing and 1 partial ⚠️
...ata/conversation/ConversationMetaDataRepository.kt 0.00% 1 Missing ⚠️
.../logic/data/conversation/ConversationRepository.kt 0.00% 1 Missing ⚠️
...ation/NewGroupConversationSystemMessagesCreator.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4286   +/-   ##
==========================================
  Coverage      61.29%   61.30%           
- Complexity      4018     4022    +4     
==========================================
  Files           2163     2163           
  Lines          69490    69457   -33     
  Branches        6890     6897    +7     
==========================================
- Hits           42594    42578   -16     
+ Misses         24132    24117   -15     
+ Partials        2764     2762    -2     
Files with missing lines Coverage Δ
...ium/persistence/adapter/ConversationTypeAdapter.kt 100.00% <100.00%> (ø)
...ersistence/dao/conversation/ConversationDAOImpl.kt 80.86% <100.00%> (-0.11%) ⬇️
...onversation/ConversationDetailsWithEventsMapper.kt 94.00% <ø> (-0.06%) ⬇️
...persistence/dao/conversation/ConversationMapper.kt 98.85% <ø> (-0.03%) ⬇️
...ce/dao/conversation/ConversationMetaDataDAOImpl.kt 41.66% <ø> (+3.20%) ⬆️
...istence/dao/conversation/ConversationViewEntity.kt 100.00% <ø> (ø)
...tlin/com/wire/kalium/persistence/db/TableMapper.kt 100.00% <100.00%> (ø)
...re/kalium/cells/data/CellConversationDataSource.kt 57.44% <100.00%> (ø)
.../com/wire/kalium/logic/data/call/CallRepository.kt 89.66% <100.00%> (ø)
...lium/logic/data/connection/ConnectionRepository.kt 68.65% <ø> (+0.50%) ⬆️
... and 10 more

... and 18 files with indirect coverage changes


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 898e728...b2f66be. 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

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch${GITHUB_HEAD_REF}
Testbedubuntu-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-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (µs)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
907.91 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
576,018.09 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
134,293.24 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
129,304.53 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,504.84 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
37,826.72 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
21,907.10 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,260,138.58 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
20,231.96 µs
🐰 View full continuous benchmarking report in Bencher

@MohamadJaara MohamadJaara enabled auto-merge July 11, 2026 23:08
@sonarqubecloud

Copy link
Copy Markdown

@MohamadJaara MohamadJaara changed the title fix(persistence): use conversation type for group kinds fix(persistence): use conversation type for group kinds [WPB-27024] Jul 13, 2026
@MohamadJaara MohamadJaara added this pull request to the merge queue Jul 13, 2026
@MohamadJaara MohamadJaara removed this pull request from the merge queue due to a manual request Jul 13, 2026
@MohamadJaara MohamadJaara merged commit 849da30 into develop Jul 13, 2026
30 of 31 checks passed
@MohamadJaara MohamadJaara deleted the mo/fix-conversation-group-types branch July 13, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants