Expand description
Re-exports§
pub use app::App;pub use app::Mode;pub use app::Pane;pub use event::Effect;pub use options::OptionList;pub use runtime::ComposeSeed;pub use runtime::run_pr_picker;pub use runtime::run_tui;
Modules§
- app
- TUI view-model: the
Appstate and the modal substates (spec §10). - event
- Pure event handling for the TUI (spec §10).
App::handle_eventmaps a terminal event to a state mutation and anEffectfor the runtime to execute (switch, create, remove, refresh, …). No terminal I/O happens here, which is what makes the whole interaction testable. - glyphs
- Status/marker glyphs for the TUI (spec §10 Nerd Font support). The ASCII
fallbacks (the default) match the
wt listmarkers; Nerd Font glyphs are an optional, purely cosmetic alternative. - hints
- Single source of truth for the modal status-bar / overlay key hints (issue
#39). Each modal mode declares its keys exactly once here;
viewrenders both the bottom status bar and the in-overlay hint rows from these tables, and the consistency test below drives every hinted key through the real handler — so a hint can never claim a key the handler ignores, nor drift from it during a refactor. - options
- A reusable inline option list (the “dropdown” of selectable values shown on a pop-up field, issue #25).
- runtime
- TUI runtime (spec §10): the async event loop that drives
App, executesEffects, and loads async data. The loop and terminal handling are the thin, untestable shell; the effect-executing helpers are pure of the terminal and are unit-tested. Shell-based mutating actions run on a background task as aJoband apply theirJobOutcometo the app, so the loop can animate a spinner overlay instead of freezing (issue #46). - terminal
- Terminal lifecycle for the TUI (spec §10): raw mode + alternate screen on stderr (stdout stays reserved for the chosen path, §5), a panic hook that restores the terminal, and suspend/resume for the foreground editor.
- theme
- Truecolor theme for the TUI (spec §10/§11): maps worktree and UI state to
ratatui
Styles. - view
- TUI rendering (spec §10): the list pane, detail pane, status bar, and modal
overlays. Rendering is a pure function of
Appstate into a ratatuiFrame, so it is testable with aTestBackend. Color comes from the resolvedTheme(spec §11); when color is disabled the styles collapse to the monochrome look (dim/bold/reversed only).