Analyse & Fix
When a preview fails, let AI diagnose the logs, explain the root cause, and apply the fix.
When a preview fails, you could read the stack trace — or you could press Analyse & Fix and let the AI do it. It reads the failing preview's logs, identifies the root cause, and comes back with a diagnosis and a proposed fix.
Using it
-
In the Preview Hub, open the preview that failed. Failed previews are marked clearly in the list.
-
Click Analyse & Fix. The AI receives the full log output — install, build, and runtime — along with knowledge of your project's code and recent changes.
-
Read the diagnosis. You get the cause in plain language ("the new appointment screen calls an API endpoint that was renamed in the last change") rather than a raw stack trace.
-
Approve the fix. The repair runs like any other change — applied, verified, and visible in a fresh preview. You confirm the preview boots and the flow works.
What it's good at
The strongest cases are mechanical failures with their cause in the logs: build errors, crashes at startup, missing configuration, schema/migration mismatches, broken API calls between your app and its backend. For "it runs but behaves wrong", a normal chat message describing the wrong behavior — ideally with an annotated preview — gives the AI more to work with than logs alone.
If the fix doesn't take
Some failures have compound causes. If the preview fails again after a fix, run Analyse & Fix again — the new logs reflect the new state — or reply in the thread with anything you know that the logs don't show ("this started after we imported the customer CSV").
Related
- Reading preview logs — what the AI reads, if you want to follow along.
- Troubleshoot previews — failures you can resolve without a fix cycle.
Last updated: September 4, 2026