The Spinner Has Been Turning for Five Minutes
Long tasks need durable job states and honest progress. A browser connection should not be the only place the application remembers that work is happening.

Give the work an identity
Generating a large report or processing a media file may outlast a normal request. Create a durable job record with an identifier, owner, and state, then return a way to check it. Decide what a second submission means: another job, a retry, or a request for the existing result. This prevents uncertainty after a browser refresh from turning into several expensive copies of the same task.
Report what the system actually knows
If the system has processed forty of a hundred records, a percentage may be useful. If it only knows that a provider has accepted the request, a precise-looking progress bar is misleading. Show named stages or an elapsed-time explanation instead. Distinguish queued work from active work, and explain when waiting is expected. A calm, truthful message gives someone a better basis for deciding whether to continue or come back later.
Cancellation needs a contract
Closing the tab rarely means the server has stopped. Specify whether cancellation is supported, when it takes effect, and which completed effects remain. A job that has already sent customer messages cannot simply roll back by deleting its status record. Protect the cancel action with the same authorization as the job itself, and make race conditions visible: completion may occur just before the cancellation request reaches the worker.
Make the result retrievable
Keep the final outcome available through a stable authenticated page or notification. Define how long generated files remain accessible and how failed jobs can be retried safely. Operators need to distinguish a slow worker from a lost job and identify work that has stopped advancing. Test navigation away, reconnection, failure during a later stage, and repeated result downloads. The task should have a coherent life beyond one uninterrupted browser session.


