# Exporting your data

Open **Settings → Saved data** to see all saved documents, independently of the
active tab. Each row shows its last-opened time and saved highlights, notes and
chats, including documents outside Recents or whose PDF has moved or is missing.
Multipage highlights and their shared notes are counted once; empty chats are
not included in the chat count. Reading-only documents remain listed. Longer
lists offer search. Each row offers **Reveal in folder**, **Export saved data…**,
and **Delete saved data…**, with tooltips explaining each action. Reveal uses a
saved PDF location and is unavailable when no associated PDF can be found;
duplicate names remain separate rows without showing internal IDs.

Use a row's **Export saved data…** action or **Export all…**, choose **JSON** or
**Markdown**, and select **Export…** to save a file. Neither action requires an
open PDF. Documents with only prepared AI data can be deleted, but that data is
not included in exports.

## Deleting saved data

A row's **Delete saved data…** action opens a compact confirmation dialog naming
the document. Cancel is focused first; Escape, the close button, or clicking
outside dismisses it before confirmation. During deletion, the dialog stays
open with its actions disabled; a failure is shown inside it for retry.
Confirming closes its open tabs in every window, stops and waits for active
chat/preparation work, and removes highlights, notes, reading progress, chats,
path associations, and prepared AI data. Native CLI session
deletion uses the existing retry mechanism if a provider is unavailable.
Unsent drafts in the closed tabs are discarded. The original PDF, Recents card,
other documents, and downloaded model resources remain. Reopening the PDF starts
fresh saved data; chat preparation must be run again.

Deletion cannot be undone, and exports cannot be imported to restore state.
An unresponsive window prevents removal. If a later stage fails, some data may
already have been removed; the remaining records stay available for retry.

## Exporting from Home

Home cards also offer **Export saved data…**. For a PDF opened with the current
version, its saved document is preselected even if the PDF is now missing. For
older cards without a saved association, choose the document from the list or
choose **All documents**. Identical filenames are not automatically matched;
the picker includes the last-opened time to help distinguish saved documents.
Removing a card from Recents leaves its saved data intact.

## What exports include

Both formats include highlights, notes, saved conversations, attached selections,
and citation references. Export needs no AI connection, parsing, or indexing.
Pending note edits and reading positions are saved across open windows before
records are collected. Chat export includes messages already saved at collection
time; an answer still in progress and unsent composer drafts are not included.
A question that was stopped, failed or interrupted keeps its saved user message,
but the note shown under it (such as "Response stopped.") is not exported. Successful
rewind removes the selected question and later conversation from subsequent exports;
an existing export is unchanged.
Editing can continue after collection; later changes belong to a subsequent export.

Files contain no original PDFs, settings, credentials, downloaded models, or
retrieval indexes. Export does not change original PDFs. These are readable data
exports; V1 does not import them or restore application state from them.

## JSON (default)

UTF-8, formatted JSON for processing in other tools. The top-level fields are:

| Field                       | Meaning                                                                  |
| --------------------------- | ------------------------------------------------------------------------ |
| `formatVersion`             | `1`; identifies the export format independently of app/database versions |
| `application`, `appVersion` | `Platypus` and the version that created the file                         |
| `exportedAt`                | ISO 8601 UTC collection timestamp                                        |
| `scope`                     | `document` or `all-documents`                                            |
| `documentSha`               | Selected document's SHA-256, or `null` for all documents                 |
| `coordinateSystem`          | `normalized-top-left`                                                    |
| `pageNumbering`             | `one-based`                                                              |
| `documents`                 | Document records with nested `annotations` and `chats`                   |

Each document retains its `sha256`, `name`, timestamps, `lastLocation`, and
`readingMarker`. Timestamps on saved records are milliseconds since the Unix
epoch. PDF page numbers start at 1 and refer to physical pages, which may differ
from a document's printed labels. Coordinates range from 0 to 1 relative to the
page; x increases rightward and y increases downward.

### Annotations

`annotations` contains each saved `highlight` or `freeNote`, retaining its `id`,
`docSha`, `groupId`, page, position, all rectangles, anchor quote, style, note
display settings, and timestamps. Deleted annotations are omitted.

`content` remains in its original form: `{ "format": "markdown", "value": "…" }`
or `{ "format": "tiptap", "value": { … } }`, or `null`. `plainText` provides a
readable representation of the note without requiring a Tiptap parser. Highlight
text is in `anchorText.quote`; it is separate from the note's `plainText`.

Multipage highlights retain their individual page records. Group records using
`groupId`, falling back to `id`; the same attached note can appear on multiple
members of a highlight group.

### Chats

`chats` contains all saved conversations for the document, each with its `id`,
title, timestamps, and `messages`. Messages retain their IDs, `role`, original
Markdown `content`, timestamp, `citations`, `selections`, and `tokenUsage` when
present. Messages are ordered by creation time; ties retain saved order.

When token usage is saved for an answer produced with long-document planning, it
includes the planning usage reported for that turn. Calls that report no usage
are absent from those totals. Planning prompts and tool results are not exported.

In message content, `[[cite:0]]` refers to index 0 in that message's `citations`
array. A document citation's `ordinal` identifies its original retrieved span;
it is not the citation-array index. Document citations retain quoted text, page,
and all bounding rectangles. Web citations retain URL, title, snippet, and
retrieval time. Attached selections retain their own text, page, and rectangles.

If annotation/chat records exist without their document metadata, they are still
exported under their hash with `metadataUnavailable: true` and a placeholder name.
Export reports malformed records it cannot represent instead of silently dropping
them. New optional fields may be added within format version 1; readers should
ignore fields they do not understand.

## Markdown

A single UTF-8 `.md` file, organized by document. Highlights and notes appear in
page order, with multipage highlights grouped and repeated attached notes shown
once. Chats include speaker labels, UTC timestamps, attached selections, and
message-specific citation footnotes. A Sources line references all saved citations.
Literal citation markers inside code examples remain unchanged.

Notes preserve headings, paragraphs, line breaks, lists, tasks, links, code,
and equation text. Readers supporting GitHub-style Markdown, footnotes, and LaTeX
equations provide richer rendering; the underlying text remains readable in an
ordinary text editor. Exact colors, fonts, indentation styles, note sizes, and PDF
positions are available in JSON where stored, rather than reproduced visually in
Markdown. Links from rich-text notes use HTTP, HTTPS, or mailto URLs.

## Saving and errors

Exports are written to a temporary file beside the destination and finalized only
after the write succeeds. Canceling the native save dialog writes nothing. A
failed write leaves an existing destination unchanged and reports an error; retry
with available disk space or another writable folder. Exports are unencrypted;
sharing a file shares the document excerpts and conversations it contains.
