-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unread messages" banner stays when scrolled to end #3509
Comments
I think I will file a ticket for this if it's not already reported:
|
Hi @GonzRon ! Please do file issues for those -- those reports will be helpful. Let's keep this issue thread focused on the specific issue described in the description at the top. |
I just reproduced this on v25.6.120, the latest beta:
So, probably the unreads were older than the messages on the screen? That seems like a clue. |
There are two possibilities for this issue:
if (Date.now() - lastSentTime > 2000) {
console.log('Date.now() - lastSentTime > 2000', unsentMessageIds);
messagesFlags(auth, unsentMessageIds, 'add', 'read');
unsentMessageIds = [];
lastSentTime = Date.now();
} As soon as user scrolls message list, we emit scroll events with messageIds from webview and pass them to this queue. Now imagine some events came and this queue called Example:
Solution: Calling of |
Thanks @jainkuniya for the investigation and the detailed writeup! I agree that both of those points are problems. I just filed #3549 for the first one -- which also aligns with a bug report Rishi made just last week. I'm happy that #3125 is helping us sort out so many of these issues that have been there for a long time 😃 I think the second one, about A few months ago we looked at the same function in the context of a different problem, and I filed #3423 describing several issues with it. But it looks like I didn't notice this one! We discussed this by video chat just now. I agree with your diagnosis, and with the general direction to fix it. Specifically what I'd like us to do is:
The corresponding webapp code is in static/js/message_flags.js inside |
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
If there are multiple requests to mark messages as read with interval less than 2s, and if there is no further request then later were stuck in the queue. Becuase there was only one caller to `messagesFlags`, which was only called by user scroll event. So even after reaching at the end of message list, unread banner is visible with some unread count. So now set timeout to send read message flag to server. Fixes: zulip#3509
Pretty often, when I'm catching up on a conversation and the "N unread messages" banner is showing, I'll scroll through it to the end... and then the banner is still there. Usually with just a handful of messages unread.
Then if I scroll slightly back up from the end, the banner goes away.
Now that #3125 is merged, this should get substantially easier to investigate.
The text was updated successfully, but these errors were encountered: