Editing your project
Code and preview tabs, version history, cloning, visibility, and connecting your own Supabase.
After the first build, most of your time is spent iterating. This guide covers the tools in the project workspace and when to reach for each.
Switch between code and preview
The top bar has two tabs: Preview and Code.
- Preview shows the live app in an iframe. Click around to test.
- Code shows the generated source tree. Browse files, copy snippets, read what the AI wrote.
Both stay in sync with the current version. Switching tabs does not lose your place.
Use version history
Every successful build is a version. Open the history icon (clock) in the top bar to see the list.
From history you can:
- Preview a past version without changing anything
- Roll back to make that version the new head
- Compare what changed between versions
Rolling back is not destructive. The versions you leave behind stay in history.
Rename, clone, delete
Open the project name dropdown in the top-left to:
- Rename the project
- Clone it — creates a fresh copy with its own history
- Delete it
Cloning is the right move when you want to try a risky change without losing the current project.
Control visibility
Projects are private by default. A private project is only visible to you in the editor — nobody else can open the link. Switch to public from the project dropdown under Visibility if you want anyone with the link to view the editor.
Private projects require an active subscription. On the free plan, projects stay public.
Visibility is separate from publishing. A private project can still be published — the published URL is public, but the project editor is not.
Connect your own Supabase
Layout provisions a Supabase project for you automatically. If you want to own the database directly — to run queries, manage users, or keep data across projects — connect your own.
Open the Supabase button
Click the Supabase icon in the chat toolbar, just below the prompt input.
Sign in and pick a project
Authorize Layout to access your Supabase account. Pick an existing project or create a new one from the picker.
Confirm the migration
Layout shows the schema changes it wants to apply. Review them and confirm. Your app now reads and writes to your Supabase project.
Once connected, the dropdown shows the selected project's name with two icons next to it: an external-link icon that opens the project in the Supabase dashboard, and an unplug icon that disconnects.
Read the build log
The chat panel doubles as the build log. When Layout runs a build, you see:
- Plan — what the AI intends to change
- File edits — each file touched, with a diff
- Migrations — any schema changes applied to the database
- Build result — success, or the error if it failed
If something goes wrong, the log is where to look first.