> For the complete documentation index, see [llms.txt](https://swu-forge.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swu-forge.gitbook.io/docs/decks/managing-decks/deck-history.md).

# Deck History

The **History** tab on a deck page shows an auto-captured timeline of every save, with a diff of what changed since the previous save. It lets you trace how a deck evolved without having to remember which cards you swapped in or out.

## Where to find it

Open any deck (`/decks/<deckId>`) and click the **History** tab in the right column toolbar, next to **Notes**. The tab appears as soon as a deck has any save history; brand-new decks show "No save history yet" until the first save lands.

## How snapshots are captured

Snapshots are created **automatically** every time the deck is saved (the same write that the Workshop and Browse builder issue when you save card changes). Each snapshot stores:

* Leader / second leader / base
* Format
* Full main-deck and sideboard contents
* Save timestamp

Snapshots are deduped at write time: if a save didn't actually change anything in the snapshot fields (e.g., you re-saved the same list), no new history entry is added.

Renames, folder moves, and link-toggle changes do **not** create snapshots — only card / leader / base / format mutations do.

## The version tab strip

If the deck has been split into multiple versions in the Workshop's version tree, History groups its snapshots by version. The strip across the top of the panel shows one tab per version that has snapshots; the deck's **active** version is selected by default. The number on each tab shows how many save events landed on that version.

Decks without versions show no tab strip — just a single timeline.

## What each entry shows

Each save event is displayed newest-first inside the active tab:

* **Absolute timestamp** (date + time, localized).
* **Relative time** (e.g., "3h ago").
* **"Latest"** badge on the most recent entry.
* **Diff** vs the previous save in the same version:
  * `+2 Han Solo` — cards added
  * `-1 Maul` — cards removed
  * "Leader changed", "Base changed", "Second leader changed" when those swap
  * "Sideboard" section header when sideboard changes are present
* "First save on this version" for the oldest entry in a tab (nothing to diff against).
* "No card changes since the previous save" if a save reshaped only metadata that History tracks no diff for.

## Retention

The most recent **50 snapshots per deck** are kept. Older entries are pruned automatically at save time, so a heavily-edited deck still bounds its history rows.

## Privacy

History travels with the deck. If the deck's link is enabled (or the deck is listed publicly), anyone who can view the decklist can also view its History — the timeline of edits is part of the public surface.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://swu-forge.gitbook.io/docs/decks/managing-decks/deck-history.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
