Topics appear in Unread() well before 'n new posts' banner


(probus) #1

It seems like Unread() is a lot quicker and more reliable to react to new posts than the banner in topic list. Very often I see the numbers changed in Unread() when someone posts into one of the topics I’m tracking with no notification in the topic list. Sometimes they both appear, but the Unread() count is correct, while the ‘n new posts’ is off. For example Unread(4) and only ‘2 new posts’ in the banner.

Why is there a difference? How often are these updated anyway?


(Sam Saffron) #2

Both are updated live. I wonder, can you reproduce any issue on “try” (create a sock puppet account or something)


(Dave McClure) #3

Spent a little time testing on Try:

  1. account 1:
    Set topic to tracking
  2. account 1:
    Go back to topic list.
  3. account 2:
    reply to topic
  4. account 1:
    tab shows Unread(1), but topic 118 has not popped to the top of the list, and does not show an unread count badge.
  5. account 2:
    create a new topic
  6. account 1:
    tab shows New (1) and Unread(1) and the banner appears saying
    ’1 new posts. Click to show.’

The banner always shows up immediately if a new topic is created.

The banner never shows up if a new post is just added to a tracked topic.

It says new posts though, so it leads one to believe that perhaps it should show up when now posts are added to a tracking topic, as @probus assumed.

What should happen?

  • Should the topic sort to the top immediately?
  • Or, should the ‘new posts banner’ show up when posts are added to a tracked topic?

Also, relatedly the unread counters don’t show up immediately:

  • Should the unread counter appear immediately?

Also tested what happens when account 2 replies to an untracked topic. In this case, nothing changes on account 1 until the browser is refreshed, at which point, it sorts to the topic of the list… Again, not sure what the desired behavior is here, but that’s how it works today…


(probus) #4

This is surprising. I would have thought the banner shows up eventually, just later and less reliably. How long did you wait?


(Dave McClure) #5

Long enough…

After thinking about this a little more it seems like that banner should show up for all 3 cases I tested.

Right now it seems implemented as the “new topic” banner.

But instead it should be the “new stuff is gonna go at the top of the list when you click here or refresh” banner.


(probus) #6

Well, I just got the banner notification for a new post in an old topic I’m following. There were no completely new topics so the notification was definitely about that topic. I can’t be sure when it appeared but I’d guess about 15min after posting. This was not on meta or try and the system is a few commits behind. I’m quite sure this isn’t regression though, the notification banner is just not appearing very reliably.


(Dave McClure) #7

I have a theory about that but now easy way to test it at the moment… It may be that it only appears for topics that are not yet loaded…


(probus) #8

I just got another one from another topic. Both were clearly visible in the topic list before the notification, if that’s what you mean by the topic being loaded. The latter was actually the first topic on that list. This time the notification was instant.


(Dave McClure) #9

Well then… must be more going on here… What I posted above is what I see on Try in any case.


(probus) #10

Right now I also noticed that the blue notification bubble in the header appears before the notification banner as well.


(Bill Ayakatubby) #11

I’ve experienced this a few times today, including just now. I keep Meta open as a pinned tab in Firefox. I’d been off of it for some time (I wasn’t keeping track), and when I came back, this is what I saw:


(Sam Saffron) #12

I fixed a pile of bugs around here today, let me know how it works, will close automatically in 2 days

https://github.com/discourse/discourse/commit/4536f772c1cf9aa2bebe15a927be68eac00b53f0


(Dave McClure) #13

Is this deployed on try yet? At first glance, not noticing any difference in behavior yet.


Continuously deploying test.discourse.org?
(Sam Saffron) #14

not yet, let me deploy to try… try again in 5 minutes.


(Dave McClure) #15

lookin’ good… much better now in my test cases above…

Now the banner appears immediately “1 new or updated topic. Click to show.”

Now the banner immediately updates to “2 new or updated topics. Click to show.”

Now the banner immediately updates to “3 new or updated topics. Click to show.”


(Sam Saffron) #16

This topic was automatically closed after 2 days. New replies are no longer allowed.