From 6868ef7b07bb39daa008328bdbd3a52465d6dbf3 Mon Sep 17 00:00:00 2001 From: Ali Waseem Date: Thu, 19 Feb 2026 07:36:15 -0700 Subject: [PATCH] fix: update users table in case project status is unreachable (#42779) ## 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? This lead to a bad experience where project status was not reachable and caused the query to show zero users. --------- Co-authored-by: Ivan Vasilov --- .../interfaces/Auth/Users/UsersV2.tsx | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx index ae210967cf4..97d62ca60c9 100644 --- a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx +++ b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx @@ -75,6 +75,7 @@ import { import { formatUserColumns, formatUsersData } from './Users.utils' import { UsersFooter } from './UsersFooter' import { UsersSearch } from './UsersSearch' +import { PROJECT_STATUS } from '@/lib/constants/infrastructure' const SORT_BY_VALUE_COUNT_THRESHOLD = 10_000 const IMPROVED_SEARCH_COUNT_THRESHOLD = 10_000 @@ -90,7 +91,11 @@ limit 100` export const UsersV2 = () => { const queryClient = useQueryClient() const { ref: projectRef } = useParams() - const { data: project } = useSelectedProjectQuery() + const { + data: project, + isPending: isPendingProject, + isError: isProjectError, + } = useSelectedProjectQuery() const { data: selectedOrg } = useSelectedOrganizationQuery() const gridRef = useRef(null) const xScroll = useRef(0) @@ -283,6 +288,7 @@ export const UsersV2 = () => { data, error, isSuccess, + isPending, isLoading, isRefetching, isError, @@ -802,7 +808,21 @@ export const UsersV2 = () => { /> ) }, - noRowsFallback: isLoading ? ( + noRowsFallback: isPendingProject ? ( +
+ +
+ ) : project?.status !== PROJECT_STATUS.ACTIVE_HEALTHY || isProjectError ? ( +
+ +
+ ) : isPending ? (
@@ -810,7 +830,7 @@ export const UsersV2 = () => {
- ) : ( + ) : isSuccess ? (
@@ -826,7 +846,7 @@ export const UsersV2 = () => {

- ), + ) : null, }} />