From cfd6af4be08dbc6b91bddd9b583bba765d77fe90 Mon Sep 17 00:00:00 2001 From: "kemal.earth" <606977+kemaldotearth@users.noreply.github.com> Date: Wed, 15 Jul 2026 14:42:51 +0100 Subject: [PATCH] fix(studio): autoscaling marker positioning (#47958) ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Small UI fix to stop things bundling into each other on smaller viewports. Autoscaling marker moves from bottom to top to preserve structural integrity. | Before | After | |--------|--------| | Screenshot 2026-07-15 at 11 28 07 | Screenshot 2026-07-15 at 11 28
15 | ## Summary by CodeRabbit * **Bug Fixes** * Fixed the Autoscaling tooltip placement on the disk space bar so it consistently appears in the correct spot. * Updated the tooltip trigger to use an info icon with a static positioned tooltip, removing the previous animated trigger behavior while preserving existing tooltip content and visibility rules. * Improved tooltip/marker positioning accuracy by recalculating the horizontal placement from the independently-rounded usage segments to prevent drift. --- .../DiskManagement/ui/DiskSpaceBar.tsx | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/apps/studio/components/interfaces/DiskManagement/ui/DiskSpaceBar.tsx b/apps/studio/components/interfaces/DiskManagement/ui/DiskSpaceBar.tsx index c47a8bb2da8..1e7491d44e9 100644 --- a/apps/studio/components/interfaces/DiskManagement/ui/DiskSpaceBar.tsx +++ b/apps/studio/components/interfaces/DiskManagement/ui/DiskSpaceBar.tsx @@ -76,7 +76,14 @@ export const DiskSpaceBar = ({ form }: DiskSpaceBarProps) => { const newUsedPercentageSystem = Math.min((usedSizeSystem / newTotalSize) * 100, 100) const resizePercentage = AUTOSCALING_THRESHOLD * 100 - const newResizePercentage = AUTOSCALING_THRESHOLD * 100 + // Anchored to the actual right edge of the highlighted "border-r" zone below, rather than + // trusting resizePercentage alone, since usedPercentage* are each rounded independently and + // can drift a fraction of a percent from usedTotalPercentage. + const resizeMarkerLeftPercentage = + usedPercentageDatabase + + usedPercentageWAL + + usedPercentageSystem + + Math.max(0, resizePercentage - usedTotalPercentage) return (
@@ -166,45 +173,40 @@ export const DiskSpaceBar = ({ form }: DiskSpaceBarProps) => { )} -
- {!showNewSize && ( - -
- - -
- Autoscaling -
-
- -

- Supabase expands your disk storage automatically when the database reaches 90% - of the disk size. However, disk modifications, including auto-scaling, are - limited to 4 within a rolling 24-hour window. -

-

- If you exhaust these modifications and reach 95% of the disk space, your - project{' '} - will enter read-only mode. -

-
-
-
-
- + + +
+ +
+
+ +

Autoscaling

+

+ Supabase expands your disk storage automatically when the database reaches 90% + of the disk size. However, disk modifications, including auto-scaling, are + limited to 4 within a rolling 24-hour window. +

+

+ If you exhaust these modifications and reach 95% of the disk space, your project{' '} + will enter read-only mode. +

+
+
+
)} -
+ {!showNewSize && (