refactor: improve conversation list rendering performance#4853
refactor: improve conversation list rendering performance#4853MohamadJaara wants to merge 2 commits into
Conversation
|
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (55.91%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #4853 +/- ##
===========================================
- Coverage 51.26% 51.19% -0.08%
===========================================
Files 611 612 +1
Lines 21181 21172 -9
Branches 3405 3421 +16
===========================================
- Hits 10859 10839 -20
- Misses 9308 9318 +10
- Partials 1014 1015 +1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| searchQuery: String = conversation.searchQuery, | ||
| showLegalHoldIndicator: Boolean = conversation.showLegalHoldIndicator, | ||
| playingAudio: PlayingAudioInConversation? = conversation.playingAudio, |
There was a problem hiding this comment.
I think that conversationItem.searchQuery and conversationItem.playingAudio are not being set anywhere anymore, apart from some mocks and previews, so to avoid the confusion as to whether these fields in the ConversationItem are filled in and correct or not, maybe we should decide to only provide them externally like here and remove these fields completely from ConversationItem?
About legal hold field, maybe we could simplify it to make ConversationItem to have LegalHoldStatus field instead and move the logic of determining showLegalHoldIndicator completely to ConversationItemFactory as now it's scattered around and some part is determined in ConversationMapper, then in ConversationListViewModel and finally in ConversationItemFactory 🤔



Refactors conversation list item rendering to avoid doing UI-only and expensive work during paged item mapping. Search highlighting, legal-hold visibility, and currently playing audio state are now applied closer to rendering, reducing unnecessary remapping when those UI states change.
Also defers last-message markdown preview parsing to the UI layer and adds a lightweight markdown preview parser so conversation subtitles avoid full markdown parsing while preserving formatted previews.