Skip to main content

Module run

Module run 

Source
Expand description

The ~30-line main loop.

Single entry point that composes crossterm events, the reducer, and the effect runner:

  crossterm events ──┐
                     ├── tokio::select! ── Msg ── update(State, Msg) ── (State, Vec<Cmd>) ── EffectRunner::dispatch ──┐
  effect results  ──┤                                                                                                   │
                     │                                                                          ▲                         │
  tick              ──┘                                                                          │                         │
                                                                                                 └─────── Msg back ◄──────┘

No parallel event loops, no observer callbacks, no polling. One select!, one reducer call per message, effects dispatched into structured concurrency per turn.

Structs§

InteractiveOptions
Options for run_interactive_with. Added so new flags land without reshuffling positional args.

Functions§

run_interactive_with
Interactive TUI main loop with explicit options. recorder (if provided) appends one JSONL line per reducer input to the file for debugging / replay.