Get started

AI regeneration UI patterns: preserve versions, context, and recovery

Treat regeneration as a new attempt based on a declared frozen input snapshot. It must not silently mean edit, resume, replace, or retry after failure. The interface should state what remains fixed, preserve prior results, and withhold retry until the product knows whether the previous request was accepted.

Updated December 4, 2026

Start with a narrow regeneration contract

Shape of AI describes regeneration as rerunning the same prompt and context while allowing a different result. That works as an interaction-level definition, but implementation needs a stricter boundary. The control labeled Regenerate should submit a new attempt using the declared frozen prompt, context revision, attachments, and configuration. It should not mutate the previous attempt or imply that the output will be identical.

The frozen snapshot lets you explain the result later. If an attachment, context item, parameter, or prompt changed before submission, the operation is no longer an unchanged regeneration. It may still be a valid refinement or edited request, but the interface should name it accurately.

A seed is conditional evidence

Some systems expose a seed, and Shape of AI notes that a shared seed may make results more consistent. Record it when the underlying generator supports it. Don't promise identical output, invent a seed for systems without one, or use the absence of a seed to hide other configuration changes.

Route the task before choosing the control

Start with the user's intended change. The control, frozen fields, and lineage should follow that intent. One generic retry button can't communicate all six operations.

ControlKeep frozenChange and result
Try the same request againRegeneratePrompt, context revision, attachments, configuration; seed only if the contract says it remains fixedCreate a new sibling attempt under the same parent result or request lineage. Don't edit the previous result.
Ask for a directed changeRefineChosen source result and any context not explicitly replacedAdd a visible instruction or parameter change, then create a child attempt from the selected source.
Correct the submitted materialEdit inputsNothing should be assumed frozen until the edited snapshot is reviewedCreate a new request snapshot that identifies the changed prompt, context, attachment, or configuration.
Explore from one versionBranch from versionSelected version identity and its recorded source snapshotCreate a child lineage from that version while keeping the current branch and selection recoverable.
Continue interrupted workResumeExisting attempt identity, accepted request snapshot, and available continuation stateContinue the same attempt only when the runtime supports resumption and can identify the accepted interrupted work.
Discard inherited context intentionallyRestart with clean contextOnly inputs the user explicitly carries into the restartCreate a new root attempt or lineage and disclose that prior conversational or working context is excluded.
Task-first routing for regeneration and adjacent actions

Resume is the route teams most often confuse with regeneration. It doesn't mean submitting the prompt again. It means continuing an already accepted attempt under whatever continuation contract the consuming product actually supports. If that contract doesn't exist, offer a clearly labeled new attempt instead of presenting a duplicate submission as resumption.

Give every attempt a copyable provenance record

Keep one record that connects user intent to the submitted snapshot, runtime evidence, generated artifact, preservation rule, and current selection. The following JSON is a product-agnostic record shape. It isn't a framework API or proof that any named backend supports these fields.

{
  "attemptId": "attempt-0042",
  "parentResultId": "result-0041",
  "requestIdentity": "request-stable-id-if-available",
  "operation": "regenerate",
  "frozenInput": {
    "prompt": "Summarize the attached interview for the product team.",
    "contextRevision": "context-rev-17",
    "attachments": [
      { "id": "attachment-9", "revision": "sha256-or-version-id" }
    ],
    "configurationIdentity": "generation-config-v6",
    "seed": null
  },
  "attemptNumber": 3,
  "timestamps": {
    "createdAt": "record-when-created",
    "submittedAt": null,
    "acknowledgedAt": null,
    "completedAt": null,
    "persistedAt": null,
    "cancelRequestedAt": null,
    "cancelledAt": null
  },
  "statusEvidence": {
    "state": "ready",
    "source": "local-record",
    "evidenceId": null,
    "observedAt": "record-observation-time"
  },
  "preservationPolicy": {
    "previousCompletedResult": "retain",
    "partialOutput": "retain-as-provisional",
    "visiblePresentation": "inline-variants"
  },
  "resultState": {
    "artifactId": null,
    "selected": false,
    "selectedAt": null,
    "selectionRevision": null
  }
}
Illustrative attempt contract. Replace identifiers and evidence fields with values your application can actually establish.

