phenotypic.gui.builder._state._DagBuilderState#

class phenotypic.gui.builder._state._DagBuilderState(root: ~phenotypic.gui.builder._state._DagBuilderScope = <factory>, breadcrumb: ~typing.List[str] = <factory>, selected_block_id: str | None = None, selected_edge_id: str | None = None, selected_targets_by_scope: ~typing.Dict[str, ~typing.Dict[str, ~typing.Any]] = <factory>, open_port_menu: ~typing.Dict[str, ~typing.Any] | None = None, pending_delete_block_id: str | None = None, toast_queue: ~typing.List[~typing.Dict[str, ~typing.Any]] = <factory>)[source]#

Bases: object

Top-level DAG state for the Dash builder.

Mirrors the legacy _LegacyBuilderState surface but with block_ids / edge_ids instead of node_ids. The popover-era inspector_focus_aux override is gone — the DAG path edits aux parameters via the inspector aux-ports section directly.

Parameters:
root#

Outermost _DagBuilderScope (what the user sees when breadcrumb is empty).

Type:

phenotypic.gui.builder._state._DagBuilderScope

breadcrumb#

Ordered list of container block_ids the user has drilled into. Each entry is the BlockNode.block_id of a Pipeline container in the next-outer scope. An empty list means “viewing root”.

Type:

List[str]

selected_block_id#

BlockNode.block_id of the currently focused block (op, container, or Input Image), if any. Mutually exclusive with selected_edge_id.

Type:

str | None

selected_edge_id#

Edge.edge_id of the currently focused wire, if any. Mutually exclusive with selected_block_id.

Type:

str | None

pending_delete_block_id#

Set by block_delete_request for non-empty containers; drives the confirm-delete modal’s visibility. Cleared on Confirm/Cancel.

Type:

str | None

toast_queue#

FIFO queue of toast payloads (one visible at a time, 3000ms auto-dismiss). Each entry is a free-form dict shaped by the callback that enqueued it; the Dash callback that binds to the toast component pops the head.

Type:

List[Dict[str, Any]]

Methods

__init__

Attributes

root: _DagBuilderScope#
breadcrumb: List[str]#
selected_block_id: str | None = None#
selected_edge_id: str | None = None#
selected_targets_by_scope: Dict[str, Dict[str, Any]]#
open_port_menu: Dict[str, Any] | None = None#
pending_delete_block_id: str | None = None#
toast_queue: List[Dict[str, Any]]#