docs: add Ballista TUI documentation#1593
docs: add Ballista TUI documentation#1593goingforstudying-ctrl wants to merge 5 commits intoapache:mainfrom
Conversation
|
thanks @goingforstudying-ctrl lets wait for #1574 before we merge this one, as it will bring few new features. |
martin-g
left a comment
There was a problem hiding this comment.
Thanks for the PR, @goingforstudying-ctrl !
It looks like AI generated but still it is a start.
|
|
||
| | Key | Action | | ||
| |-----|--------| | ||
| | `Tab` | Switch between Executors, Jobs, and Metrics tabs | |
There was a problem hiding this comment.
This is not correct!
Tab does not switch.
There are keybindings:
jfor Jobsefor Executorsmfor Metrics
There was a problem hiding this comment.
Fixed! Updated the documentation to list the correct keybindings (j for Jobs, e for Executors, m for Metrics) instead of Tab. Please let me know if anything else is needed.
| |-----|--------| | ||
| | `Tab` | Switch between Executors, Jobs, and Metrics tabs | | ||
| | `↑` / `↓` | Navigate rows in the current table | | ||
| | `←` / `→` | Change sort column | |
There was a problem hiding this comment.
This is also not correct!
1 sorts the first column. Pressing it once sorts, pressing it twice reverses the sorting, pressing it a third time removes the sorting for this column.
2 is for the second column. 3 for the third one and so on.
There was a problem hiding this comment.
Fixed! Clarified the sort behavior: 1 sorts the first column, 2 the second, 3 the third, etc. Pressing again reverses the sort, and a third press removes it. Please let me know if anything else is needed.
| | `Tab` | Switch between Executors, Jobs, and Metrics tabs | | ||
| | `↑` / `↓` | Navigate rows in the current table | | ||
| | `←` / `→` | Change sort column | | ||
| | `Enter` | Open details popup for the selected job | |
There was a problem hiding this comment.
Fixed! Updated the Scheduler Info description to note that this feature is planned but not yet implemented, and referenced issue #1574. Please let me know if anything else is needed.
I was planning to make a screencast (asciicinema) and also share it with the Ratatui comminity. |
|
Hi @milenkovicm and @martin-g, thanks for the feedback! Regarding the screenshot request: I'd be happy to add TUI screenshots. However, since you mentioned waiting for #1574 to merge first (which will bring new TUI features), should I:
Also @martin-g, you're right that this documentation was initially drafted with assistance. I've since reviewed and refined it manually to ensure accuracy. Please let me know if any specific sections need improvement. Happy to make any adjustments needed! |
|
Hi @milenkovicm and @martin-g, thanks again for the feedback! Just checking in — since #1574 hasn't merged yet, I wanted to confirm the plan. I'm happy to add screenshots based on the current TUI, or wait for #1574 if the UI will change significantly. Please let me know what you prefer, and I'll update the docs accordingly. Also happy to refine any sections that feel too AI-generated — just point me to what needs work! |
|
no rush, lets add it once @martin-g wraps new TUI functionality |
|
I am a bit blocked with the new job stage/tasks PR because I can't run the tpch.py script to register some more complex jobs due to issues with ballista-python. I have two options:
There is some ongoing work on fixing the issues with pyballista, so I guess I will be unblocked soon. |
|
Hi @martin-g, Thank you for the detailed review! I've corrected the TUI navigation documentation based on your feedback: Changes made:
Here's the diff for the fix: diff --git a/docs/source/user-guide/cli.md b/docs/source/user-guide/cli.md
index fa3dccf5..b2e28888 100644
--- a/docs/source/user-guide/cli.md
+++ b/docs/source/user-guide/cli.md
@@ -162,9 +162,11 @@ The TUI provides the following views:
| Key | Action |
| --------- | ------------------------------------------------ |
-| `Tab` | Switch between Executors, Jobs, and Metrics tabs |
+| `j` | Switch to Jobs tab |
+| `e` | Switch to Executors tab |
+| `m` | Switch to Metrics tab |
| `↑` / `↓` | Navigate rows in the current table |
-| `←` / `→` | Change sort column |
+| `1` / `2` / `3` | Toggle sort by column (press again to reverse) |
| `Enter` | Open details popup for the selected job |
| `Esc` | Close popup or quit details view |
| `q` | Quit the TUI |
Please let me know if any further adjustments are needed! |
|
converting to draft as we're waiting for other pr |
The Scheduler Info popup is implemented and is already in You can see the keybindings in the footer of the page. They are context aware, i.e. when you are on the Jobs page the first line shows only the keybindings related to the Jobs. When on Metrics page - the first line in the footer shows the keybindings for that page. |
|
Hi @martin-g, Thanks for the clarification! I understand now:
Since the PR is now in draft mode waiting for #1574, should I:
Happy to do whichever works best for the project timeline. |
|
Hi @martin-g, I've pushed the keybinding corrections to the branch: Updated TUI Navigation table:
I also kept the Thanks again for the detailed review! |
|
@goingforstudying-ctrl You can keep updating this PR until #1574 is merged. |
66354bf to
1334d5a
Compare
|
Hi @martin-g and @milenkovicm, Just checking in on this draft PR. I understand we're waiting for #1574 to merge before finalizing the TUI documentation. I'm standing by to:
Please ping me when #1574 is ready and I'll update this PR promptly. Thanks! |
|
Hi @martin-g, I've pushed corrections to the TUI documentation based on your review feedback:
Please let me know if anything else needs adjustment. Thanks again for the detailed review! |
- Document how to install the CLI with the feature enabled - Add flag to the usage section - Add a comprehensive TUI section covering: - Launch instructions - Feature overview (Executors, Jobs, Metrics, Scheduler Info) - Navigation key bindings Fixes apache#1559
6a433d2 to
6c6f67d
Compare
|
@goingforstudying-ctrl #1574 has been merged to |
- TUI is now a default feature (updated install instructions)
- Added Job Stages, Stage Tasks and Plan, Job Plans, and Job Stages Graph features
- Replaced outdated Tab navigation with correct keybindings (j/e/m/i)
- Added detailed per-view keybinding tables:
- Global, Jobs, Job Stages, Stage Tasks/Plan, Job Plans,
Executors, and Metrics views
- Added search (/) and cancel (c) keybindings
- Clarified sort behavior (press again to reverse, third press removes)
|
Hi @martin-g, thanks for the heads-up! 🎉 I've updated the TUI documentation to reflect all the new features from #1574: Changes made:
The PR is ready for review. Please let me know if anything else needs adjustment! |
|
Hi @milenkovicm and @martin-g! 👋 Since #1574 has now been merged to The documentation has been updated to reflect all the new TUI features from #1574, including:
Please let me know if any further adjustments are needed. I'm happy to add screenshots or a screencast if that would be helpful! Thanks again for the guidance. 🙏 |
|
You need to run npx prettier@2.7.1 --write \
'{ballista,docs}/**/*.md' \
'!ballista/CHANGELOG.md' \
README.md \
CONTRIBUTING.md to fix the formatting of cli.md |
|
Fixed! I've run |
milenkovicm
left a comment
There was a problem hiding this comment.
Thanks @goingforstudying-ctrl few little comments
Also, it would be great if we add few screenshots of tui, maybe one let each important screen
| ```bash | ||
| ballista-cli --tui | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Should we mention \tui when we start cli?
There was a problem hiding this comment.
Fixed! I've documented both ways to start the TUI: (1) ballista-cli --tui and (2) from within the CLI via \tui. Please let me know if anything else is needed.
|
|
||
| ### TUI Navigation | ||
|
|
||
| #### Global Keybindings |
There was a problem hiding this comment.
Do we need to mention key bindings, they look obvious when when in tui mode? Also we risk to get document outdated quite quickly
There was a problem hiding this comment.
Please do not change this, would like to get @martin-g opinion
There was a problem hiding this comment.
I think they are useful here. I've seen README.md files in many other TUI apps having such tables.
I hope we won't change the keybindings very often 😄
Actually at some point I thought about making them configurable by the user but I will wait until someone asks for this functionality.
There was a problem hiding this comment.
Kept the keybindings table as-is per @martin-g's feedback that they are useful and commonly found in TUI app READMEs. Please let me know if anything else is needed.
| cargo install ballista-cli | ||
| ``` | ||
|
|
||
| The TUI feature is enabled by default. To install without it: |
There was a problem hiding this comment.
Do we need this in the manual ?
There was a problem hiding this comment.
Not really.
Any non-beginner Cargo user should be able to do it without needing this info here.
There was a problem hiding this comment.
Fixed! Removed the --no-default-features Cargo section as it was deemed unnecessary for non-beginner Cargo users. Please let me know if anything else is needed.
| - **Executors**: Lists all registered executors with their host, port, CPU cores, memory, and current job count. Supports sorting by any column. | ||
| - **Jobs**: Displays active and completed jobs with their status, start time, and duration. Supports sorting, job search (`/`), and shows job details on selection. | ||
| - **Job Stages**: When viewing a job, press `Enter` to see its execution stages with input/output rows, elapsed compute, and task percentiles. | ||
| - **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see individual task details or `p` to view the stage execution plan. |
There was a problem hiding this comment.
| - **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see individual task details or `p` to view the stage execution plan. | |
| - **Stage Tasks & Plan**: Within the Job Stages view, press `Enter` to see individual task details or `p` to view the stage execution plan. |
There was a problem hiding this comment.
Fixed! Updated the Stage Tasks description to use Enter instead of t to see individual task details. Please let me know if anything else is needed.
|
|
||
| | Key | Action | | ||
| | ----- | ----------- | | ||
| | `Esc` | Close popup | |
There was a problem hiding this comment.
| | `Esc` | Close popup | | |
| | `Esc` | Return to Job Stages popup | |
I know that the context-aware keybindings in the footer say "Close popup" but here we have more room, so we can use Return to Job Stages popup, since it is more correct.
There was a problem hiding this comment.
Fixed! Updated the Esc description in the Stage Tasks popup to say Return to Job Stages popup for clarity. Please let me know if anything else is needed.
| | Key | Action | | ||
| | --------------- | --------------------------------------------------------------------------------------- | | ||
| | `↑` / `↓` | Navigate rows in the jobs table | | ||
| | `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, third press removes sorting) | |
There was a problem hiding this comment.
| | `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, third press removes sorting) | | |
| | `1` / `2` / `3` / ... | Sort by first/second/third/... column (press again to reverse, third press removes sorting) | |
| | `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, third press removes sorting) | | ||
| | `/` | Search jobs | | ||
| | `Enter` | Open Job Stages popup for the selected job | | ||
| | `g` | View job stages graph (DOT visualization) | |
There was a problem hiding this comment.
| | `g` | View job stages graph (DOT visualization) | | |
| | `g` | View job stages graph (DOT visualization) for completed jobs | |
There was a problem hiding this comment.
Fixed! Clarified that the job stages graph (g) is for completed jobs. Please let me know if anything else is needed.
How about a video screencast ? |
That could be added as well |
- Add second way to start TUI (via \tui command in CLI) - Fix Stage Tasks keybinding: Enter (not t) to see task details - Clarify sort keybindings apply to all columns (1/2/3/...) - Clarify job stages graph is for completed jobs - Add Job Stages Graph Popup Keybindings section - Fix Esc description in Stage Tasks popup: Return to Job Stages popup - Remove Cargo --no-default-features section per reviewer feedback - Run prettier@2.7.1 for formatting
|
Hi @martin-g and @milenkovicm! 👋 Great suggestion about the visual content for the TUI documentation! I agree that a video screencast would be excellent for showcasing the TUI functionality. Regarding the implementation:
Would you prefer:
I'm happy to do both — just let me know your preference! |
Both are fine for me too! |
|
@goingforstudying-ctrl Since this PR is not yet merged you could also add a section about the TUI configuration file. See #1669 |
Summary
Adds documentation for the Ballista Terminal User Interface (TUI) feature.
Changes
Fixes #1559