-
Notifications
You must be signed in to change notification settings - Fork 158
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
SPIKE: Bubble tea and two viewports #2757
Comments
Sorry, I didn't quite get it, could you please clarify it? Does it mean that, when the questions are displayed, the logs are paused and continue scrolling after the questions are answered? (Is the program execution somehow paused?) Or should the logs be scrolling/the program continue its execution while the user is answering the questions? |
Logs are running in the top uninterrupted as the question is asked in the bottom. |
a) with gitops run code put into Bubble Tea completely (in the b) and with Bubble Tea used as a lightweight UI (in the The initial branch Known limitations of the prototypes and Bubble Tea:
Adding inputs in case of working viewports and messages should not be a technical problem.
Recover panics from within cmds goroutines This issue can be reproduced by pressing Ctrl+C twice (because in the prototype running the gitops run cleanup twice on Ctrl+C is not blocked) in the bubble tea regular UI branch and initial version after "Reconciliation is done" or "Portforwarding..." messages are displayed.
Conclusions:
It would require serious planning and rework of the program's structure (at least several days with the dev mostly frozen or new features added as separate modules) with possible future fixes for issues required.
In both cases, we should keep that issue with unhandled panics in goroutines in mind, because non-operative state of the terminal would lead to very poor use experience.
|
As discussed with @ozamosi , we decided to stop on the lightweight UI option with some improvements (the dispatcher), suggested by @ozamosi with a cool diagram to boot:
For communication between parts (namely, for sending messages from Bubble Tea to goroutines, sending messages to the Bubble Tea UI is easier and can be performed with Bubble Tea's The "blocking stuff" is split between Bubble Tea and the dispatcher:
About forwarding the output to Bubble Tea UI only (Bubble Tea UI is not compatible with regular
The dispatcher cannot control/interact with the UI directly, the UI is displayed based on the bubble tea model. So, we'll have
So, in conclusion, using Bubble Tea UI for GitOps Run looks feasible and I will be able to start working on it after #2831 is resolved. |
The UI will be implemented in #2933 |
As a user, there is a lot to see with
gitops run
. It is doing a lot of work in the background. There are also times I need to interact with it as I am being asked questions. I would like to have two separate view ports on the CLI. One forstdout
. This should take up about 70% of the screen real estate. The second should be below that taking up about 30%.Build a POC that leverages the bubble tea UI components to pull this off. While there are some different use-cases we want to use with the view ports for this POC let's just have the two questions we want to answer during install.
As the user answers these questions we should see the logs continue to scroll at the top.
Key takeaways for Spike
Reference
The text was updated successfully, but these errors were encountered: