diff --git a/apps/web/lib/document-icon.tsx b/apps/web/lib/document-icon.tsx
index a0f56e63..edeaf76b 100644
--- a/apps/web/lib/document-icon.tsx
+++ b/apps/web/lib/document-icon.tsx
@@ -1,59 +1,119 @@
-import { MCPIcon } from '@/components/menu';
-import { colors } from '@repo/ui/memory-graph/constants';
+import { MCPIcon } from "@/components/menu"
+import { colors } from "@repo/ui/memory-graph/constants"
import {
- GoogleDocs,
- MicrosoftWord,
- NotionDoc,
- GoogleDrive,
- GoogleSheets,
- GoogleSlides,
- PDF,
- OneDrive,
- MicrosoftOneNote,
- MicrosoftPowerpoint,
- MicrosoftExcel,
-} from '@ui/assets/icons';
-import { FileText } from 'lucide-react';
+ GoogleDocs,
+ MicrosoftWord,
+ NotionDoc,
+ GoogleDrive,
+ GoogleSheets,
+ GoogleSlides,
+ PDF,
+ OneDrive,
+ MicrosoftOneNote,
+ MicrosoftPowerpoint,
+ MicrosoftExcel,
+} from "@ui/assets/icons"
+import { FileText, Globe } from "lucide-react"
+import { useState } from "react"
-export const getDocumentIcon = (type: string, className: string, source?: string) => {
- const iconProps = {
- className,
- style: { color: colors.text.muted },
- };
+const getFaviconUrl = (url: string): string => {
+ try {
+ const domain = new URL(url).hostname
+ return `https://www.google.com/s2/favicons?domain=${domain}&sz=32`
+ } catch {
+ return ""
+ }
+}
- if(source === "mcp") {
- return
;
- }
+const FaviconIcon = ({
+ url,
+ className,
+ iconProps,
+}: {
+ url: string
+ className: string
+ iconProps: { className: string; style: { color: string } }
+}) => {
+ const [hasError, setHasError] = useState(false)
+ const faviconUrl = getFaviconUrl(url)
- switch (type) {
- case 'google_doc':
- return
;
- case 'google_sheet':
- return
;
- case 'google_slide':
- return
;
- case 'google_drive':
- return
;
- case 'notion':
- case 'notion_doc':
- return
;
- case 'word':
- case 'microsoft_word':
- return
;
- case 'excel':
- case 'microsoft_excel':
- return
;
- case 'powerpoint':
- case 'microsoft_powerpoint':
- return
;
- case 'onenote':
- case 'microsoft_onenote':
- return
;
- case 'onedrive':
- return
;
- case 'pdf':
- return
;
- default:
- return
;
- }
-};
+ if (hasError || !faviconUrl) {
+ return
+ }
+
+ return (
+

setHasError(true)}
+ />
+ )
+}
+
+export const getDocumentIcon = (
+ type: string,
+ className: string,
+ source?: string,
+ url?: string,
+) => {
+ const iconProps = {
+ className,
+ style: { color: colors.text.muted },
+ }
+
+ if (source === "mcp") {
+ return
+ }
+
+ if (
+ type === "webpage" ||
+ type === "url" ||
+ (url && (type === "unknown" || !type))
+ ) {
+ if (url) {
+ return (
+
+ )
+ }
+
+ return
+ }
+
+ switch (type) {
+ case "google_doc":
+ return
+ case "google_sheet":
+ return
+ case "google_slide":
+ return
+ case "google_drive":
+ return
+ case "notion":
+ case "notion_doc":
+ return
+ case "word":
+ case "microsoft_word":
+ return
+ case "excel":
+ case "microsoft_excel":
+ return
+ case "powerpoint":
+ case "microsoft_powerpoint":
+ return
+ case "onenote":
+ case "microsoft_onenote":
+ return
+ case "onedrive":
+ return
+ case "pdf":
+ return
+ default:
+ return
+ }
+}
From 0ca737f3643b9ec64b0aa2bae4e62a571667eacf Mon Sep 17 00:00:00 2001
From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
Date: Mon, 6 Oct 2025 01:06:32 +0000
Subject: [PATCH 2/5] fix: mobile responsive issues on onboarding (#453)
---
apps/web/app/onboarding/bio-form.tsx | 20 +-
apps/web/app/onboarding/extension-form.tsx | 1497 +++++++++--------
apps/web/app/onboarding/intro.tsx | 2 +-
apps/web/app/onboarding/name-form.tsx | 11 +-
.../app/onboarding/onboarding-background.tsx | 4 +-
apps/web/app/onboarding/onboarding-form.tsx | 2 +-
apps/web/app/onboarding/welcome.tsx | 10 +-
.../components/chrome-extension-button.tsx | 6 +-
8 files changed, 871 insertions(+), 681 deletions(-)
diff --git a/apps/web/app/onboarding/bio-form.tsx b/apps/web/app/onboarding/bio-form.tsx
index d985a775..63f359ec 100644
--- a/apps/web/app/onboarding/bio-form.tsx
+++ b/apps/web/app/onboarding/bio-form.tsx
@@ -31,23 +31,23 @@ export function BioForm() {
})
}
return (
-
+
Step {getStepNumberFor("bio")} of {totalSteps}
-
- Tell us about yourself
+
+ Tell Supermemory about yourself
-
- What should Supermemory know about you?
+
+ share with Supermemory what you do, who you are, and what you're interested in
+ )
}
function ChatGPTDemo() {
- const iconRef = useRef
(null);
- const submitButtonRef = useRef(null);
- const [enhancementStatus, setEnhancementStatus] = useState<"notStarted" | "enhancing" | "done">("notStarted");
- const [memoriesExpanded, setMemoriesExpanded] = useState(false);
+ const iconRef = useRef(null)
+ const submitButtonRef = useRef(null)
+ const [enhancementStatus, setEnhancementStatus] = useState<
+ "notStarted" | "enhancing" | "done"
+ >("notStarted")
+ const [memoriesExpanded, setMemoriesExpanded] = useState(false)
- const cursorActions: CursorAction[] = useMemo(() => [
- {
- type: "call", fn: function resetStates() {
- setEnhancementStatus("notStarted");
- setMemoriesExpanded(false);
- }
- },
- { type: 'startAtPercent', xPercent: 80, yPercent: 80 },
- { type: 'pause', duration: 1000 },
- { type: 'move', target: iconRef, duration: 1000 },
- { type: 'pause', duration: 1000 },
- { type: 'click' },
- { type: 'call', fn: function startEnhancing() { setEnhancementStatus("enhancing"); } },
- { type: 'pause', duration: 1000 },
- { type: 'move', xPercent: 10, yPercent: 80, duration: 1000 },
- { type: 'call', fn: function finishEnhancing() { setEnhancementStatus("done"); } },
- { type: 'pause', duration: 500 },
- { type: 'move', target: iconRef, duration: 1000 },
- { type: 'call', fn: function expandMemories() { setMemoriesExpanded(true); } },
- { type: "pause", duration: 1000 },
- { type: 'move', xPercent: 80, yPercent: 80, duration: 1000 },
- ], []);
+ const cursorActions: CursorAction[] = useMemo(
+ () => [
+ {
+ type: "call",
+ fn: function resetStates() {
+ setEnhancementStatus("notStarted")
+ setMemoriesExpanded(false)
+ },
+ },
+ { type: "startAtPercent", xPercent: 80, yPercent: 80 },
+ { type: "pause", duration: 1000 },
+ { type: "move", target: iconRef, duration: 1000 },
+ { type: "pause", duration: 1000 },
+ { type: "click" },
+ {
+ type: "call",
+ fn: function startEnhancing() {
+ setEnhancementStatus("enhancing")
+ },
+ },
+ { type: "pause", duration: 1000 },
+ { type: "move", xPercent: 10, yPercent: 80, duration: 1000 },
+ {
+ type: "call",
+ fn: function finishEnhancing() {
+ setEnhancementStatus("done")
+ },
+ },
+ { type: "pause", duration: 500 },
+ { type: "move", target: iconRef, duration: 1000 },
+ {
+ type: "call",
+ fn: function expandMemories() {
+ setMemoriesExpanded(true)
+ },
+ },
+ { type: "pause", duration: 1000 },
+ { type: "move", xPercent: 80, yPercent: 80, duration: 1000 },
+ ],
+ [],
+ )
- return (
-
-
-
What's on your mind today?
-
-
- what are my card's benefits?
-
-
-
-
-
-
- {enhancementStatus === "notStarted" && (
-
- )}
- {enhancementStatus === "enhancing" && (
- <>
-
-
- Searching...
-
- >
- )}
- {enhancementStatus === "done" && (
- <>
-
- Including 1 memory
- >
- )}
-
- {memoriesExpanded && (
-
-
-

-
User possesses an American Express Platinum card
-
-
- )}
-
-
-
+ return (
+
+
+
What's on your mind today?
+
+
what are my card's benefits?
+
+
+
+
+
+ {enhancementStatus === "notStarted" && (
+
+ )}
+ {enhancementStatus === "enhancing" && (
+ <>
+
+
+ Searching...
+
+ >
+ )}
+ {enhancementStatus === "done" && (
+ <>
+
+
+ Including 1 memory
+
+ >
+ )}
+
+ {memoriesExpanded && (
+
+
+

+
+ User possesses an American Express Platinum card
+
+
+
+ )}
+
+
+
-
-
-
-
-
-
- )
+
+
+
+
+
+
+ )
}
function TwitterDemo() {
- const importButtonRef = useRef(null);
- const [importStatus, setImportStatus] = useState<"notStarted" | "importing" | "done">("notStarted");
+ const importButtonRef = useRef(null)
+ const [importStatus, setImportStatus] = useState<
+ "notStarted" | "importing" | "done"
+ >("notStarted")
- const cursorActions: CursorAction[] = useMemo(() => [
- {
- type: "call", fn: function resetStates() {
- setImportStatus("notStarted");
- }
- },
- { type: 'startAtPercent', xPercent: 10, yPercent: 80 },
- { type: 'pause', duration: 1300 },
- { type: 'move', target: importButtonRef, duration: 1100 },
- { type: 'pause', duration: 800 },
- { type: 'click' },
- { type: 'call', fn: function startImporting() { setImportStatus("importing"); } },
- { type: 'pause', duration: 700 },
- { type: 'move', xPercent: 80, yPercent: 80, duration: 1200 },
- { type: 'call', fn: function finishImporting() { setImportStatus("done"); } },
- ], []);
+ const cursorActions: CursorAction[] = useMemo(
+ () => [
+ {
+ type: "call",
+ fn: function resetStates() {
+ setImportStatus("notStarted")
+ },
+ },
+ { type: "startAtPercent", xPercent: 10, yPercent: 80 },
+ { type: "pause", duration: 1300 },
+ { type: "move", target: importButtonRef, duration: 1100 },
+ { type: "pause", duration: 800 },
+ { type: "click" },
+ {
+ type: "call",
+ fn: function startImporting() {
+ setImportStatus("importing")
+ },
+ },
+ { type: "pause", duration: 700 },
+ { type: "move", xPercent: 80, yPercent: 80, duration: 1200 },
+ {
+ type: "call",
+ fn: function finishImporting() {
+ setImportStatus("done")
+ },
+ },
+ ],
+ [],
+ )
- return (
-
-
-
-
- 𝕏
- Import Twitter Bookmarks
-
-
-
-
-
- This will import all your Twitter bookmarks to Supermemory
-
-
-
-
-
- {importStatus === "importing" && (
-
-
-
- )}
- {importStatus === "done" && (
-
-
-
- )}
-
-
- {importStatus === "importing"
- ? "Importing bookmarks..."
- : importStatus === "done"
- ? "Import successful"
- : "Import All Bookmarks"}
-
-
-
-
-
-
- )
+ return (
+
+
+
+
+ 𝕏
+
+ Import Twitter Bookmarks
+
+
+
+
+
+
+ This will import all your Twitter bookmarks to Supermemory
+
+
+
+
+
+ {importStatus === "importing" && (
+
+
+
+ )}
+ {importStatus === "done" && (
+
+
+
+ )}
+
+
+ {importStatus === "importing"
+ ? "Importing bookmarks..."
+ : importStatus === "done"
+ ? "Import successful"
+ : "Import All Bookmarks"}
+
+
+
+
+
+
+ )
}
export function ExtensionForm() {
- const { totalSteps, nextStep, getStepNumberFor } = useOnboarding();
- return (
-
-
-
-
-
- Step {getStepNumberFor("extension")} of {totalSteps}
-
-
-
- Install the Chrome extension
-
-
- {/* Install the Supermemory extension to start saving and organizing everything that matters. */}
- Bring Supermemory everywhere
-
-
-
-
+ const { totalSteps, nextStep, getStepNumberFor } = useOnboarding()
+ return (
+
+
+
+
+
+ Step {getStepNumberFor("extension")} of {totalSteps}
+
+
+
+ Install the Chrome extension
+
+
+ {/* Install the Supermemory extension to start saving and organizing everything that matters. */}
+ Bring Supermemory everywhere
+
+
+
+
-
-
-
-
Remember anything, anywhere
-
- Just right-click to save instantly.
-
-
-
-
-
-
-
-
-
Integrate with your AI
- {/* Supercharge your AI with memory */}
- {/* Supercharge any AI with Supermemory. */}
- {/* ChatGPT is better with Supermemory. */}
- {/* Seamless integration with your workflow */}
-
- {/* Integrates with ChatGPT and Claude. */}
- {/* Integrates with your chat apps */}
- Enhance any prompt with Supermemory.
- {/* Seamlessly */}
-
-
-
-
-
-
-
-
-
Import Twitter bookmarks
-
- Search semantically and effortlessly.
- {/* Import instantly and search effortlessly. */}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
Remember anything, anywhere
+
+ Just right-click to save instantly.
+
- )
-}
\ No newline at end of file
+
+
+
+
+
+
+
Integrate with your AI
+ {/* Supercharge your AI with memory */}
+ {/* Supercharge any AI with Supermemory. */}
+ {/* ChatGPT is better with Supermemory. */}
+ {/* Seamless integration with your workflow */}
+
+ {/* Integrates with ChatGPT and Claude. */}
+ {/* Integrates with your chat apps */}
+ Enhance any prompt with Supermemory.
+ {/* Seamlessly */}
+
+
+
+
+
+
+
+
+
Import Twitter bookmarks
+
+ Search semantically and effortlessly.
+ {/* Import instantly and search effortlessly. */}
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/apps/web/app/onboarding/intro.tsx b/apps/web/app/onboarding/intro.tsx
index cc242df3..ebf9b471 100644
--- a/apps/web/app/onboarding/intro.tsx
+++ b/apps/web/app/onboarding/intro.tsx
@@ -11,7 +11,7 @@ export function Intro() {
return (
+
Step {getStepNumberFor("name")} of {totalSteps}
-
What should we call you?
+
+ What should we call you?
+