mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
create-pull-request/patch
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f38928ad90 |
fix(studio): resolve disk limits from the project's instance configuration (#52367)
## Problem Studio validates disk IOPS/throughput against one minimum value per compute size. Projects whose hardware supports more get blocked below their actual limits, charts and banners can show the wrong baseline, and burst charts are gated by a hardcoded size list that is wrong for some configs. Fixes PROD-674 ## What changed - New per-configuration limits table: `packages/shared-data/instance-disk-limits.ts` (values from the AWS EBS-optimized tables). - The size-wide floors in `compute-disk-limits.ts` are now derived from that table as per-size minimums. Published values are unchanged and pinned in tests. - New `useProjectDiskLimits()` resolves a project's limits from its primary database, falling back to the floors. - Disk form validates against the project's actual limits (floors when a different compute size is selected). New inline hint when provisioning between baseline and max. - Burst charts/tiles/metrics show only if baseline is below max. - Chart reference lines and the disk IO banner use the resolved values. ## How to test 1. Settings → Database → Disk on a Large+ project: IOPS/throughput accept values up to the project's actual limits, error above them, and show the burst hint between baseline and max. 2. Reports: burst metrics are offered only for projects whose disk IO bursts; a saved burst chart on a non-bursting project renders an "unavailable" placeholder instead. 3. `pnpm --filter studio vitest run components/interfaces/DiskManagement/DiskManagement.test.ts data/reports/database-charts.test.ts` --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
4825c6d9f5 |
fix(studio): clarify disk IO balance FDBKPRI-2885 (#51943)
## Problem Infrastructure and Observability label consumed disk IO burst credits as “Disk IO,” so a value of 1% appears inconsistent with a remaining balance of 99% in AWS or Grafana. Both surfaces request `disk_io_consumption`, which is the inverse of `disk_io_budget`. ## Fix Show `disk_io_budget` as “Disk IO balance” and explain that it represents the lower of the remaining throughput and IOPS burst balances. Infrastructure shows the lowest sampled balance over seven days; Observability shows the selected-window average. Keep Infrastructure's overall Compute score based on consumed credits, so a full balance stays healthy and a low balance still warns. Missing balance remains unavailable. Update the compute and disk guide and disk IO troubleshooting page to explain the remaining balance, its direction, and the different aggregation windows. ## How to test - Open Infrastructure settings for a project with burstable IO. Verify the balance headline and chart show remaining credits, with 100% full and 0% exhausted. - Open Observability and verify “Disk IO balance” shows the average remaining balance for the selected window. - Hover the labels to check the explanation and aggregation window. - Verify a high balance does not inflate Compute usage, a low balance raises the warning, and missing balance does not appear as 0% or 100%. - Focused unit and MSW component tests: 79 passed, including shuffled runs with retries disabled; regression mutations caught wrong metric selection, reversed pressure, and maximum-versus-minimum selection. ## Validation Studio typecheck, changed-file ESLint, and Prettier pass locally. Verified both surfaces on the deployed preview, including Observability refresh and the balance tooltip. Documentation formatting and review pass. The local markdown build is blocked by missing generated federated content and its GitHub credentials; docs CI validates the deployed build. ## Screenshots Same project on `supabase.green` (before) and the PR preview (after), captured October 20. Infrastructure uses the same seven-day window; Observability uses Last 24 hours. ### Infrastructure | Before | After | | --- | --- | |  |  | ### Observability | Before | After | | --- | --- | |  |  | Observability balance explanation:  Fixes FDBKPRI-2885 |
||
|
|
09a1f431bc |
Mass update for all lucide icon imports to use the component with Icon suffix (#51659)
## Context This is largely just a mechanical change here: Opting to use lucide icons with the `Icon` suffix across all icon imports within `studio` - so that it’s clearer which components are icons + reduces the possibility of name collision with our own components - e.g <User /> vs <UserIcon /> Also added a eslint rule for this: <img width="1069" height="167" alt="image" src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc" /> And updated `AGENTS.md` as such: ``` Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced). ``` |
||
|
|
d067e81a69 |
fix(ui): align primary colours across text, buttons, and controls (#50697)
## Problem Primary colour serves readable text and selected controls, but those uses need different shades. Light mode needs darker text, while dark mode needs a deeper button fill. Fixed brand green on interactive chrome also prevents a custom primary hue from carrying through the interface. Some slider tracks and selected text are hard to read. ## Solution - Keep `--primary` for accessible text and small selected indicators. Use `--primary-solid` for button fills, which need a deeper shade in dark mode. - Add `--primary-bright` for focus rings, selected control chrome, chart accents, and other interactive highlights. It follows `--primary-hue`; `brand-*` stays fixed for Supabase identity. - Make slider troughs clearer and text selection translucent with theme foreground text. - Document the split in the design-system colour guide. | Before | After | | --- | --- | | <img width="980" height="244" alt="Before: light mode primary controls" src="https://github.com/user-attachments/assets/dfae325d-0dfe-4231-8bcd-3f89c4b9d793" /> | <img width="982" height="204" alt="After: light mode primary controls" src="https://github.com/user-attachments/assets/5fdcb531-a6e3-4549-8a13-9d9a5ebe6e20" /> | | <img width="610" height="120" alt="Before: slider track" src="https://github.com/user-attachments/assets/04f768e0-51e8-4d06-9b97-c52f4a34f122" /> | <img width="622" height="126" alt="After: slider track" src="https://github.com/user-attachments/assets/95127f4e-13dc-4f0f-b63c-cf5d70a28b42" /> | | <img width="652" height="512" alt="Before: dark mode controls" src="https://github.com/user-attachments/assets/3f88de66-90cc-40ee-8cf1-b5f4eb87b09a" /> | <img width="658" height="498" alt="After: dark mode controls" src="https://github.com/user-attachments/assets/906bec30-6ca1-4614-9fb3-6cf5e5feec22" /> | ## Review instructions 1. Compare light and dark mode in the [colour usage guide](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#primary-and-brand-colors). Check primary ink, primary-solid, primary-bright, and fixed brand swatches. 2. In Studio, open the ‘new table’ sheet in [Table Editor](https://studio-staging-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/dashboard/project/_/editor). Tab through the new table sheet's fields and toggles. Check the focus rings, selected controls, and the sheet's edges in both themes. You do not need to save a table. 3. Select text in Studio in both themes, including a link or primary-coloured label. The selection and text should remain legible. 4. Check the [Field](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/field) Price Range slider: the unused track should remain visible in both themes. The selected field card border should follow primary-bright. 5. Check the [Button](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/button) and [Radio Group](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/radio-group) previews. In dark mode, `primary` button fill should be deeper than primary [text](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#text); selected radios should remain readable. |
||
|
|
b455d871e5 |
Add compute and disk usage charts (#48369)
## Summary This is the second step towards merging compute and disk with infrastructure. There are some usage charts on the current infrastructure page that are useful to have in the context of compute and disk settings. This branch adds two charts which give a general sense of usage and whether an upgrade needs to happen. Other data points in infrastructure can be found within observability and organisation usage. - Adds rolling seven-day Compute and Disk charts to the existing Compute and Disk page. - Shows CPU, memory, optional burstable disk IO, and disk usage split into database, WAL, and system data. - Covers loading, error, empty, warning, and critical states, retaining the 75% warning and 90% critical thresholds. - Uses a dedicated PageSection and keeps the charts in two columns from 680px. - Uses the concise primary labels Compute and Disk, removes the database report link, and removes tooltip icons from secondary metrics. - Adds transformation, summary, and component tests covering dedicated IO behavior, legacy anchors, responsive layout, rolling refetch, and tooltip behavior. ## Stack 1. #48368 2. #48369 (this PR) 3. #48370 ## How to test 1. Check out `chore/infra-compute-2-charts` and start Studio with `pnpm dev:studio`. 2. Open `/project/<ref>/settings/compute-and-disk` on a project with recent metrics. 3. Confirm the charts are in their own page section with standard spacing below the page header. 4. Confirm the Compute chart shows CPU and memory, plus disk IO when applicable, and the Disk chart splits usage into database, WAL, and system data. 5. Confirm the primary labels are Compute and Disk, secondary metrics do not show tooltip icons, and there is no Database Observability/report link. 6. Resize across 680px. The charts should remain in two columns at and above the breakpoint and stack into two rows below it. 7. Exercise loading, error, empty, warning, and critical responses with the metrics mocks or response overrides. Confirm warning styling begins at 75%, critical styling begins at 90%, and an error or empty response does not break the configuration form. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added compute and disk usage charts to the disk management interface, including metric cards for CPU, memory, disk I/O, database, WAL, and system. * Added usage status indicators, peak calculations, tooltips, and a detailed disk breakdown with placeholders when data is missing. * Added special handling for dedicated-I/O instances to hide burst-only disk I/O. * **Style** * Simplified the disk space display by removing supplemental explanatory text. * **Tests** * Added comprehensive test coverage for chart rendering, loading/error/empty states, status/peak calculations, and rolling 7-day data window behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |