Я уже несколько месяцев замечаю подобные вещи, но никогда не создавал отчеты, потому что не мог воспроизвести их стабильно. Но, наконец, случайно мне удалось поймать один из них на видео! (Поэтому, пожалуйста, простите за паузы и неразбериху в движениях моего курсора.)
На что следует обратить внимание:
Пустой список непрочитанных
Тег Contribute > Feature отображается как «Обычный» (несмотря на то, что он отслеживается, как показано в моих настройках), и становится «Отслеживаемым» только после обновления страницы
Тема таинственным образом появляется в списке непрочитанных (от нескольких дней назад, из категории howto)
Второй пункт немного похож на распространенную ошибку, которую я вижу (но никогда не мог воспроизвести на видео): я нажимаю на тему из раздела «Новые» в категории, которую отслеживаю, но её статус не отображается как отслеживаемый, пока я не обновлю страницу. (Интересно, связано ли это с этим.)
Прямо перед записью я пытался воспроизвести эту ошибку, отслеживая тег Contribute > Bug, а затем нажимая на одну из его тем во вкладке непрочитанных. У меня не получилось, но после того как я перестал отслеживать Contribute > Bug, моя вкладка непрочитанных заполнилась примерно 20 закрытыми темами из Contribute > Bug за 2015 год, что, похоже, является той же ошибкой, что и в пункте 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.
Первая заключается в том, что темы не отслеживаются должным образом неявно. Если бы это работало, все темы из канала Community Building > Praise должны были бы отображаться на этом шаге:
Похоже, что этот список показывает только темы с записью отслеживания «tracked» (отслеживается), и это работает не так, как ожидалось. Правильное поведение должно заключаться в отображении всех тем с записью отслеживания «tracked», а также всех тем, находящихся в отслеживаемой категории. (То же самое относится и к подписке.)
Кроме того, хотя следующее утверждение логично:
Похоже, что аналогичный функционал отсутствует при отслеживании категории пользователем. Разве не должна создаваться запись отслеживания, когда в теме появляется новый пост?
Вторая проблема заключается в появлении seemingly произвольных тем как непрочитанных при отслеживании категории (я предполагаю, что это побочный эффект изменения состояния отслеживания предыдущих тем с «regular» на «tracked»), что можно исправить, автоматически помечая эти темы как прочитанные.
Я столкнулся с этим некоторое время назад, и обсуждение этой проблемы можно найти здесь (я не совсем уверен, почему её переместили из раздела Contribute > Bug в Contribute > Feature).
Обсуждение довольно запутанное, так как изначально я думал, что проблема возникла из-за первоначального импорта из phpBB. Поэтому вот попытка кратко изложить суть:
Суть проблемы в том, что тема не может одновременно быть и новой, и непрочитанной:
Хотя она неявно отслеживается, тема не появляется в разделе непрочитанные, потому что пользователь никогда её не открывал.
Тема не появляется в разделе новые, потому что она превышает порог, установленный в настройке «Считать темы новыми в течение».
Это сложная проблема для решения, так как появление каждой старой темы в категории во вкладке «непрочитанные» — это действительно плохой пользовательский опыт.
«Автоматическое закрытие» таких тем требует значительных ресурсов базы данных (для каждой темы в только что отслеживаемой категории пришлось бы создавать новую запись TopicUser).
Мы так и не придумали аккуратного решения этой проблемы, и обсуждение постепенно затихло. Одна из идей, предложенная @sam, звучала так:
В то время мне показалось, что это может быть хорошей идеей:
Но
TL;DR: У меня нет решения, но надеюсь, это проясняет суть проблемы
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.