Skip to content

Undo and Failure Behavior

Composite history

The production shell owns presentation-level history. It captures complete three-surface snapshots for interactive document mutations and for validated operation batches.

  • Surface switching is navigation and creates no undo entry.
  • Layout, theme, and whole-family application create one composite entry.
  • Undo restores every affected surface, binding, fragment, template record, viewport, transparency value, safe area, and theme token.
  • Redo reapplies the same validated result.
  • Keyboard Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z use composite history.

Document-local history is cleared when the host session loads a different surface so undo can never replace one surface with another.

Atomic failure

Validation and mapping operate on clones. Failures return structured issues and leave the visible and serialized presentation unchanged.

Stable failure families include:

  • REVISION_CONFLICT;
  • INVALID_OPERATION and UNKNOWN_OPERATION;
  • UNSAFE_LAYOUT_MAPPING and UNSAFE_FAMILY_MAPPING;
  • SEMANTIC_CONTENT_LOSS, SEMANTIC_CARDINALITY_LOSS, and AMBIGUOUS_SEMANTIC_MAPPING;
  • OPERATION_PRECONDITION_FAILED;
  • SAVE_VALIDATION_FAILED; and
  • EDITOR_COMMAND_FAILED.

A rejected save remains dirty. A later valid host load or accepted revision restores a defined state without reloading the browser application.