#5963-Disappearing Messages Cut off#5974
Conversation
(cherry picked from commit 369784844dfd41a0ee7cd11c5248ec63235e013e)
sashaweiss-signal
left a comment
There was a problem hiding this comment.
This fixes one specific case, but breaks the visual separation between clustered messages. I suspect the root cause is more along the lines of the clustering logic being wrong.
| private var innerVStackConfig: CVStackViewConfig { | ||
|
|
||
| let layoutMargins: UIEdgeInsets | ||
| if itemModel.itemViewState.isFirstInCluster { |
There was a problem hiding this comment.
I think that removing this will lead to other UI issues. We intentionally add that top padding for those isFirstInCluster items, to visually separate those clusters.
|
Just for clarification for my sakes; a thread (TSThread) is the collection of all messages between individuals (Or single individual). A cluster is a subcollection of a thread consisting of consecutive messages from a single individual. So the purple would be the entire thread and the red would be clusters. Would that be correct? I'm going to look more into the |
|
Hey @sashaweiss-signal ! I've spent the past few days investigating the issue with the cell not displaying correctly. Initially, I thought it was due to a race condition with After reviewing the item clustering logic, I found that it was producing the correct results. As you can see in the attached image, after the OutgoingMessage is deleted and new messages are reloaded and turned into Next, I examined the logic for turning Despite the correct measurements, I re-examined the Debug Views for the disappearing message view when the bug occurred and after a debounce event reloaded the views. I discovered that the "bubble" view (marked with a purple arrow) was incorrect. Although the After the bug has happened and before the debounce update: I set breakpoints when the bubble view was created and modified and found that when I reproduced the bug, the only call to In the batch update block, I realized that the To address this issue, I see a few options:
Another potential solution to consider for the future is utilizing UICollectionViewDiffableDataSource, which is a more modern approach to handling batch updates. It uses an identifier instead of an index path, allowing for more flexibility and avoiding issues like this bug. We're already using it in the Call functionality (CallDrawerSheet, CallLinkBulkApprovalSheet, CallListViewController) for table views. This approach could potentially simplify our batch update logic and make it more robust. This bug has been a challenging journey, and I've become familiar with the process of loading messages, from the Let me know how we should tackle this moving forward. Cheers, |
|
Hey @MarlowBrown, As discussed over email, given the complexity of the underlying issues that you've identified, I think this is something we should leave alone for now. Rebuilding the Thanks for looking into this. |
|
Of course! This bug is extremely complex and will require a lot of resources to address, but as long as we are aware of it, that is a good first step. I will leave this open for now so it doesn't get lost in the closed PRs. |
|
Thanks for looking into this. Since this isn't ultimately how we'll end up addressing this or related issues, I'm going to close this PR. |






Contributor checklist
Description
This pull request
fixes #5963by addressing a potential race condition that could cause a label to be excessively compressed by edge insets.To verify the effectiveness of this fix, I reproduce the bugs step to ensure that it does not happen anymore. The changes made in this pull request ensure that the label compression issue is consistently resolved.
Simulator.Screen.Recording.-.iPhone.16.-.2025-02-17.at.02.35.08.mp4