earthstar-project / earthstar-cli

A complete Earthstar toolbox in the console.
GNU Lesser General Public License v3.0
12 stars 1 forks source link

Better feedback for providing a too-long shortname #25

Open decentral1se opened 1 year ago

decentral1se commented 1 year ago

What's the problem you want solved?

earthstar identities generate foobar
ValidationError: name must be between 4 and 4 characters long, but is 6

My first choice was > 4 and I imagine most people will do that too...

Error is a somewhat confusing read also :sweat_smile:

Is there a solution you'd like to recommend?

Length ~ 16 chars to avoid this?

achou11 commented 1 year ago

yeah I've pointed out the unclear error message from the CLI before. Not sure it's documented as an issue in https://github.com/earthstar-project-earthstar-cli but probably should be if it's not.

there's some specific reasoning for the 4 char length for the short name but will let gwil answer that since I don't fully remember :)

decentral1se commented 1 year ago

Ah right, probably needs to be migrated to https://github.com/earthstar-project/earthstar-cli

sgwilym commented 1 year ago

Here's the full breakdown of why shortnames are a part of keypair addresses, and why they are four characters.

Shortnames need to be long enough that they can express a clear relationship to the real identity of the account.

They need to be short enough for users to intuitively understand that they are non-unique.

Users can change their display names freely but their shortnames are fixed. Modifying the shortname effectively creates a new identity and the user's followers will not automatically follow the new identity.

Humane software must allows users to change their names.

decentral1se commented 1 year ago

Ah ok. I'd suggest doing an interactive input which limits to 4 chars (don't take args?). And/or giving a one-liner of the why directly on the CLI (potentially linking to the docs?). It isn't a great first UI/UX moment with the CLI facing an unexplained limitation.

sgwilym commented 1 year ago

I'm 100% with you that a better explanation should be given by the CLI.

I'm also (maybe obviously) not experienced with CLI design. Why is an interactive input is better than args for this? Quicker feedback?

decentral1se commented 1 year ago

Well, idk if better. Interactive would ideally limit the input at 4 chars and have a chance to output explanation while asking for input. It could be better UI/UX but some folks don't like interactive inputs :woman_shrugging: Simplest is just have a better error message :smile: But then you do risk someone typing in a BigLongCoolShortNameTheyWant and then boom, error message, bitta confusion, etc.