Expand description
Live step-progress UI.
A step engine emits ProgressEvents through a ProgressSink (cheap to
clone, a no-op when no renderer is attached). A renderer thread consumes them
and draws one of: a full-screen split dashboard (RenderMode::Fullscreen),
an inline sticky block on stderr (RenderMode::Rich), or clean line
transitions (RenderMode::Plain). The durable log keeps flowing to the
tool’s own subscriber; this UI is purely additive operator feedback.
Mode is chosen from stderr (where the inline UI renders) plus the
environment, so it behaves correctly under curl … | sudo bash (stdin is a
pipe, stderr is the operator’s terminal) and degrades to plain text in CI /
piped / TERM=dumb contexts.
Re-exports§
pub use events::group_index_for_step;pub use events::GroupMap;pub use events::ProgressEvent;pub use events::ProgressSpec;pub use events::SummaryView;
Modules§
- events
- Progress events, the step→group map, and the per-flow wording.
- export
- Terminal-UI asset export: turn a real composed grid (from
crate::frame::composeorcrate::progress::fullscreen::sample_grid) into standalone SVG and HTML assets for documentation. Because it consumes the same styled grid the live terminal renders, the asset IS the real UI. - fullscreen
- The full-screen progress renderer.
- model
- The renderer’s view model: the checklist groups and their live state.
- plain
- The plain renderer: one escape-free line per group transition.
- rich
- The rich renderer: a live, pinned status block with logs scrolling above it.
Structs§
- Channel
Layer - A tracing layer that forwards each log line to the renderer (when a log-forwarding renderer is attached). Add it alongside the tool’s durable log layer so that log keeps the full record regardless.
- Mode
Flags - The output flags a tool’s command line carries.
- Progress
Sink - A cheap, clonable handle the step engine emits events through. A sink with
no channel (the default, or
RenderMode::Json) silently drops events. - Render
Handle - Owns the renderer thread;
RenderHandle::finishjoins it (call after sendingProgressSink::summary+ProgressSink::finish).
Enums§
- Render
Mode - Which renderer to drive, decided once at startup.
Functions§
- detect_
mode - Decide the render mode from the flags + environment. Gates on stderr because that is where the inline UI draws.
- resolve_
live_ mode - Resolve the live render mode + terminal, upgrading
RichtoFullscreenwhen a terminal can be opened.carriedis a still-openTty(a wizard → progress handoff keeps one alternate-screen session); when it isNonebut the base mode isRich,openis tried (passTty::open_controllingorTty::open_stdio). Plain / Quiet / Json drop any carriedTty(leaving the alternate screen) and keep the base renderer. - start
- Create the progress sink + spawn the renderer thread for
mode.headeris the one-line banner the renderer prints first.ttyis the terminal forFullscreen(fromresolve_live_mode); the other modes ignore it (it is dropped, leaving the alternate screen if one was carried).interactiveholds a non-failed closing card full-screen until a key press.