cars.core.progress.ui

Rich-based UI for hierarchical pipeline progress display.

Displays a tree of pipelines with status icons, indentation, and progress bars. Uses Rich’s Live display to update content in place.

Classes

UINode

Represents a displayable node in the pipeline tree.

PipelineTreeUI

Rich-based UI for displaying hierarchical pipeline progress.

Module Contents

class cars.core.progress.ui.UINode[source]

Represents a displayable node in the pipeline tree.

name: str
indent: int = 0
pipeline_id: int | None = None
progress: float = 0.0
retries: int = 0
failed: int = 0
state: str = 'pending'
children: list[UINode] = []
status_icon() str[source]

Return an icon for the current state.

class cars.core.progress.ui.PipelineTreeUI(console: rich.console.Console | None = None)[source]

Rich-based UI for displaying hierarchical pipeline progress.

console
tree: dict[int, UINode]
_order: list[int] = []
live: rich.live.Live | None = None
empty_status_text: str = 'Loading configuration file'
warning_count: int = 0
log_file_path: str | None = None
crash_exception: BaseException | None = None
success_output_dir: str | None = None
update_empty_status_text(status_text: str) None[source]

Update startup status, shown before any pipeline is registered.

update_warning_count(warning_count: int) None[source]

Update total warning counter displayed in the panel footer.

update_log_file_path(log_file_path: str | None) None[source]

Update log file path used by the footer log link button.

update_crash(exception: BaseException) None[source]

Store crash exception for rich crash rendering.

update_success(output_dir: str | None) None[source]

Store successful output directory for final success rendering.

_path_to_uri(path_str: str) str[source]

Convert path string to clickable file URI.

_render_log_button() rich.text.Text[source]

Render a clickable footer button linking to the current log file.

_render_success_panel() rich.panel.Panel | None[source]

Render final success panel with output links using Tree.

add_node(node_id: int, name: str, indent: int = 0, parent_id: int | None = None) None[source]

Add a node to the tree.

update_state(node_id: int, state: str) None[source]

Update node state: pending, running, completed.

update_progress(node_id: int, progress: float, retries: int = 0, failed: int = 0) None[source]

Update node progress (0.0 to 1.0) and retry count.

_node_label(node: UINode, depth: int) str[source]

Build a plain node label used for width calculation.

_label_renderable(node: UINode, depth: int) rich.console.RenderableType[source]

Render label with tabs first, then status icon/spinner and name.

_compute_label_width() int[source]

Compute a shared width so all bars start at the same column.

_render_node(node: UINode, depth: int = 0, label_width: int = 24) list[rich.console.RenderableType][source]

Render a single node and its children as a list of Rich renderables.

_render_full_tree() rich.panel.Panel[source]

Render the full tree as a Rich Panel.

display() None[source]

Render the full tree to console using Live display.

display_final() None[source]

Stop Live display and display the final rendered view once.