The Code tab shows the source code of the app the Solution agent built. You can read it, download it, or make changes yourself and have the agent rebuild with them.
Overview
The Code tab becomes available once the app exists. It has a file explorer with search on the left and an editor with tabs for open files on the right. The bar above the editor shows the path of the open file; until you open one you'll see "No file open. Select a file from the explorer to view it." New files appear as the agent writes them.
If the app has no build workspace on record, the tab shows "No source to show" — "This app has no build workspace on record, so its code can't be opened here."
Editing Code
Edit a file by opening it and typing. Files with unsaved changes show a dot.
Create new file opens New file, where you enter a path such as app/src/components/MyFile.tsx.
Each file's menu offers Copy path, Download, Rename and Delete. A deleted file is removed when you save; Discard brings it back before then.
Markdown files can be switched between code and a formatted preview.
A few files are managed by the platform and can't be edited — the path bar shows "Managed by the platform — read only" for app/vite.config.ts, app/src/main.tsx and app/src/index.css.
Saving and Rebuilding
When you have unsaved changes, three buttons appear in the header:
Button | What it does |
|---|---|
View changes | Shows a side-by-side comparison of your edits with the saved files. |
Discard | Throws away all unsaved changes after you confirm in Discard unsaved changes?. |
Save | Saves your changes and asks the Solution agent to rebuild the app with them. |
Saving sends the agent a message naming the files you changed. If you changed app files, it asks the agent to rebuild the preview, fix any errors your changes introduced, and commit the result. The rebuild shows up in the chat as a Manual edit card — click a file in it to open that file in the Code tab. Saving changes updates the working solution and starts a rebuild. It does not publish the app unless you separately publish it.
While the Agent Is Working
The editor, the file explorer and Save become read-only — "Can't edit while the agent is working" — whenever the agent is working on the solution. That includes work started from any chat about the solution, not just the one you're in, because all chats share the same code. Editing becomes available again when the agent finishes.
Downloading the Code
Click Download code in the header to download the app's source as a zip file named after the solution.
Branches
If the app is linked to a Git repository, a chip in the header shows which branch the agent is working on. The Code tab shows that branch. You can't switch branches from the Solution builder — branches are managed from the app's Git panel in the code builder.
Tip: Press ⌘⇧E (Mac) or Ctrl+Shift+E (Windows) anywhere in the Solution builder to copy a link to this app in the code builder, opened on the same workspace the agent uses.