Version History
Frontend’s Version History feature provides a robust way to track changes to your project over time. This safety net allows you to experiment confidently with AI-generated code while maintaining the ability to return to previous working states.
Automatic Version Creation
Section titled “Automatic Version Creation”Every significant change made by the AI automatically creates a new version of your project. This ensures that you have a complete history of how your project has evolved:
- Each prompt that results in code changes creates a new version
- Versions include a timestamp and description of the changes made
- All project files and their state are preserved in each version
- No manual action is required to create versions
This automatic versioning provides peace of mind as you build your application, knowing that you can always revisit previous states of your project.
Managing AI-Generated Changes
Section titled “Managing AI-Generated Changes”When working with AI, it’s natural that not every generated change will be perfect on the first try. The Version History feature is particularly valuable in these situations:
- If the AI introduces errors or unexpected behavior
- When you want to try a different approach to solving a problem
- If you prefer a previous implementation of a feature
- When experimental changes don’t work out as expected
- If multiple iterations are needed to achieve the desired result
Instead of manually undoing changes or trying to recreate previous code, you can simply restore to an earlier version that worked correctly.
Navigating Between Versions
Section titled “Navigating Between Versions”Frontend provides intuitive controls for moving between different versions of your project:
- Use the ← and → arrow buttons to quickly move back and forth between sequential versions
- Click the clock icon button to view the complete version history with all available versions
- Each version in the history view includes a timestamp and description of the changes
- Preview versions before restoring to see what they contain
These navigation options make it easy to explore your project’s history and find the specific version you want to restore.
Restoring Previous Versions
Section titled “Restoring Previous Versions”Restoring to a previous version is straightforward and selective:
- Navigate to the version you want to restore using the arrow buttons or history view
- Click “Restore this version” to revert your code to that state
- Continue working from the restored state
Important note: Restoring to a previous version will only restore the code in your Frontend project. It will not:
- Revert any changes made to Supabase (such as database data or serverless functions)
- Make changes to GitHub (it will not restore to a previous git commit)
- Undo external API integrations or third-party connections
- Reset environment variables or project settings
This selective restoration ensures that your external dependencies remain consistent while allowing you to adjust your application code.
Best Practices
Section titled “Best Practices”To make the most of the Version History feature:
- Make frequent, smaller changes rather than large, sweeping modifications
- Test each significant change before moving on to the next feature
- Add descriptive comments in your prompts to create more informative version descriptions
- Use version history as a way to compare different approaches to the same problem
- Consider creating a new version before making major architectural changes
By effectively using the Version History feature, you can work more confidently with AI-generated code, knowing that you always have the ability to return to a known working state.