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

# Add shared team comments to a data app

> Let everyone who opens a data app post, edit, and read comments next to its charts

[Experimental](https://docs.lightdash.com/support/feature-badges.md#experimental)

## What you'll build

A comments panel next to each chart where your team posts notes that everyone who opens the app can read, with each comment's author and time, and a **Refresh** button to pull in new replies.

![A data app with a Notes panel beside its charts, listing team notes with author and time, one note linked by a dashed line to a marker on the chart, and a box to post a new note](https://mintcdn.com/lightdash/LhCKN8gnaiHUaLdy/images/data-apps/add-shared-comments-to-an-app/team-notes-hero.png?fit=max\&auto=format\&n=LhCKN8gnaiHUaLdy\&q=85\&s=a79d8a1e088aecc718d2ace71994b6cd)

## Before you start

* **Data apps** on your Lightdash instance. See [Data apps](https://docs.lightdash.com/data-apps).
* **Saved app state** turned on for your organization. See [Saved app state](https://docs.lightdash.com/data-apps/saved-app-state.md).
* **A data app with charts** that you can edit. To start from scratch, create an app with the **Dashboard** template and attach an existing dashboard as context. See [Creating a new app](https://docs.lightdash.com/data-apps#creating-a-new-app).
* **A teammate who can open the app**, to try the comments together. A new app is personal, so [move it into a space](https://docs.lightdash.com/data-apps#sharing-an-app) they can access.

## Copy the prompt

Open your app, copy this prompt, and send it as your next prompt to the app agent.

Prompt
Copy this prompt to your clipboard

<pre>
  Let the team leave comments on this app, visible to everyone who opens it:

  * A comments panel next to each chart. Anyone can post a comment, and each comment shows who wrote it and when.
  * Let people edit or delete their own comments.
  * Keep what someone typed visible until the comment is saved, and say so if a save fails.
  * Preserve both comments when two people post at once; keep my draft if a conflict can't be resolved.
  * Add a Refresh button to the comments panel.
</pre>

Paste into the prompt box of your app, then send it.

The agent builds a new version of the app that keeps the comments in [shared storage](https://docs.lightdash.com/data-apps/saved-app-state.md#shared-storage). Lightdash records every change with its author and time.

Anyone who can open the app can change shared values, so "only edit your own comments" is a rule the app's buttons follow, not a permission Lightdash enforces. Viewers of an [embedded app](https://docs.lightdash.com/data-apps/saved-app-state.md#embedded-apps) can read the comments but can't post.

## Try it

**1. Post a comment**

Write a comment on one of the charts and post it. It appears with your name and the time, and the text box clears once the comment is saved.

**2. Watch the save**

Open **View network** in the preview header and select the **Requests** tab. With the panel open, post another comment. A row with an **app state** badge appears for a `set-shared` call, with the value size and duration. A save that fails shows an error code instead of **ok**. See [Network inspector](https://docs.lightdash.com/data-apps#network-inspector).

**3. Post from another account**

Ask your teammate to open the app from its space and post another comment. Comments don't update live: click **Refresh** in the comments panel, or come back to the app's browser tab, to see their comment.

**4. Post at the same time**

Ask your teammate to post a comment while you post one too. Both comments land. If a save can't be merged, the **Requests** tab shows a `conflict` error, and the app keeps your draft so you can post it again.

**5. Edit and delete a comment**

Edit one of your comments and save it. Ask your teammate to click **Refresh**: they see the new text. Then delete the comment and ask them to refresh again: it's gone for them too.

Deleting removes the comment from the app, but earlier versions of the comments key still contain its text. People who can manage the app can read those versions in the **App state** panel.

**6. Review the history (optional)**

This step needs permission to manage the app. Open the app's **⋯** menu and select **App state**, then select the comments key. Each version shows who changed it, when, and the full list of comments at that point. See [See what an app has saved](https://docs.lightdash.com/data-apps/saved-app-state.md#see-what-an-app-has-saved).

## Make it yours

Send any of these as a follow-up prompt.

Let people close out discussions:

```text theme={null}
Let people mark a comment as resolved, and hide resolved comments behind a "Show resolved" toggle.
```

Pin comments to a specific data point instead of a whole chart:

```text theme={null}
Let people attach a comment to a specific month on the revenue chart, and show a marker on months that have comments.
```

Save AI commentary once per selection and let the team edit it. This needs [AI analysis](https://docs.lightdash.com/data-apps/ai-analysis.md) turned on.

> [!WARNING]
>
> Shared commentary is content every viewer of the app can read, including viewers with different data permissions. A viewer may read commentary generated from data they couldn't query themselves. See [For app code](https://docs.lightdash.com/data-apps/ai-analysis.md#for-app-code) before you use it with row-level access.

```text theme={null}
Add AI commentary under the main chart that is saved and shared between viewers, and let anyone edit the text.
```

## How it works

* [Shared storage](https://docs.lightdash.com/data-apps/saved-app-state.md#shared-storage) explains what shared values are for and when other people's changes appear.
* [See what an app has saved](https://docs.lightdash.com/data-apps/saved-app-state.md#see-what-an-app-has-saved) covers the **App state** panel, version history, and clearing a key.
* [Limits](https://docs.lightdash.com/data-apps/saved-app-state.md#limits) lists how large a saved value can be and how many versions Lightdash keeps.
* [Network inspector](https://docs.lightdash.com/data-apps#network-inspector) explains the **Requests** tab and its app state rows.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.