How to Undo a Change AI Made Without Losing Newer Work
AI broke something and you have changed more since? Detach that one change or feature from History instead of restoring old files over your newer work.
Short answer: open History, find the change by what it did, and click Detach this change. LightCode asks an AI agent to remove only that behavior and keep what came after it.
The problem#
You asked AI for a feature, kept building, and later found you do not want it, or it broke something. Putting the old files back would also erase everything you did since.
Why it happens#
Ordinary undo works on whole files or whole commits. Several features often live in the same file, so rolling one back drags the others with it.
Steps#
- Click History in the top toolbar.
- Find the feature in the list. Entries describe what changed for users, with who asked for it and when.
- Open View N changes if you only want to remove one step of the feature.
- Click Detach this change or Detach this feature.
- Wait for the editing task to finish.
- Open your app in the Browser panel and check both the removed behavior and the features around it.
Good to know#
- Detaching is an AI editing task, not an instant restore. Always verify the result before deploying.
- History covers changes made in LightCode sessions.
- Keep using Git as your safety net: commit when your app works.
- The Free plan shows the last 3 days of history. Pro shows up to 90 days.