Debugging problems with messages often requires numerous unread messages in the realm, e.g. when checking unread counts or scrolling through 400+ unread messages (400 is the current batch size) to test the frontend.
This poses a problem for the developer - they have to either generate the messages or manually mark them as unread.
We would like to have a simple interface for marking the last N messages as unread, moving back the pointer and reloading the page.
Some users have been reporting accidentally marking messages as read and a feature to revert this action could benefit them. Example suggested use case:
From a UI perspective, either a "really mark as read?" for threads with greater than a threshold, or "unmark as read" that can work for, say, 5 minutes if more than a threshold of things were read, perhaps.
In the most basic case, a simple UI for providing the ID for the last message read in the realm would be enough.
Possible enhancements to the MVP:
Marking messages as unread can be done with the update_message_flags endpoint; the only tricky thing is to manage races that would cause the messages to be immediately marked as read again (primarily through the pointer being ahead of the newly marked as unread messages).
I think it's fine to reload the browser when we do this; so the issues are primarily going to be around making sure that we move the pointer back (the API may not allow this; I'd add a force flag to enable doing so) and dealing with invariant problems caused by this.
So, we'll probably want to do some sequence like:
This may be a fairly involved feature to get right for general user, but for development it's probably a bit simpler (in that we could e.g. do it via management command when a browser isn't running).
It would be great to have this feature also simply for users.
Slack has Alt+click, which marks messages as unread.
This is great for when you started to read a long message, but then realise you don't actually have time to read it fully.
Just a quick note -- a helpful option for folks who want to come back to a thread later is to star the message and use this setting: https://zulipchat.com/help/star-a-message#display-the-number-of-starred-messages to have starred messages displayed as unread.
Most helpful comment
It would be great to have this feature also simply for users.
Slack has Alt+click, which marks messages as unread.
This is great for when you started to read a long message, but then realise you don't actually have time to read it fully.