The record needs both an editable request and the submitted snapshot. The editable copy can change while the request is in flight; the submitted snapshot can't. Without that separation, a later edit can make the interface appear to have submitted inputs the backend never received.

  • The attempt ID identifies this execution, while the parent result ID records its lineage.
  • Request identity is the reconciliation key when the runtime or backend supplies one. It should remain stable across status checks for the same submission.
  • Context revision and attachment revisions identify what was sent. A display name alone is insufficient when content can change.
  • Configuration identity should point to the declared generation settings without pretending that hidden provider state is known.
  • Status evidence records the source and time of the observation. A spinner or streamed token is presentation evidence, not acknowledgement by itself.
  • Selection is separate from completion. A completed artifact can exist without becoming the version currently shown as preferred.

Choose a preservation model deliberately

Overwrite, inline variants, and branching describe how versions are presented and related. They shouldn't decide whether earlier successful work survives. Shape of AI warns that past results should remain easy to recover even when the latest result occupies the inline slot.

PresentationRecovery ruleSelection and descendants
Overwrite presentationThe newest result occupies the visible slot.Retain the prior completed artifact in recoverable history. A destructive overwrite fails this contract.Selecting an earlier result changes the visible choice; it doesn't erase later attempts or rewrite their parents.
Recoverable inline variantsKeep one compact result position with controls for cycling among attempts.Every completed variant retains identity, provenance, and copy or restore access.Store selection independently. A new variant shouldn't silently become preferred before the product's stated selection rule allows it.
Explicit branchingDisplay separate child paths from a chosen version.Preserve each branch and its parent relationship so users can compare or resume their exploration.A descendant of a deselected version remains attached to its actual parent and may be marked outside the current selection path.
Version presentation and recovery trade-offs

A descendant is stale only relative to the currently selected path. It isn't automatically invalid. Keep its original parent identity, show which version it came from, and require an explicit choice before using it as the source for further work. Changing selection must not silently reparent, delete, or relabel existing descendants.

Style the states after the behavior is defined

Once the consuming product owns attempt identity, preservation, and recovery, use a complete visual kit to keep status, history, controls, and focus treatment consistent across the interface.

Model evidence and permitted actions together

A single pending flag can't tell you whether a request was submitted, acknowledged, producing provisional output, durably completed, persisted, selected, cancelled, or safe to retry. Use separate states backed by the strongest evidence the application has. The labels below form a proposed product contract, not a claim about a particular framework.

Required evidencePreservePermitted actions
ReadyA frozen snapshot exists locally; no submission evidence exists.Editable request, frozen candidate snapshot, parent result, and previous completed result.Review inputs, submit, edit, change route, or cancel locally without contacting the backend.
SubmittingA submission started, but acceptance has not been established.Editable request and immutable submitted snapshot, local attempt ID, parent result, previous completed result.Show pending submission; allow a local cancel request only if its effect is accurately described. Don't offer duplicate retry.
AcknowledgedBackend or runtime evidence links the accepted request to this attempt or stable request identity.All submitted fields, acknowledgement evidence, parent result, and prior completed result.Show accepted status, request cancellation if supported, or wait for generation evidence.
GeneratingRuntime evidence shows work continuing for the acknowledged attempt.Acknowledgement, submitted snapshot, any provisional stream, and previous completed result.Show progress as available, request cancellation if supported, and keep the prior result accessible.
PartialOutput fragments are associated with the acknowledged attempt, but completion is absent.All received fragments as provisional, their order or revision, submitted snapshot, and previous completed result.Allow inspection or copying only if the product labels the content provisional; request cancellation or wait. Don't promote it as completed.
CompletedRuntime evidence says generation finished and identifies the resulting artifact.Completed artifact, provenance, completion evidence, prior results, and any provisional-to-final relationship.Persist or verify persistence, compare, select, copy, branch, refine, or regenerate. Completion alone doesn't prove selection.
CancelledCancellation acknowledgement or equivalent terminal evidence identifies the attempt.Submitted snapshot, cancellation evidence, previous result, and partial output according to the declared policy.Return to the previous completed result, inspect retained partial output, edit inputs, or create a new attempt.
FailedTerminal failure evidence identifies the attempt and establishes that it won't complete.Failure evidence, submitted snapshot, previous result, and any retained partial output.Inspect the error, edit inputs, or enter retry-ready only when non-acceptance or terminal non-completion makes another submission safe.
Acknowledgement unknownSubmission occurred locally, but available evidence can't establish acceptance or rejection.Editable request, exact submitted snapshot, local attempt ID, request identity if available, timestamps, previous result, and visible uncertainty.Reconcile status or wait. Allow cancellation inquiry if supported. Don't label the request failed or enable a fresh retry yet.
ReconciledA later lookup or event has been matched to the stable request identity and explains the uncertain submission.The original uncertainty, reconciliation evidence, submitted snapshot, resolved attempt identity, and all artifacts found.Move to acknowledged, generating, partial, completed, cancelled, failed, or retry-ready according to the resolved evidence.
Retry readyEvidence establishes that a new submission won't duplicate accepted work, or the product has a documented duplicate-safe submission contract.Prior failed or rejected attempt, non-acceptance evidence, frozen snapshot, parent result, and previous completed result.Submit a new attempt with a new attempt ID while retaining the former record and its evidence.
Regeneration transition matrix

