Jewelry AI - collections
Deleting a collection does not delete the images inside it
The two deletions in this app work in opposite directions. An image you delete goes to the Deleted tab and can be brought back. A collection you delete is removed outright: there is no trash behind it and nothing restores it. In both cases the thing that is actually lost is the grouping, not the photographs.
The two deletions point in opposite directions
In Jewelry AI, deleting an image and deleting a collection are not two sizes of the same action. An image that you delete is moved out of view but kept: it can be restored. A collection that you delete is removed from the database, and there is no equivalent second chance - the app has no trash for collections and no soft delete for them.
That asymmetry is easy to read the wrong way round. Because the recoverable operation is the one sellers meet first, the destructive one inherits an undo it does not have. It helps to keep the objects straight: your images live in your library, and a collection is a grouping laid over them. Deleting the grouping cannot reach the images underneath it.
The code says this plainly. The collection delete removes the collection row and lets its membership rows cascade away with it (apps/api/src/collections/collections.service.ts: `await this.prisma.collection.delete({ where: { id } }); // items cascade`), and nothing in that path touches the images. Verified against the code on 2026-08-18.
What each delete actually removes
Four facts cover almost every version of this question. Each one is read from the product code rather than from the interface copy.
- A collection delete removes the collection row and its membership links - nothing else.
- apps/api/src/collections/collections.service.ts: `await this.prisma.collection.delete({ where: { id } }); // items cascade`. The images stay in your library, and other collections keep their own links to those images.
- An image delete leaves the membership row in place.
- apps/api/src/collections/collections.service.ts: `// Only active (not soft-deleted, not purged) generations are considered members — deleted/purged items`. The image drops out of the collection view and out of its count, but its place in the collection is still recorded.
- A restored image reappears in the same collection.
- Because the membership row was never removed, restoring the image restores its place along with it. You do not have to file it again.
- The same image in several collections is one record, not copies.
- packages/db/prisma/schema.prisma: `@@unique([collectionId, generationId])`. Uniqueness applies to the pair, so an image cannot be added to a single collection twice while it can belong to many collections at once. Deleting it removes it from every one of them at the same time.
Side by side
The same six questions, answered for each of the two deletions.
| Question | Deleting an image | Deleting a collection |
|---|---|---|
| Where does it go? | To the Deleted tab, where it can be restored | Nowhere - the collection row is removed outright |
| Can it be undone? | Yes, by restoring it | No - there is no trash and no restore for collections |
| What happens to the images? | The image is the thing being removed | Untouched - they stay in your library |
| What happens to the membership links? | Kept, which is why a restore returns the image to the same collection | Deleted together with the collection |
| What about other collections? | The shared record leaves every collection it sits in, at once | Only this collection's links go; other collections keep theirs |
| Does the app ask first? | Not described on this page | Yes - the interface shows a confirmation dialog before deleting |
What comes back, and what does not
Restoring an image returns two things at once: the image, and its filing. It reappears in the same collection, because the membership row stayed behind while the image was deleted. That is why a mistaken image delete costs you nothing but the round trip: you do not have to file it again afterwards.
Deleting a collection returns nothing, because nothing was held. What comes back afterwards is only what was never lost: the images, still in your library, now ungrouped.
There is one case where the link is destroyed as well. When an image is removed permanently, its collection memberships are deleted with it (apps/api/src/generation/generation.service.ts: `await this.prisma.collectionItem.deleteMany({`), and the record cannot return to any collection. Verified 2026-08-18. The controls that lead to that state, and the confirmations around them, belong to the Deleted tab and are described there rather than here.
What this page does not settle
This page is about which records a delete removes. Several neighbouring questions are deliberately left to the pages that own them.
- Whether the file itself is really gone, and what happens to it afterwards, is a separate question and is not answered here. No retention, privacy or compliance statement is made or implied by anything on this page.
- The Deleted tab itself - how you reach it, the control that restores an item, and the confirmation that removes one for good - is described on its own page, not on this one.
- The findings here come from the API and the mobile client. Whether collections appear anywhere else, such as a web or admin surface, is outside what this evidence covers.
- Sharing a collection, exporting one, searching inside one or ordering it by hand are not covered here; nothing on this page should be read as a statement about whether such features exist.
Questions
If I delete a collection, do I lose the photos inside it?
No. Deleting a collection removes the collection and the links that placed images in it; the images themselves are untouched and stay in your library (apps/api/src/collections/collections.service.ts: `await this.prisma.collection.delete({ where: { id } }); // items cascade`). What you lose is the grouping.
Can I get a deleted collection back?
No. Collections have no trash and no restore - the row is removed outright, and the app shows a confirmation dialog before doing it. Because the images survive, the only way back is to create the collection again and file them into it.
I deleted an image that was in a collection. If I restore it, do I have to add it back?
No. The membership record stays in place while the image is deleted (apps/api/src/collections/collections.service.ts: `// Only active (not soft-deleted, not purged) generations are considered members — deleted/purged items`), so a restored image reappears in the same collection on its own.
The same image is in several collections. What happens if I delete it?
It is one shared record rather than a set of copies - the database only enforces uniqueness on the collection-and-image pair (packages/db/prisma/schema.prisma: `@@unique([collectionId, generationId])`) - so it leaves every one of those collections at the same time and each count drops. Restoring it reverses that, because the membership rows were never removed.