# Versions and history

> Running and debugging · https://spoletta.com/docs/versions

A flow's board is saved as numbered versions, and every change you make is a step of its history. Undo a slip with a keystroke, go back to a version that worked, and always know which board a run ran.

## Saving versions

A version is a snapshot of the whole board: every process, object, link, state and setting, inner boards included.

-   Press **Save** in the toolbar to save one.
-   Starting a run saves one first if the board changed since the last, so every run is tied to a version.
-   An import of a setup file, and a change made by the flow assistant, save a version first.

The toolbar's version toggle says where you are: *Not saved* when the board has changed since its last version, *Version 7* when it matches one, with *latest 9* when you are looking at an older one.

## Going back to a version

1.  **Open the versions**
    
    Press the version toggle. The panel lists each version, tagging the **Latest** and the **Current** one, and noting which a version was restored *from version M*.
    
2.  **Click a version**
    
    The board becomes that version. Changes made since the last save are lost, but newer versions stay, so you can move forward again.
    

> **Note:** You can't switch versions while the flow runs: *Wait for the run to finish to switch versions.* A run shown on the board always shows the version it ran on, read-only.

## Undo and redo

| Keys | Does |
| --- | --- |
| `Cmd`+`Z` (`Ctrl`+`Z`) | Undo the last change to the board |
| `Shift`+`Cmd`+`Z` (`Shift`+`Ctrl`+`Z`) | Redo it |

-   The history is kept on the server, so it survives a reload: the last 100 steps.
-   Changes in quick succession, such as typing a prompt, are grouped into one step once you pause.
-   Making a new change after undoing drops the steps you undid.
-   An import, or a change by the [flow assistant](https://spoletta.com/docs/assistant.md), is one step, so `Cmd`+`Z` undoes it whole.
-   There are no undo buttons; use the keys.

## Versions and runs

Because a run is tied to the version it ran on, you can keep editing while runs go on, and open any past run to see the board exactly as it was then. A re-run, on the other hand, runs on the board as it is now. That is what lets you fix a step and try it again. See [Re-runs and follow-ups](https://spoletta.com/docs/reruns.md).
