From 2cf6866c10e7e7219ffcf205b33744972dbed866 Mon Sep 17 00:00:00 2001 From: JoeMakuta Date: Thu, 26 Mar 2026 11:59:04 +0200 Subject: [PATCH 1/3] Add loader on new chat route --- .../new-chat/[[...chat_id]]/page.tsx | 38 ++-------------- .../[search_space_id]/new-chat/loading.tsx | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx diff --git a/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx index 8578d2dcb..1cbfca2df 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx @@ -74,6 +74,7 @@ import { trackChatMessageSent, trackChatResponseReceived, } from "@/lib/posthog/events"; +import Loading from "../loading"; /** * After a tool produces output, mark any previously-decided interrupt tool @@ -1527,40 +1528,7 @@ export default function NewChatPage() { // Show loading state only when loading an existing thread if (isInitializing) { return ( -
-
- {/* User message */} -
- -
- - {/* Assistant message */} -
- - - -
- - {/* User message */} -
- -
- - {/* Assistant message */} -
- - - -
-
- - {/* Input bar */} -
-
- -
-
-
+ ); } @@ -1597,4 +1565,4 @@ export default function NewChatPage() { ); -} +} \ No newline at end of file diff --git a/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx b/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx new file mode 100644 index 000000000..1f47fb95a --- /dev/null +++ b/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx @@ -0,0 +1,45 @@ +import { Skeleton } from "@/components/ui/skeleton"; + +export default function Loading() { + return ( +
+
+ {/* User message */} +
+ +
+ + {/* Assistant message */} +
+ + + +
+ + {/* User message */} +
+ +
+ + {/* Assistant message */} +
+ + + +
+ + {/* User message */} +
+ +
+
+ + {/* Input bar */} +
+
+ +
+
+
+ ); +} From 80ede9849ab5feed4c0cb3be0935422315811d1f Mon Sep 17 00:00:00 2001 From: JoeMakuta Date: Thu, 26 Mar 2026 12:19:18 +0200 Subject: [PATCH 2/3] Add loading od logs route --- .../[search_space_id]/logs/loading.tsx | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 surfsense_web/app/dashboard/[search_space_id]/logs/loading.tsx diff --git a/surfsense_web/app/dashboard/[search_space_id]/logs/loading.tsx b/surfsense_web/app/dashboard/[search_space_id]/logs/loading.tsx new file mode 100644 index 000000000..318c2836b --- /dev/null +++ b/surfsense_web/app/dashboard/[search_space_id]/logs/loading.tsx @@ -0,0 +1,136 @@ +"use client"; + +import { motion } from "motion/react"; +import { Skeleton } from "@/components/ui/skeleton"; + +export default function Loading() { + return ( + + {/* Summary Dashboard Skeleton */} + + {[...Array(4)].map((_, i) => ( +
+
+ + +
+
+ + +
+
+ ))} +
+ + {/* Header Section Skeleton */} + +
+ + +
+ +
+ + {/* Filters Skeleton */} + +
+ + + + +
+
+ + {/* Table Skeleton */} + + {/* Table Header */} +
+ + + + + + + +
+ + {/* Table Rows */} + {[...Array(6)].map((_, i) => ( +
+ + + +
+ + +
+
+ + +
+
+ + +
+ +
+ ))} +
+ + {/* Pagination Skeleton */} +
+ + + + + + + + + +
+ + + + +
+
+
+ ); +} From d535851ad51ad574fd99664ec553c13786b0e5b5 Mon Sep 17 00:00:00 2001 From: JoeMakuta Date: Thu, 26 Mar 2026 12:44:46 +0200 Subject: [PATCH 3/3] Add loader to more-pages route --- .../dashboard/[search_space_id]/more-pages/loading.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 surfsense_web/app/dashboard/[search_space_id]/more-pages/loading.tsx diff --git a/surfsense_web/app/dashboard/[search_space_id]/more-pages/loading.tsx b/surfsense_web/app/dashboard/[search_space_id]/more-pages/loading.tsx new file mode 100644 index 000000000..9a0c45f3f --- /dev/null +++ b/surfsense_web/app/dashboard/[search_space_id]/more-pages/loading.tsx @@ -0,0 +1,10 @@ +import { Skeleton } from "@/components/ui/skeleton"; + +export default function Loading() { + return ( +
+ + +
+ ); +}