Bottom of topic shows "There is 1 unread remaining" when there are actually 0 unread topics remaining

Recently when reading a topic, when I scroll to the bottom of the topic I see “There is 1 unread remaining”. But when I click the link on “1 unread”, it turns out there are no unread topics remaining. I’ve been seeing this fairly often lately on https://community.wanikani.com, but I’m pretty sure I saw it once here on meta as well. I just follow a lot fewer topics here, so there’s less opportunity for me to see the issue appear.

In this latest case, I did see the “There is 1 unread remaining” text disappear right after I copied it to get an exact quote for this bug report. So it could be that there is a somewhat long delay on some background task that updates the number of unread topics. Or maybe it disappeared when I opened the Categories home page in another tab. I’m not really sure if any of that speculation is relevant, but I figured I should mention it just in case.

7 Likes

I’m still seeing this, but now I’m also seeing topics showing up as actually unread 15+ second after I visited the topic, with no additional posts between those points. I think there might be some delay between reading a topic and it being marked as read elsewhere in the system.

1 Like

Our forum is also seeing this. Shortly after posting something, we get a “1 unread” notification, and there’s nothing new (other than the fact that we just posted something ourselves).

4 Likes

I am experiencing this since several days now on https://community.openstreetmap.org/ while logged out. I am not experiencing this on Discourse Meta when logged in nor when logged out.
I’ve now closed the tab and opened a new one in the same browser session. It seems to have resolved itself for now.
I’ve now experienced this again for Proposal - New categories requirements and process - This Site Feedback - OpenStreetMap Community
(the third reply is the one which became marked as unread.)

1 Like

Just wanted to bump this again in case the team happened to miss it.

Did not miss this, just need a clear repro, I guess we could make one with 2 accounts ?

1 Like

EDIT: Feel free to read this post, but these steps are actually incorrect. The next post gives correct repro steps.

Original post containing incorrect repro steps

The bug happens inconsistently, making it hard to give exact repro steps. Here’s usually what happens:

  • I navigate to /unread from the link on the home page. Let’s say there’s one unread topic.
  • I open the unread topic.
  • I navigate to the bottom of the page after reading the topic.
  • The bottom of the page still shows 1 unread despite me having just opened the only unread topic.
  • I click the 1 unread link to navigate to /unread, where no unread topics are shown.

If you mean one account tracking a topic and another account to post in that topic, it might help, yeah. I do think the bug occurs frequently enough that you’re bound to reproduce it that way if you try it a handful of times.

Did anything change in the last month or so related to all this? It really did start happening out of nowhere, both on https://community.wanikani.com and here on meta.

1 Like

Funny enough, by posting the above steps I may have discovered the actual repro steps (or perhaps just another way it happens, not really sure). As I was writing up the previous post, the bottom of the page correctly showed 1 unread. However, as soon as I submitted that post it changed to 2 unread, which was wrong. Clicking the 2 unread link brought me to /unread where I verified that there really was only one unread topic. It’s as if submitting the post added to the unread count even though it was my post and shouldn’t have affected the unread count. If this happens consistently it should be more useful to reproduce the bug than my previous steps.

EDIT: Lo and behold, when I submitted this post it did change incorrectly to 2 unread again. It stayed that way for several seconds before changing back to the correct 1 unread. So I think these steps should work. :slight_smile:

EDIT 2: I posted in a topic I was tracking in https://community.wanikani.com, and in this case it also went from not showing the unread link to incorrectly showing 1 unread. This time it took a full minute for the page to realize I didn’t actually have any unread topics at which point the link disappeared again. I’m now three for three with the steps in this post reproducing the issue, so I think these steps will reproduce consistently.

2 Likes

After seeing @seanblue 's repro, ours is different.

We start out with no unread, then after making a new post, we go back to the Main Page, where it now shows 1 unread, that being the post we just made. Have to click on the Unread category to clear it.

2 Likes

I think that’s the same thing. It just happens whether you go from 0 to 1 or from 1 to 2 unread, as well as showing up at the bottom of a topic or on the main page. As I mentioned above, my first attempt at repro steps were wrong. I’ll edit the post further to make that clearer.

1 Like

This is great Sean! We will have a look over the next week and see if we can plug this edge case. It has been bugging me for a few weeks as well, so happy to have the repro.

image

image

:exploding_head: :open_mouth:

Repro while posting to this very topic, my unread climbed from 305 → 306

9 Likes

Is there any update for this?

2 Likes

I am currently working on this and some other related issues around unread and new topics, probably won’t have a fix before the end of the week because of Easter but I will keep looking into this next week.

9 Likes

Just for the record, the ‘unread’ notifications don’t go away after a minute for me. I have to refresh the page to make them go away.

4 Likes

I merged this pull request recently which should solve the issue, let me know if any similar issues are still occurring:

10 Likes

I’d like to follow up in the main thread, but it’s closed:

I’m getting this intermittently right now in our hosted instance:

5 Likes

I’ve re-opened it, and moved your post across. :+1:

3 Likes

For the record, still seeing this on our hosted site

Edit: Seems to be happening as I navigate within the site.
My workflow:

  • Scroll down Latest (my homepage) & open threads of interest in new tabs.
  • Clear tabs & land back at Latest list.
  • Click logo to refresh. No extra notifications
  • Click New / Unread
  • Click logo to return to Latest. Extra notifications

Edit2: Alternate workflow:

  • Answer some tabs open from before the weekend & land on Latest: no extra notifications
  • Click link to see updated threads added to the top → threads I’ve updated but no extra notifications
  • Scroll down far enough for progressive loading to kick in, opening new tabs as needed
  • Scroll back up => extra notifications on the threads I updated before the first step
2 Likes