Files
supabase/apps/studio/components/interfaces/Database/RestoreToNewProject
Monica Khoury 873b42c84d feat(studio): collapse previous restorations list in database backups (#53264)
## Problem

The "Previous restorations" list on the Database Backups restore page
keeps growing. Entries for cloned projects that were later removed stay
in the list and can't be deleted, so the list pushes the rest of the
page down.

Linear: FE-4402

## Solution

Make the list collapsible instead of deleting entries, which is the
safer option.

- The list is collapsed by default.
- The heading is now a trigger with a chevron that rotates when open.
- The heading shows the number of restorations, e.g. "Previous
restorations (12)", so a collapsed list still shows how much is hidden.

It reuses the existing `Collapsible` component from `ui`. Only
`RestoreToNewProject.tsx` changes.

## Review instructions

1. Open a project on a Pro plan or above with physical backups enabled,
then go to Database > Backups > Restore to a new project.
2. Make sure the project has previous restorations. If it doesn't, mock
the response of the `clone/status` request in DevTools with a few
entries.
3. Check that "Previous restorations (N)" is collapsed on load.
4. Click the heading and check that the list opens and the chevron
rotates.
5. Click again and check that the list closes.
2026-11-11 16:52:37 +02:00
..