Unify Logo Footer.svg
Platform Tools
Logo
Editing the app in the preview

Editing the app in the preview

Logo

5 mins READ

Picking an element in the live preview and changing its text, its sample data, or its appearance without asking the agent.

Overview

On the Preview tab, click Edit (the element-picker button) in the header. The preview becomes pickable and an Edit panel opens on the right. Click anything in the running app — or pick a row in the panel's layers tree — and the panel fills with what that element exposes. Clicking it again leaves edit mode. The button is unavailable until the app has been built at least once.

Where: Code Builder › Preview › Edit (element picker)

builder-3.png
builder-3.png

Edit panel

Top to bottom:

  • Data sources — the app's standalone data bindings, each tagged list or scalar with a few of its field names. Only bindings that aren't already shown in the tree appear here.

  • The layers tree — the element hierarchy of the page the preview is currently showing, not every page in the app. Rows expand and collapse, and clicking one selects that element in the preview too.

  • The editor for whatever is selected — its text and/or its data, plus its style when you picked it in the preview.

The panel header carries Discard and Apply, both inactive until you actually change something. Apply sends everything you've changed — text edits, seed data, and style edits — as one batch; both buttons lock with a spinner while it runs. If part of the batch fails you'll see the first reason "(and N more)"; if the app takes too long you'll see "The app took too long to respond. Your changes are still pending — press Apply to try again." — your drafts are kept on anything other than a clean success. If the data behind the panel can't be loaded you'll see the reason and a Retry button; if the app simply has none, No data.

Where: Code Builder › Preview › Edit panel

Changing a piece of text

Select the element and edit its text in the panel. The change appears in the running preview as you type, without reloading it — so scroll position, form input and the current page all survive. Press Apply to keep it, which writes the new text into the app's source so it also shows up in the published app; Discard puts everything back. Text that comes from data rather than being written into the page is shown read-only — change it at its data source instead.

Where: Code Builder › Preview › Edit panel

FAQs

Can I edit the sample data behind a component?

Yes. Select a data source (or a data-backed element) and the panel shows Shape — the fields the app expects, for reference — and Seed data, an editable block holding the sample values. Edit and Apply. Values that don't parse are rejected with "Invalid JSON" and nothing is saved — including any text edits waiting in the same batch; values that parse but don't match the declared shape are only flagged as warnings and still save. Unlike a text edit, saving seed data rebuilds and reloads the preview.

Why is the Edit panel greyed out / not opening?

Because a turn owns the app's files. While the agent is working — or while a message of yours is queued, or someone else holds the branch — an edit of yours would collide with the agent's own writes. So the element picker can't be entered ("Can't edit while the agent is working"), and a panel that was already open stays visible but read-only with the banner "The agent is working — editing is paused until it finishes." You can still read and navigate; Apply comes back when the turn finishes.

What happens to my edits if I switch branch or chat?

Anything you haven't applied is dropped. Unapplied edits point at the elements of the tree you were on, and the branch or chat you move to is a different tree — applying them there would write into the wrong place. Applied edits are already in the source and travel with that branch.