mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
Fixes FE-4128. ## What is the current behavior? When updating the global Storage file size limit using a unit other than MB, the selected unit displays an incorrect value after navigating away from the Storage settings page and returning. The updated file size is persisted correctly by the API, but the unit selector does not always reflect the value derived from the persisted configuration. The Save button also remains enabled after successfully saving the updated configuration. ## What is the new behavior? The file size unit selector now correctly reflects the unit derived from the persisted global file size limit after saving and navigating between pages. The form state is also correctly synchronized with the latest Storage configuration after an update, so the Save button returns to its disabled state once the changes have been persisted. ## Additional context The Storage API persists the global file size limit in bytes rather than persisting the selected display unit separately. The dashboard derives the appropriate unit (MB/GB) from the stored byte value when loading the configuration. The issue was caused by the unit Select retaining stale internal state when the form values were reset after the Storage configuration was loaded/refetched. Ensuring the Select is refreshed when the controlled unit changes keeps the displayed unit synchronized with the form state. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved storage settings form initialization when configuration and entitlements load. * Ensured storage unit selections and placeholders display consistently. * Improved form resetting to reflect the latest loaded settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->