Using 'Fix with Camelia' to make a preview runnable
When the in-browser preview can't start — no entry point, a build error, or broken imports — "Fix with Camelia" hands the project to the AI copilot to make it runnable, then re-runs it automatically.
What it does
The IDE sends the current project files to a dedicated endpoint and asks Camelia to turn the code into a runnable client-side web app for the in-browser bundle. Specifically, she's asked to:
- Ensure a browser entry exists that mounts the app into the preview's root element.
- Add an index.html with a root container if one is missing.
- Make sure the project lists react and react-dom as dependencies.
- Fix any broken or unresolved imports.
- Keep it client-only — no server, no Next.js.
What happens after
If Camelia returns edits, the IDE applies them to your files, saves them to the encrypted store, and re-runs the preview so you see the result immediately. The edited files are merged into your working set and the changed file is opened for you. If she can't fix it, you'll get a message explaining that rather than a silent failure.
When to reach for it
Use it whenever the preview reports it can't run — it's the fastest way to get a freshly imported or partially scaffolded project into a previewable state. Since the goal is a client-only web build, it's best suited to React-style front-end projects, not backend or SSR code.