Skip to main content

Module runtime

Module runtime 

Source
Expand description

Transport-agnostic event loop.

Receives a Transport and an App, draws the UI, polls for input, translates key events to [Intent]s, and applies them. Quits when App::should_quit is set. The loop is generic so both the local binary and the SSH daemon share identical behaviour.

Constants§

POLL_INTERVAL
Poll interval. Short enough to feel responsive to App::should_quit flips, long enough to not burn CPU.

Functions§

run_loop
Run the TUI until the app requests shutdown or the transport disconnects. Does not call Transport::finish; the caller owns the transport’s lifecycle.