Undo Has to Restore More Than Text

An AI edit can be undone perfectly at the text layer and still leave the user stranded.

Imagine an assistant rewrites a selected paragraph. A conventional undo restores the old words, but the selection has collapsed, the instruction has disappeared, and the interface has moved to a results state. The artifact is technically back where it started; the task is not.

The People + AI Guidebook frames control as contextual. People may want more control when they enjoy doing the task, remain responsible for the outcome, face high stakes, or have preferences that are difficult to communicate. It also recommends opt-out paths, a non-automated fallback, and editable feedback or preferences. The guidebook does not define an undo architecture or report results from one.

A useful product hypothesis follows from those principles: treat an AI-assisted edit as an interaction bundle, not just a content mutation. Depending on the workflow, that bundle may include:

  • the artifact before the AI action;
  • the active selection or insertion point;
  • the instruction and relevant attached context;
  • the user’s position in the flow, such as editing, previewing, or comparing; and
  • the specific AI action that moved the product between those states.

Undo should restore the smallest coherent version of that bundle. “Smallest” matters because restoring every piece of application state can be surprising too. A user who has navigated elsewhere, opened another panel, or made a deliberate follow-up choice may not expect one undo command to rewind all of it.

That creates three design decisions worth making explicitly.

  1. Define the transaction boundary. Decide which changes are one user-perceived action. If “rewrite selection” replaces content, clears the selection, closes the prompt, and opens a comparison view, test whether users understand those effects as one action or several.

  2. Separate restoration from retry. Undo should recover a prior state without silently asking the model to act again. Once restored, the product can offer a deliberate retry with an edited instruction or different context.

  3. Preserve a manual path. If the AI feature is turned off or dismissed, the underlying task should remain possible. Restoring the artifact while trapping the user inside the AI flow is not a complete fallback.

A compact implementation record can make the behavior inspectable:

action_id
artifact_before
artifact_after
selection_before
input_context_before
flow_state_before
flow_state_after
follow_up_changes

The follow_up_changes field is important for conflict handling. If the user edits the generated result before choosing undo, the product needs a clear policy: undo only the latest manual edit, restore the entire pre-AI bundle, or ask which checkpoint to return to. None of those policies is universally correct; the right choice depends on how the product represents history and how much work a broad restoration could erase.

This interaction-bundle model is a design inference, not a pattern validated by the guidebook. It should be tested against the product’s own workflows, especially multi-step edits, attached files, branching histories, and actions that affect more than one artifact.

The useful acceptance question is not only “Did the old text come back?” It is: after undo, can the user understand where they are, recover the inputs that still matter, and continue without reconstructing the task?

A boundary worth adding is the point where an AI action has already produced effects outside the editable artifact.

Restoring a draft, selection, and prompt is different from recovering an action that sent a message, changed access, or submitted a request. Those effects may need a compensating action or human review, and some may not be reversible at all.

For higher-stakes flows, the recovery record should make that scope explicit: which state was restored, which external effects were compensated for, and which consequences remain outstanding. That turns “undo” into a bounded recovery promise instead of implying that every consequence has disappeared. A product can then require confirmation before an irreversible effect while still preserving the manual fallback for the underlying task.