cadrumo.entrypoints.tui.operations.modal module¶
The generic detachable operation modal, built solely from public DTOs.
This modal drives exactly one submitted operation through
OperationController and renders exactly the public projection,
event-page, REVIEW, response-control, cancellation, detach and typed
Workspace-refresh DTOs those public services return. It never imports a
persisted snapshot, a journal record, or a supervisor-private type, and it
never reclassifies lifecycle truth beyond what
build_operation_modal_view_model() already derived.
- class OperationModalSettledOutcomeV1(**data)[source]¶
Bases:
BaseModelThe modal closed because its bound operation reached settlement.
- Parameters:
data (Any)
- disposition: Literal['settled']¶
- view_model: OperationModalViewModelV1¶
- class OperationModalDetachedOutcomeV1(**data)[source]¶
Bases:
BaseModelThe modal closed because the operator detached from a live operation.
- Parameters:
data (Any)
- disposition: Literal['detached']¶
- operation_id: OperationId¶
- revision: OperationRevision¶
- class OperationModal(controller)[source]¶
Bases:
ModalScreen[OperationModalOutcomeV1|None]Generic modal presenting one supervised operation until it settles.
- Parameters:
controller (OperationController)
- DEFAULT_CSS: ClassVar[str]¶
Default TCSS.
- BINDINGS: ClassVar¶
A list of key bindings.
- compose()[source]¶
Called by Textual to create child widgets.
This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].
Note that you don’t typically need to explicitly call this method.
Example
def compose(self) -> ComposeResult: yield Header() yield Label("Press the button below:") yield Button() yield Footer()
- async on_button_pressed(event)[source]¶
Dispatch one operator action through the bound controller only.
- async action_request_close()[source]¶
Close the modal, detaching first if the operation is still live.
- Return type:
- can_focus: bool¶
Widget may receive focus.
- can_focus_children: bool¶
Widget’s children may receive focus.