Visible activity is not a receipt

A disabled button, optimistic card, spinner, or locally rendered stream does not by itself prove backend acknowledgement, durable completion, persistence, selection, or safe retry eligibility. Record each claim against its own evidence.

Reconcile uncertain acknowledgement before retrying

If the client loses its connection after submission, the product may not know whether the request was accepted. Keep the editable request for repair and the immutable submitted snapshot for comparison. Show that receipt is unknown instead of changing the attempt to failed.

When a stable request identity is available, use it to query or consume later status evidence. If the request is found, attach the evidence and continue from the resolved state. If non-acceptance is established, preserve that evidence and move to retry ready. If neither outcome can be established, the uncertainty remains. A generic Retry control would risk duplicate work.

Treat streaming and partial output as provisional

Streaming proves that some output associated with an attempt reached the interface. It doesn't prove that the artifact is complete or durably stored. Label partial content, retain its association with the attempt, and keep the previous completed result available while generation continues.

A Stop action should first record a cancellation request. The attempt becomes cancelled only after the application receives evidence supporting that terminal state. Until then, show cancellation as pending within the active state. If partial content is retained, mark it provisional and prevent it from silently replacing the selected completed version.

Write acceptance cases before implementation claims

The following cases are specifications to execute in the consuming product. No observations have been collected. These tables don't report a benchmark, usability finding, or reliability result.

Case 1: regenerate text after a context edit

Test content: result R1 was generated from prompt P1 and context revision C1. The user edits the working context to C2, then chooses Regenerate from R1 without confirming that C2 should replace the original context.

Expected behaviorInspectFailure condition
Product designerBefore submission, the control explains whether regeneration uses C1 or C2.Action label, context summary, confirmation copy, and visible parent result.The interface says Regenerate but silently substitutes C2 or leaves the context choice unknowable.
Application engineerAttempt A2 records R1 as parent and freezes the declared context revision.Stored attempt record, submitted payload mapping, context revision, and timestamps.The stored record lacks a context revision or disagrees with the submitted snapshot.
QA reviewerR1 remains recoverable; A2 remains separately identifiable; selection changes only under the declared rule.History, selected-version record, rendered result, and refresh or reload behavior.R1 disappears, A2 overwrites its identity, or the selected version changes without the stated selection event.
ObservationLeave blank until the named product and environment are exercised.Record actual evidence IDs, screenshots or logs, environment, and observed state.Any filled result without an executed case and traceable evidence is unsupported.
Unexecuted acceptance record for context preservation

If the intended task is to use C2, route it as Edit inputs or Refine instead. The important test isn't which route the team prefers. It is whether the label, frozen record, submitted snapshot, and visible lineage agree.

