From 4c0dfd1a32680b501c47a021d0127283b788e764 Mon Sep 17 00:00:00 2001 From: Ishaan Gupta Date: Fri, 8 May 2026 19:46:26 +0530 Subject: [PATCH] fix responsiveness for graph layout --- apps/web/app/(app)/page.tsx | 22 ++++------------------ apps/web/components/graph-layout-view.tsx | 13 +++++++++---- apps/web/components/mobile-banner.tsx | 23 +---------------------- 3 files changed, 14 insertions(+), 44 deletions(-) diff --git a/apps/web/app/(app)/page.tsx b/apps/web/app/(app)/page.tsx index e7d7caff..4c54f582 100644 --- a/apps/web/app/(app)/page.tsx +++ b/apps/web/app/(app)/page.tsx @@ -515,12 +515,11 @@ export default function NewPage() { const gradientTopPosition = gradientTopPositionForWidth(viewportWidth) const isChatView = viewMode === "chat" - const isGraphMode = viewMode === "graph" && !isMobile + const isGraphMode = viewMode === "graph" const isMemoriesDesktop = viewMode === "list" && !isMobile const isHomeDesktop = viewMode === "dashboard" && !isMobile const showNovaBackdrop = isGraphMode || isMemoriesDesktop || isHomeDesktop - const isDashboardShell = - viewMode === "dashboard" || (viewMode === "graph" && isMobile) + const isDashboardShell = viewMode === "dashboard" return ( @@ -629,7 +628,7 @@ export default function NewPage() { void setViewMode("integrations")} /> - ) : viewMode === "graph" && !isMobile ? ( + ) : viewMode === "graph" ? (
@@ -674,20 +673,7 @@ export default function NewPage() { ) : ( - - Graph view is available on desktop. - {" "} - Use a larger screen for the full graph, or keep - working from this home view. - - ) : undefined - } + headerNotice={undefined} highlights={highlightsData?.highlights ?? []} isLoadingHighlights={isLoadingHighlights} onAddMemory={handleAddMemory} diff --git a/apps/web/components/graph-layout-view.tsx b/apps/web/components/graph-layout-view.tsx index 0a21c357..97e6a1ab 100644 --- a/apps/web/components/graph-layout-view.tsx +++ b/apps/web/components/graph-layout-view.tsx @@ -3,6 +3,7 @@ import { memo, useCallback, useRef } from "react" import { useQueryState } from "nuqs" import Image from "next/image" +import { Share2 } from "lucide-react" import { MemoryGraph } from "./memory-graph" import { useProject } from "@/stores" import { useGraphHighlights } from "@/stores/highlights" @@ -30,7 +31,7 @@ export const GraphLayoutView = memo(function GraphLayoutView() { }, [setIsShareModalOpen]) return ( -
+
{/* Full-width graph */}
{/* Share graph button - top left */} -
+
diff --git a/apps/web/components/mobile-banner.tsx b/apps/web/components/mobile-banner.tsx index 245b6952..0f3153b3 100644 --- a/apps/web/components/mobile-banner.tsx +++ b/apps/web/components/mobile-banner.tsx @@ -1,24 +1,3 @@ -"use client" - -import { useIsMobile } from "@hooks/use-mobile" -import { cn } from "@lib/utils" - export function MobileBanner() { - const isMobile = useIsMobile() - - if (!isMobile) { - return null - } - - return ( -
- 🚧 Mobile responsive in development. Desktop recommended. -
- ) + return null }