-
-
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
"N unreads" banner on "All messages", but no unreads in home view #3589
Comments
This happens to me all the time. I just confirmed that the “All messages” unread counter is counting messages on a muted stream (I have |
Also several TODO comments, where it looks like the actual semantics and intended semantics differ. One of those looks to be the cause of a bug we've gotten reports of! Namely #3589. So, hooray for closely reading code.
In the course of studying some of our code closely for the sake of #4035, I think I've spotted the cause of this bug! It's in our
A direct fix for this issue would be to fix A more thorough fix would be to use the |
This bug still appears on the Android app. |
Originally reported in chat:
https://chat.zulip.org/#narrow/stream/48-mobile/topic/all.20messages.20and.20unread.20messages/near/779399
Screenshots there show
So there's a mismatch between two different presentations of whether there are unreads.
This is a bit like #3549. There:
In that issue, I wrote:
But the inconsistency seen in this issue is between those two things that are controlled by the Redux store.
Some hypotheses on where the bug could be:
There are a couple of different spots in the Redux store that have relevant information -- I think the banner is based on the per-message
read
flags understate.flags.read
, while the home view is based on some summary data structures instate.unread
. So if there's a bug where the reducers managing those two subtrees of the state get the data out of sync, that could cause these symptoms.It could also be that that code is working perfectly fine and that data is staying in sync, and there's an issue elsewhere. For example, maybe the "All messages" view includes some messages that don't appear in the home screen's unreads. Possible hypotheses for that include: muted topics? muted streams? @-mentions? alert words?
Probably we ought to have an invariant that the messages that count for the unreads list in the home view are exactly the same as the messages that show up in "All messages". But I'd have to dig into the code to be confident about whether we do have such an invariant.
Possibly also related to #3509. It's not clear in that issue whether the home tab with its unreads list is in sync with the "N unreads" banner.
The text was updated successfully, but these errors were encountered: