# So, how is that @ thing supposed to work anyway?

**URL:** <https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206>\
**Category:** Site Feedback\
**Created:** [January 10, 2021, 9:33pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206 "2021-01-10T21:33:11Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Shoeless](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/shoeless/32/7099_2.png) [@Shoeless](https://boards.straightdope.com/u/Shoeless)\
**Post date:** [January 22, 2021, 1:28am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/22 "2021-01-22T01:28:59Z")

</div>

Thanks @codinghorror!

---

<div class="post-metadata">

**Author:** ![puzzlegal](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/puzzlegal/32/3827_2.png) [@puzzlegal](https://boards.straightdope.com/u/puzzlegal)\
**Post date:** [January 22, 2021, 2:02am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/23 "2021-01-22T02:02:43Z")

</div>

> [@BigT](#):
>
> You’re correct. But that then leaves me another issue, where scrolling down sometimes seems to skip down past the second half of a longer post. I’ve never been sure if I accidentally just glossed over it, but this time I’m sure I didn’t see it at all, as I would have noticed mention of the exact example I used.
> 
> Anyways, allow me to replace that with another issue, then: sometimes (and it’s not predictable), the dropdown list will start near the bottom of the page and thus not fit. It would be good if it could do an extra check to make sure the overlay fits on the screen, and automatically move it up if it doesn’t.

This is off topic, and risks diluting the thread. Please start a new thread if you want to discuss other issues.

> [@Chingon](#):
>
> Frankly, you should start a new topic if you’re going to bring up a different issue. This isn’t a general issues thread.

Please report off-topic posts, however, as this site doesn’t allow “junior modding”. Best to report it as “other” and explain the problem, as the canned choices can be hard for the mods to work with. If we ever get an active admin, we plan to disable or rename the other options.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zogstrip/32/6338_2.png) [@zogstrip](https://boards.straightdope.com/u/zogstrip)\
**Post date:** [January 22, 2021, 11:09pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/24 "2021-01-22T23:09:14Z")

</div>

> [@codinghorror](#):
>
> I _currently_ suspect database migration data issues but we will get to the bottom of this because the current behavior is 🤪

It was indeed a bug due to the migration. I’ve manually fixed the database and the mentions should be much better 👍

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [January 23, 2021, 1:10am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/25 "2021-01-23T01:10:09Z")

</div>

Yes, this was an artifact of the migration, and yes, it was _incredibly_ annoying, so thanks for bringing it to our attention, and our apologies for the super erratic way it was behaving!

If you’d like technical details, here they are:

> When you start adding letters after the initial `@` , we are prioritizing exact matches (using `username_lower` ) and then we’re filtering the users using the `user_search_data` table.
> 
> On SD however, only ~10k of the 210k users have a `user_search_data` record. That is definitely a migration artefact but that’s something Discourse should be fixing automagically.
> 
> The user `Elmer_J.Fudd` did not have a `user_search_data` record so that’s why it wasn’t showing up when you were typing their username!

We made it so that the `user_search_data` discrepancy is automagically fixed by the background task, so this _particular_ problem is (in theory) fixed forever.

Feel free to reply with or comment on any peculiar `@` mention behavior, but before you do, let me explain the **_philosophy_ of the `@` name mention feature** :

- prioritize people in the _current topic_
- who were _seen_ recently (note that I didn’t say _posted!_)
- if the list is still less than 20 people, widen scope to the current _category_
- if there is an _exact match_ for a name, e.g. “david” give that match extra priority in the list, but only if that person was seen less than a year ago

And all of the above tries to match on both **username** and **full name** ; the more you type, the more we have to match with.

Depending on how active / large the topic is, you might branch out to people _seen_ recently who posted any reply to any topic in the current category.

I know, the level of detail is mind numbing, but hey, welcome to the wild and wooly world of software programming, where [even a single incorrect character brings everything crashing down!](https://www.slashgear.com/a-single-character-can-crash-your-iphones-messaging-apps-15519688/)

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [January 23, 2021, 2:32am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/26 "2021-01-23T02:32:12Z")

</div>

As a former IT guy with the gray hair and decrepit liver to go along with that, thank you. It was obviously badly broken and dirty data smelled like the cause.

Your explanation of the correctly functioning logic was especially helpful. It’s at odds with what some of us had intuited, but it’s not insane either. It should produce sensible (= more or less as expected, reliable-seeming) results almost all of the time.

Bravo good Sir! And a heartfelt Thank you!

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [January 23, 2021, 2:45am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/27 "2021-01-23T02:45:09Z")

</div>

Yeah ordering by post count is “logical”, but would implicitly encourage a lot of back-and-forth between the same people racking up massive post counts, which (in my experience at least) does not lead to the best conversations overall… hence ordering by _last seen_ instead.

There are a lot of implicit nudges in Discourse, it is fairly opinionated about its goals, but I\* believe those goals (diverse, sustainable, community-moderated civil conversations) are noble ones.

\* but I am obviously _extreeeeeeeemely_ biased

---

<div class="post-metadata">

**Author:** ![puzzlegal](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/puzzlegal/32/3827_2.png) [@puzzlegal](https://boards.straightdope.com/u/puzzlegal)\
**Post date:** [January 23, 2021, 2:52am UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/28 "2021-01-23T02:52:20Z")

</div>

Yay! I just played around with it, and got some very reasonable and helpful results.

Thanks!

---

<div class="post-metadata">

**Author:** ![DemonTree](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/demontree/32/8646_2.png) [@DemonTree](https://boards.straightdope.com/u/DemonTree)\
**Post date:** [January 23, 2021, 12:07pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/29 "2021-01-23T12:07:44Z")

</div>

Hooray! It now finds Elmer\_J.Fudd, puzzlegal, Northern\_Piper and all the other users who were mysteriously missing before.

Thank you for fixing it.

---

<div class="post-metadata">

**Author:** ![Shoeless](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/shoeless/32/7099_2.png) [@Shoeless](https://boards.straightdope.com/u/Shoeless)\
**Post date:** [January 23, 2021, 4:26pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/30 "2021-01-23T16:26:41Z")

</div>

Thanks again @codinghorror and @zogstrip for fixing this. 👍

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [January 23, 2021, 8:22pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/31 "2021-01-23T20:22:34Z")

</div>

You’re welcome but it was all @zogstrip … the good news is we made a “forever” fix so this mistake won’t happen again in future migrations.

---

<div class="post-metadata">

**Author:** ![DemonTree](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/demontree/32/8646_2.png) [@DemonTree](https://boards.straightdope.com/u/DemonTree)\
**Post date:** [January 23, 2021, 8:59pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/32 "2021-01-23T20:59:07Z")

</div>

And I think I know now why my name was one of the few that did autocomplete. I had edited the Name field and that probably caused the database to update.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zogstrip/32/6338_2.png) [@zogstrip](https://boards.straightdope.com/u/zogstrip)\
**Post date:** [January 26, 2021, 4:45pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/33 "2021-01-26T16:45:11Z")

</div>

Just deployed a fixed that will prioritize **exact** username match iif the user has been seen in the **past year**. So typing `@su`, in this topic, won’t show @su who hasn’t been seen in over a decade…

> [@DemonTree](#):
>
> I had edited the Name field and that probably caused the database to update.

Yes, that’s probably right 👍

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [January 26, 2021, 7:25pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/34 "2021-01-26T19:25:06Z")

</div>

I’m glad we got to that change! It’s an excellent one for all instances. The odds of someone needing to mention a particular user who hasn’t been seen in over a year are… uh, low.

(Also more of a problem with short usernames; the minimum username length in Discourse as I recall is 3 so having a user named `su` (apologies to Johnny Cash) wouldn’t usually be possible to gunk up the name mention algorithm.)

---

<div class="post-metadata">

**Author:** ![DemonTree](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/demontree/32/8646_2.png) [@DemonTree](https://boards.straightdope.com/u/DemonTree)\
**Post date:** [January 26, 2021, 7:46pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/35 "2021-01-26T19:46:18Z")

</div>

It’s working 200% better. I can now find users without having to know exactly how to spell their usernames, which kind of defeated the point.

There are a few less serious bugs we’ve noticed, should we report them here in #site-feedback, or is there somewhere off site for general Discourse bugs that would be better?

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zogstrip/32/6338_2.png) [@zogstrip](https://boards.straightdope.com/u/zogstrip)\
**Post date:** [January 26, 2021, 8:16pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/36 "2021-01-26T20:16:34Z")

</div>

> [@DemonTree](#):
>
> is there somewhere off site for general Discourse bugs that would be better?

[https://meta.discourse.org](https://meta.discourse.org) would be much better for bugs that would benefit all Discourse 👍

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [January 26, 2021, 9:42pm UTC](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206/37 "2021-01-26T21:42:20Z")

</div>

> [@DemonTree](#):
>
> There are a few less serious bugs we’ve noticed, should we report them here in #Site Feedback, or is there somewhere off site for general Discourse bugs that would be better?

It’s better to report them here first, so that others can share their site-specific experiences.

[Previous page](https://boards.straightdope.com/t/so-how-is-that-thing-supposed-to-work-anyway/930206.md?page=1)
