GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
503 stars 55 forks source link

[Bug]: Invalid user @ mentions don't have a visual indication (different color from blue) #970

Closed nekohayo closed 1 month ago

nekohayo commented 1 month ago

Describe the bug

It just occurred to me what makes user mentions so hard to use for me: there is no visual distinction between a valid and invalid mention.

Steps To Reproduce

  1. Open the composer
  2. Type some clearly invalid user mention, like La la la @nthosaeuaoe89u7aoeuthahoeu blah blah
  3. Notice the @ mention is still colored blue as if it was valid. Also, even if you type impossible gibberish, it still offers you autocompletion choices that clearly don't match what you typed, as you can see in the video below.

I would expect invalid mentions to be checked and not be colored blue; maybe red instead?

Logs and/or Screenshots

Screencast from 2024-06-02 11-05-35.webm

Instance Backend

Mastodon

Operating System

Fedora 39

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime) prefix: /app flatpak: true version: 0.7.2 (production) gtk: 4.14.4 (4.14.1) libadwaita: 1.5.1 (1.5.0) libsoup: 3.4.4 (3.4.4) libgtksourceview: 5.12.0 (5.12.0)

Additional Context

No response

GeopJr commented 1 month ago

The web frontend doesn't highlight mentions at all in the composer

I would expect invalid mentions to be checked

:x: Can't do. I think we've had this convo before in another issue, but due to the way federation works, we can't know in advance if a user exists. Forcing your instance to resolve every single character you type would be too stressful.

Example:

I make a new instance, faraway.town, make my account @geopjr\@faraway.town and tell you to mention me. Your instance doesn't even know my instance exists yet. When you do create a post that mentions me, your instance will check if faraway.town is an AP instance and push it. My account might still not be resolved on your instance. If you search @geopjr\@faraway.town from your instance, it will resolve it and then it will show up on autocompletions.

In summary, AP is very liberal, so any tag might be valid and since it's somewhat expensive to check, it will only check when it needs to

nekohayo commented 1 month ago

Ah I see, that's unfortunate!

I had searched for other tickets related to "invalid mention" or "mention color" and didn't find it, the closest I can find now is #779, I guess that's what you're referring to.

It's weird that in the video above you get autocompletion (or a lingering autocompletion popover?) for things that can't possibly match, though.

GeopJr commented 1 month ago

I guess that's what you're referring to

Can't remember, doesn't matter anyway :weary:

It's weird that in the video above you get autocompletion (or a lingering autocompletion popover?) for things that can't possibly match, though.

My guess is that it hasn't updated yet with the new search results, I'll go through this when I get to fixing all autocomplete issues you've found, for the next release!

Right now I'm prioritizing anything that introduces new strings so we finally get to freezing them for translators