From 97f1b6197910a3bd787dd95d46c4922c37200045 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Fri, 14 Aug 2026 04:48:24 +0530 Subject: [PATCH] fix: hide the global AI chat widget on /coming-soon AiChatWidget renders unconditionally in the root layout for every route - looked out of place on the pre-launch marketing page (a floating chat bubble implying app functionality that doesn't exist yet). Hidden via a small route-exclusion set keyed off useLocation(), rather than threading a prop through every route. Co-Authored-By: Claude Sonnet 5 --- src/app.tsx | 84 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index d7e64fb..9c26c50 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,52 +1,62 @@ import { MetaProvider, Title } from "@solidjs/meta"; -import { Router } from "@solidjs/router"; +import { Router, useLocation } from "@solidjs/router"; import { FileRoutes } from "@solidjs/start/router"; -import { ErrorBoundary, Suspense } from "solid-js"; +import { ErrorBoundary, Suspense, Show } from "solid-js"; import { AuthProvider } from "~/lib/auth"; import { AiChatWidget } from "~/components/AiChatWidget"; import "./app.css"; +// Standalone pre-launch pages that shouldn't show the logged-out-app chrome +// (the AI chat widget assumes an app context - it doesn't make sense on a +// pure marketing/waitlist page). +const NO_CHAT_WIDGET_ROUTES = new Set(["/coming-soon"]); + export default function App() { return ( ( - - Nxtgauge - - ( -
-

Frontend Error

-

- A runtime error occurred while rendering this page. -

-
 {
+        const location = useLocation();
+        return (
+          
+            Nxtgauge
+            
+               (
+                  
- {String((err as any)?.message || err)} -
-
- )} - > - {props.children} - -
-
-
- )} +

Frontend Error

+

+ A runtime error occurred while rendering this page. +

+
+                      {String((err as any)?.message || err)}
+                    
+ + )} + > + {props.children} + + + + + + + ); + }} >