exlab_wizard.ui.components.status_bar_segment#
Bottom-of-window status bar segment (Frontend Spec §3.5.5).
The status bar has three segments left-to-right – Sync, Validator, LIMS –
each clickable and using var(--text-xs) monospace.
The component handles two concerns:
Color logic – normal state uses
var(--color-muted); warning states usevar(--color-warning); error states usevar(--color-danger).Layout – a small rounded segment with optional warning glyph prefix.
Functions
|
Map live backend counts to per-segment states (Frontend §3.5.5). |
|
Compute a |
|
Build a clickable status-bar segment. |
Classes
|
Derived |
|
Computed render spec for a status-bar segment. |
Bases:
objectDerived
SEGMENT_*state for each footer status segment (Phase 5).Only the segments whose state varies with live backend signals are carried here – Validator, LIMS, Staging. The Sync segment keeps its own richer label/click logic in the page renderer (it doubles as the Operations entry point), so it is not duplicated in this mapping.
- class exlab_wizard.ui.components.status_bar_segment.SegmentSpec(label, state, color_var, show_warning_glyph)[source]#
Bases:
objectComputed render spec for a status-bar segment.
Map live backend counts to per-segment states (Frontend §3.5.5).
Validator –
WARNINGwhen at least one hard-tier finding gates work (problems_count_hard > 0), sourced from the 30 s background audit rollup.LIMS –
DANGERwhen the LIMS endpoint is unreachable (deps.lims_reachableisFalse).Staging –
WARNINGwhen runs are pending clearance. There is no cheap cached count today (a per-renderlist_staged_runsscan would be I/O on the render path), so the caller passes0and the segment staysNORMALuntil a cached signal exists; the parameter is wired so that becomes a one-line change.
Pure so the mapping is unit-testable; the defaults describe a clean / half-wired backend (every segment
NORMAL) so a missing signal degrades quietly rather than raising.- Parameters:
- Return type:
- exlab_wizard.ui.components.status_bar_segment.segment_spec(*, label, state='normal')[source]#
Compute a
SegmentSpecfrom a label and state.The state controls the color and whether a warning glyph prefixes the label.
- Parameters:
- Return type: