diff --git a/apps/studio/components/interfaces/Storage/Trash/Trash.tsx b/apps/studio/components/interfaces/Storage/Trash/Trash.tsx index fb04bfa5663..c4881a611c9 100644 --- a/apps/studio/components/interfaces/Storage/Trash/Trash.tsx +++ b/apps/studio/components/interfaces/Storage/Trash/Trash.tsx @@ -9,6 +9,8 @@ import { PageContainer } from 'ui-patterns/PageContainer' import { PageSection, PageSectionContent } from 'ui-patterns/PageSection' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' +import { StorageBucketSelector } from '../StorageBucketSelector' +import { TrashList } from './TrashList' import { AlertError } from '@/components/ui/AlertError' import { usePaginatedBucketsQuery } from '@/data/storage/buckets-query' import { @@ -16,8 +18,6 @@ import { useBucketTrashRestoreMutation, } from '@/data/storage/protection/bucket-trash-query' import { type TrashObject } from '@/data/storage/protection/protection-mocks' -import { StorageBucketSelector } from '../StorageBucketSelector' -import { TrashList } from './TrashList' export const Trash = () => { const { ref } = useParams() @@ -72,11 +72,11 @@ export const Trash = () => { {isPending && } - {isError && } + {isError && } {isSuccess && objects.length === 0 && ( )} @@ -92,7 +92,7 @@ export const Trash = () => {

