diff --git a/apps/web/app/(navigation)/chat/[id]/page.tsx b/apps/web/app/(navigation)/chat/[id]/page.tsx index 9bb2038b..b3812998 100644 --- a/apps/web/app/(navigation)/chat/[id]/page.tsx +++ b/apps/web/app/(navigation)/chat/[id]/page.tsx @@ -7,7 +7,7 @@ import { ChatMessages } from "@/components/views/chat/chat-messages" export default function ChatPage() { const params = useParams() - const { setCurrentChatId, getCurrentChat } = usePersistentChat() + const { setCurrentChatId } = usePersistentChat() const chatId = params.id as string @@ -17,17 +17,9 @@ export default function ChatPage() { } }, [chatId, setCurrentChatId]) - const currentChat = getCurrentChat() - return (
-
-

- {currentChat?.title || "New Chat"} -

-
-
diff --git a/apps/web/app/onboarding/mcp-form.tsx b/apps/web/app/onboarding/mcp-form.tsx index f8561a09..d3152e42 100644 --- a/apps/web/app/onboarding/mcp-form.tsx +++ b/apps/web/app/onboarding/mcp-form.tsx @@ -220,7 +220,7 @@ export function MCPForm() {
- + Cancel + + - - - - + {createProjectMutation.isPending ? ( + <> + + Creating... + + ) : ( + "Create Project" + )} + diff --git a/apps/web/components/header.tsx b/apps/web/components/header.tsx index 2ea075d1..0d3682c0 100644 --- a/apps/web/components/header.tsx +++ b/apps/web/components/header.tsx @@ -6,11 +6,12 @@ import { Plus, SunIcon, MonitorIcon, - Network, User, CreditCard, Chrome, LogOut, + WaypointsIcon, + Gauge, } from "lucide-react" import { DropdownMenuContent, @@ -25,17 +26,19 @@ import { useAuth } from "@lib/auth-context" import { ConnectAIModal } from "./connect-ai-modal" import { useTheme } from "next-themes" import { cn } from "@lib/utils" -import { useRouter } from "next/navigation" +import { usePathname, useRouter } from "next/navigation" import { MCPIcon } from "./menu" import { authClient } from "@lib/auth" import { analytics } from "@/lib/analytics" -import { useGraphModal } from "@/stores" +import { useGraphModal, usePersistentChat } from "@/stores" export function Header({ onAddMemory }: { onAddMemory?: () => void }) { const { user } = useAuth() const { theme, setTheme } = useTheme() const router = useRouter() const { setIsOpen: setGraphModalOpen } = useGraphModal() + const { getCurrentChat } = usePersistentChat() + const pathname = usePathname() const handleSignOut = () => { analytics.userSignedOut() @@ -46,20 +49,31 @@ export function Header({ onAddMemory }: { onAddMemory?: () => void }) { return (
- - - - +
+ + {getCurrentChat()?.title && pathname.includes("/chat") ? ( +
+ + {getCurrentChat()?.title} +
+ ) : ( + <> + + + + )} + +
-
+
@@ -103,15 +116,21 @@ export function Header({ onAddMemory }: { onAddMemory?: () => void }) { router.push("/settings")}> - + Profile router.push("/settings/billing")} > - + Billing + router.push("/settings/integrations")} + > + + Integrations + { window.open( @@ -121,7 +140,7 @@ export function Header({ onAddMemory }: { onAddMemory?: () => void }) { ) }} > - + Chrome Extension void }) { handleSignOut()}> - + Logout diff --git a/apps/web/components/project-selector.tsx b/apps/web/components/project-selector.tsx index 0682a641..a492783b 100644 --- a/apps/web/components/project-selector.tsx +++ b/apps/web/components/project-selector.tsx @@ -25,7 +25,7 @@ import { SelectTrigger, SelectValue, } from "@repo/ui/components/select" -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query" +import { useQuery } from "@tanstack/react-query" import { ChevronDown, FolderIcon, @@ -36,7 +36,6 @@ import { } from "lucide-react" import { AnimatePresence, motion } from "motion/react" import { useState } from "react" -import { toast } from "sonner" import { useProjectMutations } from "@/hooks/use-project-mutations" import { useProjectName } from "@/hooks/use-project-name" import { useProject } from "@/stores" @@ -52,7 +51,6 @@ interface Project { } export function ProjectSelector() { - const queryClient = useQueryClient() const [isOpen, setIsOpen] = useState(false) const [showCreateDialog, setShowCreateDialog] = useState(false) const { selectedProject } = useProject() @@ -69,13 +67,6 @@ export function ProjectSelector() { action: "move", targetProjectId: DEFAULT_PROJECT_ID, }) - const [expDialog, setExpDialog] = useState<{ - open: boolean - projectId: string - }>({ - open: false, - projectId: "", - }) const { data: projects = [], isLoading } = useQuery({ queryKey: ["projects"], @@ -91,30 +82,6 @@ export function ProjectSelector() { staleTime: 30 * 1000, }) - const enableExperimentalMutation = useMutation({ - mutationFn: async (projectId: string) => { - const response = await $fetch( - `@post/projects/${projectId}/enable-experimental`, - ) - if (response.error) { - throw new Error( - response.error?.message || "Failed to enable experimental mode", - ) - } - return response.data - }, - onSuccess: () => { - toast.success("Experimental mode enabled for project") - queryClient.invalidateQueries({ queryKey: ["projects"] }) - setExpDialog({ open: false, projectId: "" }) - }, - onError: (error) => { - toast.error("Failed to enable experimental mode", { - description: error instanceof Error ? error.message : "Unknown error", - }) - }, - }) - const handleProjectSelect = (containerTag: string) => { switchProject(containerTag) setIsOpen(false) @@ -138,7 +105,7 @@ export function ProjectSelector() { @@ -165,33 +132,30 @@ export function ProjectSelector() {
{/* User Projects */} {projects .filter((p: Project) => p.containerTag !== DEFAULT_PROJECT_ID) - .map((project: Project, index: number) => ( - ( +
- {/* Show experimental toggle only if NOT experimental and NOT default project */} - {!project.isExperimental && - project.containerTag !== DEFAULT_PROJECT_ID && ( - { - e.stopPropagation() - setExpDialog({ - open: true, - projectId: project.id, - }) - setIsOpen(false) - }} - > -
- Enable Experimental Mode - - )} - {project.isExperimental && ( - -
- Experimental Mode Active - - )} { e.stopPropagation() setDeleteDialog({ @@ -262,13 +199,13 @@ export function ProjectSelector() { setIsOpen(false) }} > - + Delete Project
- +
))} )} - - {/* Experimental Mode Confirmation Dialog */} - - {expDialog.open && ( - setExpDialog({ ...expDialog, open })} - open={expDialog.open} - > - - - - Enable Experimental Mode? - - Experimental mode enables beta features and advanced memory - relationships for this project. -
-
- - Warning: - {" "} - This action is{" "} - - irreversible - - . Once enabled, you cannot return to regular mode for this - project. -
-
- - - - - - - - -
-
-
- )} -
) } diff --git a/apps/web/components/views/add-memory/index.tsx b/apps/web/components/views/add-memory/index.tsx index d9c6aef8..19e02df1 100644 --- a/apps/web/components/views/add-memory/index.tsx +++ b/apps/web/components/views/add-memory/index.tsx @@ -1021,7 +1021,6 @@ export function AddMemoryView({ > setNewProjectName(e.target.value)} placeholder="My Awesome Project" diff --git a/packages/ui/assets/Logo.tsx b/packages/ui/assets/Logo.tsx index 805687d7..bb8800c8 100644 --- a/packages/ui/assets/Logo.tsx +++ b/packages/ui/assets/Logo.tsx @@ -16,7 +16,7 @@ export const Logo = ({ supermemory Logo ); diff --git a/packages/ui/globals.css b/packages/ui/globals.css index c6c904c9..357e34b7 100644 --- a/packages/ui/globals.css +++ b/packages/ui/globals.css @@ -65,7 +65,7 @@ --destructive: oklch(0.6368 0.2078 25.3313); --border: oklch(0.9366 0.0017 247.8401); --input: oklch(0.9702 0 0); - --ring: oklch(1 0 0); + --ring: oklch(0 0 0); --chart-1: oklch(0.7197 0.1448 266.6983); --chart-2: oklch(0.8101 0.1488 148.2032); --chart-3: oklch(0.7507 0.1353 58.4182); @@ -125,7 +125,7 @@ --destructive: oklch(0.6368 0.2078 25.3313); --border: oklch(0.3715 0 0); --input: oklch(0.262 0.0074 285.8781); - --ring: oklch(0 0 0); + --ring: oklch(1 0 0); --chart-1: oklch(0.7197 0.1448 266.6983); --chart-2: oklch(0.8101 0.1488 148.2032); --chart-3: oklch(0.7507 0.1353 58.4182);