# Reviewing & Staging Changes

The AI never touches your diagram directly. Every change it proposes goes through a **preview → stage → commit** flow so you can review, reposition, and confirm before anything lands on your board.

## The Flow at a Glance

1. **Preview in chat** – A miniature preview appears inside the AI's response.
2. **Stage on canvas** – The proposed changes appear on your board with a dashed green highlight, which you can move.
3. **Commit or discard** – You apply the changes (merge or add) or throw them away.

<figure><img src="/files/ru6EkKqz4hTX9fWTV3mi" alt=""><figcaption></figcaption></figure>

## Step 1: Preview in Chat

After the AI responds, the chat shows:

* A miniature view of the proposed diagram changes.
* A count of how many nodes and links are included.
* Three action buttons: **Cancel**, **Merge**, and **Add**.

Click the **expand icon** to open a full-screen preview with a zoomable view. The full-screen preview has the same action buttons.

<figure><img src="/files/XDUmjL2jkF2YULQV7BX6" alt=""><figcaption></figcaption></figure>

## Step 2: Staging on Canvas

When you click **Merge** or **Add**, the proposed elements appear on your canvas inside a dashed green boundary. A floating action bar also appears with commit controls.

| Button      | What It Does                                                                                            |
| ----------- | ------------------------------------------------------------------------------------------------------- |
| **Merge**   | Apply the changes to your existing diagram. Existing elements are updated in place; new ones are added. |
| **Add**     | Add every element as a new copy, without modifying any existing elements.                               |
| **Discard** | Remove the preview and discard the changes.                                                             |

<figure><img src="/files/i0AEZIwnKvqAIzgiCDJd" alt=""><figcaption></figcaption></figure>

### Repositioning Before Committing

While the staged area is visible, you can **drag it around the canvas** to reposition the proposed changes. Use this to place new elements exactly where you want them before committing.

### Keyboard Shortcut

Press **Escape** at any time to discard the staged preview.

## Step 3: Status Indicators in Chat

Each AI response shows its current status so you can always see what happened:

* **Previewing on canvas** – The changes are currently staged for review.
* **Added to canvas** – You applied the changes.
* **Preview discarded** – You rejected the changes.
* **Preview replaced** – A newer preview replaced this one.

## Merge vs. Add — Which to Pick

| You want to...                                                           | Use       |
| ------------------------------------------------------------------------ | --------- |
| Update the color, size, or labels of elements that already exist         | **Merge** |
| Connect, rename, or reposition elements already on your board            | **Merge** |
| Keep your existing diagram untouched and drop the AI's result next to it | **Add**   |
| Compare the AI's version against what you already have                   | **Add**   |

## Related

* [AI Chat](/models/work-in-the-app/ai/chat.md) – Sending messages that produce previews
* [@Mentions & Context](/models/work-in-the-app/ai/mentions.md) – Tell the AI exactly what to change so Merge does the right thing


---

# Agent Instructions: 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:

```
GET https://docs.ins-pi.com/models/work-in-the-app/ai/staging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
