OpenMentions news: trending topics, trending topics RSS feed, and other bug fixes

Posted under Site News On By Matt

I’ve spent the day tracking down a weird bug where the content of the trending topics feed and the trending topics on the front page did not agree with each other. It turns out that you should not assume consistency of behaviour in a complex dynamic system and should explicitly set the select and exclude values.

When I updated OpenMentions to include likes, boosts, and other interactions, I apparently did not update trending topics to use them all. As a result, it was either using all or sum based on defaults. Not too helpful. The good news is, I fixed it.

Both the RSS feed and the front page now agree. However, the RSS feed has many more trending topics. This is because the front page usually looks lopsided with too many trending topics when the topic text is very long. I manually tune the number it shows to stop the page looking silly.

While I was solving that one, I also fixed some fudged HTML things (tags closed in the wrong order and that sort of thing). I also spotted an edge case where a hyperlink tag was opened inside another one. It doesn’t break anything, but it is not really the right way to do it. I added a few new conditionals and fixed it.

There may be some minor changes to the way trending topics show up now, but that is only due to more data (likes, boosts, and other previously ignored data). As a result, OpenMention site news will appear in trending topics when it is fresh. If you think I should exclude that, drop me a mention – I’m always open to a persuasive argument. Same goes for code, CSS, and other ideas. This is your site too.

For those who are wondering, the trending topics system takes sums up the inverse of the age (in hours) of the comments younger than 12 weeks for posts, topics, and other pages with comments that young. It then orders that list from highest to lowest. That way, fresher comments count more, but the fall-off is gentle.

It does not balance boosts, likes, comments, mentions, or other things. They all count equally right now. Maybe in a future update if necessary, but for now it looks like it works well enough.

No AI is used to generate the trending topics. I limit my AI use to doing code review when I am feeling tired because I sometimes make silly errors which AI can spot, but AI makes errors I might not spot (which is worse). Personally, I would rather do that with a team of fellow humans, but this is a solo project at the moment. Therefore, all bugs are my own.

Likes

Leave a comment

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.