Case 2: variants, cancellation, partial output, and uncertain retry

Test content: variant V1 is selected. A branch request creates attempt A2. A2 streams partial output, the user requests cancellation, and the connection is interrupted before cancellation or request receipt is confirmed. The user then returns to V1 and asks to generate another variant.

Expected behaviorInspectFailure condition
Runtime ownerEvery status event can be associated with A2 or its stable request identity; cancellation acknowledgement remains distinct from the local request.Request identity, event identity, status evidence, cancel request, and terminal evidence if received.Events can't be tied to A2, or a local Stop click is recorded as confirmed cancellation.
Persistence ownerV1, A2's provisional fragments, branch lineage, and selection state remain separately stored according to policy.Artifact records, attempt record, parent links, preservation policy, selected-version revision, and reload behavior.Partial output overwrites V1, lineage is lost, or selecting V1 deletes or reparents A2.
Interface ownerThe UI shows V1 as selected, A2 as unresolved or reconciled, partial output as provisional, and retry as unavailable until safe.Version controls, status copy, available actions, provisional label, and retry control state.A2 appears completed, cancelled, or failed without evidence, or retry is enabled while receipt remains unknown.
QA reviewerA later reconciliation moves A2 to the matching evidence-backed state. A new attempt is allowed only after non-acceptance or duplicate-safe handling is established.Reconciliation request and response, transition history, new attempt identity, and preserved prior records.A duplicate is submitted because the interface treated uncertainty as rejection, or reconciliation changes the wrong attempt.
ObservationLeave blank until the complete sequence is executed in a named environment.Record expectations and observations separately for every transition.A pass is claimed from the presence of a final-looking output without checking identity, persistence, selection, and retry eligibility.
Unexecuted acceptance record for recovery and duplicate prevention

Find the first divergence

When the visible result differs from the user's expectation, inspect the chain in order. Stop at the first layer that differs from the recorded contract. Fixing a later layer can hide the symptom while leaving the attempt history unreliable.

  1. 1

    1. User intent

    Confirm which action the user chose and what the control said would remain fixed or change.

  2. 2

    2. Frozen inputs

    Compare the declared prompt, context revision, attachments, configuration identity, and conditional seed with the immutable submitted snapshot.

  3. 3

    3. Request identity

    Check whether the attempt and any stable backend request identity refer to the same submission, especially after reconnects or retries.

  4. 4

    4. Backend status evidence

    Inspect acknowledgement, progress, cancellation, failure, and completion evidence without inferring one from another.

  5. 5

    5. Stored attempt

    Verify that lineage, timestamps, preservation policy, status evidence, and retry eligibility match the submitted request and later events.

  6. 6

    6. Generated artifact

    Confirm that the full or partial artifact belongs to the recorded attempt and retains the correct provisional or completed status.

  7. 7

    7. Selected version

    Check the independent selection record and its revision. Completion must not be mistaken for selection.

  8. 8

    8. Rendered presentation

    Confirm that labels, available actions, history controls, and visible output reflect the recorded attempt and selection instead of stale local state.

Keep the visual system at its real boundary

Identity Forge can provide visual-system artifacts for presenting these states consistently, including tokens, typography, spacing, component rules, and implementation guidance. It doesn't establish whether an AI request was accepted, persisted, cancelled, reconciled, or safe to retry. The consuming product must own request identity, runtime integration, persistence, lineage, cancellation semantics, reconciliation, selection, and duplicate prevention.

That boundary matters during review. A polished progress card can still report the wrong attempt. A consistent warning color can still appear before failure is established. Review the behavioral record first, then verify that the design system presents each supported state clearly.

Set the acceptance decision

Retain the regeneration flow only when a previous completed result remains recoverable, every control accurately states what it keeps and changes, uncertain receipt blocks unsafe retry, provisional output stays distinguishable from completion, and the rendered state agrees with the recorded attempt and selected version. Start with one real regeneration path. Fill the attempt record, execute both acceptance cases, and record observations without converting missing evidence into a pass.

Sources