From 0879eff45960f81bb9aa4242e758d667d8e8eee7 Mon Sep 17 00:00:00 2001 From: The-AarushiSingh <175547726+The-AarushiSingh@users.noreply.github.com> Date: Sat, 11 Jul 2026 17:35:40 +0530 Subject: [PATCH] fix: show error state when repository status fails to load --- .../[repo]/components/repoIndexedGuard.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx b/packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx index 863f9b284..606b3f709 100644 --- a/packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx +++ b/packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx @@ -1,9 +1,10 @@ 'use client'; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { ServiceError } from "@/lib/serviceError"; import { unwrapServiceError } from "@/lib/utils"; import { useQuery } from "@tanstack/react-query"; -import { Loader2 } from "lucide-react"; +import { AlertCircle, Loader2 } from "lucide-react"; import { usePrevious } from "@uidotdev/usehooks"; import { useEffect } from "react"; import { useBrowserNotification } from "@/hooks/useBrowserNotification"; @@ -61,8 +62,17 @@ export function RepoIndexedGuard({ initialRepoInfo, children }: Props) { }, [previousIsIndexed, repoInfo.isIndexed, repoInfo.displayName, repoInfo.name, repoInfo.imageUrl, showNotification]); if (isError) { - // todo - return null; + return ( +
+ + + Unable to load repository status + + Please refresh the page or try again shortly. + + +
+ ); } if (!repoInfo.isIndexed) {