Skip to content

When can my app safely tell the user that generation has been accepted?

Show a local submitting state immediately, but reserve accepted for evidence that the generation request was accepted or your durable dispatcher owns the command under clearly explained semantics. A successful browser click or optimistic UI update cannot establish AISwapLab acceptance, completion or a final credit charge.

DESIGN A CLEAR API PRODUCT EXPERIENCEAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Name local and remote states; Commit local ownership first; Update with confirmed evidence.
Workflow diagram: Name local and remote states → Commit local ownership first → Update with confirmed evidence. Read the article for evidence and limits.

Optimism needs an evidence boundary

An optimistic interface feels responsive, yet its labels must survive network failure. Users may leave the page after seeing Accepted. Your app needs to explain whether that means a saved local command, an upstream job or a completed result.

What to do next

  1. 01

    Name local and remote states

    Use distinct internal states for command saved, dispatching and remote job known. Choose visible wording that matches the evidence you have, and preserve the last confirmed state if the next network hop becomes uncertain.

  2. 02

    Commit local ownership first

    If you tell users their action is saved for processing, persist the approved command before returning that message. A transient browser event or uncommitted database row is insufficient evidence for a return-later promise.

  3. 03

    Update with confirmed evidence

    When the remote job is known, attach its identity and show accepted or the documented stage. If acceptance remains uncertain, explain the uncertainty and recovery path instead of reverting to a fresh Generate button.

A concrete example

Illustrative example: the browser receives Action saved from your backend before dispatch. The page says Waiting to submit. Only after the dispatcher records the remote job does it say Generation accepted, retaining the same local action throughout.

Before you call it ready

  • Visible labels match stored evidence.
  • Saved-for-processing survives a reload.
  • Uncertainty does not enable an unreviewed new action.

When to stop or choose another method

Stop claiming remote acceptance from an optimistic local update; persist evidence or use a truthful submitting or uncertain state.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation