Skip to content

.progress

Liatir.progress provides progress tracking for long-running plugin jobs. Progress updates are streamed in real time to the Liatir Jobs UI, where users see a progress bar with the current step label and percentage.

Methods

Parameters

ParameterTypeDescription
totalnumberTotal number of units (e.g., files, reads, steps)
currentnumberAbsolute progress value
nnumberIncrement to add (default: 1)
labelstringHuman-readable label for the current step

Examples

Basic progress tracking

Multi-phase pipeline

Using absolute updates

Progress states

StateUI DisplayDescription
IndeterminateSpinning barBefore .start() is called or when total is unknown
DeterminatePercentage barAfter .start(total) — shows current / total
CompleteCheckmarkAfter .done() is called

Notes


IMPORTANT

JSON response fields are always camelCase in both Node and Python.

  • Progress updates are emitted as Tauri events (jobs:progress:{jobId}) and displayed in real time in the Jobs UI.
  • Call .start() to initialize progress with a known total. If you don't know the total upfront, the progress bar shows an indeterminate spinner.
  • Use .advance(n) for incremental updates (most common) or .update(current) for absolute jumps.
  • Always call .done() when the job completes — this signals the UI to show a completion state.
  • You can call .start() multiple times to reset progress for different phases of a multi-step pipeline.
  • Progress state is stored in the job registry and can be queried via jobs.status().