feat(tui): adopt an asynchronous Tokio runtime for the TUI frontend

Refactor TUI event handling and rendering to improve responsiveness and use a unified managed client worker.
This commit is contained in:
Nils Andreas Svee committed 2026-10-05 21:49:36 +07:00
1 parent 66abb792ce
commit 5067ceeb1c
12 files changed
+508 -266

No files matched your search

-6
View File
@@ -106,7 +106,6 @@ pub(super) struct TuiState {
details_open: bool,
details_scroll: (u16, u16),
pub(super) paused: bool,
pub(super) quit_requested: bool,
}
impl TuiState {
@@ -143,7 +142,6 @@ impl TuiState {
details_open: false,
details_scroll: (0, 0),
paused: false,
quit_requested: false,
}
}
@@ -939,10 +937,6 @@ pub(super) fn draw_dashboard(frame: &mut Frame<'_>, state: &TuiState) {
frame.render_widget(status_line(state), rows[3]);
}
pub(super) fn should_render(now: Instant, next_render: Instant, paused: bool, force: bool) -> bool {
force || (!paused && now >= next_render)
}
fn dashboard_layout(area: Rect, state: &TuiState) -> [Rect; 4] {
let footer = 3 + u16::from(state.last_warning.is_some());
let target_rows = state.targets.len().min(6) as u16;