There are things like the following Iâve been noticing for months, but never filed a report for, because I could never reproduce them consistently. But, finally, accidentally, Iâve caught one on camera! (So please forgive the pausing and confusion reflected in my cursor movements.)
The things to look out for are:
Unread being empty
feature showing as âNormalâ (despite being tracked, as shown in my preferences) and only showing as âTrackedâ on a refresh
A topic mysteriously appearing in unread (from days ago, from the howto category)
The 2nd point is somewhat similar to a common bug I see (but have never been able to reproduce on video) where Iâll click on a topic from new in a category Iâm tracking, but its own status wonât show as tracked unless I refresh the page. (I wonder if thatâs related to this.)
Just before recording this I was trying to reproduce that bug by tracking bug, and then clicking on one of itâs topics from the unread tab. I couldnât, but upon un-tracking bug, my unread tab was filled with about 20 closed topics in bug from around 2015, which seems to be the same bug as point 3.
I canât consistently reproduce the first, where the correct notification level is only shown after a refresh (of a category, or a topic). Itâs been happening to me for months, but whenever I try to reproduce it, it doesnât happen.
The second, which I think is a bit more minor, but still a nuisance can be reproduced (for a limited time only) like so:
Clear /unread
Track a category currently set to âNormalâ
Go back to /unread and observe posts not previously in it
Iâve been able to do this with a number of categories, but only once for each. Once Iâve dismissed the posts from unread, they never appear again.
Consistently reproducing it takes a little more work, so hold onto your hats, itâs gonna get a bit crazy:
Go to unread in a category of your choosing which has a notification level of âNormalâ, observe nothing there:
So, the bug here is that previously opened topics in a category become tracked, and appear in unread (unless previously dismissed), when the category is tracked, whereas nothing happens to old not-opened-before topics.
To me, what should happen is either:
Nothing changes about the notification status of old topics in a category when it becomes tracked, previously opened or not.
or
All old topics become tracked when the category is tracked, but are automatically dismissed, so only new activity appears in the unread tab.
I lean towards the second solution, provided explicitly set notification levels on topics are kept.
I havenât investigated how this works with other notification levels, I imagine its the same, but I feel it would confuse things for the time being.
The first would be topics not being properly implicitly tracked. If they were, all of the topics from praise should appear in this step:
It seems like that list is just showing topics with a tracking record of âtrackedâ, and thatâs not working as expected. What would be, would be showing all topics with a tracking record of âtrackedâ, and all topics which are in a tracked category. (The same would go for watching.)
Furthermore, while this makes sense:
It seems like the same functionality is missing when a user tracks a category. Shouldnât a tracking record also be created when there is a new post in a topic?
The second would be the appearance of seemingly arbitrary topics in unread when you track a category, (I assume a side effect of changing the tracking state of past topics from regular to tracked), which could be fixed by automatically dismissing those topics from unread.
This is something I found a while ago, and a thread can be found here (not entirely sure why it got moved from bug to feature).
The thread is quite confusing as I originally thought the problem was caused by the initial import from phpBB. So hereâs an attempt to summarise:
It comes down to the fact that a topic cannot be both new and unread simultaneously:
Even though itâs implicitly tracked, topic does not show up in unread because the user has never viewed it
Topic does not show up in new because it is beyond the threshold of whatever your âConsider topics new whenâ setting is
Itâs a hard problem to solve, because having every single old topic in a category appear in your âunreadâ tab is really not a good user experience.
âAutomatically dismissingâ them is quite expensive database-wise (a new TopicUser record would have to be created for every single topic in the category you just tracked).
We didnât really come up with a tidy idea to solve the problem, and the discussion kinda died. One option that @sam came up with was
At the time, I thought this might be a good idea:
But
TL;DR: I donât have a solution, but hopefully this makes the problem clearer
From a practical perspective, that doesnât make sense to me. If I buy a book and put it on my shelf having not opened it, it is both new and unread.
Wouldnât it be possible to have an old topic (with no tracking record) only appear in unread when thereâs new activity on it?
So, just as a tracking record is created on new activity for topics in watched categories, a tracking record would be created on new activity for topics in tracked categories.
Combined with the above, couldnât we just dismiss topics where the tracking record has been changed to âtrackingâ as a result of tracking the category, which would mean the same user experience, without any additional database writes? (If I understand how tracking records, dismissing and TopicUser relate.)
This way, it seems to me, we could have a mailing list experience for tracking too!
Sure, I agree. I was talking purely about how it currently works in discourse.
I believe @sam thought this would have major performance issues
Iâm 99% sure a new record isnât created for tracked topics - @sam said âcreated when we notify usersâ, and tracking doesnât cause notifications. Maybe fixing this is the solution
Ok⊠Iâve done some testing in my dev environment. As a simplest possible repro:
Set previous visit timeout hours site setting to 0, to make testing quicker
User A sets âConsider topics new whenâ to âcreated since I was last hereâ
User A sets Category1 to tracked
User B posts in Category1
User A observes the topic in ânewâ, but does not open it
User A leaves the site
User A comes back to the site later, and User Bâs post is gone from the ânewâ tab
User B posts again in the same topic
The topic does not appear in either ânewâ or âunreadâ for User A, even though they are tracking the topic
That same repro works for âwatchingâ a category as well. A notification is sent, but no TopicUser row is created (checked on the rails console). It seems that this:
is not happening for some reason, both for watched and tracked categories.
Would it though? We already have topics listed in the latest tab and the new/unread tabs simultaneously. And the two (new and unread) are for different purposes: new is âshow me the newest topics on this siteâ and unread is âshow me topics Iâve expressed an interest in, but havenât (finished) read(ing)â. For new to achieve its purpose it has to have unread topics in it which are new, and for unread to achieve its purpose it needs to have new topics in it which are unread.
Currently the unread tab is rather dysfunctional.
Interesting, thanks for doing all this investigation! So it would seem like if this did actually happen (or more specifically, a TopicUser row was created on topic update, rather than notification, to include tracked categories), then our problems here would be solved. @sam thoughts?
I am fine to change the semantics of âtracked categoryâ so it means, if a category is tracked it will unconditionally show up in new regardless of your new duration, it does not mean this now.