Skip to content

feat: Add web rendering of the TUI application#1742

Draft
martin-g wants to merge 41 commits into
apache:mainfrom
martin-g:1660-tui-web
Draft

feat: Add web rendering of the TUI application#1742
martin-g wants to merge 41 commits into
apache:mainfrom
martin-g:1660-tui-web

Conversation

@martin-g
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #1660

Rationale for this change

Be cool :-)
Seriously, I don't expect someone to prefer use the web-tui than the TUI app.

What changes are included in this PR?

Added a WASM32 start method for the web app.
Implement custom event bus for the tick updates and key events.

Are there any user-facing changes?

The TUI application should behave the same way.
The Web TUI is completely new way to interact with it.

@milenkovicm
Copy link
Copy Markdown
Contributor

can't wait to see WebGl2Backend using more CPU to render than ballista to crunch data 😀 (just joking)

@milenkovicm
Copy link
Copy Markdown
Contributor

btw show WebGl2Backend render if you have it

@martin-g
Copy link
Copy Markdown
Member Author

martin-g commented May 26, 2026

CanvasBackend:
ballista-canvas-backend

@martin-g
Copy link
Copy Markdown
Member Author

WebGl2Backend:
image

@martin-g
Copy link
Copy Markdown
Member Author

ballista-webgl2-backend

The Web TUI uses the ballista-logo.svg as a banner. I just modified the text color to be white.

I also tried with ratatui-image for the TUI but it cannot render SVGs, only bitmap formats, and the PNG does not look good on Ghostty (my terminal app). So, the TUI will continue using tui-big-text.

@milenkovicm
Copy link
Copy Markdown
Contributor

milenkovicm commented May 27, 2026

Failed jobs can't be drill into nor plan can't be shown. Not sure where to print failed reason

correction: just plan cant be shown and there is no reason why job failed

Comment thread ballista/scheduler/src/api/routes.rs Outdated

router.with_state(scheduler_server)
let cors = CorsLayer::new()
.allow_origin(AllowOrigin::exact("http://localhost:8080".parse().unwrap()))
Copy link
Copy Markdown
Member Author

@martin-g martin-g May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this configurable or permissive and let any Ajax client able to connect ? As long as it can reach the Scheduler address

@martin-g martin-g changed the title (feat) Add web rendering of the TUI application feat: Add web rendering of the TUI application May 27, 2026
Comment thread ci/scripts/rust_clippy.sh
cargo clippy --all-targets --package ballista --all-features -- -D warnings
cargo clippy --all-targets --package ballista-cli --no-default-features --features cli,tui -- -D warnings
#cargo clippy --all-targets --package ballista-cli --no-default-features --features web -- -D warnings
cargo clippy --all-targets --package ballista-examples --all-features -- -D warnings
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems running clippy on ballista-examples crate concretely exposes some problems:

error[E0432]: unresolved import `ballista_core::object_store`
  --> examples/examples/custom-client.rs:19:20
   |
19 | use ballista_core::object_store::state_with_s3_support;
   |                    ^^^^^^^^^^^^ could not find `object_store` in `ballista_core`

For some reason those are not reported when running Clippy on the whole workspace (line 21).

martin-g added 8 commits May 27, 2026 22:43
Fixes a Clippy error:
```
error[E0432]: unresolved import `ballista_core::object_store`
  --> examples/examples/custom-client.rs:19:20
   |
19 | use ballista_core::object_store::state_with_s3_support;
   |                    ^^^^^^^^^^^^ could not find `object_store` in `ballista_core`
```

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add web version of the TUI app

2 participants