mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## 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).
4 lines
187 B
TypeScript
4 lines
187 B
TypeScript
import type { ProjectServiceStatus as APIProjectServiceStatus } from '@/data/service-status/service-status-query'
|
|
|
|
export type ProjectServiceStatus = APIProjectServiceStatus | 'DISABLED'
|