The discussion revolves around implementing a plugin to display the unseen topic count per tag. jack2 proposes observing topicTrackingState.messageCount and fetching unseen topics via the API to determine their tags, but sam warns this approach is expensive. sam suggests publishing tag-related data in core, though it would add performance overhead. jack2 considers using topicTrackingState.state to get unseen topic IDs and then retrieve their tags, but sam again cautions against this due to high cost. jack2 notes that the current limitation means new topics on a tag page don’t trigger the ‘new topic’ notification, highlighting a UX issue.
We publish category now with the “new information” I am not against adding publishing of tags as well in core.
The tricky thing though is that this adds an extra join each time we publish info. Additionally, when we generate the initial cache we do not include tags, adding them will be expensive.
I’ve just seen that I can get the unseen topic ids from the topicTrackingState.state object (as you mentioned, I can see the category in there, but not the tags). So here is a better plan:
Observe the topicTrackingState.messageCount property.
Each time there’s a change, use the API to load the unseen topics and get their tags
Tell me if I’m wrong, but a consequence of this tag limitation is that, when you’re on a tag page (example here), any new topic with that tag won’t trigger the “1 new or updated topic. Click to show” message.