Empty „Your topic is similar to...”

AI-generated summary

The “Your topic is similar to…” feature is not functioning correctly, often displaying an empty box even when there are no similar topics. iamntz and davemaxwell both reported this issue and suggested hiding the box when there are no results. zogstrip found the relevant code and iamntz provided steps to reproduce the issue. zogstrip confirmed the repro and initially thought the issue was fixed, but codinghorror noted that the logic to prevent the empty box from appearing was previously in place and zogstrip later confirmed the issue is still not fixed, requiring further investigation by @eviltrout.

Hi!

On a new forum (50 topics atm), i see the similar topic box to be empty pretty often. I’m not sure what’s the algorithm for displaying that, but i think it should be hidden if there are no results, no?

I noticed that earlier today on another instance of discourse. I agree - doesn’t seem like it should be displayed if there’s nothing there…

Not sure what’s happening but there is a check

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/controllers/composer.js.es6#L300

The problem is easy to reproduce with these steps:

  1. Add a title
  • start adding content in order to get valid suggestion (the popup shows)
  • continue adding content until there is no suggestions left (the popup remain)

I can reproduce (almost) every time :smile:


edit: i even succeeded to reproduce on meta.discourse, but apparently it’s not every time, but only once in a while

1 Like

Thanks, I have a repro. Will fix :smile:

2 Likes

I think this is fixed now? There used to be logic to prevent that from appearing until the number of topics was high enough to support it…

Not fixed yet. @eviltrout will have to have a look because I can’t figure out why it’s not hiding the popup when the code is right :frowning:

1 Like