Items held by a snapshot stay recoverable — and billable — until every snapshot - referencing them is deleted, even past their trash retention. + referencing them is deleted, even past their retention period.

)} diff --git a/apps/studio/components/layouts/StorageLayout/StorageBucketsLayout.tsx b/apps/studio/components/layouts/StorageLayout/StorageBucketsLayout.tsx index bbae8133fec..0b24849f494 100644 --- a/apps/studio/components/layouts/StorageLayout/StorageBucketsLayout.tsx +++ b/apps/studio/components/layouts/StorageLayout/StorageBucketsLayout.tsx @@ -44,7 +44,7 @@ export const StorageBucketsLayout = ({ href: `/project/${ref}/storage/files/snapshots`, }, { - label: 'Trash', + label: 'Deleted files', href: `/project/${ref}/storage/files/trash`, }, ] diff --git a/apps/studio/pages/project/[ref]/storage/files/buckets/[bucketId].tsx b/apps/studio/pages/project/[ref]/storage/files/buckets/[bucketId].tsx index 5fa630e34f2..60966a3d8fa 100644 --- a/apps/studio/pages/project/[ref]/storage/files/buckets/[bucketId].tsx +++ b/apps/studio/pages/project/[ref]/storage/files/buckets/[bucketId].tsx @@ -104,7 +104,7 @@ const BucketPage: NextPageWithLayout = () => { - Trash + Deleted files )} diff --git a/design/storage-snapshots-versioning/DEMO-SCRIPT-AND-UPDATE.md b/design/storage-snapshots-versioning/DEMO-SCRIPT-AND-UPDATE.md index 2063a2f155c..76e1ed63749 100644 --- a/design/storage-snapshots-versioning/DEMO-SCRIPT-AND-UPDATE.md +++ b/design/storage-snapshots-versioning/DEMO-SCRIPT-AND-UPDATE.md @@ -25,8 +25,8 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr - Restore an older version; call out that it's **non-destructive** (promotes to a new current version, old current becomes noncurrent). - Show a version **pinned by a snapshot** blocking hard-delete — this is the direct answer to "when do I actually stop paying for this." -### Beat 3 — Trash (1–2 min) -**Storage → Files → Trash tab** +### Beat 3 — Deleted files (1–2 min) +**Storage → Files → Deleted files tab** - Soft-deleted objects, an "auto-removes" column, one-click restore. - Same "held by snapshot" state appears here too — one consistent mental model across both surfaces. @@ -53,7 +53,7 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr - Vision tie-in: three primitives, Postgres as source of truth, branching as the default recovery path. Nothing here required a fourth primitive. - **Ask the room:** - Storage: does branch-first restore hold up against how storage branching is actually sequenced (2026–2027 per the vision)? - - Storage: per-bucket Trash, or project-wide? + - Storage: per-bucket Deleted files, or project-wide? - Design: does the platform reframe (coverage chips, "restore point" language) read as coherent, or is it doing too much in one screen? --- @@ -74,12 +74,12 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr > > So the prototype now treats a database backup as a restore point for the **environment** — Database, Storage, and Config — rather than a database artifact with a Storage bolt-on. Concretely: each backup shows coverage across all three; restoring defaults to a new preview branch (cheap, reversible, verify-then-promote), with in-place restore as an explicit, warned-against escape hatch; and the coverage gap — buckets without snapshots — is named instead of silently reproducing the drift the PRFAQ set out to fix. > -> **What's built.** Real Studio components, not a static mockup, behind a prototype flag and wired to mock data since there's no backend yet: per-bucket enable with lifecycle policies, version history in the file preview pane with non-destructive restore, a Trash view, a Snapshots view with restore-with-diff, Database/Storage/Config coverage on backup rows with branch-first restore, and Storage Size in Org Usage broken into live/versions/snapshots inside the existing section. +> **What's built.** Real Studio components, not a static mockup, behind a prototype flag and wired to mock data since there's no backend yet: per-bucket enable with lifecycle policies, version history in the file preview pane with non-destructive restore, a Deleted files view, a Snapshots view with restore-with-diff, Database/Storage/Config coverage on backup rows with branch-first restore, and Storage Size in Org Usage broken into live/versions/snapshots inside the existing section. > > **What's deliberately unsolved.** The PRFAQ's own Internal FAQ was honest that the hard part is infra, not UI: event-driven lifecycle expiry, hard-delete coordination between Postgres and S3, and bucket-restore diffing at scale. None of that is in this prototype — it's all mocked. I don't think that's a gap in the demo; I think it's the right place to draw the line before a design review. > > **What I'd like from you:** -> - **Storage** — does branch-first restore hold up against how storage branching is actually sequenced? Per-bucket Trash, or project-wide? +> - **Storage** — does branch-first restore hold up against how storage branching is actually sequenced? Per-bucket Deleted files, or project-wide? > - **Design** — does the platform reframe read as coherent, or is it trying to do too much in one screen? > > I'll walk through it live, ~15 minutes. diff --git a/design/storage-snapshots-versioning/IMPLEMENTATION.md b/design/storage-snapshots-versioning/IMPLEMENTATION.md index 6916811e13a..c3de3c67dea 100644 --- a/design/storage-snapshots-versioning/IMPLEMENTATION.md +++ b/design/storage-snapshots-versioning/IMPLEMENTATION.md @@ -37,9 +37,9 @@ localized swap later): | **Snapshots (2a)** | Storage → Files → **Snapshots** tab (`/storage/files/snapshots`) | `Snapshots/Snapshots.tsx`, `SnapshotsList.tsx`, `TakeSnapshotModal.tsx`, `RestoreSnapshotModal.tsx`; page `pages/project/[ref]/storage/files/snapshots/index.tsx` (+ route) | | **Versions tab (3a)** | Storage explorer → select a file → preview pane | `StorageExplorer/VersionHistory.tsx`, tabs added to `StorageExplorer/PreviewPane.tsx` | | **Storage size breakdown (4a)** | Org → **Usage** page | `StorageRetentionUsage/StorageRetentionUsage.tsx`, mounted in `Organization/Usage/Usage.tsx` | -| **Trash (6a)** | Storage → Files → **Trash** tab (`/storage/files/trash`) | `Trash/Trash.tsx`, `TrashList.tsx`; page `pages/project/[ref]/storage/files/trash/index.tsx` (+ route) | -| Nav | Snapshots + Trash as **Files sub-tabs** (not sidebar items — they're views over file buckets, not a bucket type) | `StorageLayout/StorageBucketsLayout.tsx` | -| Shared | Bucket picker for Snapshots/Trash | `StorageBucketSelector.tsx` | +| **Deleted files (6a)** | Storage → Files → **Deleted files** tab (`/storage/files/trash`) | `Trash/Trash.tsx`, `TrashList.tsx`; page `pages/project/[ref]/storage/files/trash/index.tsx` (+ route) — internal naming ("Trash") kept for the component/route, only the displayed label changed | +| Nav | Snapshots + Deleted files as **Files sub-tabs** (not sidebar items — they're views over file buckets, not a bucket type) | `StorageLayout/StorageBucketsLayout.tsx` | +| Shared | Bucket picker for Snapshots/Deleted files | `StorageBucketSelector.tsx` | ## Verification status