diff --git a/apps/web/app/(app)/page.tsx b/apps/web/app/(app)/page.tsx index 6d336fa35..5c88b5065 100644 --- a/apps/web/app/(app)/page.tsx +++ b/apps/web/app/(app)/page.tsx @@ -13,6 +13,7 @@ import { useQueryState } from "nuqs" import { Header, PublicHeader } from "@/components/header" import { MobileBottomNav } from "@/components/bottom-nav" import { ChatSidebar, HomeChatComposer } from "@/components/chat" +import type { ChatAttachmentDraft } from "@/components/chat/attachments" import { DashboardView } from "@/components/dashboard-view" import { MemoriesGrid } from "@/components/memories-grid" import { GraphLayoutView } from "@/components/graph-layout-view" @@ -166,6 +167,9 @@ export default function NewPage() { const [queuedChatProject, setQueuedChatProject] = useState( null, ) + const [queuedChatAttachments, setQueuedChatAttachments] = useState< + ChatAttachmentDraft[] | null + >(null) const [queuedHighlightContent, setQueuedHighlightContent] = useState< string | null >(null) @@ -494,6 +498,7 @@ export default function NewPage() { setQueuedChatModel(null) setQueuedChatReasoningEffort(null) setQueuedChatProject(null) + setQueuedChatAttachments(null) setQueuedMessageSource("highlight") void setViewMode("chat") }, @@ -506,12 +511,14 @@ export default function NewPage() { model: ModelId, projectId: string, reasoningEffort: ReasoningEffort, + attachments?: ChatAttachmentDraft[], ) => { setQueuedHighlightContent(null) setQueuedChatSeed(message) setQueuedChatModel(model) setQueuedChatReasoningEffort(reasoningEffort) setQueuedChatProject(projectId) + setQueuedChatAttachments(attachments ?? null) setQueuedMessageSource("home") void setViewMode("chat") }, @@ -523,6 +530,7 @@ export default function NewPage() { setQueuedChatModel(null) setQueuedChatReasoningEffort(null) setQueuedChatProject(null) + setQueuedChatAttachments(null) setQueuedHighlightContent(null) setQueuedMessageSource("highlight") }, []) @@ -572,17 +580,17 @@ export default function NewPage() { const isDashboardShell = viewMode === "dashboard" || (viewMode === "graph" && isMobile) const isGraphMode = viewMode === "graph" - const showBottomNav = isMobile && !!session + const showBottomNav = isMobile && !!session && !isChatView return (
{showNovaBackdrop && ( @@ -642,6 +650,7 @@ export default function NewPage() { queuedHighlightContent={queuedHighlightContent} onConsumeQueuedMessage={consumeQueuedChat} queuedMessageSource={queuedMessageSource} + queuedAttachments={queuedChatAttachments} initialSelectedModel={queuedChatModel} initialReasoningEffort={queuedChatReasoningEffort} initialChatProject={queuedChatProject} @@ -761,7 +770,7 @@ export default function NewPage() { className={cn( "pointer-events-none fixed inset-x-0 z-30", showBottomNav - ? "bottom-[4.25rem]" + ? "bottom-[calc(4rem+env(safe-area-inset-bottom))]" : "bottom-0 bg-gradient-to-t from-black via-black/40 to-transparent pt-12", )} > diff --git a/apps/web/components/bottom-nav.tsx b/apps/web/components/bottom-nav.tsx index c611de5a2..cf0a39716 100644 --- a/apps/web/components/bottom-nav.tsx +++ b/apps/web/components/bottom-nav.tsx @@ -55,11 +55,11 @@ export function MobileBottomNav({ onAddMemory, onOpenSearch }: BottomNavProps) {