Skip to main content

Module runtime

Module runtime 

Source
Expand description

TUI runtime (spec §10): the async event loop that drives App, executes Effects, 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 a Job and apply their JobOutcome to the app, so the loop can animate a spinner overlay instead of freezing (issue #46).

Structs§

ComposeSeed
The initial title/body/draft seed for the compose form (wt pr open).

Functions§

run_pr_picker
Runs the TUI directly in PR-picker mode (the wt pr no-argument entry). Returns the chosen worktree path once a PR is checked out, or None if the user cancels. The picker loads its PRs on open (via an initial FetchPrs), and selecting a PR switches into the new worktree (spec §7).
run_tui
Runs the TUI, returning the chosen worktree path (if the user switched). When initial_filter is set, the picker opens pre-filtered to that query (the ambiguous-query fallback uses this to surface the candidates).