daytonaio / daytona

The Open Source Dev Environment Manager.
https://daytona.io
Apache License 2.0
6.81k stars 750 forks source link

JSON output flag breaks select TUI #688

Open Tpuljak opened 2 weeks ago

Tpuljak commented 2 weeks ago

Describe the bug When the -o json flag is added, the selection TUI seems to break completely. A video is provided in the screenshots section

To Reproduce Steps to reproduce the behavior:

  1. Run the Daytona Server
  2. Run daytona info -o json (or daytona code -o json)
  3. Observe that the selection TUI is blank

Expected behavior The user should be able to select a workspace from the TUI list (the same behavior as with daytona info).

Screenshots https://github.com/daytonaio/daytona/assets/26512078/d049aedd-2eb4-40e0-bf7f-2bb46f31bd51

Desktop (please complete the following information):

RS-labhub commented 1 week ago

Hey @Tpuljak. That screenshot link in not working 😅

By the way, as per my understading, What if you add a check for the -o json flag and handle the output accordingly??

Tpuljak commented 1 week ago

@RS-labhub the link seems to work for me, it downloads the file and I can play it locally.

By the way, as per my understading, What if you add a check for the -o json flag and handle the output accordingly??

That's the idea. There seems to be an issue with displaying the TUI while the flag is set. You're welcome to tackle the issue and raise a PR

RS-labhub commented 1 week ago

@RS-labhub the link seems to work for me, it downloads the file and I can play it locally.

It's throwing me this: "this site can't be reached". Don't know why, I'm able to upload the screenshot 🙂

That's the idea. There seems to be an issue with displaying the TUI while the flag is set. You're welcome to tackle the issue and raise a PR A silly question, where should I add the code? in cmd/Daytona > main.go or cmd/Daytona > congif > config.go?? 😅

Tpuljak commented 1 week ago

A silly question, where should I add the code? in cmd/Daytona > main.go or cmd/Daytona > congif > config.go?? 😅

Try to figure that out while working on the PR.

It's throwing me this: "this site can't be reached". Don't know why, I'm able to upload the screenshot 🙂

Simply run daytona info -o json and you should see a blank screen.

RS-labhub commented 1 week ago

Oh okay... Trying!