diff --git a/app/layout.tsx b/app/layout.tsx index 1343f4e..e25fc1e 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -36,18 +36,16 @@ export const metadata: Metadata = { { url: "/icons/splash-1668x2388.png", media: "(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)" }, ], }, - icons: IS_DEV_INSTANCE - ? { - // Dev wears its own favicon so the two instances are never confused. - icon: [{ url: "/icons/dev-favicon.svg", type: "image/svg+xml" }], - } - : { - icon: [ - // ?v=2 busts browser favicon caches after the icon redesign. - { url: "/icons/favicon-32.png?v=2", sizes: "32x32", type: "image/png" }, - { url: "/icons/icon-192.png?v=2", sizes: "192x192", type: "image/png" }, - { url: "/icons/icon-512.png?v=2", sizes: "512x512", type: "image/png" }, - ], + icons: { + icon: IS_DEV_INSTANCE + ? // Dev wears its own favicon so the two instances are never confused. + [{ url: "/icons/dev-favicon.svg", type: "image/svg+xml" }] + : [ + // ?v=2 busts browser favicon caches after the icon redesign. + { url: "/icons/favicon-32.png?v=2", sizes: "32x32", type: "image/png" }, + { url: "/icons/icon-192.png?v=2", sizes: "192x192", type: "image/png" }, + { url: "/icons/icon-512.png?v=2", sizes: "512x512", type: "image/png" }, + ], apple: [ { url: "/icons/apple-touch-icon.png?v=2", sizes: "180x180" }, { url: "/icons/apple-touch-icon-167.png?v=2", sizes: "167x167" }, diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index ee89d08..8f74d0e 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -1,8 +1,11 @@ "use client"; import Link from "next/link"; +import { usePathname } from "next/navigation"; import { useMemo, useState, useSyncExternalStore, type ReactNode } from "react"; +import { SidebarChatSection } from "@/components/chat/SidebarChatSection"; + import { ChatIcon, ChevronLeftIcon, @@ -35,6 +38,8 @@ const COLLAPSE_KEY = "freezmo.sidebarCollapsed"; * there is no drawer any more, so this is the only consumer of the rail. */ function NavContent({ collapsed = false }: { collapsed?: boolean }) { + const pathname = usePathname(); + const onChat = pathname === "/chat"; const decks = useSyncExternalStore(deckStore.subscribe, deckStore.getSnapshot, deckStore.getServerSnapshot); const folders = useSyncExternalStore( folderStore.subscribe, @@ -149,6 +154,7 @@ function NavContent({ collapsed = false }: { collapsed?: boolean }) { {/* chat with your notes --------------------------------------------- */} @@ -156,19 +162,27 @@ function NavContent({ collapsed = false }: { collapsed?: boolean }) { {!collapsed ? {t("chat.nav")} : null} -