YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
feat(onboarding): overhaul connect-apps UX — ChatGPT, pro unlock animation, free lock overlay
Anshgrover235193dc745b6c
diff --git a/apps/screenpipe-app-tauri/components/onboarding/connect-apps.tsx b/apps/screenpipe-app-tauri/components/onboarding/connect-apps.tsxindex f53737cdd..c74451a4f 100644--- a/apps/screenpipe-app-tauri/components/onboarding/connect-apps.tsx+++ b/apps/screenpipe-app-tauri/components/onboarding/connect-apps.tsx@@ -5,14 +5,13 @@"use client";import React, { useState, useEffect, useRef, useCallback } from "react";-import { Check, Loader, Lock } from "lucide-react";+import { Check, Loader, Lock, LockOpen } from "lucide-react";import { motion, AnimatePresence } from "framer-motion";import { commands } from "@/lib/utils/tauri";import { useSettings } from "@/lib/hooks/use-settings";import { openUrl } from "@tauri-apps/plugin-opener";import { readTextFile, writeFile } from "@tauri-apps/plugin-fs";import { homeDir, join } from "@tauri-apps/api/path";-import { platform } from "@tauri-apps/plugin-os";import posthog from "posthog-js";// ─── Icons ───────────────────────────────────────────────────────────────────@@ -28,12 +27,10 @@ function GmailIcon({ className = "w-5 h-5" }: { className?: string }) {);}-function ClaudeIcon({ className = "w-5 h-5" }: { className?: string }) {+function ChatGptIcon({ className = "w-5 h-5" }: { className?: string }) {return (- <svg viewBox="0 0 512 509.64" xmlns="http://www.w3.org/2000/svg" className={className}>- <path fill="#D77655" d="M115.612 0h280.775C459.974 0 512 52.026 512 115.612v278.415c0 63.587-52.026 115.612-115.613 115.612H115.612C52.026 509.639 0 457.614 0 394.027V115.612C0 52.026 52.026 0 115.612 0z"/>- <path fill="#FCF2EE" fillRule="nonzero" d="M142.27 316.619l73.655-41.326 1.238-3.589-1.238-1.996-3.589-.001-12.31-.759-42.084-1.138-36.498-1.516-35.361-1.896-8.897-1.895-8.34-10.995.859-5.484 7.482-5.03 10.717.935 23.683 1.617 35.537 2.452 25.782 1.517 38.193 3.968h6.064l.86-2.451-2.073-1.517-1.618-1.517-36.776-24.922-39.81-26.338-20.852-15.166-11.273-7.683-5.687-7.204-2.451-15.721 10.237-11.273 13.75.935 3.513.936 13.928 10.716 29.749 23.027 38.848 28.612 5.687 4.727 2.275-1.617.278-1.138-2.553-4.271-21.13-38.193-22.546-38.848-10.035-16.101-2.654-9.655c-.935-3.968-1.617-7.304-1.617-11.374l11.652-15.823 6.445-2.073 15.545 2.073 6.547 5.687 9.655 22.092 15.646 34.78 24.265 47.291 7.103 14.028 3.791 12.992 1.416 3.968 2.449-.001v-2.275l1.997-26.641 3.69-32.707 3.589-42.084 1.239-11.854 5.863-14.206 11.652-7.683 9.099 4.348 7.482 10.716-1.036 6.926-4.449 28.915-8.72 45.294-5.687 30.331h3.313l3.792-3.791 15.342-20.372 25.782-32.227 11.374-12.789 13.27-14.129 8.517-6.724 16.1-.001 11.854 17.617-5.307 18.199-16.581 21.029-13.75 17.819-19.716 26.54-12.309 21.231 1.138 1.694 2.932-.278 44.536-9.479 24.062-4.347 28.714-4.928 12.992 6.066 1.416 6.167-5.106 12.613-30.71 7.583-36.018 7.204-53.636 12.689-.657.48.758.935 24.164 2.275 10.337.556h25.301l47.114 3.514 12.309 8.139 7.381 9.959-1.238 7.583-18.957 9.655-25.579-6.066-59.702-14.205-20.474-5.106-2.83-.001v1.694l17.061 16.682 31.266 28.233 39.152 36.397 1.997 8.999-5.03 7.102-5.307-.758-34.401-25.883-13.27-11.651-30.053-25.302-1.996-.001v2.654l6.926 10.136 36.574 54.975 1.895 16.859-2.653 5.485-9.479 3.311-10.414-1.895-21.408-30.054-22.092-33.844-17.819-30.331-2.173 1.238-10.515 113.261-4.929 5.788-11.374 4.348-9.478-7.204-5.03-11.652 5.03-23.027 6.066-30.052 4.928-23.886 4.449-29.674 2.654-9.858-.177-.657-2.173.278-22.37 30.71-34.021 45.977-26.919 28.815-6.445 2.553-11.173-5.789 1.037-10.337 6.243-9.2 37.257-47.392 22.47-29.371 14.508-16.961-.101-2.451h-.859l-98.954 64.251-17.618 2.275-7.583-7.103.936-11.652 3.589-3.791 29.749-20.474-.101.102.024.101z"/>- </svg>+ // eslint-disable-next-line @next/next/no-img-element+ <img src="/images/openai.png" alt="ChatGPT" className={className} style={{ borderRadius: 3 }} />);}@@ -93,33 +90,6 @@ async function writeMcpConfig(configPath: string, config: Record<string, unknownawait writeFile(configPath, new TextEncoder().encode(JSON.stringify(config, null, 2)));}-// Claude Desktop-async function getClaudeMcpConfigPath(): Promise<string | null> {- try {- const os = platform();- const home = await homeDir();- if (os === "macos") return join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");- if (os === "windows") return join(home, "AppData", "Roaming", "Claude", "claude_desktop_config.json");- return null;- } catch { return null; }-}--async function isClaudeMcpInstalled(): Promise<boolean> {- try {- const configPath = await getClaudeMcpConfigPath();- if (!configPath) return false;- const config = await readMcpConfig(configPath);- return !!(config?.mcpServers as Record<string, unknown>)?.screenpipe;- } catch { return false; }-}--async function installClaudeMcp(): Promise<void> {- const configPath = await getClaudeMcpConfigPath();- if (!configPath) throw new Error("claude desktop not found");- const config = await readMcpConfig(configPath);- await writeMcpConfig(configPath, config);-}-// Cursorasync function getCursorMcpConfigPath(): Promise<string> {const home = await homeDir();@@ -148,14 +118,14 @@ interface Integration {valueProp: string;ahaCopy: string;isPro: boolean;- type: "oauth" | "mcp";+ type: "oauth" | "mcp" | "chatgpt";}type CardState = "idle" | "connecting" | "connected" | "error";// ─── Integration list ─────────────────────────────────────────────────────────-const INTEGRATIONS: Integration[] = [+const PRO_INTEGRATIONS: Integration[] = [{id: "gmail",cardKey: "gmail",@@ -183,15 +153,9 @@ const INTEGRATIONS: Integration[] = [isPro: true,type: "oauth",},- {- id: "claude",- cardKey: "claude",- name: "Claude Desktop",- valueProp: "give Claude memory of everything you do",- ahaCopy: "MCP installed — restart Claude",- isPro: false,- type: "mcp",- },+];++const FREE_INTEGRATIONS: Integration[] = [{id: "github",cardKey: "github",@@ -210,6 +174,23 @@ const INTEGRATIONS: Integration[] = [isPro: false,type: "mcp",},+ {+ id: "chatgpt",+ cardKey: "chatgpt",+ name: "ChatGPT",+ valueProp: "use ChatGPT Plus as screenpipe's AI brain",+ ahaCopy: "ChatGPT connected",+ isPro: false,+ type: "chatgpt",+ },+];++// Free-user view: GitHub, Cursor, Gmail (pro teaser at slot 3), ChatGPT+const FREE_USER_ORDER: Integration[] = [+ FREE_INTEGRATIONS[0], // GitHub+ FREE_INTEGRATIONS[1], // Cursor+ PRO_INTEGRATIONS[0], // Gmail (pro — shown as teaser at position 3)+ FREE_INTEGRATIONS[2], // ChatGPT];const ICONS: Record<string, React.ReactNode> = {@@ -222,130 +203,220 @@ const ICONS: Record<string, React.ReactNode> = {// eslint-disable-next-line @next/next/no-img-element<img src="/images/notion.svg" alt="Notion" className="w-5 h-5 dark:invert" />),- claude: <ClaudeIcon />,github: (// eslint-disable-next-line @next/next/no-img-element<img src="/images/github.png" alt="GitHub" className="w-5 h-5 rounded" />),cursor: <CursorIcon className="w-5 h-5 rounded" />,+ chatgpt: <ChatGptIcon className="w-5 h-5" />,};// ─── Card ─────────────────────────────────────────────────────────────────────+type ProPhase = "locked" | "unlocking" | "unlocked";+function IntegrationCard({integration,isPro,state,displayName,- showUpsell,+ // proPhase / unlockDelay from parent trigger the local animation sequence.+ // Each card runs its own phase independently so the stagger is exact.+ proPhase,+ unlockDelay,onConnect,- onToggleUpsell,}: {integration: Integration;isPro: boolean;state: CardState;displayName: string | null;- showUpsell: boolean;+ proPhase: ProPhase;+ unlockDelay: number;onConnect: () => void;- onToggleUpsell: () => void;}) {const isLocked = integration.isPro && !isPro;const isConnected = state === "connected";const isConnecting = state === "connecting";+ const isError = state === "error";+ const shouldAnimate = isPro && integration.isPro && !isConnected;++ // Each card owns its own local phase so animations are fully independent.+ const [localPhase, setLocalPhase] = useState<ProPhase>(+ shouldAnimate ? "locked" : "unlocked"+ );++ useEffect(() => {+ if (!shouldAnimate) return;+ if (proPhase !== "unlocking") return;+ const delayMs = unlockDelay * 1000;+ // Step 1: start the burst-open animation for this card+ const t1 = setTimeout(() => setLocalPhase("unlocking"), delayMs);+ // Step 2: overlay fully gone, show "connect →"+ const t2 = setTimeout(() => setLocalPhase("unlocked"), delayMs + 600);+ return () => { clearTimeout(t1); clearTimeout(t2); };+ }, [proPhase, unlockDelay, shouldAnimate]);return (<div- className={`relative flex flex-col gap-1.5 border p-3 transition-all duration-200 overflow-hidden ${+ className={`relative flex flex-col gap-1.5 border p-3 transition-colors duration-500 overflow-hidden ${isConnected? "border-foreground/50 bg-foreground/[0.03]": "border-border/50"}`}>- {/* Header */}- <div className="flex items-center gap-2 min-w-0">- <div className="w-5 h-5 flex items-center justify-center shrink-0">- {ICONS[integration.cardKey]}- </div>- <span className="font-mono text-xs font-semibold truncate">- {integration.name}- </span>- {integration.isPro && !isConnected && (- <span className="ml-auto shrink-0 font-mono text-[9px] px-1 py-0.5 border border-amber-500/40 text-amber-500/70 leading-none">- pro- </span>- )}- </div>-- {/* Value prop */}- <p className="font-mono text-[10px] text-muted-foreground/60 leading-tight">- {integration.valueProp}- </p>-- {/* Action */}- <div className="mt-0.5 min-h-[28px]">- {isConnected ? (+ {/* ── Static lock overlay for free users on pro cards ────────────────+ Always visible, never animates. Lock + upgrade CTA centred. */}+ {isLocked && (+ <div className="absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/55"><motion.div- className="flex flex-col gap-0.5"- initial={{ opacity: 0, y: 3 }}- animate={{ opacity: 1, y: 0 }}- transition={{ duration: 0.2 }}+ animate={{ opacity: [0.2, 0.38, 0.2] }}+ transition={{ duration: 2.8, repeat: Infinity, ease: "easeInOut" }}>- <span className="flex items-center gap-1 font-mono text-[10px] text-foreground/70">- <Check className="w-3 h-3 shrink-0" strokeWidth={2.5} />- <span className="truncate">{displayName ?? "connected"}</span>- </span>- <motion.span- className="font-mono text-[9px] text-muted-foreground/50 pl-4 leading-tight"- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- transition={{ delay: 0.2, duration: 0.3 }}- >- {integration.ahaCopy}- </motion.span>+ <Lock className="w-6 h-6 text-foreground/35" strokeWidth={1.5} /></motion.div>- ) : isConnecting ? (- <span className="flex items-center gap-1 font-mono text-[10px] text-muted-foreground/50">- <Loader className="w-3 h-3 animate-spin shrink-0" />- connecting...- </span>- ) : isLocked ? (- <button- onClick={onToggleUpsell}- className="flex items-center gap-1 font-mono text-[10px] text-muted-foreground/40 hover:text-amber-500/60 transition-colors"- >- <Lock className="w-3 h-3 shrink-0" />- requires pro- </button>- ) : (<button- onClick={onConnect}- className="font-mono text-[10px] text-muted-foreground/60 hover:text-foreground transition-colors"+ onClick={() => openUrl("https://screenpi.pe/onboarding")}+ className="font-mono text-[9px] text-muted-foreground/45 hover:text-foreground/70 transition-colors underline underline-offset-2">- connect →+ upgrade to pro →</button>- )}- </div>+ </div>+ )}- {/* Inline pro upsell */}- <AnimatePresence>- {showUpsell && isLocked && (- <motion.div- className="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 px-3 py-1.5 bg-background border-t border-amber-500/20"- initial={{ opacity: 0, y: 6 }}- animate={{ opacity: 1, y: 0 }}- exit={{ opacity: 0, y: 6 }}- transition={{ duration: 0.15 }}- >- <span className="font-mono text-[9px] text-amber-500/60">pro required</span>+ {/* ── Full-card lock overlay for pro users (animated unlock) ─────────+ Each card drives its OWN localPhase, so stagger is exact and+ there is no shared-state timing conflict between the three cards. */}+ {shouldAnimate && (+ <motion.div+ className="absolute inset-0 z-10 flex items-center justify-center bg-background/60"+ animate={{ opacity: localPhase === "unlocked" ? 0 : 1 }}+ transition={+ localPhase === "unlocked"+ ? { duration: 0.35, ease: "easeOut" }+ : { duration: 0 }+ }+ style={{ pointerEvents: localPhase === "unlocked" ? "none" : "auto" }}+ >+ <AnimatePresence mode="wait">+ {localPhase === "locked" && (+ <motion.div+ key="lock-closed"+ initial={{ opacity: 0.45, scale: 1 }}+ animate={{ opacity: [0.45, 0.75, 0.45], scale: [1, 1.07, 1] }}+ exit={{ opacity: 0, scale: 1.4, rotate: 30, y: -5,+ transition: { duration: 0.16, ease: "easeIn" } }}+ transition={{ duration: 2, repeat: Infinity, ease: "easeInOut" }}+ >+ <Lock className="w-7 h-7 text-foreground/50" strokeWidth={1.5} />+ </motion.div>+ )}+ {localPhase === "unlocking" && (+ <motion.div+ key="lock-open"+ initial={{ opacity: 0, scale: 0.75, rotate: -12 }}+ animate={{+ opacity: [0, 1, 1, 0],+ scale: [0.75, 1.2, 1.05, 0],+ rotate: [-12, 6, 2, 18],+ }}+ transition={{ duration: 0.52, times: [0, 0.28, 0.62, 1], ease: "easeOut" }}+ >+ <LockOpen className="w-7 h-7 text-foreground/65" strokeWidth={1.5} />+ </motion.div>+ )}+ </AnimatePresence>+ </motion.div>+ )}++ {/* Card content — dimmed while locked so the overlay contrast is clear */}+ <motion.div+ className="flex flex-col gap-1.5"+ animate={{ opacity: shouldAnimate && localPhase === "locked" ? 0.38 : 1 }}+ transition={{ duration: 0.4 }}+ >+ {/* Header */}+ <div className="flex items-center gap-2 min-w-0">+ <div className="w-5 h-5 flex items-center justify-center shrink-0">+ {ICONS[integration.cardKey]}+ </div>+ <span className="font-mono text-xs font-semibold truncate">+ {integration.name}+ </span>+ {/* Only show pro badge for free users on pro cards */}+ {integration.isPro && !isPro && !isConnected && (+ <span className="ml-auto shrink-0 font-mono text-[9px] px-1 py-0.5 border border-amber-500/40 text-amber-500/70 leading-none">+ pro+ </span>+ )}+ </div>++ {/* Value prop */}+ <p className="font-mono text-[10px] text-muted-foreground/60 leading-tight">+ {integration.valueProp}+ </p>++ {/* Action */}+ <div className="mt-0.5 min-h-[20px] flex items-center">+ {isConnected ? (+ <motion.div+ className="flex flex-col gap-0.5 w-full"+ initial={{ opacity: 0, y: 3 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.2 }}+ >+ <span className="flex items-center gap-1 font-mono text-[10px] text-foreground/70">+ <Check className="w-3 h-3 shrink-0" strokeWidth={2.5} />+ <span className="truncate">{displayName ?? "connected"}</span>+ </span>+ <motion.span+ className="font-mono text-[9px] text-muted-foreground/50 pl-4 leading-tight"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.2, duration: 0.3 }}+ >+ {integration.ahaCopy}+ </motion.span>+ </motion.div>+ ) : isConnecting ? (+ <span className="flex items-center gap-1 font-mono text-[10px] text-muted-foreground/50">+ <Loader className="w-3 h-3 animate-spin shrink-0" />+ connecting...+ </span>+ ) : shouldAnimate ? (+ /* "connect →" appears after this card's own overlay fades out */+ <AnimatePresence>+ {localPhase === "unlocked" && (+ <motion.button+ initial={{ opacity: 0, y: 5 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.28, ease: "easeOut" }}+ onClick={onConnect}+ className="font-mono text-[10px] text-muted-foreground/60 hover:text-foreground transition-colors"+ >+ connect →+ </motion.button>+ )}+ </AnimatePresence>+ ) : isLocked ? (+ // overlay handles the CTA — action area intentionally empty+ null+ ) : isError ? (<button- onClick={() => openUrl("https://screenpi.pe/onboarding")}- className="font-mono text-[9px] text-amber-500/80 hover:text-amber-500 transition-colors whitespace-nowrap"+ onClick={onConnect}+ className="font-mono text-[10px] text-red-400/70 hover:text-red-400 transition-colors">- upgrade →+ failed — retry →</button>- </motion.div>- )}- </AnimatePresence>+ ) : (+ <button+ onClick={onConnect}+ className="font-mono text-[10px] text-muted-foreground/60 hover:text-foreground transition-colors"+ >+ connect →+ </button>+ )}+ </div>+ </motion.div></div>);}@@ -362,7 +433,7 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {const [cardStates, setCardStates] = useState<Record<string, CardState>>({});const [displayNames, setDisplayNames] = useState<Record<string, string>>({});- const [upsellVisible, setUpsellVisible] = useState<Record<string, boolean>>({});+ const [proPhase, setProPhase] = useState<ProPhase>(isPro ? "locked" : "unlocked");const [seconds, setSeconds] = useState(0);const mountTimeRef = useRef(Date.now());@@ -372,9 +443,11 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {const stateUpdates: Record<string, CardState> = {};const nameUpdates: Record<string, string> = {};- // OAuth integrations+ const allIntegrations = [...PRO_INTEGRATIONS, ...FREE_INTEGRATIONS];++ // Standard OAuth integrationsawait Promise.allSettled(- INTEGRATIONS.filter((i) => i.type === "oauth").map(async (i) => {+ allIntegrations.filter((i) => i.type === "oauth").map(async (i) => {try {const res = await commands.oauthStatus(i.id, null);if (res.status === "ok" && res.data.connected) {@@ -387,9 +460,13 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {}));- // Claude Desktop MCP+ // ChatGPT (separate OAuth flow)try {- if (await isClaudeMcpInstalled()) stateUpdates["claude"] = "connected";+ const res = await commands.chatgptOauthStatus();+ if (res.status === "ok" && res.data.logged_in) {+ stateUpdates["chatgpt"] = "connected";+ nameUpdates["chatgpt"] = "ChatGPT Plus";+ }} catch { /* ignore */ }// Cursor MCP@@ -405,6 +482,17 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {check();}, []);+ // Pro unlock animation sequence+ // Cards enter at ~200-320ms. Locked state visible for ~400ms before unlock starts.+ // Each card's unlock: 550ms animation, staggered 150ms apart.+ // Last card (index 2) starts at 700 + 300 = 1000ms, finishes at 1550ms.+ useEffect(() => {+ if (!isPro) return;+ const t1 = setTimeout(() => setProPhase("unlocking"), 700);+ const t2 = setTimeout(() => setProPhase("unlocked"), 1650);+ return () => { clearTimeout(t1); clearTimeout(t2); };+ }, [isPro]);+// Seconds tickeruseEffect(() => {const interval = setInterval(() => setSeconds((s) => s + 1), 1000);@@ -422,32 +510,33 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {const handleConnect = useCallback(async (integration: Integration) => {- // Pro gate- if (integration.isPro && !isPro) {- setUpsellVisible((prev) => ({- ...prev,- [integration.cardKey]: !prev[integration.cardKey],- }));- posthog.capture("onboarding_integration_upsell_shown", { integration: integration.id });- return;- }+ // Pro gate — locked cards show upsell inline, connect button is never shown for them+ if (integration.isPro && !isPro) return;posthog.capture("onboarding_integration_connect_clicked", { integration: integration.id });setCardState(integration.cardKey, "connecting");try {- if (integration.type === "mcp") {- if (integration.cardKey === "claude") {- await installClaudeMcp();+ if (integration.type === "chatgpt") {+ const res = await commands.chatgptOauthLogin();+ if (res.status === "ok" && res.data) {+ setCardState(integration.cardKey, "connected");+ setDisplayNames((prev) => ({ ...prev, [integration.cardKey]: "ChatGPT Plus" }));+ posthog.capture("onboarding_integration_connected", { integration: integration.id });} else {- await installCursorMcp();+ setCardState(integration.cardKey, "idle");}+ return;+ }++ if (integration.type === "mcp") {+ await installCursorMcp();setCardState(integration.cardKey, "connected");posthog.capture("onboarding_integration_connected", { integration: integration.id });return;}- // OAuth+ // Standard OAuthconst res = await commands.oauthConnect(integration.id, null);if (res.status === "ok" && res.data.connected) {setCardState(integration.cardKey, "connected");@@ -459,11 +548,12 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {has_display_name: !!res.data.display_name,});} else {+ // User cancelled or OAuth didn't complete — go back to idle quietlysetCardState(integration.cardKey, "idle");}- } catch {+ } catch (err) {setCardState(integration.cardKey, "error");- setTimeout(() => setCardState(integration.cardKey, "idle"), 2000);+ setTimeout(() => setCardState(integration.cardKey, "idle"), 3000);}},[isPro, setCardState]@@ -519,55 +609,110 @@ export default function ConnectApps({ handleNextSlide }: ConnectAppsProps) {transition={{ delay: 0.15 }}><h2 className="font-mono text-base font-bold lowercase">connect your world</h2>- <p className="font-mono text-[10px] text-muted-foreground/60 mt-1 max-w-[280px]">- screenpipe sees your screen — connect the tools it acts on+ <p className="font-mono text-[10px] text-muted-foreground/60 mt-1 max-w-[300px]">+ {isPro+ ? "everything is unlocked — connect what you use"+ : "screenpipe sees your screen — connect the tools it acts on"}</p></motion.div>- {/* 2×3 grid */}- <div className="grid grid-cols-2 gap-2 w-full">- {INTEGRATIONS.map((integration, i) => (+ {isPro ? (+ /* Pro layout: pro section + divider + free section */+ <div className="w-full flex flex-col gap-3">+ {/* Pro cards */}+ <div className="grid grid-cols-3 gap-2 w-full">+ {PRO_INTEGRATIONS.map((integration, i) => (+ <motion.div+ key={integration.cardKey}+ initial={{ opacity: 0, y: 8 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.2 + i * 0.06, duration: 0.3 }}+ >+ <IntegrationCard+ integration={integration}+ isPro={isPro}+ state={cardStates[integration.cardKey] ?? "idle"}+ displayName={displayNames[integration.cardKey] ?? null}+ proPhase={proPhase}+ unlockDelay={i * 0.15}+ onConnect={() => handleConnect(integration)}+ />+ </motion.div>+ ))}+ </div>++ {/* Divider */}<motion.div- key={integration.cardKey}- initial={{ opacity: 0, y: 8 }}- animate={{ opacity: 1, y: 0 }}- transition={{ delay: 0.2 + i * 0.06, duration: 0.3 }}+ className="flex items-center gap-2 w-full"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.38 }}>- <IntegrationCard- integration={integration}- isPro={isPro}- state={cardStates[integration.cardKey] ?? "idle"}- displayName={displayNames[integration.cardKey] ?? null}- showUpsell={!!upsellVisible[integration.cardKey]}- onConnect={() => handleConnect(integration)}- onToggleUpsell={() => {- setUpsellVisible((prev) => ({- ...prev,- [integration.cardKey]: !prev[integration.cardKey],- }));- posthog.capture("onboarding_integration_upsell_shown", { integration: integration.id });- }}- />+ <div className="flex-1 h-px bg-border/40" />+ <span className="font-mono text-[9px] text-muted-foreground/30 uppercase tracking-widest">also free</span>+ <div className="flex-1 h-px bg-border/40" /></motion.div>- ))}- </div>- {/* Pro hint */}- {!isPro && (- <motion.p- className="font-mono text-[9px] text-muted-foreground/30 mt-3 text-center"- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- transition={{ delay: 0.65 }}- >- gmail, google calendar & notion require{" "}- <button- onClick={() => openUrl("https://screenpi.pe/onboarding")}- className="underline underline-offset-2 hover:text-muted-foreground/50 transition-colors"+ {/* Free cards */}+ <div className="grid grid-cols-3 gap-2 w-full">+ {FREE_INTEGRATIONS.map((integration, i) => (+ <motion.div+ key={integration.cardKey}+ initial={{ opacity: 0, y: 8 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.42 + i * 0.06, duration: 0.3 }}+ >+ <IntegrationCard+ integration={integration}+ isPro={isPro}+ state={cardStates[integration.cardKey] ?? "idle"}+ displayName={displayNames[integration.cardKey] ?? null}+ proPhase={proPhase}+ unlockDelay={0}+ onConnect={() => handleConnect(integration)}+ />+ </motion.div>+ ))}+ </div>+ </div>+ ) : (+ /* Free layout: 2×2 grid — GitHub, Cursor, Gmail(teaser), ChatGPT */+ <>+ <div className="grid grid-cols-2 gap-2 w-full">+ {FREE_USER_ORDER.map((integration, i) => (+ <motion.div+ key={integration.cardKey}+ initial={{ opacity: 0, y: 8 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.2 + i * 0.06, duration: 0.3 }}+ >+ <IntegrationCard+ integration={integration}+ isPro={isPro}+ state={cardStates[integration.cardKey] ?? "idle"}+ displayName={displayNames[integration.cardKey] ?? null}+ proPhase={proPhase}+ unlockDelay={0}+ onConnect={() => handleConnect(integration)}+ />+ </motion.div>+ ))}+ </div>+ <motion.p+ className="font-mono text-[9px] text-muted-foreground/30 mt-3 text-center"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.5 }}>- screenpipe pro- </button>- </motion.p>+ gmail, gcal & notion unlock with{" "}+ <button+ onClick={() => openUrl("https://screenpi.pe/onboarding")}+ className="underline underline-offset-2 hover:text-muted-foreground/50 transition-colors"+ >+ screenpipe pro+ </button>+ </motion.p>+ </>)}{/* Actions */}