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

# Versioning & Locking

> Edit documents in place, prevent conflicting changes with locks, and keep a full version history.

Denari Documents lets you work on files without leaving the app, while keeping every prior version safe and preventing two people from overwriting each other's work.

## Viewing and editing

Open a document to view it in the built-in viewer. Supported formats include **PDF**, **TIFF**, **Excel** (.xlsx), and **Word** (.docx). The PDF viewer includes an outline / thumbnails sidebar for moving quickly through long documents.

You can edit documents in place:

* **PDFs** — annotate and run page operations directly in the viewer.
* **Spreadsheets** — edit Excel files in the in-app spreadsheet editor.

## Locking

When you start editing, a document can be **locked** so others don't make conflicting changes at the same time.

* A locked document shows a lock indicator on the list and in its detail header, along with who holds the lock.
* While a document is locked, other users can still view and download it, but edits are held until the lock is released.
* Admins can **force-unlock** a document if a lock is left in place.

## Versions

Every change is preserved as a version, so nothing is ever lost.

<Steps>
  <Step title="Create a new version">
    Upload a replacement file to add a new version of the document. The previous version is retained.
  </Step>

  <Step title="Review pending versions">
    When a document is locked, a new upload can land as a **pending** version for review. Promote it to make it current, or reject it.
  </Step>

  <Step title="Restore a previous version">
    Open the **Versions** tab in the document sidebar to see the full history, and restore an earlier version as the current one.
  </Step>
</Steps>

<Note>
  Attributes are properties of the document as a whole, not of a specific version — so they carry across versions and don't need to be re-entered when you upload a replacement.
</Note>

## History

The **History** view on the document detail sidebar shows an audit log of activity on the document — who viewed, edited, locked, or commented on it, when, and from where. It's the system of record for everything that has happened to a document.

## Deleting

Documents can be deleted from the actions menu on the list or detail page, with a confirmation step. Deletion is a **soft delete**: it retires every version of the document and removes it from search and from any client portals, but the record is retained and can be recovered.
