oxidelake_tui/lib.rs
1//! Terminal dashboard built on ratatui + crossterm (docs/SPEC.md §2.7).
2//!
3//! The application is a state machine decoupled from rendering:
4//! [`AppState`] + [`AppState::on_key`] are pure and unit-tested; [`render()`] is
5//! a pure function of `(state, model, frame)`; [`run_terminal`] is the only
6//! place that touches a real terminal, and it brackets every repaint in a
7//! DEC 2026 synchronized update so PTY tests observe complete frames.
8//!
9//! Panels: Plan DAG (hardware tag per operator), Inspector (selected operator's
10//! counters), Telemetry (memory tiers, PCIe/NVMe rates) and Describe (column
11//! profiles). Keys: `↑`/`↓` select, `Tab` cycles panels, `q` quits.
12//!
13//! In v1 the dashboard observes the local process only (a
14//! [`DashboardModel`] built from the session's `TelemetryHub`).
15//!
16//! Dependency direction: depends on `oxidelake-core` only.
17
18pub mod app;
19pub mod model;
20pub mod render;
21pub mod state;
22
23pub use app::{
24 NON_INTERACTIVE_TERMINAL_MESSAGE, draw_frame, is_interactive_terminal,
25 key_input_from_crossterm, run_terminal,
26};
27pub use model::{ColumnProfile, DashboardModel, demo_model};
28pub use render::render;
29pub use state::{AppState, KeyInput, Panel, Transition};