[Bug] Forced autocomplete commands aren't very user friendly

So this one probably frustrates me more than it should. But for commands like mail, whois, watch or focus which require the full name of a character to work (and are grey until they match a name, unlike page or address which are a light blue whether there’s a valid target or not), if you make a mistake, backspacing currently not only deletes the entire partial name, but also removes the space, not only requiring you to start over typing the character’s name, but also the space between the command and the name.

Sorry if this sounds a little ranty, I’m just a bit frustrated at my own inability to type correctly :sweat_smile:

1 Like

Thus is born my new alt, Despevnivarius Gnuthriglestinsveigner. :stuck_out_tongue: Hehe~ honestly though, I prefer that it deletes the entire thing because I’ve used autocomplete systems before where it will punch in a whole name for you that you didn’t want to type just because a few letters matched, then you have to erase through the entire thing since correcting it sometimes won’t cause it to link to the character you’re actually targeting. XP

1 Like

I’ve also noticed that these types of commands aren’t working for offline characters (specifically mail) when the supposedly should be working. It may be related.

1 Like

Yes and no. It works to tab-complete if that character is 1) either awake, or 2) in your watchfor list.

Tab completion is completely a client-side feature, using info from the In Room, Awake, and Watchfor lists to search for names to complete. This is also the reason why the console doesn’t “warn” you about mailing someone who doesn’t exist, because it doesn’t know that until trying to send it.

But I am frustrated by this myself, so I am planning on:

  • supporting tab-completion based on characters encountered (stored in IndexedDB on the client)
  • allow first-name mailing:
    mail John = Hello, you have the same name as me!
    
    (And if it becomes ambiguous, we can show a few of the latest awake Johns)

    There are multiple character’s named John. Did you mean:
    John Doe
    John Alpha
    John Beta

[EDIT]
One “danger” of the above solution is that, IF the client finds one single John in the IndexedDB, it will mail it to that John instead of telling you of other John options. But maybe that is exactly how we want it to behave.

When would you want to mail someone by first name that you’ve never met ?

1 Like

I guess I confused the scope a bit with my first reply. The commands themselves aren’t working for me for offline characters (at least ones that I don’t own, it does if they’re my characters), ignoring tab complete. They just stay greyed out and when I try to send them mail, it doesn’t know who I’m trying to send to, despite it being the character’s full name.

1 Like

Oh… They are grey? I misunderstood, as the names are suppose to be light blue even if the name actually doesn’t exist:

blue_name

Can you confirm that in your case, “Despevnivarius” would be in grey instead? (just to make sure I understood)

1 Like

image

Completely grey. and if I try to backspace or otherwise move my cursor other than typing new characters, it all erases except for mail.

1 Like

That changes things. This is a bug. :sweat_smile:

What browser+version are you using?

1 Like

Opera GX version LVL3 (core: 86.0.4363.70)

But it’s also not working on Firefox (version 101), from a quick test.

2 Likes

Looking at the console, there are a lot of toLowerCase calls that don’t seem to be happy. Don’t know if they’re related.

1 Like

I have found the issue.

It is related the deleted character in your Watch For list.
When the console scans the list of Watchfor character to match against, it crashes on the deleted character.

It will be fixed in next release.

2 Likes

Awesome! In the mean time, is there a way for me to remove the broken watchfor character through some console trickery?

1 Like

Well… You could write this in the console:

let watches = app.getModule('charsAwake').model.watches;
watches.__update(Object.keys(watches.props).reduce((o, v) => Object.assign(o, watches.props[v].char.id ? null : { [v]: undefined }) , {}));

It removes the broken WatchFor character from the client’s model (object) that holds it.
But without triggering any event. So it won’t cause the GUI to smoothly update.
So, it is only a local solution that works until you reload the client.
And it is very hacky :sweat_smile:

But yeah, it should do it.

1 Like

Scrap that. Instead, run this code to actually Unwatch all the deleted watches on the server:

let watches = app.getModule('charsAwake').model.watches;
Object.keys(watches.props).filter(v => !watches.props[v].char.id).forEach(v => {
    app.getModule('api').call('note.player.' + app.getModule('player').model.player.id + '.watch.' + v, 'delete');
});

This is a more “permanent” solution.

2 Likes

That did it! I can now send out some mails I’ve been needing to get to. Thank you!

2 Likes

Hey, thanks for helping get this solved! I didn’t even know it was part of an issue I was experiencing. XD I just thought it was supposed to work that way and I needed to remember peoples’ last names.

1 Like