exlab_wizard.ui.components.metadata_pane#

Node-type-aware metadata pane for the rebuilt main window.

GUI/Orchestrator Redesign §4.4. Renders the right-pane Metadata tab content based on the kind of tree node selected.

Pure render function: takes the selected node id + a payload dict shaped by the caller (typically derived from GET /tree + GET /run responses) and dispatches to the per-kind renderer. The Problems tab is rendered separately by the existing problems-row machinery.

Functions

render_metadata_pane(*, state[, ...])

Render the right-pane Metadata content for state.selected_node.

selected_file_card_title(payload)

Return the sub-card heading for a selected file/folder payload (pure).

Classes

MetadataPaneState([selected_node, ...])

Mutable state for the metadata pane.

class exlab_wizard.ui.components.metadata_pane.MetadataPaneState(selected_node=None, node_kind=None, payload=<factory>, selected_file=None)[source]#

Bases: object

Mutable state for the metadata pane.

Parameters:
node_kind: str | None = None#
payload: dict[str, Any]#

equipment dict, run dict, lifecycle dict, etc.

Type:

Node-kind-specific data

selected_file: dict[str, Any] | None = None#

a file/folder selected in the centre list, assembled by mount._build_selected_file. Rendered as a sub-card beneath the node-kind content (and beneath the empty state), so the selection’s metadata shows whether or not a tree node is also selected.

Type:

Phase 4 / Option B (spec §4.4)

selected_node: str | None = None#
exlab_wizard.ui.components.metadata_pane.render_metadata_pane(*, state, on_run_staging_action=None)[source]#

Render the right-pane Metadata content for state.selected_node.

Dispatches to one of the per-kind renderers. on_run_staging_action is the callback invoked by the run-level staging actions (force sync / clear / view log) per Redesign §4.6.

Parameters:
Return type:

Any

exlab_wizard.ui.components.metadata_pane.selected_file_card_title(payload)[source]#

Return the sub-card heading for a selected file/folder payload (pure).

"Selected folder" for a folder payload (kind == "folder"), "Selected file" otherwise. Pure so the title mapping is testable without spinning up NiceGUI.

Parameters:

payload (dict[str, Any])

Return type:

str