Skip to content

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

Closed

Description

@jsjoeio

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

Activity

  1. added this to the Community MVP milestone on May 2, 2022
  2. bpmct commented on May 3, 2022

    @bpmct
    Member

    potential duplicate of #1173

  3. jsjoeio commented on May 3, 2022

    @jsjoeio
    ContributorAuthor

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

  4. spikecurtis commented on May 4, 2022

    @spikecurtis
    Collaborator

    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

  5. kylecarbs commented on May 4, 2022

    @kylecarbs
    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.

  6. spikecurtis commented on May 4, 2022

    @spikecurtis
    Collaborator

    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...

  7. modified the milestones: Community MVP, V2 Beta on May 4, 2022
  8. modified the milestones: V2 Beta, Community MVP on May 5, 2022
  9. spikecurtis commented on May 6, 2022

    @spikecurtis
    Collaborator

    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.

  10. kylecarbs commented on May 6, 2022

    @kylecarbs
    Member

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

  11. spikecurtis commented on May 6, 2022

    @spikecurtis
    Collaborator

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

  12. spikecurtis commented on May 6, 2022

    @spikecurtis
    Collaborator

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

  13. kylecarbs commented on May 6, 2022

    @kylecarbs
    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).

  14. spikecurtis commented on May 6, 2022

    @spikecurtis
    Collaborator

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

  15. kylecarbs commented on May 6, 2022

    @kylecarbs
    Member

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

  16. tjcran commented on May 7, 2022

    @tjcran

    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.

  17. tjcran commented on May 7, 2022

    @tjcran

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

  18. spikecurtis commented on May 10, 2022

    @spikecurtis
    Collaborator

    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

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions