AddThisFeature

Background Job Progress

Show people what a long import, export, or report is actually doing.

involved Admin & Operations

What it adds

Durable progress for long-running work, with distinct states, live updates, and a real failure path.

What your agent is told to do

5
  1. 1

    Persist job state server-side: status, progress, counts, started and finished times, and the requesting user.

  2. 2

    Model the states explicitly — queued, running, stalled, cancelled, failed, completed — and give each its own copy. A single spinner cannot express any of that.

  3. 3

    Push updates to the client where you can, and fall back to polling with a widening interval. Progress must survive a refresh, a closed tab, and a different device.

  4. 4

    Let the user cancel a running job, and make cancellation actually stop the work rather than just hiding the row.

  5. 5

    Do NOT show a percentage you cannot compute. An honest 'processed 4,120 of 50,000 rows' beats a fabricated bar that sits at 90 percent.

Edge cases it handles

7
  • A job with no heartbeat for a defined period is stalled, not running. Say so and offer retry.
  • Launching the same job twice must be blocked while one is in flight, with a clear reason.
  • A job that completes after the user lost access to the source data must not deliver its output.
  • Retry must be safe to press twice. Partial work already committed should not be duplicated.
  • Error details must be actionable for the user — which row, which field — without exposing stack traces or internal identifiers.
  • Completed job artefacts need a retention policy and expiring download links.
  • A queue backlog must be visible as queued, not as a running job stuck at zero percent.

Definition of done

9
  • Job state is persisted and reloads correctly after a refresh or on another device.
  • Queued, running, stalled, cancelled, failed, and completed are distinguishable in the UI.
  • Progress reflects real measured work, or shows counts instead of a fake percentage.
  • Duplicate submissions of the same job are prevented while one is in flight.
  • Cancellation stops the work, not just the display.
  • Failures offer retry and user-readable error detail with no stack traces.
  • Generated files expire on a defined schedule.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.