Rule
Long-running operations must show real progress, not fake animation.
Why
A progress bar that freezes at 80% loses user trust faster than showing no progress at all.
Must
- Use a determinate progress bar when completion percentage is known.
- Use an indeterminate spinner only when duration is truly unknown.
- Show an estimated time remaining if the operation exceeds 5 seconds.
- Provide a cancel action for operations that take more than 10 seconds.
- Surface a clear success or failure state at completion.
Should
- Break large jobs into stages and name each stage.
- Persist progress state so a page refresh does not restart long jobs.
Anti-patterns
- Fake progress animation that does not reflect server state.
- No cancel option for unbounded operations.
- Silent failure that looks identical to success.
Test Cases
- Cancelled job surfaces clean cancellation feedback.
- Failed job distinguishes itself from success visually.
Telemetry
- long_operation_started
- long_operation_cancelled
- long_operation_completed
- long_operation_failed