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: redesign onboarding to build shortcut habit
Louis Beaumont0f9e43aa6c45
diff --git a/apps/screenpipe-app-tauri/app/onboarding/page.tsx b/apps/screenpipe-app-tauri/app/onboarding/page.tsxindex 0c35cde3e..a3cb2c568 100644--- a/apps/screenpipe-app-tauri/app/onboarding/page.tsx+++ b/apps/screenpipe-app-tauri/app/onboarding/page.tsx@@ -2,345 +2,134 @@import React, { useState, useEffect } from "react";import { useToast } from "@/components/ui/use-toast";-import OnboardingStatus from "@/components/onboarding/status";-import OnboardingWelcome from "@/components/onboarding/welcome";-import OnboardingSelection from "@/components/onboarding/usecases-selection";+import OnboardingSetup from "@/components/onboarding/status";+import ShortcutGate from "@/components/onboarding/shortcut-gate";import { useOnboarding } from "@/lib/hooks/use-onboarding";-import { useSettings } from "@/lib/hooks/use-settings";-import { scheduleFirstRunNotification } from "@/lib/notifications";import posthog from "posthog-js";import { commands } from "@/lib/utils/tauri";-type SlideKey = "welcome" | "usecases" | "status";+type SlideKey = "setup" | "shortcut";-// Window size configurations for each slideconst SLIDE_WINDOW_SIZES: Record<SlideKey, { width: number; height: number }> = {- welcome: { width: 1000, height: 650 },- usecases: { width: 900, height: 800 },- status: { width: 900, height: 800 },+ setup: { width: 500, height: 560 },+ shortcut: { width: 520, height: 480 },};-// 3-step flow: welcome → usecases → status → done-const getNextSlide = (currentSlide: SlideKey): SlideKey | null => {- switch (currentSlide) {- case "welcome":- return "usecases";- case "usecases":- return "status";- case "status":- return null; // Complete onboarding- default:- return null;- }-};--const getPrevSlide = (currentSlide: SlideKey): SlideKey | null => {- switch (currentSlide) {- case "welcome":- return null;- case "usecases":- return "welcome";- case "status":- return "usecases";- default:- return null;- }-};--// Track step completion (when user clicks next/back)-const trackOnboardingStepCompleted = (- step: SlideKey,- properties?: Record<string, any>-) => {- posthog.capture(`onboarding_${step}_completed`, {- step,- ...properties,- });-};--// Track step viewed (when user enters a step)-const trackOnboardingStepViewed = (step: SlideKey) => {- posthog.capture(`onboarding_${step}_viewed`, {- step,- });-};--// Track final completion-const trackOnboardingCompleted = () => {- posthog.capture("onboarding_completed");-};--// Function to set window size for current slideconst setWindowSizeForSlide = async (slide: SlideKey) => {try {const { width, height } = SLIDE_WINDOW_SIZES[slide];await commands.setWindowSize("Onboarding", width, height);- console.log(`✅ Set window size for ${slide}: ${width}x${height}`);- } catch (error) {- console.warn(`⚠️ Failed to set window size for ${slide}:`, error);- // Don't show error toast for window sizing issues as it's not critical- // The window will just maintain its current size+ } catch {+ // non-critical}};export default function OnboardingPage() {const { toast } = useToast();- const [currentSlide, setCurrentSlide] = useState<SlideKey>("welcome");- const [error, setError] = useState<string | null>(null);- const [isVisible, setIsVisible] = useState(false);+ const [currentSlide, setCurrentSlide] = useState<SlideKey>("setup");+ const [isVisible, setIsVisible] = useState(true);const [isTransitioning, setIsTransitioning] = useState(false);- const [completedSteps, setCompletedSteps] = useState<SlideKey[]>(["welcome"]);- const [selectedUsecase, setSelectedUsecase] = useState<string | null>(null);- const {- onboardingData,- completeOnboarding,- isLoading- } = useOnboarding();- const { settings } = useSettings();-- const handleUsecaseClick = (option: string) => {- // Single-select: clicking the same option deselects it, otherwise select the new one- setSelectedUsecase((prev) => prev === option ? null : option);- };+ const { onboardingData, isLoading } = useOnboarding();- // Load onboarding status and restore saved step on mount+ // Restore saved step on mountuseEffect(() => {const init = async () => {const { loadOnboardingStatus } = useOnboarding.getState();await loadOnboardingStatus();const { onboardingData } = useOnboarding.getState();- // Restore saved step if exists (e.g., after app restart during permissions)+if (onboardingData.currentStep && !onboardingData.isCompleted) {- const savedStep = onboardingData.currentStep as SlideKey;- // Map old step names to new ones for backwards compatibility+ const step = onboardingData.currentStep as string;+ // Map any old step names to new onesconst stepMap: Record<string, SlideKey> = {- "login": "welcome",- "intro": "welcome",- "usecases": "usecases",- "status": "status",- "welcome": "welcome",+ setup: "setup",+ shortcut: "shortcut",+ // backwards compat with old onboarding+ welcome: "setup",+ login: "setup",+ intro: "setup",+ usecases: "setup",+ status: "setup",};- const mappedStep = stepMap[savedStep];- if (mappedStep) {- setCurrentSlide(mappedStep);- console.log(`Restored onboarding to step: ${mappedStep}`);+ const mapped = stepMap[step];+ if (mapped) {+ setCurrentSlide(mapped);}}};init();}, []);- // Set window size and track view when slide changes+ // Set window size + track view when slide changesuseEffect(() => {setWindowSizeForSlide(currentSlide);setIsVisible(true);- // Track that user viewed this step (fires on ENTER, not exit)- trackOnboardingStepViewed(currentSlide);+ posthog.capture(`onboarding_${currentSlide}_viewed`);}, [currentSlide]);- useEffect(() => {- if (error) {- toast({- title: "Error",- description: error,- variant: "destructive",- });- }- }, [error, toast]);-- // Handle redirect if already completed+ // Redirect if already completeduseEffect(() => {if (onboardingData.isCompleted) {- const redirectToMain = async () => {- try {- await commands.showWindow("Main");- if (typeof window !== 'undefined' && 'close' in window) {- window.close();- }- } catch (error) {- console.error("Error redirecting to main window:", error);- }- };- redirectToMain();+ commands+ .showWindow("Main")+ .then(() => window.close())+ .catch(() => {});}}, [onboardingData.isCompleted]);- const showSuccessToast = (message: string) => {- toast({- title: "Success",- description: message,- variant: "default",- });- };-- const showErrorToast = (message: string) => {- toast({- title: "Error",- description: message,- variant: "destructive",- });- };+ useEffect(() => {+ // nothing needed for error state currently+ }, [toast]);const handleNextSlide = async () => {if (isTransitioning) return;-- setIsTransitioning(true);- const nextSlide = getNextSlide(currentSlide);-- try {- // Track that user completed this step (clicked next)- trackOnboardingStepCompleted(currentSlide, {- direction: "next",- });-- // Mark current step as completed- if (!completedSteps.includes(currentSlide)) {- setCompletedSteps(prev => [...prev, currentSlide]);- }-- if (nextSlide) {- // Save the next step to persist across app restarts- await commands.setOnboardingStep(nextSlide);- setIsVisible(false);- setTimeout(async () => {- setCurrentSlide(nextSlide);- setError(null);- setIsTransitioning(false);- }, 300);- } else {- await handleEnd();- }- } catch (error) {- console.error("Error in handleNextSlide:", error);- showErrorToast("Failed to proceed to next step");- setIsTransitioning(false);- }- };-- const handlePrevSlide = async () => {- if (isTransitioning) return;-setIsTransitioning(true);- try {- // Track that user went back from this step- trackOnboardingStepCompleted(currentSlide, {- direction: "back",- });-- setIsVisible(false);-- setTimeout(async () => {- let prevSlide = getPrevSlide(currentSlide);-- if (prevSlide) {- setError(null);- setCurrentSlide(prevSlide);- }- setIsTransitioning(false);- }, 300);- } catch (error) {- console.error("Error in handlePrevSlide:", error);- showErrorToast("Failed to go back");- setIsTransitioning(false);- }- };+ posthog.capture(`onboarding_${currentSlide}_completed`);- const handleEnd = async () => {- setIsTransitioning(true);-- // Track completion (don't block on failure)- try {- trackOnboardingCompleted();- } catch (error) {- console.error("Error tracking onboarding completion:", error);- }-- // Complete onboarding in backend (don't block on failure)try {- await completeOnboarding();- } catch (error) {- console.error("Error completing onboarding:", error);- // Continue anyway - we'll try to proceed to main window+ await commands.setOnboardingStep("shortcut");+ } catch {+ // non-critical}- // Show shortcut reminder (don't block on failure)- try {- if (settings.showScreenpipeShortcut && settings.showShortcutOverlay !== false) {- commands.showShortcutReminder(settings.showScreenpipeShortcut);- }- } catch (error) {- console.error("Error showing shortcut reminder:", error);- }-- // Schedule notification (don't block on failure)- try {- scheduleFirstRunNotification();- } catch (error) {- console.error("Error scheduling notification:", error);- }-- // Always try to proceed to main window- try {- await commands.showWindow("Main");- showSuccessToast("Onboarding completed successfully!");- if (typeof window !== 'undefined' && 'close' in window) {- window.close();- }- } catch (error) {- console.error("Error showing main window:", error);- showErrorToast("Failed to open main window. Please restart the app.");+ setIsVisible(false);+ setTimeout(() => {+ setCurrentSlide("shortcut");+ setIsVisible(true);setIsTransitioning(false);- }+ }, 300);};if (isLoading) {return (<div className="flex items-center justify-center min-h-screen bg-background">- <div className="text-center">- <div className="w-6 h-6 border border-foreground border-t-transparent animate-spin mx-auto mb-4"></div>- <p className="font-mono text-xs text-muted-foreground">loading...</p>- </div>+ <div className="w-6 h-6 border border-foreground border-t-transparent rounded-full animate-spin" /></div>);}return (<div className="flex flex-col w-full h-screen overflow-hidden bg-background">- {/* Minimal header with drag region */}- <div className="w-full bg-background p-4" data-tauri-drag-region>- </div>-- {/* Main content container */}- <div className={`flex-1 flex items-center justify-center overflow-auto ${currentSlide === "welcome" ? "p-0" : "p-6"}`}>- <div className={`w-full ${currentSlide === "welcome" ? "h-full" : "max-w-2xl mx-auto"}`}>- {currentSlide === "welcome" && (- <OnboardingWelcome- className={`transition-opacity duration-300 w-full h-full- ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}- handleNextSlide={handleNextSlide}- />- )}- {currentSlide === "usecases" && (- <OnboardingSelection- className={`transition-opacity duration-300 w-full- ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}- selectedOption={selectedUsecase}- handleOptionClick={handleUsecaseClick}- handlePrevSlide={handlePrevSlide}- handleNextSlide={handleNextSlide}- />- )}- {currentSlide === "status" && (- <OnboardingStatus- className={`transition-opacity duration-300 w-full- ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}- handlePrevSlide={handlePrevSlide}+ {/* Drag region */}+ <div className="w-full bg-background p-3" data-tauri-drag-region />++ {/* Content */}+ <div className="flex-1 flex items-center justify-center p-6 overflow-auto">+ <div+ className={`w-full max-w-lg mx-auto transition-opacity duration-300 ${+ isVisible ? "opacity-100" : "opacity-0"+ }`}+ >+ {currentSlide === "setup" && (+ <OnboardingSetup+ className=""handleNextSlide={handleNextSlide}/>)}+ {currentSlide === "shortcut" && <ShortcutGate />}</div></div></div>);-}\ No newline at end of file+}diff --git a/apps/screenpipe-app-tauri/components/onboarding/shortcut-gate.tsx b/apps/screenpipe-app-tauri/components/onboarding/shortcut-gate.tsxnew file mode 100644index 000000000..23b03dfdd--- /dev/null+++ b/apps/screenpipe-app-tauri/components/onboarding/shortcut-gate.tsx@@ -0,0 +1,296 @@+"use client";++import React, { useState, useEffect, useCallback, useRef } from "react";+import { motion, AnimatePresence } from "framer-motion";+import { useSettings } from "@/lib/hooks/use-settings";+import { usePlatform } from "@/lib/hooks/use-platform";+import { useOnboarding } from "@/lib/hooks/use-onboarding";+import { listen } from "@tauri-apps/api/event";+import { scheduleFirstRunNotification } from "@/lib/notifications";+import { commands } from "@/lib/utils/tauri";+import posthog from "posthog-js";++interface CapturedText {+ text: string;+ appName: string;+ windowName: string;+}++function parseShortcutKeys(shortcut: string, isMac: boolean): string[] {+ if (!shortcut) return isMac ? ["⌃", "⌘", "S"] : ["Ctrl", "Win", "S"];++ const parts = shortcut.split("+").map((p) => p.trim().toLowerCase());+ const keys: string[] = [];++ for (const part of parts) {+ if (isMac) {+ switch (part) {+ case "super": case "command": case "cmd": keys.push("⌘"); break;+ case "control": case "ctrl": keys.push("⌃"); break;+ case "alt": case "option": keys.push("⌥"); break;+ case "shift": keys.push("⇧"); break;+ default: keys.push(part.toUpperCase());+ }+ } else {+ switch (part) {+ case "super": keys.push("Win"); break;+ case "command": case "cmd": case "control": case "ctrl": keys.push("Ctrl"); break;+ case "alt": case "option": keys.push("Alt"); break;+ case "shift": keys.push("Shift"); break;+ default: keys.push(part.toUpperCase());+ }+ }+ }++ return keys;+}++function KeyCap({ label, index }: { label: string; index: number }) {+ return (+ <motion.div+ className="relative"+ initial={{ opacity: 0, y: 20 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.2 + index * 0.12, type: "spring", stiffness: 300, damping: 20 }}+ >+ {/* Pulsing glow */}+ <motion.div+ className="absolute -inset-3 bg-primary/20 rounded-2xl blur-xl"+ animate={{ opacity: [0.2, 0.5, 0.2], scale: [0.9, 1.1, 0.9] }}+ transition={{ duration: 2.5, repeat: Infinity, delay: index * 0.3 }}+ />+ {/* Key surface */}+ <div className="relative min-w-[3.5rem] h-14 flex items-center justify-center bg-background border-2 border-foreground/20 rounded-xl shadow-lg shadow-primary/5 px-5">+ <span className="text-2xl font-mono font-bold text-foreground select-none">+ {label}+ </span>+ </div>+ </motion.div>+ );+}++export default function ShortcutGate() {+ const { settings } = useSettings();+ const { isMac } = usePlatform();+ const { completeOnboarding } = useOnboarding();+ const [seconds, setSeconds] = useState(0);+ const [captures, setCaptures] = useState<CapturedText[]>([]);+ const [currentCapture, setCurrentCapture] = useState<CapturedText | null>(null);+ const [showSkip, setShowSkip] = useState(false);+ const isCompletingRef = useRef(false);++ const keys = parseShortcutKeys(settings.showScreenpipeShortcut, isMac);++ // Count-up timer+ useEffect(() => {+ const interval = setInterval(() => setSeconds((s) => s + 1), 1000);+ return () => clearInterval(interval);+ }, []);++ // Poll for latest captured text+ useEffect(() => {+ const poll = async () => {+ try {+ const res = await fetch(+ "http://localhost:3030/search?content_type=ocr&limit=1&offset=0&order=descending",+ { signal: AbortSignal.timeout(3000) }+ );+ const data = await res.json();+ if (data.data?.length > 0) {+ const item = data.data[0];+ const text = item.content?.text?.trim();+ if (text && text.length > 15) {+ // Extract a clean snippet (first meaningful line)+ const lines = text.split("\n").filter((l: string) => l.trim().length > 10);+ const snippet = lines[0]?.substring(0, 80) || text.substring(0, 80);+ const capture: CapturedText = {+ text: snippet + (snippet.length >= 80 ? "..." : ""),+ appName: item.content?.app_name || "",+ windowName: item.content?.window_name || "",+ };+ setCurrentCapture(capture);+ setCaptures((prev) => {+ // Avoid duplicates+ if (prev.length > 0 && prev[prev.length - 1].text === capture.text) return prev;+ return [...prev.slice(-4), capture];+ });+ }+ }+ } catch {+ /* server might still be starting */+ }+ };+ poll();+ const interval = setInterval(poll, 3000);+ return () => clearInterval(interval);+ }, []);++ // Show skip after 30s+ useEffect(() => {+ const timer = setTimeout(() => setShowSkip(true), 30000);+ return () => clearTimeout(timer);+ }, []);++ const handleComplete = useCallback(async () => {+ if (isCompletingRef.current) return;+ isCompletingRef.current = true;++ posthog.capture("onboarding_shortcut_pressed");+ posthog.capture("onboarding_completed");++ try {+ await completeOnboarding();+ } catch (e) {+ console.error("failed to complete onboarding:", e);+ }+ try {+ scheduleFirstRunNotification();+ } catch (e) {+ console.error("failed to schedule notification:", e);+ }++ // Main window is already shown by the shortcut handler+ try {+ window.close();+ } catch {+ /* ignore */+ }+ }, [completeOnboarding]);++ const handleSkip = async () => {+ if (isCompletingRef.current) return;+ isCompletingRef.current = true;++ posthog.capture("onboarding_shortcut_skipped");+ posthog.capture("onboarding_completed");++ try {+ await completeOnboarding();+ } catch (e) {+ console.error("failed to complete onboarding:", e);+ }+ try {+ scheduleFirstRunNotification();+ } catch (e) {+ console.error("failed to schedule notification:", e);+ }+ try {+ await commands.showWindow("Main");+ window.close();+ } catch {+ /* ignore */+ }+ };++ // Listen for the global shortcut event+ useEffect(() => {+ let unlisten: (() => void) | undefined;+ listen("shortcut-show", () => {+ handleComplete();+ }).then((fn) => {+ unlisten = fn;+ });+ return () => {+ unlisten?.();+ };+ }, [handleComplete]);++ return (+ <div className="flex flex-col items-center justify-center space-y-8 py-2">+ {/* Recording indicator with timer */}+ <motion.div+ className="flex items-center space-x-2"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.1 }}+ >+ <motion.div+ className="w-2 h-2 rounded-full bg-red-500"+ animate={{ opacity: [1, 0.3, 1] }}+ transition={{ duration: 1.5, repeat: Infinity }}+ />+ <span className="font-mono text-sm text-muted-foreground">+ recording · {seconds}s+ </span>+ </motion.div>++ {/* Live capture preview */}+ <motion.div+ className="w-full max-w-sm min-h-[4.5rem] flex items-center justify-center"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.3 }}+ >+ <AnimatePresence mode="wait">+ {currentCapture ? (+ <motion.div+ key={currentCapture.text}+ className="w-full border border-border/50 rounded-lg p-3 bg-muted/20"+ initial={{ opacity: 0, y: 8 }}+ animate={{ opacity: 1, y: 0 }}+ exit={{ opacity: 0, y: -8 }}+ transition={{ duration: 0.3 }}+ >+ <p className="font-mono text-xs text-foreground/70 line-clamp-2 leading-relaxed">+ “{currentCapture.text}”+ </p>+ {(currentCapture.appName || currentCapture.windowName) && (+ <p className="font-mono text-[10px] text-muted-foreground mt-1.5">+ {[currentCapture.appName, currentCapture.windowName]+ .filter(Boolean)+ .slice(0, 2)+ .join(" · ")}+ </p>+ )}+ </motion.div>+ ) : (+ <motion.p+ key="placeholder"+ className="font-mono text-xs text-muted-foreground"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ exit={{ opacity: 0 }}+ >+ capturing your screen...+ </motion.p>+ )}+ </AnimatePresence>+ </motion.div>++ {/* The gate */}+ <motion.div+ className="flex flex-col items-center space-y-6"+ initial={{ opacity: 0, y: 20 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.5, duration: 0.5 }}+ >+ <p className="font-mono text-sm text-muted-foreground">+ press to see your timeline+ </p>++ <div className="flex items-center gap-3">+ {keys.map((key, i) => (+ <KeyCap key={`${key}-${i}`} label={key} index={i} />+ ))}+ </div>+ </motion.div>++ {/* Skip escape hatch — appears after 30s */}+ <div className="h-6">+ <AnimatePresence>+ {showSkip && (+ <motion.button+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ exit={{ opacity: 0 }}+ onClick={handleSkip}+ className="font-mono text-xs text-muted-foreground/40 hover:text-muted-foreground transition-colors"+ >+ skip →+ </motion.button>+ )}+ </AnimatePresence>+ </div>+ </div>+ );+}diff --git a/apps/screenpipe-app-tauri/components/onboarding/status.tsx b/apps/screenpipe-app-tauri/components/onboarding/status.tsxindex b3409667a..c9e52c7b7 100644--- a/apps/screenpipe-app-tauri/components/onboarding/status.tsx+++ b/apps/screenpipe-app-tauri/components/onboarding/status.tsx@@ -10,7 +10,7 @@ import { useSettings, DEFAULT_PROMPT } from "@/lib/hooks/use-settings";import { open as openUrl } from "@tauri-apps/plugin-shell";import { revealItemInDir } from "@tauri-apps/plugin-opener";import { homeDir, join } from "@tauri-apps/api/path";-import { TimelineAIDemo } from "./timeline-ai-demo";+// TimelineAIDemo removed — shortcut gate replaces itimport { readTextFile } from "@tauri-apps/plugin-fs";import { getVersion } from "@tauri-apps/api/app";import { version as osVersion, platform as osPlatform } from "@tauri-apps/plugin-os";@@ -74,7 +74,6 @@ function formatShortcut(shortcut: string, isMac: boolean): string {interface OnboardingStatusProps {className?: string;- handlePrevSlide: () => void;handleNextSlide: () => void;}@@ -97,6 +96,16 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({const hasStartedRef = useRef(false);const isStartingRef = useRef(false);const stuckTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);+ const hasAdvancedRef = useRef(false);++ // Auto-advance to shortcut gate when recording starts+ useEffect(() => {+ if (setupState === "recording" && !hasAdvancedRef.current) {+ hasAdvancedRef.current = true;+ handleNextSlide();+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [setupState]);const sendLogs = async () => {setIsSendingLogs(true);@@ -402,6 +411,20 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({return (<div className={`${className} w-full flex flex-col items-center justify-center min-h-[400px]`}>+ {/* Branding */}+ {(setupState === "checking" || setupState === "needs-permissions") && (+ <motion.div+ className="flex flex-col items-center mb-6"+ initial={{ opacity: 0, y: -10 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.4 }}+ >+ <img className="w-14 h-14 mb-3" src="/128x128.png" alt="screenpipe" />+ <h1 className="font-mono text-lg font-bold text-foreground">screenpipe</h1>+ <p className="font-mono text-xs text-muted-foreground mt-1">AI memory for your screen</p>+ </motion.div>+ )}+{/* Checking state */}{setupState === "checking" && (<motion.div@@ -588,73 +611,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({</motion.div>)}- {/* Recording state */}- {setupState === "recording" && (- <motion.div- className="flex flex-col items-center space-y-8"- initial={{ opacity: 0, scale: 0.95 }}- animate={{ opacity: 1, scale: 1 }}- transition={{ duration: 0.3 }}- >- <div className="flex items-center space-x-3">- <div className="w-3 h-3 bg-foreground animate-pulse" />- <span className="font-mono text-lg text-foreground">recording</span>- </div>-- <div className="text-center space-y-2">- <p className="font-mono text-sm text-muted-foreground">- screenpipe is now capturing your screen and audio- </p>- <p className="font-mono text-xs text-muted-foreground">- find it in your menu bar anytime- </p>- </div>-- {/* Shortcut reminders */}- <div className="border border-border px-6 py-3 space-y-1.5">- <div className="flex items-center justify-between gap-8 font-mono text-xs">- <span className="text-muted-foreground">timeline</span>- <span className="font-semibold text-foreground px-2 py-0.5 bg-muted border border-border">- {formatShortcut(settings.showScreenpipeShortcut, isMacOS)}- </span>- </div>- <div className="flex items-center justify-between gap-8 font-mono text-xs">- <span className="text-muted-foreground">ai chat</span>- <span className="font-semibold text-foreground px-2 py-0.5 bg-muted border border-border">- {formatShortcut(settings.showChatShortcut, isMacOS)}- </span>- </div>- </div>-- {/* Timeline + AI Chat animation */}- <motion.div- initial={{ opacity: 0, y: 10 }}- animate={{ opacity: 1, y: 0 }}- transition={{ delay: 0.3 }}- >- <TimelineAIDemo />- </motion.div>-- <div className="flex items-center space-x-4 text-xs font-mono text-muted-foreground">- <div className="flex items-center space-x-2">- <Check className="w-4 h-4" strokeWidth={1.5} />- <span>screen</span>- </div>- <div className="flex items-center space-x-2">- <Check className="w-4 h-4" strokeWidth={1.5} />- <span>audio</span>- </div>- <div className="flex items-center space-x-2">- <Check className="w-4 h-4" strokeWidth={1.5} />- <span>local</span>- </div>- </div>-- <Button onClick={handleComplete} size="lg">- continue- </Button>- </motion.div>- )}+ {/* Recording state — auto-advances to shortcut gate via useEffect */}{/* Ready but not auto-started (fallback) */}{setupState === "ready" && (diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsxindex 84eb7bb96..1307f7a2b 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx@@ -62,10 +62,13 @@ const easeOutCubic = (x: number): number => {return 1 - Math.pow(1 - x, 3);};+const FIRST_OPEN_KEY = "screenpipe_timeline_first_open";+export default function Timeline() {const [currentIndex, setCurrentIndex] = useState(0);const [showAudioTranscript, setShowAudioTranscript] = useState(true);const [showSearchModal, setShowSearchModal] = useState(false);+ const [showFirstOpenTip, setShowFirstOpenTip] = useState(false);const containerRef = useRef<HTMLDivElement | null>(null);// const [searchResults, setSearchResults] = useState<number[]>([]);const [startAndEndDates, setStartAndEndDates] = useState<TimeRange>({@@ -296,6 +299,12 @@ export default function Timeline() {dateChangesRef.current = 0;posthog.capture("timeline_opened");++ // Show first-open coaching tip+ if (!localStorage.getItem(FIRST_OPEN_KEY)) {+ setShowFirstOpenTip(true);+ localStorage.setItem(FIRST_OPEN_KEY, "true");+ }// Send session summary when timeline closesreturn () => {@@ -1069,6 +1078,27 @@ export default function Timeline() {</div>)}+ {/* First-open coaching tip */}+ {showFirstOpenTip && (+ <div className="absolute bottom-28 left-1/2 -translate-x-1/2 z-[45] pointer-events-auto">+ <div className="bg-card/95 backdrop-blur-sm border border-border rounded-lg px-5 py-3 shadow-lg flex items-center gap-4 max-w-lg">+ <p className="font-mono text-xs text-muted-foreground">+ <span className="text-foreground font-medium">← →</span> travel through time+ <span className="mx-2 text-border">·</span>+ <span className="text-foreground font-medium">⌃⌘L</span> ask AI+ <span className="mx-2 text-border">·</span>+ <span className="text-foreground font-medium">⌃⌘S</span> close+ </p>+ <button+ onClick={() => setShowFirstOpenTip(false)}+ className="text-muted-foreground hover:text-foreground transition-colors flex-shrink-0"+ >+ <X className="w-3.5 h-3.5" />+ </button>+ </div>+ </div>+ )}+{/* Bottom Timeline - Overlay that doesn't cut off image */}<div className="absolute bottom-0 left-0 right-0 z-40 pointer-events-auto">{frames.length > 0 ? (diff --git a/apps/screenpipe-app-tauri/lib/notifications.ts b/apps/screenpipe-app-tauri/lib/notifications.tsindex 0dcc0f57a..6650fa06d 100644--- a/apps/screenpipe-app-tauri/lib/notifications.ts+++ b/apps/screenpipe-app-tauri/lib/notifications.ts@@ -41,8 +41,8 @@ export async function scheduleFirstRunNotification(): Promise<void> {// Schedule notification for 2 hours from nowsetTimeout(() => {sendNotification({- title: "Your screen history is ready",- body: "You have 2 hours of activity recorded. Open screenpipe to search or ask AI about what you did.",+ title: "2 hours of memory ready",+ body: "Press ⌃⌘S to see what you did in the last 2 hours.",});console.log("First run notification sent");}, TWO_HOURS_MS);