TofuPilotTofuPilot

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_status

TofuPilot 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.

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.voltage

Display

Components

You can use display components to show real-time information and feedback to operators.

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 value
import 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:

  1. UI displays immediately to the operator in an expanded phase row
  2. Your Python code runs concurrently and can update display components in real-time
  3. After Python finishes:
    • Phases with input components wait for operator to click submit
    • Phases with only display components continue automatically

How is this guide?