exlab_wizard.ui.components.input_required_dialog#

Plugin INPUT_REQUIRED escalation dialog (Frontend Spec §9.1).

When a plugin suspends mid-creation to ask the operator for more input, the controller publishes an input_required frame carrying the plugin identity, a reason line, and a list of README-style field declarations. This dialog renders those fields, collects the answers, and hands them back so the caller can controller.resume(...).

Escalations are strictly sequential (§9.2): the dialog is persistent so it must be resolved (Submit / Cancel) before anything else happens.

Functions

collect_default_values(fields)

Seed an answers dict from each field's declared default.

input_required_dialog(*, plugin, reason, ...)

Build the §9.1 "Additional input required" dialog.

exlab_wizard.ui.components.input_required_dialog.collect_default_values(fields)[source]#

Seed an answers dict from each field’s declared default.

Booleans default to False when undeclared; every other type defaults to the empty string so input_required_dialog() always has a value to two-way bind against.

Parameters:

fields (list[dict[str, Any]])

Return type:

dict[str, Any]

exlab_wizard.ui.components.input_required_dialog.input_required_dialog(*, plugin, reason, fields, on_submit, on_cancel)[source]#

Build the §9.1 “Additional input required” dialog.

Renders one widget per field (string/text/choice/date/boolean), a plugin-identity pill, and the reason line. on_submit receives the collected answers dict; on_cancel fires when the operator backs out. Returns the NiceGUI dialog (or, in tests, a payload describing the resolved fields/defaults).

Parameters:
Return type:

Any