# Saving and undoing in the layout editor

URL: https://kywi-docs-production.up.railway.app/authoring/saving-and-undoing-in-the-layout-editor
Type: docPage

Undo survives a Save but not a reload. Since 0.25.0, a save that would overwrite a newer save asks you first.

Saving is explicit — nothing autosaves in the layout editor, on the admin Layout tab or on Design on site. Undo, meanwhile, is ordinary in-memory history: a stack of states the editor keeps for as long as it's open, and nothing more durable than that.

## What undo remembers, and what it doesn't

Undo has no idea a save happened — saving updates what the editor treats as the "original" document without touching the history stack, so you can save, then undo back past that save, in the same session. What it can't do is survive the session itself: reload the page, or close the editor and reopen it, and the history is gone. You start again from one entry, the document as it now stands.

## What clears the history on purpose

Two actions reset it deliberately. Cancel reverts to the last saved document and clears history along with it — and if you have unsaved edits, Cancel asks first rather than reverting on the spot. The other is an internal refresh of linked component copies, which only runs when the document is still pristine, so it never discards an edit you haven't saved.

Leaving with unsaved work prompts you either way: the front-of-site overlay warns before a browser reload or tab close, and the admin form asks before you switch away from the Layout tab with edits pending.

## Copy reference is not an edit

Copying a module's or section's reference for [your agent](/agent/hand-a-module-to-your-agent/) adds nothing to undo history and doesn't mark the page as changed.

## Two people saving the same page: you are asked before overwriting

Each Save or Publish, from the Layout tab or from Design on site, carries the version of the page the editor loaded. If the page was saved since you opened it (by someone else, another tab of yours, or an agent), the save stops and asks: **Reload the saved layout**, which drops your unsaved layout changes, or **Overwrite with my changes**, which replaces theirs. Nothing merges the two, so check with whoever else had it open before you overwrite. The [version history](/governing/version-history-and-rollback/) the platform keeps after publish is a separate record, not a substitute for that. On the front of the site, Save Draft and Schedule only queue a draft and don't check. Before 0.25.0 there was no check at all: the second save silently replaced the first.
