From 9473d64c1dc1c2b543725d48040f0978a32f1d8f Mon Sep 17 00:00:00 2001
From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
Date: Tue, 31 Mar 2026 21:36:42 +0000
Subject: [PATCH] chore(nova): loader on initial data load (#817)

---
.../entrypoints/popup/App.tsx | 22 +++----
.../entrypoints/popup/style.css | 17 ++---
apps/browser-extension/wxt.config.ts | 20 +++++-
apps/web/components/memories-grid.tsx | 66 ++++++++++++++++---
packages/lib/auth-context.tsx | 10 ++-
5 files changed, 102 insertions(+), 33 deletions(-)
diff --git a/apps/browser-extension/entrypoints/popup/App.tsx b/apps/browser-extension/entrypoints/popup/App.tsx
index f61a2415..498a75a2 100644
--- a/apps/browser-extension/entrypoints/popup/App.tsx
+++ b/apps/browser-extension/entrypoints/popup/App.tsx
@@ -845,11 +845,11 @@ function App() {
{authInvalidated ? (
-
-
+
+
Session Expired
-
+
Logged out since authentication was invalidated. Please
login again.
@@ -857,18 +857,18 @@ function App() {
) : (
-
- Login to unlock all chrome extension features
+
+ Login to unlock all Chrome extension features
- -
+
-
Save any page to your supermemory
- -
+
-
Import all your Twitter / X Bookmarks
- -
+
-
Import your ChatGPT Memories
@@ -876,10 +876,10 @@ function App() {
)}
-
+
Having trouble logging in?{" "}
) : isPending ? (
-
-
-
+
) : showNovaEmptyState ? (
{isLoadingMore && (
-
diff --git a/packages/lib/auth-context.tsx b/packages/lib/auth-context.tsx
index 45ffc5b4..cfb9b9ab 100644
--- a/packages/lib/auth-context.tsx
+++ b/packages/lib/auth-context.tsx
@@ -24,6 +24,7 @@ interface AuthContextType {
org: Organization | null
organizations: OrganizationListItem[] | null
isRestoring: boolean
+ isSessionPending: boolean
setActiveOrg: (orgSlug: string) => Promise
updateOrgMetadata: (partial: Record) => void
refetchOrganizations: () => Promise
@@ -32,7 +33,7 @@ interface AuthContextType {
const AuthContext = createContext(undefined)
export function AuthProvider({ children }: { children: ReactNode }) {
- const { data: session } = useSession()
+ const { data: session, isPending: isSessionPending } = useSession()
const [org, setOrg] = useState(null)
const [isRestoring, setIsRestoring] = useState(true)
const {
@@ -73,6 +74,10 @@ export function AuthProvider({ children }: { children: ReactNode }) {
}, [])
useEffect(() => {
+ if (isSessionPending) {
+ return
+ }
+
if (!session?.session) {
setIsRestoring(false)
setOrg(null)
@@ -145,7 +150,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
return () => {
cancelled = true
}
- }, [session, orgsData, orgsPending, setActiveOrg])
+ }, [session, isSessionPending, orgsData, orgsPending, setActiveOrg])
useEffect(() => {
if (typeof window === "undefined") return
@@ -181,6 +186,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
org,
organizations,
isRestoring,
+ isSessionPending,
session: session?.session ?? null,
user: session?.user ?? null,
setActiveOrg,