> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sprintbrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Version History: Compare and Restore Snippet Revisions

> Every snippet save creates a revision. Browse the full history, compare versions with a word-level diff, and restore an earlier version in one click.

SprintBrain keeps a complete revision history for every snippet in your library. Every time you save a snippet, a new version is recorded automatically. You never lose a previous wording, and you can always see exactly what changed, who changed it, and when.

***

## How version history works

Each time a snippet is saved, SprintBrain creates a **revision** and appends it to the snippet's history. A revision records:

* The **full snippet body** at the time of the save
* The **author** — the team member who made the change, stamped by the server
* The **version number** — an incrementing integer starting from v1
* A **timestamp** showing how long ago the change was made
* An optional **edit note** if the author added one

Revisions are stored indefinitely. There is no limit on the number of revisions per snippet, and older revisions are never automatically pruned.

***

## Viewing version history

<Steps>
  <Step title="Open the snippet">
    Find the snippet in your dashboard and open it. You can open version history from any snippet you have at least View access to.
  </Step>

  <Step title="Open the Version History panel">
    Click the **History icon** (clock) in the snippet toolbar, or open the row action menu and choose **Version History**. The Version History panel slides in from the right.
  </Step>

  <Step title="Browse the revision list">
    The panel shows all revisions in reverse-chronological order — newest first. The current version is labeled **Current** and highlighted. Each row shows the version number, the author's name, any edit note, and a relative timestamp.
  </Step>

  <Step title="Expand a revision">
    Click any revision row to expand it and see the diff for that version.
  </Step>
</Steps>

***

## Side-by-side diff

When you expand a revision, SprintBrain shows a **word-level diff** comparing that revision to the one before it:

<CodeGroup>
  ```diff Example diff view theme={null}
    Dear {guest_name},
  - Thank you for staying with us last week.
  + Thank you for your recent stay with us.
    We hope to welcome you back soon.
  ```
</CodeGroup>

* **Additions** are highlighted in **green** with a `+` prefix
* **Removals** are shown in **red** with strikethrough and a `−` prefix
* **Unchanged lines** appear in the context color so you can read the full snippet

If you want to compare a revision to an older baseline rather than its immediate predecessor, use the **vs** dropdown that appears when older versions are available. Select any earlier version number as the comparison target, and the diff updates instantly.

<Note>
  Version history tracks changes to the **snippet body and language variants**. Trigger changes and folder assignment changes are not captured in the diff view. If you need to audit those, check the authorship record on the snippet itself.
</Note>

***

## Restoring a previous version

<Steps>
  <Step title="Find the version you want">
    Expand the revision you want to go back to in the Version History panel and confirm it contains the wording you need.
  </Step>

  <Step title="Click Restore">
    Click the **Restore v\[n]** button at the bottom of the expanded revision. SprintBrain asks you to confirm before making any changes.
  </Step>

  <Step title="Confirm the restore">
    Click **Confirm restore**. The snippet body is immediately replaced with the selected version's content.
  </Step>

  <Step title="A new revision is created">
    The restored state is saved as a **brand-new revision** at the top of the history. This means you can undo the restore itself — just expand the new revision, find the version you had before the restore, and restore that one.
  </Step>
</Steps>

<Tip>
  Version history is a safety net for shared snippets. When teammates have Edit access to a folder, encourage them to edit freely — every change is tracked, any revision can be reviewed in the diff view, and any wording can be recovered in a single click. You never have to worry about an accidental edit being permanent.
</Tip>
