exlab_wizard.ui.components.session_progress#

Wizard session-progress bar (Frontend Spec §10.1, §9.3).

Drives a phase indicator on the wizard’s Confirm & Create step from the Backend §4.6.2 progress WebSocket event. The phase enum is fixed by Backend §4.7; the labels come from Frontend §10.1.

When the active phase is running_plugins and the event carries current/total, a sub-row is rendered per Frontend §9.3.

Functions

compute_phase_rows(*, active_phase[, completed])

Return one PhaseRow per phase, in canonical order.

session_progress(*, active_phase[, ...])

Build the progress bar for the Confirm & Create step.

Classes

PhaseRow(phase, label, fraction, is_active, ...)

One renderable row in the session-progress component.

class exlab_wizard.ui.components.session_progress.PhaseRow(phase, label, fraction, is_active, is_done)[source]#

Bases: object

One renderable row in the session-progress component.

Parameters:
fraction: float#
is_active: bool#
is_done: bool#
label: str#
phase: str#
exlab_wizard.ui.components.session_progress.compute_phase_rows(*, active_phase, completed=())[source]#

Return one PhaseRow per phase, in canonical order.

A phase is done when it appears in completed; active when it matches active_phase; pending otherwise.

The fractional value is 1.0 for done, 0.5 for active (a soft visual cue while the indeterminate sub-progress fills in), 0.0 for pending.

Parameters:
Return type:

list[PhaseRow]

exlab_wizard.ui.components.session_progress.session_progress(*, active_phase, completed=(), plugin_current=None, plugin_total=None, plugin_name=None)[source]#

Build the progress bar for the Confirm & Create step.

The wizard reaches into this and re-renders it on every progress event; in tests we just call compute_phase_rows() and assert on the data shape.

Parameters:
Return type:

Any