Skip to main content

Module app

Module app 

Source
Expand description

TUI application: event loop, terminal setup, frame rendering.

The TUI runs on a dedicated std::thread (not tokio) to avoid blocking the async runtime. It reads from two sources:

  • cadence-window MetricSet snapshots from the metrics store
  • immutable Arc<RunState> snapshots published by the crate::run_state_actor (phase progress from executor)

All mutations the TUI needs to make to display state (latency frames, sparkline samples) are sent as crate::run_state_actor::RunStateCmd messages — never via a write lock. See SRD-02 §“Display and Diagnostic Decoupling”.

Structs§

App
TUI application.
ControlEditPrompt
Inline control-edit prompt state. Populated when the user presses e; dismissed on Esc or Enter. While present the event loop routes character / backspace / enter / escape keys to the prompt rather than the scenario-tree navigation.

Functions§

write_control_f64_from_tui
Dispatch a control write from the TUI event loop.