Operator UI
Create interactive interfaces for operator input and visual feedback.
You can create rich and interactive UIs without any external frontend library to install or skills using TofuPilot Operator UI.
ui:
components:
- key: voltage_reading
type: text
label: "Measured Voltage"
default_value: "0.00 V"
size: xl
color: lime
- key: power_connected
type: switch
label: "Power Supply Connected"
bind: measurements.power_statusTofuPilot provides pre-made components to prompt operator input with bindings and display real-time feedback updated directly from your Python phases.
Key
You can identify each component with a unique key field.
phases:
- name: Scan Unit
python:
module: scan_unit
ui:
components:
- key: serial_number
type: text_input
label: "Serial Number"TofuPilot uses the key to reference components in Python when retrieving input or updating displays. Studio auto-generates keys when adding components, but you must provide them when writing YAML manually.
Type
TofuPilot provides pre-made components you can select using the type field.
phases:
- name: Scan Unit
python:
module: scan_unit
ui:
components:
- key: serial_number
type: text_input
label: "Serial Number"Each component type has its own configuration options documented in dedicated pages.
Input
Components
You can use input components to collect operator input during test execution.
Text Input
Single-line text input field.
Textarea
Multi-line text input area.
Number Input
Numeric input with validation.
Slider
Numeric input with min/max range.
Switch
Yes/No or True/False toggle.
Radio
Single selection from multiple options.
Checklist
Multiple selections from a list.
Select
Single selection from dropdown menu.
Multiselect
Multiple selections from dropdown menu.
Bind to Measurements
You can bind input component values to measurements or unit properties using the bind field.
phases:
- name: Scan Unit
ui:
components:
- key: serial_number
type: text_input
label: "Serial Number"
bind: unit.serial_number
- name: Read Multimeter
measurements:
- name: voltage
ui:
components:
- key: meas_input
type: number_input
label: "Voltage"
bind: measurements.voltageDisplay
Components
You can use display components to show real-time information and feedback to operators.
Text
Display-only text that updates dynamically.
Image
Display static or dynamic images.
Progress
Progress indicator bar.
Update Display
You can update display components in real-time by assigning values to the ui object.
phases:
- name: Long Running Test
python:
module: show_progress
ui:
components:
- key: progress
type: progress
label: "Test Progress"
default_value: 0 # Initial valueimport time
def show_progress(ui):
for i in range(0, 101, 10):
ui.progress = i
time.sleep(0.5)Timing
When a phase with operator UI runs:
- UI displays immediately to the operator in an expanded phase row
- Your Python code runs concurrently and can update display components in real-time
- After Python finishes:
- Phases with input components wait for operator to click submit
- Phases with only display components continue automatically
How is this guide?