## 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
## 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>