What you’ll build
An app that opens the way each viewer left it, with their filters, active tab, and sort order restored on any device, plus a Reset button that brings back the defaults.
Before you start
- Data apps on your Lightdash instance. See Data apps.
- Saved app state turned on for your organization. See Saved app state.
- A data app with filters or other controls 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.
Copy the prompt
Open your app, copy this prompt, and send it as your next prompt to the app agent. The agent builds a new version of the app that saves these choices in user storage. Choices save as you make them, so there’s no save button.Try it
1
Change the view
Pick filter values that differ from the defaults, switch to another tab, and change a sort order.
2
Watch a save
Open View network in the preview header and select the Requests tab. With the panel open, change a filter again. A row with an app state badge appears for each call: a
set-user row for your change, with the value size and duration. A save that fails shows an error code instead of ok. See Network inspector.3
Reopen the app from the app list
Close the app, then open it again from its space or from Settings → My apps. Don’t use a copied link or your browser history: the page address carries view state, which can restore your selections even if saving failed. The app opens with the filters, tab, and sort order you left it with. Open it the same way on another device while signed in as you, and you get the same view.
4
Check that it's private
A personal app is only visible to you, so first move it into a space your teammate can access. Ask them to open the app from that space, not from a link to your current view. They see the defaults, or the choices they saved themselves, never yours.Your saved choices stay private, but selections in a link you share travel with the link. When someone opens a link with view state, those values take priority over their own saved choices.
5
Reset
Click Reset. The defaults return, and the app saves them as your new choices. Close the app and reopen it from the app list to confirm it opens with the defaults.
Make it yours
Send any of these as a follow-up prompt. Put the view in the page link, so a colleague who opens your link sees the same view:How it works
- Saved app state explains user and shared storage, what embedded viewers can do, and the storage limits.
- See what an app has saved covers the App state panel, where people who can manage the app review shared keys and their history.
- Network inspector explains the Requests tab and its app state rows.