Skip to content

Bug: can't use Backspace in "Specify a name for your workspace" #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #777 ...
jsjoeio opened this issue Apr 29, 2022 · 15 comments · Fixed by #1379
Closed
Tracked by #777 ...

Bug: can't use Backspace in "Specify a name for your workspace" #1226

jsjoeio opened this issue Apr 29, 2022 · 15 comments · Fixed by #1379
Assignees
Labels
api Area: HTTP API
Milestone

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Apr 29, 2022

OS Information

  • OS: macOS
  • Browser (if applicable): Brave
  • Architecture: amd64
  • coder --version: 0.5.1

Steps to Reproduce

  1. Download coder from releases
  2. ./coder login https://dev.coder.com
  3. Paste token and authenticate
  4. ./coder workspaces create
  5. Type in name of workspace i.e. "testt" then hit backspace key

Expected

It should let you delete characters in the name

Actual

Inserts ^?

Logs

status code 400: Validation failed
	name: username  

Screenshot

image

Notes

Using zsh and Terminal

@bpmct
Copy link
Member

bpmct commented May 3, 2022

potential duplicate of #1173

@jsjoeio
Copy link
Contributor Author

jsjoeio commented May 3, 2022

Oh dang, it is a duplicate. My bad! Should we close this one?

@spikecurtis
Copy link
Contributor

Introduced by #839 which, now that I look at it, has the helpful comment:

// This removes canonical input processing, so deletes will not function
// as expected. This seems fine for most use-cases, but is unfortunate.

So, we need to either live with inability to paste long lines, or inability to delete, or find/build a new input solution that supports both. Possibly some sort of text-UI/ncurses library? Your thoughts @kylecarbs @jsjoeio @bpmct

@kylecarbs
Copy link
Member

Considering the macOS terminal doesn't support extremely long lines, I'd say we should keep to that idiom. Maybe we prefer tfvars or something instead? That's what Terraform does.

@spikecurtis
Copy link
Contributor

I mean, presumably people can still pipe long-line inputs from file, so there is a workaround. Unclear the context when long-line pastes were causing grief. It's easy to see the grief from not being able to use backspace on a text prompt...

@ammario ammario modified the milestones: Community MVP, V2 Beta May 4, 2022
@tjcran tjcran modified the milestones: V2 Beta, Community MVP May 5, 2022
@misskniss misskniss added the api Area: HTTP API label May 5, 2022
@spikecurtis
Copy link
Contributor

Another idea is to make the long line / backspace works choice on a prompt by prompt basis. So, prompts where we expect to have people primarily paste long stuff, we pick long lines. Not very satisfying, and adds a new option every time we open a prompt, but might minimize the pain.

@kylecarbs
Copy link
Member

Maybe even display a keybind to allow long inputs? That'd be a pretty great user experience.

@spikecurtis
Copy link
Contributor

I'm not sure I know what you mean by a keybind.

@spikecurtis
Copy link
Contributor

Adding a flag that forces --allow-long-inputs would be straightforward as well.

@kylecarbs
Copy link
Member

Because Terraform doesn't support long input prompts like this, I'm tempted to say we should use tfvars instead. They also have this restriction (because it's just a macOS terminal thing).

@spikecurtis
Copy link
Contributor

literal .tfvars, or just the idea of allowing input variables to be set in a file, like .codervars?

@kylecarbs
Copy link
Member

Not sure, but .tfvars seems reasonable because then we wouldn't need input parameters.

@tjcran
Copy link

tjcran commented May 7, 2022

My input would be that we favor the ability to delete/backspace over the ability to have long-input lines.
Adding a flag for long input or a prompt-by-prompt basis is something we can wait on until we get requests for it or are looking to enhance the experience.

Being able to backspace when you typo or want to change it up is pretty core expectations.

@tjcran
Copy link

tjcran commented May 7, 2022

Adding estimate of 1 to match the estimate in #1173, which is now closed as a duplicate of this one.

@spikecurtis
Copy link
Contributor

I've added #1377 to track loading parameter values from file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants