Skip to content

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

feat(onboarding): add timeline+AI animation placeholder and 2-hour reminder notification

Louis Beaumont5054e8f82757
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
index 66ea287ff..e75823905 100644
--- a/screenpipe-app-tauri/components/onboarding/status.tsx
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from "react";
-import { Check, Monitor, Mic, AlertTriangle } from "lucide-react";
+import { Check, Monitor, Mic, AlertTriangle, MessageSquare } from "lucide-react";
import { Button } from "../ui/button";
import { invoke } from "@tauri-apps/api/core";
import posthog from "posthog-js";
@@ -9,6 +9,7 @@ import { motion } from "framer-motion";
import { useSettings, DEFAULT_PROMPT } from "@/lib/hooks/use-settings";
import { open as openPath } from "@tauri-apps/plugin-shell";
import { homeDir, join } from "@tauri-apps/api/path";
+import { scheduleFirstRunNotification } from "@/lib/notifications";
// Format shortcut for display (platform-aware)
function formatShortcut(shortcut: string, isMac: boolean): string {
@@ -73,6 +74,8 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
if (settings.showScreenpipeShortcut) {
commands.showShortcutReminder(settings.showScreenpipeShortcut);
}
+ // Schedule 2-hour reminder notification (first run only)
+ scheduleFirstRunNotification();
handleNextSlide();
};
@@ -326,6 +329,35 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
</p>
</div>
+ {/* Timeline + AI Chat animation placeholder */}
+ <motion.div
+ className="bg-muted/30 border border-border rounded-lg p-4 max-w-sm"
+ initial={{ opacity: 0, y: 10 }}
+ animate={{ opacity: 1, y: 0 }}
+ transition={{ delay: 0.3 }}
+ >
+ <div className="flex items-center space-x-2 mb-3">
+ <MessageSquare className="w-4 h-4 text-primary" />
+ <span className="font-mono text-xs font-medium text-foreground">
+ then chat with your history
+ </span>
+ </div>
+ {/* TODO: Replace with Lottie animation showing timeline selection + AI chat */}
+ <div className="bg-background/50 rounded border border-border p-3 space-y-2">
+ <div className="flex items-center space-x-2">
+ <div className="h-2 bg-muted-foreground/20 rounded flex-1">
+ <div className="h-2 bg-primary/50 rounded w-1/4 ml-[30%]" />
+ </div>
+ <span className="font-mono text-[10px] text-muted-foreground">select</span>
+ </div>
+ <p className="font-mono text-[10px] text-muted-foreground text-center">
+ press{" "}
+ <span className="font-semibold text-foreground">⌘ L</span>{" "}
+ to ask AI about any moment
+ </p>
+ </div>
+ </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} />
diff --git a/screenpipe-app-tauri/lib/notifications.ts b/screenpipe-app-tauri/lib/notifications.ts
new file mode 100644
index 000000000..0dcc0f57a
--- /dev/null
+++ b/screenpipe-app-tauri/lib/notifications.ts
@@ -0,0 +1,54 @@
+import {
+ isPermissionGranted,
+ requestPermission,
+ sendNotification,
+} from "@tauri-apps/plugin-notification";
+import localforage from "localforage";
+
+const FIRST_RUN_NOTIFICATION_KEY = "firstRunNotificationScheduled";
+const TWO_HOURS_MS = 2 * 60 * 60 * 1000;
+
+/**
+ * Schedule a notification 2 hours after first run to remind users to check their timeline.
+ * This only fires ONCE - on the first time the user completes onboarding.
+ */
+export async function scheduleFirstRunNotification(): Promise<void> {
+ try {
+ // Check if we already scheduled this notification
+ const alreadyScheduled = await localforage.getItem<boolean>(
+ FIRST_RUN_NOTIFICATION_KEY
+ );
+ if (alreadyScheduled) {
+ console.log("First run notification already scheduled, skipping");
+ return;
+ }
+
+ // Mark as scheduled immediately to prevent duplicates
+ await localforage.setItem(FIRST_RUN_NOTIFICATION_KEY, true);
+
+ // Check/request notification permission
+ let permissionGranted = await isPermissionGranted();
+ if (!permissionGranted) {
+ const permission = await requestPermission();
+ permissionGranted = permission === "granted";
+ }
+
+ if (!permissionGranted) {
+ console.log("Notification permission not granted");
+ return;
+ }
+
+ // Schedule notification for 2 hours from now
+ setTimeout(() => {
+ 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.",
+ });
+ console.log("First run notification sent");
+ }, TWO_HOURS_MS);
+
+ console.log("First run notification scheduled for 2 hours from now");
+ } catch (error) {
+ console.error("Failed to schedule first run notification:", error);
+ }
+}