# Conflicts and deletions

> Resolve sync conflicts when a file changes on both your computer and hyperclay.com, and see how deletions and mass upload removals work.

Source: https://hyperclaylocal.com/docs/guide/conflicts/

When a synced file changes on both your computer and hyperclay.com, Hyperclay Local never overwrites one side with the other. Instead, it keeps both versions and lets you choose which copy to keep in the **Notices** view.

## How a conflict happens

Sync compares each local file's 16-character SHA-256 checksum with its last recorded local checksum, and the server's ETag with its last recorded remote ETag (see [How sync decides](https://hyperclaylocal.com/docs/how-sync-decides/)).

- If only your local copy changed, it uploads.
- If only the copy on hyperclay.com changed, it downloads.
- If both sides changed to the exact same bytes, sync adopts the file automatically.
- If both sides changed to different bytes (or if a file exists in both places with different bytes and no prior sync record), sync records a conflict.

While a conflict is open, your local file stays untouched in your folder and the server's bytes are parked inside `<folder>/.hyperclay/conflicts/`.

## Resolve a conflict

When a folder has an unresolved conflict, its card in the [popover](https://hyperclaylocal.com/docs/popover/) shows **1 conflict** (or **`<count>` conflicts**) with the message **A file changed here and on hyperclay.com. Both copies are kept; see Notices.**

1. Click the bell icon in the popover to open **Notices**.
2. Find the conflict row, which reads **`<Folder>`: `<path>` changed here and on hyperclay.com**.
3. Click one of the resolution buttons:
   - **Keep mine**: uploads your local file to hyperclay.com, replacing the server version. (If the file is larger than your plan's per-file upload limit, it remains stored on your computer.)
   - **Keep theirs**: replaces your local file with the version from hyperclay.com.
   - **Keep both** (available when the file was edited on both sides or rejected): keeps your local file, writes the server's version next to it as `<name> (conflicted copy).html` (numbering `2`, `3`, up to `100` if needed), and uploads the conflicted copy so both files exist on your computer and on hyperclay.com.

## How deletions sync

Deletions follow the same rule of never discarding unsynced edits:

- **Deleted on hyperclay.com, unchanged on your computer**: Hyperclay Local moves your local file into `<folder>/.trash/<path>` instead of erasing it permanently, and logs the action as **deleted** in **Activity**. You can restore it from `.trash/` or from the [workspace window](https://hyperclaylocal.com/docs/guide/workspace/).
- **Deleted on your computer, unchanged on hyperclay.com**: Sync deletes the file on hyperclay.com.
- **Deleted on hyperclay.com, edited on your computer**: Sync opens a conflict in **Notices** offering **Keep mine** (which re-creates the file on hyperclay.com) and **Keep theirs** (which moves your local file to `<folder>/.trash/`).
- **Deleted on your computer, edited on hyperclay.com**: Sync downloads the updated file from hyperclay.com back into your folder.

Folder renames and moves made by teammates are applied locally as renames and moves rather than deletions. Removing a folder on the server does not delete your local folder directory.

## Attachments and mass removals

The top-level `uploads/` folder inside each synced root holds your attachments (see [What syncs](https://hyperclaylocal.com/docs/what-syncs/) and [Metadata and uploads](https://hyperclaylocal.com/docs/metadata-and-uploads/)).

- The `uploads/` directory itself can never be deleted, moved, or renamed on the server. If you rename or move `uploads/` in Finder, Hyperclay Local puts it back; if an attachment is missing locally when a folder connects, sync downloads it from the server.
- Under `uploads/`, a single deleted file waits 3 seconds before sync sends the deletion.
- If you remove many attachments from `uploads/` at once (20 or more files, or at least 5 files making up 10% or more of your attachments), sync holds the deletion and posts a notice in **Notices**: **`<N>` attachments were removed from uploads at once. They are kept on the server until you choose to delete them there or restore them here.** Click **Delete on server** to delete them on hyperclay.com, or **Restore here** to download them back to your folder.

## Simultaneous edits in an open page

If a document you have open in a browser tab or workspace frame is updated at the same time by someone else, another tab, or an agent, a bar inside the page shows **Another edit replaced `<N>` changes.** (**This page changed by someone else**, **in another tab**, or **by an agent**) with a **Review** button. From the review panel, you can choose **Download my copy**, **Revert to mine**, or **Accept theirs** (or, when a save was refused, **Keep mine**, **Accept theirs**, and **Yes, drop my edits**).
