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
|
Fold one controller WS |
|
Return one |
|
Build the progress bar for the Confirm & Create step. |
Classes
|
One renderable row in the session-progress component. |
|
Mutable phase/sub-progress state folded from controller WS frames. |
- class exlab_wizard.ui.components.session_progress.PhaseRow(phase, label, fraction, is_active, is_done)[source]#
Bases:
objectOne renderable row in the session-progress component.
- class exlab_wizard.ui.components.session_progress.SessionProgressState(active_phase=None, completed=<factory>, plugin_current=None, plugin_total=None, plugin_name=None)[source]#
Bases:
objectMutable phase/sub-progress state folded from controller WS frames.
The wizard’s Confirm & Create step renders
session_progress()from this object inside a@ui.refreshableand re-renders it as the creation pipeline publishes frames overCreationController.subscribe().- Parameters:
- exlab_wizard.ui.components.session_progress.apply_frame(state, frame)[source]#
Fold one controller WS
frameintostatein place.Returns
Truewhen the visible progress changed (the caller should re-render). Recognisesphaseandprogressframes plus the terminaldone;failedandinput_requiredare left to the caller (the wizard surfaces those out-of-band).- Parameters:
state (
SessionProgressState)
- Return type:
- exlab_wizard.ui.components.session_progress.compute_phase_rows(*, active_phase, completed=())[source]#
Return one
PhaseRowper phase, in canonical order.A phase is done when it appears in
completed; active when it matchesactive_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.
- 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.