The discussion addresses a bug where Discourse incorrectly warns users that a mentioned person cannot see a topic in a restricted category, often triggered prematurely by the autocomplete feature. barryvan notes the warning appears too early, even during partial mentions like @christine, due to the autocomplete popup. sam suggests delaying the warning until a terminating character (like punctuation or whitespace) is entered, but this fails if a user intends to leave a trailing @ mention. An alternative fix involves bypassing the check when autocomplete is active or was shown recently. barryvan proposes using a newline as a terminating character, though this doesn’t solve trailing mentions. codinghorror seeks input from @cpradio, and sam confirms the issue is fixed with a 2-second delay.
When replying to a topic in a restricted category, Discourse (very intelligently) shows you a warning if you @-mention someone who won’t be able to see the topic. It does, however, seem to be a little eager in doing so. For example, if you type @christine, it’ll warn you that she can’t participate – even if you’re just about to finish typing @christinejones, who can.
I think this is tied to the autocomplete popup appearing – the warning banner appears at roughly the same time.
One way to fix this would be to not show this warning until you enter a terminating character – a piece of punctuation or whitespace.
Could a newline not be considered a terminating character? Although that still wouldn’t resolve people leaving trailing @-mentions at the end of posts. (Although you could argue that such people are truly, truly awful !)
The autocomplete fix sounds like it could work well, but I imagine it’d be a bit more complex under the hood.