Skip to main content

Crate rite_tui

Crate rite_tui 

Source
Expand description

Interactive terminal frontend for Rite ceremonies, built on ratatui and shaped as a TEA (The Elm Architecture) application.

The crate exposes a single entry point, run, that the CLI invokes after spawning the executor thread. Inside, the loop merges three input sources into a single Msg stream:

  • keyboard / resize events from crossterm
  • executor events from the runtime channel
  • timer ticks for spinner animation

update(model, msg) is pure and the only place state changes; it returns a list of Cmds the runtime interprets (sending commands back to the executor, quitting). view(model, frame) is pure and the only place rendering happens.

§Stability

Internal crate. This is an implementation detail of the rite CLI, with no stable API and no semver guarantees across releases. Build against the public rite-sdk, rite-model, or rite-resolver crates instead.

Structs§

Model
Top-level UI state. A single Screen discriminant captures what the user is looking at, so the borrow checker enforces that we can’t render two contradictory views.

Enums§

Cmd
Side effect produced by update. The runtime loop interprets these after every update call.
Msg
Input to the pure update function.
RunningState
Lifecycle phase of the ceremony as observed by the UI.
Screen
Single source of truth for which screen is visible. Because only one variant is active at a time, we can’t render two contradictory views or sit “in a modal over a different modal”, exactly one screen, always.
StepTab
Active tab on the main screen.

Functions§

run
Drive the TUI against a pair of runtime channels.