anything-llm icon indicating copy to clipboard operation
anything-llm copied to clipboard

Inconsistent workspace name length validation?

Open jazelly opened this issue 1 year ago • 1 comments

How are you running AnythingLLM?

All versions

What happened?

in the onboarding flow, the workspace name length is restricted to be minimum 4 characters, while in the sidebar, a user can create a workspace name with any length. Screenshot 2024-05-13 at 7 12 18 pm

Are there known steps to reproduce?

No response

jazelly avatar May 13 '24 09:05 jazelly

This is not a "strict" validation. We just wanted to have it to where the workspace name was not just a or something like that. I suppose it could be argued it doesn't make sense and we should permit anything since in the landing page that is also allowed

timothycarambat avatar May 13 '24 16:05 timothycarambat

@timothycarambat Yes, exactly, I think it's up to the design, but considering the name length has been allowed to be less than 4 characters in the workspace settings page, wouldn't it be kind of breaking backward compatibility by reintroducing that?

So IMHO, probably just remove the workspace length restriction in the onboarding flow. I'm happy to raise a PR to address this trivial change.

jazelly avatar May 14 '24 03:05 jazelly

IIRC, the reason it every existed is because in like the v0 version of AnythingLLM we did not use slugs for the paths, so there was no guarantee they would be unique. Now, that is long long gone and you can have 40 workspaces all named a and they will get unique slugs so its basically a non-issue now and that limitation can be removed.

timothycarambat avatar May 14 '24 06:05 timothycarambat