Recycling Bin
Soft-deleted documents and folders sit in the Recycling Bin until you restore or purge them. Per-user, with cascade behaviour for folders.
When you delete a document or folder in sweetdocs, it’s soft-deleted — flagged with a deleted_at timestamp and a deleted_by user ID, but the row stays in the database. The Recycling Bin is your view of those soft-deleted items, with Restore and Delete forever for each one.
Recycling Bin
Items you've deleted. Restore puts them back where they were.
- 2026 Q1deleted 3 hours ago
- Old pricing draftdeleted yesterday
- Untitleddeleted 4 days ago
Where it lives
| Path | How to get there |
|---|---|
| Profile menu → Recycling Bin | Click your avatar bottom-left, choose “Recycling Bin” |
URL: /app/recycling-bin | Direct navigation |
The bin lives outside any library so deleted items don’t show up in your normal browsing.
What’s in it
The bin shows the items you deleted — soft-deleted documents (deleted_by = your user id) plus soft-deleted folders. Items deleted by other workspace members appear in their bin, not yours.
Each row has:
- Icon (folder or doc-type icon — markdown, SVG, table, etc.)
- Title (or “Untitled” if blank)
- Relative deletion time (“deleted 3 hours ago”)
- Per-row Restore and Delete forever buttons
The list is sorted by deletion time, newest first.
Cascade-children are hidden
When you delete a folder, every document and subfolder inside it is also soft-deleted. The bin only shows the top-level item — the folder you deleted. The descendants are still flagged, just hidden so the list stays readable.
When you restore that folder, the entire subtree comes back together. This is the right model: you don’t want to manually restore 50 docs to reverse one folder delete.
Restoring
| Action | What happens |
|---|---|
| Click Restore on a document row | deleted_at / deleted_by cleared; the doc reappears in its original folder |
| Click Restore on a folder row | The whole subtree is restored — folder, child folders, child documents — via a server-side restore_folder RPC that clears flags atomically |
If the original folder a document lived in was itself deleted (and is no longer in your bin), the restored doc lands at the library root.
Delete forever
Each row has a Delete forever button. Clicking it opens a confirmation dialog (“This will permanently delete the item. This cannot be undone.”). On confirm:
- The DB row is removed
- Associated images on storage are cleaned up
- The audit log entry stays so the deletion is recorded
This is irreversible — once a row is purged there’s no undo, no support recovery.
Empty Recycling Bin
The header has an Empty Recycling Bin button that purges every item you have in the bin at once. Same confirmation, same irreversibility, applied to the whole list.
This is useful when you’ve been cleaning up and want to free the space without per-row clicks.
Realtime updates
The Recycling Bin page subscribes to realtime changes scoped to your user ID. So:
- Soft-deleting a document in another tab makes it appear in the bin instantly
- A purge in another session removes the row immediately
- Restoring from elsewhere updates the list
You don’t need to refresh.
What’s not soft-deleted
Some things bypass the bin and are deleted immediately:
| Action | Why |
|---|---|
| Removing a comment | Comments are scoped to a doc; their own table handles tombstones |
| Removing a sharing rule (revoking access) | Not destructive to the doc |
| Image uploads orphaned during upload | Cleaned up by a background sweeper, not your bin |
| Documents created by other workspace members | They appear in their bin if they delete them, not yours |
If you accidentally delete a co-worker’s doc that you have write access to, it lands in your bin (because deleted_by = your user id). You’re the one who can restore it.
Retention
Items in the Recycling Bin are kept according to your plan’s retention window — see Plans for the per-tier numbers. After that window, a background sweeper purges them automatically; you don’t need to empty the bin manually.