Textualize / textual-web

Run TUIs and terminals in your browser
MIT License
782 stars 17 forks source link

Can't provide empty slugs to `add_app`/`add_terminal` #4

Closed rodrigogiraoserrao closed 1 year ago

rodrigogiraoserrao commented 1 year ago

Documentation to GanglionClient.add_app and GanglionClient.add_terminal say that if slug is an empty string, the server will generate a slug for you, but it doesn't. Thus, if you use add_app/add_terminal with slug="", no app/terminal is served.

To see this, modify the line 166 below to use "" for the slug and try running textual-web -t. You won't be able to connect.

https://github.com/Textualize/textual-web/blob/45e283c7baacbdd522169cf4fbf40971f5a8e372/src/textual_web/cli.py#L162-L167