Commit Graph
5 Commits
Author SHA1 Message Date
Ping-Min Lin 53c3b41065 feat(studio): show Realtime on High Availability projects in production (#52091)
## Problem

The Realtime pages, publications, the Realtime toggle in the table
editor and the Realtime status on the project home are hidden for High
Availability projects outside staging and local. That was a temporary
gate while Realtime on High Availability projects was validated, and the
platform now registers those projects as Realtime tenants.

## Solution

Remove the gate instead of flipping a default. It always resolved to
available once enabled, so keeping `resolveRealtimeUnavailable` and its
second argument would only leave dead code:

- `useHighAvailability.ts`: drop `resolveRealtimeUnavailable` and
`useIsRealtimeUnavailable`.
- `RealtimeLayout`, the two publications pages and `ServiceStatus`: drop
the "unavailable on High Availability projects" states.
`PublicationsAvailability` and `resolveRealtimeServiceStatus` are
deleted.
- `TableEditor`: `TableRealtimeToggle` no longer takes the unavailable
and pending props, and the toggle is never forced off.
- Tests for the removed code are deleted, and the toggle test now covers
the toggle itself.

Whether a project is actually registered as a Realtime tenant is still
decided by the platform, so this should land after the platform change.

## Review instructions

1. On a High Availability project, open Realtime in the sidebar: the
inspector, policies and settings pages load instead of the "unavailable"
empty state.
2. Open Database > Publications: the list loads.
3. Open the table editor's new-table panel: the "Enable Realtime"
checkbox is enabled.
4. On the project home, the Realtime service reports its health check
status instead of "Disabled".
5. A standard (non-High Availability) project looks the same as before.

`pnpm vitest run` on the affected folders passes (28 files, 184 tests).
2026-10-21 12:40:57 -07:00
Ping-Min Lin 1ee88e0fee feat(studio): show Realtime on High Availability projects in staging (#51372)
## What kind of change does this PR introduce?

Feature, limited to staging and local.

## What is the current behavior?

On High Availability projects, Studio always disables Realtime: the
Realtime pages and the Publications pages show an "unavailable" message,
the table editor's "Enable Realtime" checkbox is disabled, and the
project home shows Realtime as disabled.

## What is the new behavior?

A new `useIsRealtimeUnavailable()` hook treats Realtime as unavailable
only on High Availability projects outside staging and local (via
`IS_STAGING_OR_LOCAL`). Those four places use it instead of checking
`high_availability` directly.

- **Production:** unchanged.
- **Staging and local:** Realtime behaves as on standard projects.

## Additional context

Whether a High Availability project is actually registered as a Realtime
tenant is gated separately on the platform side. Until then, the pages
render but Realtime connections for that project fail.

Tests: a new `resolveRealtimeUnavailable` test, and the
`TableRealtimeToggle` and `resolveRealtimeServiceStatus` tests updated
for the renamed parameter.
2026-10-08 14:05:37 -07:00
Joshen Lim 102d3d1df5 Disable disk management for HA projects (#49633)
## Context

As per PR title, disables disk management for HA projects, which
involves
- Disabling "Increase disk size" CTAs in reports/database and the old
disk config settings in database/settings
- Disabling all input fields related to disk management in
settings/infrastructure
<img width="1076" height="857" alt="image"
src="https://github.com/user-attachments/assets/bfbdfc36-8ae3-41ce-af12-c05b46e620f4"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added High Availability notices and restrictions throughout disk
management settings.
* Disabled disk size, IOPS, throughput, and autoscaling controls where
High Availability limits changes.
  * Added explanatory tooltips for restricted disk-size actions.
* Updated database observability controls to reflect High Availability
restrictions.

* **Accessibility**
* Added an accessible label to the database observability refresh
button.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-27 22:17:34 +08:00
Alaister YoungandAlaister Young 0fe2366659 [FE-3790] fix(studio): hide Multigres from user-facing surfaces (#48191)
Hides the "Multigres" term from user-facing surfaces — it's the tech
powering High Availability projects, but "High Availability" is the only
term users should see for now (per Slack discussion with Saxon/Ivan).

**Changed:**
- High Availability badge hover card (project overview) no longer says
"Driven by Multigres"
- Project creation HA toggle description drops the Multigres name +
multigres.com link, keeps the informational copy
- All schema dropdowns now hide the `multigres` schema on HA projects,
by wiring in the previously-unused `filterSchemasForHighAvailability`
helper:
- `SchemaSelector` (shared — Table Editor, Functions, Indexes, Triggers,
Schema Visualizer, etc.)
  - `ExposedSchemaSelector` (API settings → exposed schemas)
- `EnableExtensionModal`, `CreateIndexSidePanel`, `ForeignKeySelector`,
`WrapperTableEditor`, Integrations install sheet `AdvancedSettings`
  - SQL editor schema autocomplete (`useAddDefinitions`)
- Schema list computations in the touched components are now memoized
(incl. stabilizing `SchemaSelector`'s `excludedSchemas` default so the
memo actually holds)

**Added:**
- Unit tests for `filterSchemasForHighAvailability` /
`resolveHighAvailability`
- MSW component test for `SchemaSelector` asserting `multigres` is
hidden on HA projects and still shown on non-HA projects

The filter is HA-gated on purpose: a self-hosted/non-HA user with their
own schema named `multigres` still sees it. The flag-gated Multigres
option in Logs is intentionally untouched — that exposure is kept for
the Multigres team's debugging (separate track).

## To test

- On an HA project (`high_availability: true`): hover the High
Availability badge on project overview — no "Multigres" mention; open
schema dropdowns in Table Editor / Database pages / SQL editor
autocomplete — no `multigres` schema
- Project creation with HA entitlement: toggle description has no
Multigres wording/link
- On a non-HA project: schema dropdowns behave as before

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Improvements**
* Made schema dropdowns and related selectors high-availability aware
across extensions, indexes, integrations, SQL editing, API exposed
schemas, and relationship editors.
* Updated project high-availability UI text and badge hover description
to remove outdated branding and clarify horizontally scalable Postgres
architecture.
* **Tests**
* Added coverage to ensure the schema “multigres” option is hidden/shown
correctly based on high availability, and validated high-availability
value handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-07-23 00:08:11 +08:00
Saxon FletcherandClaude Opus 4.8 143769afac feat(studio): shared High Availability disabled hook and UI primitives (#47322)
Add generic building blocks for blocking features on High Availability
projects:

- useHighAvailability hook: HA state only (isHighAvailability,
isPending)
- HighAvailabilityDisabledEmptyState (full-page empty state)
- HighAvailabilityDisabledSectionNotice (in-section admonition)

The components carry a generic default title/description; consuming
pages pass their own copy via props. HA state is read from the project's
high_availability flag (same source as the High Availability badge on
the project home page).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added clearer messaging for features that aren’t available in High
Availability projects.
* Introduced a standard High Availability status check to help the app
adapt what it shows.
* **Bug Fixes**
* Hid non-applicable schema options when High Availability is enabled,
reducing confusion in selection lists.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 16:08:24 +08:00