From 9f37792c8f21df4ea61df854c0c22f81e26fad02 Mon Sep 17 00:00:00 2001 From: Justin Milner Date: Fri, 3 May 2024 11:41:09 -0400 Subject: [PATCH] Add indexingNotLoaded state --- gui/src/components/Layout.tsx | 2 +- .../components/loaders/IndexingProgressBar.tsx | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 5e1820e45..1c8b52cda 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -191,7 +191,7 @@ const Layout = () => { } }, [location]); - const [indexingProgress, setIndexingProgress] = useState(1); + const [indexingProgress, setIndexingProgress] = useState(-1); const [indexingTask, setIndexingTask] = useState("Indexing Codebase"); const [indexingFailed, setIndexingFailed] = useState(false); diff --git a/gui/src/components/loaders/IndexingProgressBar.tsx b/gui/src/components/loaders/IndexingProgressBar.tsx index 744713dfc..170a7fd03 100644 --- a/gui/src/components/loaders/IndexingProgressBar.tsx +++ b/gui/src/components/loaders/IndexingProgressBar.tsx @@ -88,7 +88,18 @@ const IndexingProgressBar = ({ className="cursor-pointer" > { - indexingFailed ? ( //red 'failed' dot + completed < 0 ? ( // + <> + + {tooltipPortalDiv && + ReactDOM.createPortal( + + Codebase indexing is starting up. + , + tooltipPortalDiv, + )} + + ) : indexingFailed ? ( //red 'failed' dot <> {tooltipPortalDiv && @@ -99,7 +110,7 @@ const IndexingProgressBar = ({ tooltipPortalDiv, )} - ) : completed >= total ? ( //indexing complete green dot + ) : completed >= total ? ( //indexing complete green dot <> {tooltipPortalDiv &&