Files
supabase/packages/common
Francesco SansalvadoreandClaude Sonnet 5 84115482be feat(studio): storage lifecycle policies UI (#52318)
## Problem

Lifecycle policies can only be set with an abstracted ui that hides the
actual underlying policies but the user can still modify the policies
via api, which would result in an un-documented drift from the policies
set via said abstracted ui.

## Solution

Show ui with list of effective policies applied and show if the policies
drifted in a way that is incompatible with the abstracted ui in the
"Create/Edit bucket modal".

<img width="1489" height="800" alt="Screenshot 2026-10-26 at 18 35 39"
src="https://github.com/user-attachments/assets/9e64f123-c06e-4cfe-9dba-839fae61c845"
/>

<img width="1439" height="847" alt="Screenshot 2026-10-26 at 18 35 50"
src="https://github.com/user-attachments/assets/a32d3a27-6719-48b3-abd2-fb134158bd96"
/>

<img width="654" height="316" alt="Screenshot 2026-10-26 at 18 36 38"
src="https://github.com/user-attachments/assets/0710c139-9b64-42f7-b410-c1a351b1f616"
/>

This PR also updates copywriting around the effects procured by the
lifecycle policies settings in the bucket settings modal.

<img width="704" height="440" alt="Screenshot 2026-10-26 at 18 35 17"
src="https://github.com/user-attachments/assets/f4fa03d1-e11b-4d08-b4f5-d94b2d9350a3"
/>

<img width="351" height="82" alt="Screenshot 2026-10-26 at 18 35 28"
src="https://github.com/user-attachments/assets/6ff1e149-92e0-4fd8-bfb5-0177afe207aa"
/>

## To review

- create a file storage bucket, enable object versioning and set some
lifecycle policy values
- once created, go to /project/_/storage/files/policies and find the
bucket policies or navigate to it from the "Edit bucket settings" via
the "View rules" button
<img width="1133" height="725" alt="Screenshot 2026-10-27 at 14 50 52"
src="https://github.com/user-attachments/assets/ef014f7a-5db6-413a-af53-a5648309b2c3"
/>
- adding extra policies should result in a "This bucket has a custom
lifecycle policy" message in the edit bucket modal

<img width="557" height="130" alt="Screenshot 2026-10-27 at 14 52 23"
src="https://github.com/user-attachments/assets/cde29748-65d9-45b5-a54b-55737d78d311"
/>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-28 11:43:00 +01:00
..
2026-10-22 17:30:49 +02:00
2026-07-08 23:21:48 +08:00