exlab_wizard.ui.pages.main#

Main window (Frontend Spec §3).

Layout:

  • Left drawer – search box + filter chips + tree.

  • Right pane – tabs (Details / Problems) + detail / problems view.

  • Header toolbar – New Project / New Run / New Test Run / Settings / Refresh.

  • Bottom status bar – Sync / Validator / LIMS segments.

Pre-Phase-13 the tray and window subprocess plumbing isn’t wired here; this page is invoked from the FastAPI app’s NiceGUI mount point (GET /).

Functions

chip_state_to_tree_filters(state[, search])

Translate a chip group state into a TreeFilters.

problems_badge_text(state)

Return the count text shown on the Problems tab.

render_main_page(*, on_open_new_project, ...)

Render the main window.

setup_incomplete_banner_props()

Banner content for the setup-incomplete state (§3.1.4).

Classes

MainPageState([setup_incomplete, ...])

Render state for the main page.

class exlab_wizard.ui.pages.main.MainPageState(setup_incomplete=False, selected_node=None, chip_state=<factory>, active_tab='details', problems_count_hard=0, problems_count_soft=0, orchestrator_enabled=False, staging_dock=None)[source]#

Bases: object

Render state for the main page.

Parameters:
active_tab: str = 'details'#
chip_state: ChipState#
orchestrator_enabled: bool = False#

When True the staging dock is rendered below the main content (§13.8).

problems_count_hard: int = 0#
problems_count_soft: int = 0#
selected_node: str | None = None#
setup_incomplete: bool = False#
staging_dock: StagingDockState | None = None#

Staging-panel state – None means render an empty dock.

exlab_wizard.ui.pages.main.chip_state_to_tree_filters(state, search='')[source]#

Translate a chip group state into a TreeFilters.

Parameters:
Return type:

TreeFilters

exlab_wizard.ui.pages.main.problems_badge_text(state)[source]#

Return the count text shown on the Problems tab.

Frontend §3.2: hard count primary, soft count secondary (e.g. 3 + 12).

Parameters:

state (MainPageState)

Return type:

str

exlab_wizard.ui.pages.main.render_main_page(*, on_open_new_project, on_open_new_run, on_open_new_test_run, on_open_settings, on_refresh, state=None, hierarchy=None, tree_expand_all=False)[source]#

Render the main window.

state and hierarchy are injected by the caller; this lets the page stay free of any session-store / SSE dependency at unit-test time.

tree_expand_all forwards to build_tree()’s expand_all kwarg – only set by e2e tests that need every node visible in the DOM up front.

Parameters:
Return type:

Any

exlab_wizard.ui.pages.main.setup_incomplete_banner_props()[source]#

Banner content for the setup-incomplete state (§3.1.4).

Return type:

dict[str, str]