exlab_wizard.ui.components.sync_status_icon#

Two-icon sync-presence model + renderers (2026-05-30 design).

Each file shows a fixed local-left / NAS-right icon pair; runs and folders show a single colour-coded rollup icon. The backend stays the state authority and emits a discriminator string; this module is a pure presentation map: file_sync_view collapses the string to a FileSyncView, then sync_pair_props / sync_rollup_icon_props map the view to icon + colour props. Colour language: blue = here · green = safe on NAS · gray = absent · red = problem · amber = held. NiceGUI renderers (sync_pair_icons / sync_rollup_icon) live below the pure layer and import NiceGUI lazily.

Functions

file_sync_view(status)

Map a backend sync discriminator string to a FileSyncView.

sync_legend_entries()

Return legend rows (one per visible view) for the Files-header popover.

sync_pair_icons(view)

Render the per-file two-icon (local + NAS) row, or nothing for NONE.

sync_pair_props(view)

Return {"local": cell, "nas": cell} for a file's two-icon pair, or None.

sync_rollup_icon(view)

Render the single run/folder rollup icon, or nothing for NONE.

sync_rollup_icon_props(view)

Return single-icon props for a run/folder rollup, or None for NONE.

Classes

FileSyncView(*values)

UI-only collapsed view of a file/run's sync state (presentation, not wire).

class exlab_wizard.ui.components.sync_status_icon.FileSyncView(*values)[source]#

Bases: StrEnum

UI-only collapsed view of a file/run’s sync state (presentation, not wire).

BLOCKED = 'blocked'#
LOCAL_ONLY = 'local_only'#
MISSING = 'missing'#
NONE = 'none'#
ON_NAS = 'on_nas'#
SYNCED = 'synced'#
UPLOAD_FAILED = 'upload_failed'#
exlab_wizard.ui.components.sync_status_icon.file_sync_view(status)[source]#

Map a backend sync discriminator string to a FileSyncView.

Parameters:

status (str | None)

Return type:

FileSyncView

exlab_wizard.ui.components.sync_status_icon.sync_legend_entries()[source]#

Return legend rows (one per visible view) for the Files-header popover.

Return type:

list[dict[str, str]]

exlab_wizard.ui.components.sync_status_icon.sync_pair_icons(view)[source]#

Render the per-file two-icon (local + NAS) row, or nothing for NONE.

Parameters:

view (FileSyncView)

Return type:

Any

exlab_wizard.ui.components.sync_status_icon.sync_pair_props(view)[source]#

Return {"local": cell, "nas": cell} for a file’s two-icon pair, or None.

Parameters:

view (FileSyncView)

Return type:

dict[str, dict[str, Any]] | None

exlab_wizard.ui.components.sync_status_icon.sync_rollup_icon(view)[source]#

Render the single run/folder rollup icon, or nothing for NONE.

Parameters:

view (FileSyncView)

Return type:

Any

exlab_wizard.ui.components.sync_status_icon.sync_rollup_icon_props(view)[source]#

Return single-icon props for a run/folder rollup, or None for NONE.

Parameters:

view (FileSyncView)

Return type:

dict[str, str] | None