Gen Progress

A generation's status, small, for places outside its frame: a run in a history list, an activity tray, the submit area, a toast.

Not started

In use

The Video Studio's strip of past clips, one per run, with its time. Generate a clip to see it.

Lumen
CreateEditVideo
240 credits

Your video will appear here

40 credits

Installation

pnpm dlx shadcn@latest add https://mgp.paukraft.com/r/gen-progress.json

GenProgress

Takes what ImageGenLoader takes, so a loader from useBflGeneration or useBflBatch spreads on: <GenProgress {...generation.loader} />. Timestamps are yours: note when you submit.

PropTypeDefault
status"idle" | "queued" | "generating" | "ready" | "moderated" | "error"

Where the task is at, as ImageGenLoader takes it.

—
progressnumber

0–1 while generating. The ring spins until it's reported, then fills; the label adds the percent.

—
srcstring

The result, shown as a thumbnail in place of the check once ready. Images only.

—
errorReactNode

What went wrong; the failure's tooltip when it's text.

—
onRetry() => void

Renders a retry button on failure, except when moderated.

—
startedAt / settledAtnumber

Timestamps in ms. startedAt shows the time it's taking, live; settledAt keeps the time it took once done.

—
size"default" | "sm"

default fits an h-8 toolbar; sm a list row's second line.

"default"
labelsPartial<Record<ImageGenStatus, string>>

Words per status. Defaults: Not started, Queued, Generating, Ready, Failed, Moderated.

—

Parts

PropTypeDefault
GenProgressRootGenProgressRootProps

Holds the status for its parts. Takes the props above but labels.

—
GenProgressIndicatorspan

Dashed ring while queued, spinning or filling while generating, then a check, thumbnail or warning.

—
GenProgressLabel{ labels? }

The status in words: "Generating 42%".

—
GenProgressElapsedtime

m:ss since startedAt. Hidden without it, or once settled without settledAt.

—
GenProgressRetryButton

Calls the root's onRetry; shown on failure.

—
useGenProgress() => { status, progress, busy, … }

The root's state, for your own parts.

—