Unread direct message channels not shown in sidebar

Summary
Sometimes there is an unread direct/group channel that should be shown in the sidebar as unread (i.e. in bold), but it is not shown there and the messages get missed.

Steps to reproduce
Seen with mattermost 5 (various versions) and confirmed again today on 6.3.7. No known steps to reproduce reliably.
I do not know whether there are any consistent user settings that are always present when this occurs because I have had only had a lot of indirect reports of it. When observing the issue myself, it has been when using channel groups, where the messages should be in the collapsed “Direct Messages” group but no channel is shown there.

Expected behavior
When someone messages me in a direct/group channel, the channel should appear in the sidebar and be marked as unread.

Observed behavior
Occasionally this fails to happen for a specific direct/group channel. Even when there are more messages later in the same channel, it still doesn’t appear as unread in the sidebar. That situation can persist for hours. In this case the unread messages indicator (e.g. the dot on the app icon) does indicate an unread message, even if the UI shows no channels at all as being unread in the sidebar. This may lead the user to realise that something is not being shown because the UI shows all channels as read, yet the unread indicator on the icon says that something is unread; the user then refreshes the client, and finds an entire conversation waiting to be read.

Refreshing the client resolves the issue and the channel is then shown as unread.

I am guessing this will be impossible to follow up without steps to reproduce it, but maybe a workaround is to have the client periodically do a safety check / re-check of unread channels? Even if that was done once per minute, it would be a lot better than the current situation.

I would say I see this behaviour about once a month, and I have had dozens of other users in the organisation complain about it.

Just an update to say that this is still happening on 7.8.4. Users are increasingly complaining about it and some are suggesting we should move away from mattermost for this reason alone.

If there is anything we can do to help track it down, I’m keen to help. I don’t want to just say “maybe upgrade” since we have seen this across all version 5.x, version 6.x, and version 7.x upgrades…

Joxi (103 kb) закачан 24 августа 2023 г. Joxi - This is a screenshot of the bug that has been hanging for the second month for me, unread 2 tracks/mentions, but I have no unread posts. i’m not a developer of course, but decided to post here with the problem.
Today an empty draft appeared, it is not in the list of drafts, I closed the page with MM, opened it again - nothing changes. :smiling_face_with_tear: