Zulip: messages: Add marking messages as unread feature.

Created on 13 Dec 2016  路  3Comments  路  Source: zulip/zulip

Issue

Development

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.

User experience

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.

MVP

In the most basic case, a simple UI for providing the ID for the last message read in the realm would be enough.

Use cases

Development

  • testing frontend features for loading multiple messages and possible UI glitches
  • testing unread message counts

User experience

  • reverting the accidental "mark all as read" action in a realm/stream
  • marking topics as unread as a reminder to read them

Further development

Possible enhancements to the MVP:

  • marking all messages in realm as unread for development purposes
  • marking the last N messages in a realm/stream as unread
  • marking the messages from the past N hours as unread
  • reverting the last "mark all as read" action without specifying the message ID
misc help wanted new feature

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.

All 3 comments

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:

  • Send the users's pointer back in the local browser
  • Send the new further-back pointer to the server
  • Update the message flags remotely
  • Reload

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.

Was this page helpful?
0 / 5 - 0 ratings