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
add window overlay, add shortcuts to onboarding
shaik-zeeshan196d53ec305e
diff --git a/openrewind/app/globals.css b/openrewind/app/globals.cssindex 9c500a5e1..f99ad19cd 100644--- a/openrewind/app/globals.css+++ b/openrewind/app/globals.css@@ -4,103 +4,199 @@@layer base {:root {- --background: 0 0% 100%;- --foreground: 240 10% 3.9%;-+ /* Base colors */+ --background: 0 0% 100%; /* white */+ --foreground: 0 0% 0%; /* black */++ /* Surface colors */+ --surface: 0 0% 98%;+ --surface-secondary: 210 40% 98%;+ --surface-tertiary: 220 14.3% 95.9%;++ /* Card colors */--card: 0 0% 100%;- --card-foreground: 240 10% 3.9%;+ --card-foreground: 222.2 84% 4.9%;+ --card-hover: 210 40% 98%;+ /* Popover colors */--popover: 0 0% 100%;- --popover-foreground: 240 10% 3.9%;-- --primary: 240 5.9% 10%;- --primary-foreground: 0 0% 98%;-- --secondary: 240 4.8% 95.9%;- --secondary-foreground: 240 5.9% 10%;-- --muted: 240 4.8% 95.9%;- --muted-foreground: 240 3.8% 46.1%;-- --accent: 240 4.8% 95.9%;- --accent-foreground: 240 5.9% 10%;-+ --popover-foreground: 222.2 84% 4.9%;++ /* Primary brand colors */+ --primary: 221.2 83.2% 53.3%;+ --primary-foreground: 210 40% 98%;+ --primary-hover: 221.2 83.2% 48%;+ --primary-muted: 221.2 83.2% 93%;++ /* Secondary colors */+ --secondary: 210 40% 96%;+ --secondary-foreground: 222.2 84% 4.9%;+ --secondary-hover: 210 40% 92%;++ /* Success colors */+ --success: 142.1 76.2% 36.3%;+ --success-foreground: 355.7 100% 97.3%;+ --success-muted: 142.1 76.2% 90%;++ /* Warning colors */+ --warning: 32.4 95.4% 58%;+ --warning-foreground: 26 83.3% 14.1%;+ --warning-muted: 32.4 95.4% 90%;++ /* Error/Destructive colors */--destructive: 0 84.2% 60.2%;- --destructive-foreground: 0 0% 98%;-- --border: 240 5.9% 90%;- --input: 240 5.9% 90%;- --ring: 240 10% 3.9%;-- --radius: 0.5rem;-+ --destructive-foreground: 210 40% 98%;+ --destructive-hover: 0 84.2% 55%;+ --destructive-muted: 0 84.2% 95%;++ /* Info colors */+ --info: 199.4 89.2% 48.4%;+ --info-foreground: 210 40% 98%;+ --info-muted: 199.4 89.2% 90%;++ /* Muted colors */+ --muted: 210 40% 96%;+ --muted-foreground: 215.4 16.3% 46.9%;++ /* Accent colors */+ --accent: 210 40% 96%;+ --accent-foreground: 222.2 84% 4.9%;+ --accent-hover: 210 40% 92%;++ /* Border and input colors */+ --border: 214.3 31.8% 91.4%;+ --input: 214.3 31.8% 91.4%;+ --input-focus: 221.2 83.2% 53.3%;+ --ring: 221.2 83.2% 53.3%;++ /* Text colors */+ --text-primary: 222.2 84% 4.9%;+ --text-secondary: 215.4 16.3% 46.9%;+ --text-tertiary: 215.4 16.3% 65%;+ --text-disabled: 215.4 16.3% 75%;++ /* Brand accent colors */+ --brand-1: 0 100% 63%;+ --brand-2: 270 100% 63%;+ --brand-3: 210 100% 63%;+ --brand-4: 195 100% 63%;+ --brand-5: 90 100% 63%;++ /* Rainbow button color mappings */--color-1: 0 100% 63%;---color-2: 270 100% 63%;---color-3: 210 100% 63%;---color-4: 195 100% 63%;---color-5: 90 100% 63%;+ /* Sidebar colors */--sidebar-background: 0 0% 98%;---sidebar-foreground: 240 5.3% 26.1%;-- --sidebar-primary: 240 5.9% 10%;-- --sidebar-primary-foreground: 0 0% 98%;-- --sidebar-accent: 240 4.8% 95.9%;-- --sidebar-accent-foreground: 240 5.9% 10%;-- --sidebar-border: 220 13% 91%;-- --sidebar-ring: 217.2 91.2% 59.8%;+ --sidebar-primary: 221.2 83.2% 53.3%;+ --sidebar-primary-foreground: 210 40% 98%;+ --sidebar-accent: 210 40% 96%;+ --sidebar-accent-foreground: 222.2 84% 4.9%;+ --sidebar-border: 214.3 31.8% 91.4%;+ --sidebar-ring: 221.2 83.2% 53.3%;++ /* Utility */+ --radius: 0.5rem;}.dark {- --background: 240 10% 3.9%;- --foreground: 0 0% 98%;-- --card: 240 10% 3.9%;- --card-foreground: 0 0% 98%;-- --popover: 240 10% 3.9%;- --popover-foreground: 0 0% 98%;-- --primary: 0 0% 98%;- --primary-foreground: 240 5.9% 10%;-- --secondary: 240 3.7% 15.9%;- --secondary-foreground: 0 0% 98%;-- --muted: 240 3.7% 15.9%;- --muted-foreground: 240 5% 64.9%;-- --accent: 240 3.7% 15.9%;- --accent-foreground: 0 0% 98%;-- --destructive: 0 62.8% 30.6%;- --destructive-foreground: 0 0% 98%;-- --border: 240 3.7% 15.9%;- --input: 240 3.7% 15.9%;- --ring: 240 4.9% 83.9%;+ /* Base colors */+ --background: 0 0% 0%;+ --foreground: 210 40% 98%;++ /* Surface colors */+ --surface: 0 0% 5%;+ --surface-secondary: 0 0% 8%;+ --surface-tertiary: 0 0% 12%;++ /* Card colors */+ --card: 0 0% 3%;+ --card-foreground: 210 40% 98%;+ --card-hover: 0 0% 6%;++ /* Popover colors */+ --popover: 0 0% 3%;+ --popover-foreground: 210 40% 98%;++ /* Primary brand colors */+ --primary: 217.2 91.2% 59.8%;+ --primary-foreground: 0 0% 0%;+ --primary-hover: 217.2 91.2% 65%;+ --primary-muted: 217.2 91.2% 15%;++ /* Secondary colors */+ --secondary: 0 0% 10%;+ --secondary-foreground: 210 40% 98%;+ --secondary-hover: 0 0% 15%;++ /* Success colors */+ --success: 142.1 70.6% 45.3%;+ --success-foreground: 144.9 80.4% 10%;+ --success-muted: 142.1 70.6% 15%;++ /* Warning colors */+ --warning: 32.4 95.4% 58%;+ --warning-foreground: 26 83.3% 14.1%;+ --warning-muted: 32.4 95.4% 15%;++ /* Error/Destructive colors */+ --destructive: 0 75.7% 60.2%;+ --destructive-foreground: 210 40% 98%;+ --destructive-hover: 0 75.7% 65%;+ --destructive-muted: 0 75.7% 15%;++ /* Info colors */+ --info: 199.4 89.2% 58.4%;+ --info-foreground: 0 0% 0%;+ --info-muted: 199.4 89.2% 15%;++ /* Muted colors */+ --muted: 0 0% 8%;+ --muted-foreground: 215 20.2% 65.1%;++ /* Accent colors */+ --accent: 0 0% 8%;+ --accent-foreground: 210 40% 98%;+ --accent-hover: 0 0% 12%;++ /* Border and input colors */+ --border: 0 0% 15%;+ --input: 0 0% 10%;+ --input-focus: 217.2 91.2% 59.8%;+ --ring: 217.2 91.2% 59.8%;++ /* Text colors */+ --text-primary: 210 40% 98%;+ --text-secondary: 215 20.2% 65.1%;+ --text-tertiary: 215.4 16.3% 50%;+ --text-disabled: 215.4 16.3% 35%;++ /* Brand accent colors (same as light) */+ --brand-1: 0 100% 63%;+ --brand-2: 270 100% 63%;+ --brand-3: 210 100% 63%;+ --brand-4: 195 100% 63%;+ --brand-5: 90 100% 63%;++ /* Rainbow button color mappings */--color-1: 0 100% 63%;--color-2: 270 100% 63%;--color-3: 210 100% 63%;--color-4: 195 100% 63%;--color-5: 90 100% 63%;- --sidebar-background: 240 5.9% 10%;- --sidebar-foreground: 240 4.8% 95.9%;- --sidebar-primary: 224.3 76.3% 48%;- --sidebar-primary-foreground: 0 0% 100%;- --sidebar-accent: 240 3.7% 15.9%;- --sidebar-accent-foreground: 240 4.8% 95.9%;- --sidebar-border: 240 3.7% 15.9%;++ /* Sidebar colors */+ --sidebar-background: 0 0% 0%;+ --sidebar-foreground: 210 40% 98%;+ --sidebar-primary: 217.2 91.2% 59.8%;+ --sidebar-primary-foreground: 0 0% 0%;+ --sidebar-accent: 0 0% 8%;+ --sidebar-accent-foreground: 210 40% 98%;+ --sidebar-border: 0 0% 15%;--sidebar-ring: 217.2 91.2% 59.8%;}}@@ -109,6 +205,13 @@* {@apply border-border;}++ /* Prevent flash during theme initialization and support transparency */+ html {+ background-color: hsl(var(--background));+ transition: background-color 0ms; /* Instant transition to prevent flash */+ }+body {@apply bg-background text-foreground !pointer-events-auto !overscroll-none;}@@ -138,6 +241,19 @@display: none; /* Chrome, Safari and Opera */}+ @keyframes shimmer {+ 0% {+ background-position: -200% 0;+ }+ 100% {+ background-position: 200% 0;+ }+ }++ .animate-shimmer {+ animation: shimmer 1.5s infinite linear;+ }+}@@ -166,3 +282,46 @@position: absolute !important;}+/* PatternFly LogViewer dark theme overrides */+.dark .pf-v5-c-log-viewer {+ background-color: hsl(var(--background)) !important;+ color: hsl(var(--foreground)) !important;+}++.dark .pf-v5-c-log-viewer__main {+ background-color: hsl(var(--background)) !important;+}++.dark .pf-v5-c-log-viewer__list {+ background-color: hsl(var(--background)) !important;+}++.dark .pf-v5-c-log-viewer__list-item {+ background-color: hsl(var(--background)) !important;+ color: hsl(var(--foreground)) !important;+ border-color: hsl(var(--border)) !important;+}++.dark .pf-v5-c-toolbar {+ background-color: hsl(var(--background)) !important;+ border-color: hsl(var(--border)) !important;+}++.dark .pf-v5-c-toolbar__content {+ background-color: hsl(var(--background)) !important;+}++.dark .pf-v5-c-text-input-group {+ background-color: hsl(var(--input)) !important;+}++.dark .pf-v5-c-text-input-group__text-input {+ background-color: hsl(var(--input)) !important;+ color: hsl(var(--foreground)) !important;+ border-color: hsl(var(--border)) !important;+}++.dark .pf-v5-c-text-input-group__text-input::placeholder {+ color: hsl(var(--muted-foreground)) !important;+}+diff --git a/openrewind/app/layout.tsx b/openrewind/app/layout.tsxindex 6f4fdb3b5..72c2807d3 100644--- a/openrewind/app/layout.tsx+++ b/openrewind/app/layout.tsx@@ -63,6 +63,25 @@ export default function RootLayout({return (<html lang="en" suppressHydrationWarning>+ <head>+ <script+ dangerouslySetInnerHTML={{+ __html: `+ (function() {+ try {+ var theme = localStorage.getItem('openrewind-ui-theme');+ if (!theme) {+ theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';+ }+ document.documentElement.classList.add(theme);+ } catch (e) {+ document.documentElement.classList.add('light');+ }+ })();+ `,+ }}+ />+ </head><Providers><body className={`${inter.className} scrollbar-hide`}><DeeplinkHandler />diff --git a/openrewind/app/onboarding/page.tsx b/openrewind/app/onboarding/page.tsxindex e062320c3..9fa74a575 100644--- a/openrewind/app/onboarding/page.tsx+++ b/openrewind/app/onboarding/page.tsx@@ -7,6 +7,7 @@ import OnboardingIntro from "@/components/onboarding/introduction";import OnboardingAPISetup from "@/components/onboarding/api-setup";import OnboardingInstructions from "@/components/onboarding/explain-instructions";import OnboardingLogin from "@/components/onboarding/login";+import OnboardingShortcuts from "@/components/onboarding/shortcuts";import { useOnboarding } from "@/lib/hooks/use-onboarding";import posthog from "posthog-js";import { commands } from "@/lib/utils/tauri";@@ -16,6 +17,7 @@ type SlideKey =| "status"| "login"| "apiSetup"+ | "shortcuts"| "instructions";// Window size configurations for each slide@@ -24,6 +26,7 @@ const SLIDE_WINDOW_SIZES: Record<SlideKey, { width: number; height: number }> =status: { width: 1100, height: 850 }, // Good for status checkslogin: { width: 1100, height: 680 }, // Compact for login formapiSetup: { width: 1100, height: 1000 }, // Taller for AI presets configuration+ shortcuts: { width: 1100, height: 850 }, // Good size for shortcuts displayinstructions: { width: 1100, height: 1050 }, // Largest for the final comprehensive instructions};@@ -37,6 +40,8 @@ const getNextSlide = (currentSlide: SlideKey): SlideKey | null => {case "login":return "apiSetup";case "apiSetup":+ return "shortcuts";+ case "shortcuts":return "instructions";case "instructions":return null;@@ -55,8 +60,10 @@ const getPrevSlide = (currentSlide: SlideKey): SlideKey | null => {return "status";case "apiSetup":return "login";- case "instructions":+ case "shortcuts":return "apiSetup";+ case "instructions":+ return "shortcuts";default:return null;}@@ -273,18 +280,18 @@ export default function OnboardingPage() {return (<div className="flex flex-col w-full h-screen overflow-hidden bg-background">{/* Progress indicator with drag region */}- <div className="w-full bg-secondary p-4" data-tauri-drag-region>+ <div className="w-full bg-secondary p-4 border-b border-border" data-tauri-drag-region><div className="flex items-center justify-between max-w-4xl mx-auto"><div className="flex items-center space-x-2">- <span className="text-sm font-medium">Progress:</span>- <div className="text-sm text-muted-foreground">- Step {["intro", "status", "login", "apiSetup", "instructions"].indexOf(currentSlide) + 1} of 5+ <span className="text-sm font-medium text-text-primary">Progress:</span>+ <div className="text-sm text-text-secondary">+ Step {["intro", "status", "login", "apiSetup", "shortcuts", "instructions"].indexOf(currentSlide) + 1} of 6</div></div><buttononClick={handleSkip}disabled={isTransitioning}- className="text-sm text-muted-foreground hover:text-foreground disabled:opacity-50"+ className="text-sm text-text-secondary hover:text-text-primary disabled:opacity-50 transition-colors">Skip onboarding</button>@@ -325,6 +332,14 @@ export default function OnboardingPage() {handlePrevSlide={handlePrevSlide}/>)}+ {currentSlide === "shortcuts" && (+ <OnboardingShortcuts+ className={`transition-opacity duration-300 ease-in-out w-full+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}+ handleNextSlide={handleNextSlide}+ handlePrevSlide={handlePrevSlide}+ />+ )}{currentSlide === "instructions" && (<OnboardingInstructionsclassName={`transition-opacity duration-300 ease-in-out w-fulldiff --git a/openrewind/app/page.tsx b/openrewind/app/page.tsxindex 7cf2c1bf7..19da99e61 100644--- a/openrewind/app/page.tsx+++ b/openrewind/app/page.tsx@@ -126,26 +126,26 @@ export default function Home() {return (<div className="flex flex-col items-center flex-1 mx-auto relative scrollbar-hide">{/* Transparent titlebar area */}- <div className="h-8 bg-transparent w-full" data-tauri-drag-region>+ <div className="h-8 bg-gradient-to-b from-black/15 to-transparent w-full fixed top-0 left-0 z-50" data-tauri-drag-region><div className="flex items-center justify-between gap-2"><div/>- <h1 className="text-xs font-bold">OpenRewind</h1>+ <h1 className="text-xs font-bold"></h1><div className="flex items-center gap-2"><HealthStatus className="cursor-pointer" /><Popover open={isFeedbackOpen} onOpenChange={setIsFeedbackOpen}><PopoverTrigger asChild>- <Button variant="ghost" size="icon">+ <Button variant="link" size="icon"><Mail className="h-4 w-4" /></Button></PopoverTrigger>- <PopoverContent className="w-100 rounded-2xl">+ <PopoverContent className="w-100 rounded-2xl bg-background border border-border"><ShareLogsButtonshowShareLink={false}onComplete={() => setIsFeedbackOpen(false)}/></PopoverContent></Popover>- <Button variant="ghost" size="icon" onClick={() => openSettingsWindow()}>+ <Button variant="link" size="icon" onClick={() => openSettingsWindow()}><Settings className="h-4 w-4" /></Button></div>@@ -161,16 +161,16 @@ export default function Home() {<LoginDialog /><ModelDownloadTracker />{!isServerDown ? (- <div className="w-full scrollbar-hide">+ <div className="w-full scrollbar-hide bg-background"><Timeline /></div>) : (- <div className="flex items-center justify-center h-screen p-4">+ <div className="flex items-center justify-center h-screen p-4 bg-background w-full"><div className="max-w-lg w-full space-y-6">{/* Header */}<div className="text-center space-y-4"><div className="flex flex-col items-center gap-3">- <div className="w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center">+ <div className="w-16 h-16 rounded-full bg-destructive/20 flex items-center justify-center border border-destructive/15"><AlertTriangle className="w-8 h-8 text-destructive" /></div><div>@@ -183,7 +183,7 @@ export default function Home() {</div>{/* Actions Card */}- <div className="bg-card border rounded-lg p-6 space-y-6">+ <div className="bg-card border border-border rounded-lg p-6 space-y-6">{/* Server Control */}<div className="space-y-4"><div className="flex items-center justify-between">@@ -196,7 +196,7 @@ export default function Home() {<ButtononClick={handleRestartServer}disabled={isRestarting}- className="flex items-center gap-2"+ className="flex items-center gap-2 bg-muted"><RefreshCw className={`h-4 w-4 ${isRestarting ? 'animate-spin' : ''}`} />{isRestarting ? "Starting..." : "Start Server"}diff --git a/openrewind/app/providers.tsx b/openrewind/app/providers.tsxindex a8ac89521..78622cf1e 100644--- a/openrewind/app/providers.tsx+++ b/openrewind/app/providers.tsx@@ -5,6 +5,7 @@ import { PostHogProvider } from "posthog-js/react";import { useEffect } from "react";import { ChangelogDialogProvider } from "@/lib/hooks/use-changelog-dialog";import { SettingsProvider } from "@/lib/hooks/use-settings";+import { ThemeProvider } from "@/components/theme-provider";import { forwardRef } from "react";import { NuqsAdapter } from "nuqs/adapters/next/app";@@ -26,11 +27,13 @@ export const Providers = forwardRef<return (<NuqsAdapter>- <SettingsProvider>- <ChangelogDialogProvider>- <PostHogProvider client={posthog}>{children}</PostHogProvider>- </ChangelogDialogProvider>- </SettingsProvider>+ <ThemeProvider defaultTheme="light" storageKey="openrewind-ui-theme">+ <SettingsProvider>+ <ChangelogDialogProvider>+ <PostHogProvider client={posthog}>{children}</PostHogProvider>+ </ChangelogDialogProvider>+ </SettingsProvider>+ </ThemeProvider></NuqsAdapter>);});diff --git a/openrewind/app/settings/page.tsx b/openrewind/app/settings/page.tsxindex 93e8eb6a8..8afa2f691 100644--- a/openrewind/app/settings/page.tsx+++ b/openrewind/app/settings/page.tsx@@ -126,9 +126,7 @@ function SettingsPageContent() {<div className="w-80 border-r bg-background flex flex-col min-h-0 rounded-tl-lg"><div className="p-6 border-b"><div className="space-y-3">- <h1 className="text-2xl font-bold text-foreground">- Settings- </h1>+ <h1 className="text-2xl font-bold text-foreground">Settings</h1></div></div>@@ -137,9 +135,7 @@ function SettingsPageContent() {{settingsSections.map((section) => (<buttonkey={section.id}- onClick={() =>- setActiveSection(section.id as SettingsSection)- }+ onClick={() => setActiveSection(section.id as SettingsSection)}className={cn("w-full flex items-start space-x-3 px-4 py-3 rounded-xl transition-all duration-200 text-left group",activeSection === section.iddiff --git a/openrewind/components/header.tsx b/openrewind/components/header.tsxindex 793e85ac8..126f34ccc 100644--- a/openrewind/components/header.tsx+++ b/openrewind/components/header.tsx@@ -1,6 +1,7 @@"use client";import { Button } from "@/components/ui/button";import HealthStatus from "@/components/screenpipe-status";+import { ThemeToggle } from "@/components/theme-toggle";import React from "react";import {@@ -117,70 +118,64 @@ export default function Header() {return (<div><div className="relative z-[-1] flex flex-col items-center">- <div className="relative flex flex-col items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px] gap-4">+ <div className="relative flex flex-col items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-background before:to-transparent before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-primary/20 after:via-primary/30 after:content-[''] sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px] gap-4"><div className="w-[180px] h-[50px]" /></div></div>- <div className="flex space-x-4 absolute top-4 right-4">+ <div className="flex items-center space-x-2 absolute top-4 right-4"><Popover open={isFeedbackOpen} onOpenChange={setIsFeedbackOpen}><PopoverTrigger asChild>- <Button variant="outline">+ <Button variant="outline" className="bg-card hover:bg-card-hover"><Mail className="h-3.5 w-3.5 mr-2" />feedback</Button></PopoverTrigger>- <PopoverContent className="w-100 rounded-2xl" >+ <PopoverContent className="w-100 rounded-2xl bg-card border-border"><ShareLogsButton showShareLink={false} onComplete={() => setIsFeedbackOpen(false)} /></PopoverContent></Popover>- <HealthStatus className="mt-3 cursor-pointer" />++ <ThemeToggle className="bg-card hover:bg-card-hover" />++ <HealthStatus className="cursor-pointer" />- {/* <Button- variant="ghost"- size="icon"- onClick={() => setShowInbox(!showInbox)}- className="cursor-pointer h-8 w-8 p-0"- >- <Bell className="h-4 w-4" />- <span className="sr-only">notifications</span>- </Button> */}<DropdownMenu><DropdownMenuTrigger asChild><Buttonvariant="ghost"size="icon"- className="cursor-pointer h-8 w-8 p-0"+ className="cursor-pointer h-8 w-8 p-0 bg-card hover:bg-card-hover"><User className="h-4 w-4" /><span className="sr-only">user menu</span></Button></DropdownMenuTrigger>- <DropdownMenuContent className="mr-4" align="end">- <DropdownMenuLabel>account</DropdownMenuLabel>- <DropdownMenuSeparator />+ <DropdownMenuContent className="mr-4 bg-card border-border" align="end">+ <DropdownMenuLabel className="text-text-primary">account</DropdownMenuLabel>+ <DropdownMenuSeparator className="bg-border" /><DropdownMenuGroup><DropdownMenuItemonSelect={async (e) => {e.preventDefault();await openSettingsWindow();}}- className="cursor-pointer p-1.5"+ className="cursor-pointer p-1.5 hover:bg-accent text-text-primary"><Settings2 className="mr-2 h-4 w-4" /><span>settings</span></DropdownMenuItem></DropdownMenuGroup>- <DropdownMenuSeparator />+ <DropdownMenuSeparator className="bg-border" /><DropdownMenuGroup><DropdownMenuItem- className="cursor-pointer"+ className="cursor-pointer hover:bg-accent text-text-primary"onClick={() => open("https://docs.screenpi.pe")}><Book className="mr-2 h-4 w-4" /><span>check docs</span></DropdownMenuItem><DropdownMenuItem- className="cursor-pointer"+ className="cursor-pointer hover:bg-accent text-text-primary"onClick={() =>open("https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20..."@@ -191,17 +186,17 @@ export default function Header() {<span>support us</span></DropdownMenuItem></DropdownMenuGroup>- <DropdownMenuSeparator />+ <DropdownMenuSeparator className="bg-border" /><DropdownMenuGroup><DropdownMenuItem- className="cursor-pointer"+ className="cursor-pointer hover:bg-accent text-text-primary"onClick={() => handleShowOnboarding()}><Play className="mr-2 h-4 w-4" /><span>show onboarding</span></DropdownMenuItem><DropdownMenuItem- className="cursor-pointer"+ className="cursor-pointer hover:bg-accent text-text-primary"onClick={() => setShowChangelogDialog(true)}><Folder className="mr-2 h-4 w-4" />@@ -212,7 +207,7 @@ export default function Header() {</DropdownMenu></div>{showInbox && (- <div className="absolute right-4 top-16 z-50 bg-white shadow-lg rounded-lg">+ <div className="absolute right-4 top-16 z-50 bg-card shadow-lg rounded-lg border border-border"><InboxMessagesmessages={messages}onMessageRead={handleMessageRead}diff --git a/openrewind/components/log-file-button.tsx b/openrewind/components/log-file-button.tsxindex d984c854b..207ab9c81 100644--- a/openrewind/components/log-file-button.tsx+++ b/openrewind/components/log-file-button.tsx@@ -54,35 +54,39 @@ const LogContent = ({};return (- <div className="relative">- <LogViewer- theme="dark"- isTextWrapped={false}- hasLineNumbers={true}- data={content}- height="58vh"- toolbar={- <Toolbar>- <ToolbarContent className="p-2 relative w-full">- <ToolbarItem>- <LogViewerSearch- placeholder="Search value"- minSearchChars={3}- />- </ToolbarItem>- <ToolbarItem className="p-2 absolute right-0 top-0">- <Button- variant="outline"- size="sm"- onClick={handleOpenInDefaultApp}- >- open in default app- </Button>- </ToolbarItem>- </ToolbarContent>- </Toolbar>- }- />+ <div className="relative bg-background">+ <div className="bg-background text-foreground rounded-md overflow-hidden">+ <LogViewer+ theme="dark"+ isTextWrapped={false}+ hasLineNumbers={true}+ data={content}+ height="58vh"+ toolbar={+ <Toolbar className="bg-background border-b border-border">+ <ToolbarContent className="p-2 relative w-full bg-background">+ <ToolbarItem>+ <div className="bg-background">+ <LogViewerSearch+ placeholder="Search value"+ minSearchChars={3}+ />+ </div>+ </ToolbarItem>+ <ToolbarItem className="p-2 absolute right-0 top-0">+ <Button+ variant="outline"+ size="sm"+ onClick={handleOpenInDefaultApp}+ >+ open in default app+ </Button>+ </ToolbarItem>+ </ToolbarContent>+ </Toolbar>+ }+ />+ </div></div>);};diff --git a/openrewind/components/log-viewer-v2.tsx b/openrewind/components/log-viewer-v2.tsxindex 2c4306d88..13621f535 100644--- a/openrewind/components/log-viewer-v2.tsx+++ b/openrewind/components/log-viewer-v2.tsx@@ -66,7 +66,7 @@ const LogViewer: React.FC<LogViewerProps> = ({ className }) => {<divref={logContainerRef}className={cn(- "h-64 overflow-y-auto bg-black p-2 font-mono text-sm text-white",+ "h-64 overflow-y-auto bg-background p-2 font-mono text-sm text-foreground border border-border","whitespace-pre-wrap break-words",className)}diff --git a/openrewind/components/onboarding/api-setup.tsx b/openrewind/components/onboarding/api-setup.tsxindex e28fcf8ce..82c6c259f 100644--- a/openrewind/components/onboarding/api-setup.tsx+++ b/openrewind/components/onboarding/api-setup.tsx@@ -153,7 +153,7 @@ const OnboardingAPISetup: React.FC<OnboardingAPISetupProps> = ({src="/128x128.png"alt="screenpipe-logo"/>- <h1 className="text-center text-2xl">+ <h1 className="text-center text-2xl text-text-primary">setup your ai settings</h1></div>@@ -165,7 +165,7 @@ const OnboardingAPISetup: React.FC<OnboardingAPISetupProps> = ({open("https://github.com/ollama/ollama?tab=readme-ov-file#ollama")}href="#"- className="text-muted-foreground text-sm !text-center hover:underline"+ className="text-text-secondary text-sm !text-center hover:underline hover:text-text-primary transition-colors">don't have api key ? set up ollama locally<ArrowUpRight className="inline w-4 h-4 ml-1" />diff --git a/openrewind/components/onboarding/dev-configuration.tsx b/openrewind/components/onboarding/dev-configuration.tsxindex d20530e93..8d97c9ad1 100644--- a/openrewind/components/onboarding/dev-configuration.tsx+++ b/openrewind/components/onboarding/dev-configuration.tsx@@ -95,14 +95,14 @@ const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({src="/128x128.png"alt="screenpipe-logo"/>- <DialogTitle className="text-center text-2xl">+ <DialogTitle className="text-center text-2xl text-text-primary">screenpipe in dev mode</DialogTitle></DialogHeader><div className="mt-8 w-full flex justify-around flex-col"><div className="mx-3">- <p className="text-muted-foreground text-[14px]">- <span className="font-medium prose text-[14px] mr-1">+ <p className="text-text-secondary text-[14px]">+ <span className="font-medium prose text-[14px] mr-1 text-text-primary">by using the cli,</span>you can manually configure and manage backend processes for advanced@@ -111,14 +111,14 @@ const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({</div>{instructions.length > 0 && (<div className="mx-3 mt-1">- <h1 className="font-medium text-md">+ <h1 className="font-medium text-md text-text-primary">run the screenpipe backend via cli:</h1><ul className="mt-0">{instructions.map((instructions, index) => (<li key={index} className="list-disc mt-1">- <p className="text-muted-foreground text-sm ml-4">- <span className="font-medium text-nowrap text-[14px] mr-1 prose">+ <p className="text-text-secondary text-sm ml-4">+ <span className="font-medium text-nowrap text-[14px] mr-1 prose text-text-primary">{instructions.label}</span>{instructions.description}@@ -136,13 +136,13 @@ const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({<aonClick={() => open("https://docs.screenpi.pe/")}href="#"- className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"+ className="mt-4 text-text-secondary text-sm mr-auto ml-auto !text-center hover:underline">learn more about screenpipe args & api<ArrowUpRight className="inline w-4 h-4 ml-1 " /></a></div>- <p className="text-xs text-muted-foreground text-center mt-2">+ <p className="text-xs text-text-secondary text-center mt-2">note: if you use dev mode, you will have to start and maintain therecording process yourself in the terminal</p>diff --git a/openrewind/components/onboarding/dev-or-non-dev.tsx b/openrewind/components/onboarding/dev-or-non-dev.tsxindex 87b780714..141cf627d 100644--- a/openrewind/components/onboarding/dev-or-non-dev.tsx+++ b/openrewind/components/onboarding/dev-or-non-dev.tsx@@ -47,14 +47,14 @@ const CardItem: React.FC<{className={`absolute inset-0 rounded-lg transition-transform duration-300 ease-out group-hover:scale-105`}/><Card- className={`p-4 h-64 mt-[-5px] cursor-pointer bg-white dark:bg-gray-800 transition-transform duration-300 ease-out group-hover:scale-105+ className={`p-4 h-64 mt-[-5px] cursor-pointer bg-card transition-transform duration-300 ease-out group-hover:scale-105${isSelected ? "bg-accent" : ""}`}onClick={onClick}><CardContent className="flex flex-col w-60 justify-start">- <Icon className="w-12 h-12 mx-auto" />- <h2 className="font-semibold text-xl text-center mt-1">{title}</h2>- <span className="text-sm mt-0">{description}</span>+ <Icon className="w-12 h-12 mx-auto text-text-primary" />+ <h2 className="font-semibold text-xl text-center mt-1 text-text-primary">{title}</h2>+ <span className="text-sm mt-0 text-text-secondary">{description}</span></CardContent></Card></div>@@ -112,7 +112,7 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({src="/128x128.png"alt="screenpipe-logo"/>- <DialogTitle className="text-center text-2xl">+ <DialogTitle className="text-center text-2xl text-text-primary">how do you prefer to use screenpipe?</DialogTitle></DialogHeader>diff --git a/openrewind/components/onboarding/explain-instructions.tsx b/openrewind/components/onboarding/explain-instructions.tsxindex 6885ae6e8..5be12f47f 100644--- a/openrewind/components/onboarding/explain-instructions.tsx+++ b/openrewind/components/onboarding/explain-instructions.tsx@@ -70,10 +70,10 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({><Bot className="w-8 h-8 text-white" /></motion.div>- <h1 className="text-center text-2xl font-bold mb-2">+ <h1 className="text-center text-2xl font-bold mb-2 text-text-primary">You're All Set! 🎉</h1>- <p className="text-center text-muted-foreground max-w-md">+ <p className="text-center text-text-secondary max-w-md">OpenRewind is now configured and ready to help you remember everything. Here's how to get the most out of it.</p></div>@@ -87,13 +87,13 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({initial={{ opacity: 0, y: 20 }}animate={{ opacity: 1, y: 0 }}transition={{ delay: index * 0.1 }}- className="bg-card border rounded-xl p-4 text-center"+ className="bg-card border border-border rounded-xl p-4 text-center"><div className="flex items-center justify-center mb-3"><step.icon className={`w-8 h-8 ${step.color}`} /></div>- <h3 className="font-semibold text-sm mb-1">{step.title}</h3>- <p className="text-xs text-muted-foreground">{step.description}</p>+ <h3 className="font-semibold text-sm mb-1 text-text-primary">{step.title}</h3>+ <p className="text-xs text-text-secondary">{step.description}</p></motion.div>))}</div>@@ -103,17 +103,17 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({initial={{ opacity: 0, y: 20 }}animate={{ opacity: 1, y: 0 }}transition={{ delay: 0.4 }}- className="bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/20 dark:to-purple-950/20 rounded-xl p-6 max-w-2xl"+ className="bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/20 dark:to-purple-950/20 rounded-xl p-6 max-w-2xl border border-border"><div className="flex items-center justify-center mb-4"><Settings className="w-5 h-5 text-orange-500 mr-2" />- <h3 className="text-lg font-semibold">Quick Tips</h3>+ <h3 className="text-lg font-semibold text-text-primary">Quick Tips</h3></div><ul className="space-y-2 text-sm">{shortcuts.map((shortcut, index) => (<li key={index} className="flex items-start"><div className="w-2 h-2 bg-primary rounded-full mt-2 mr-3 flex-shrink-0" />- <span className="text-muted-foreground">{shortcut.key} - {shortcut.description}</span>+ <span className="text-text-secondary">{shortcut.key} - {shortcut.description}</span></li>))}</ul>@@ -126,11 +126,11 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({transition={{ delay: 0.6 }}className="text-center">- <p className="text-sm text-muted-foreground mb-4">+ <p className="text-sm text-text-secondary mb-4">Start using your computer normally. OpenRewind will build your timeline in the background.</p>- <div className="bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-3">- <p className="text-xs text-amber-800 dark:text-amber-200">+ <div className="bg-warning-muted border border-warning rounded-lg p-3">+ <p className="text-xs text-text-primary">💡 <strong>Pro tip:</strong> Come back in a few minutes to see your first recorded activities!</p></div>@@ -141,7 +141,7 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({<Buttonvariant="ghost"onClick={handlePrevSlide}- className="text-muted-foreground"+ className="text-text-secondary hover:text-text-primary">Back</Button>diff --git a/openrewind/components/onboarding/introduction.tsx b/openrewind/components/onboarding/introduction.tsxindex e3da4d9db..1b67ef1a4 100644--- a/openrewind/components/onboarding/introduction.tsx+++ b/openrewind/components/onboarding/introduction.tsx@@ -86,7 +86,7 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({<h1 className="text-center text-3xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">Welcome to OpenRewind</h1>- <p className="text-center text-lg text-muted-foreground mt-2">+ <p className="text-center text-lg text-text-secondary mt-2">Your AI-powered digital memory assistant</p></div>@@ -97,34 +97,34 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({{features.map((feature, index) => (<motion.divkey={index}- className="bg-card border rounded-xl p-4 hover:shadow-lg transition-all duration-300"+ className="bg-card border border-border rounded-xl p-4 hover:shadow-lg transition-all duration-300"initial={{ opacity: 0, y: 20 }}animate={{ opacity: 1, y: 0 }}transition={{ delay: index * 0.1 }}><feature.icon className={`w-8 h-8 ${feature.color} mb-3`} />- <h3 className="font-semibold text-sm mb-1">{feature.title}</h3>- <p className="text-xs text-muted-foreground">{feature.description}</p>+ <h3 className="font-semibold text-sm mb-1 text-text-primary">{feature.title}</h3>+ <p className="text-xs text-text-secondary">{feature.description}</p></motion.div>))}</div><div className="bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/20 dark:to-purple-950/20 rounded-xl p-6 max-w-2xl">- <h3 className="text-lg font-semibold text-center mb-3">How it works</h3>+ <h3 className="text-lg font-semibold text-center mb-3 text-text-primary">How it works</h3><div className="flex items-center justify-center space-x-3 text-sm"><div className="flex items-center space-x-1"><Video className="w-4 h-4 text-blue-500" />- <span>Record</span>+ <span className="text-text-primary">Record</span></div>- <ArrowRight className="w-4 h-4 text-muted-foreground" />+ <ArrowRight className="w-4 h-4 text-text-secondary" /><div className="flex items-center space-x-1"><Clock className="w-4 h-4 text-purple-500" />- <span>Timeline</span>+ <span className="text-text-primary">Timeline</span></div>- <ArrowRight className="w-4 h-4 text-muted-foreground" />+ <ArrowRight className="w-4 h-4 text-text-secondary" /><div className="flex items-center space-x-1"><Brain className="w-4 h-4 text-orange-500" />- <span>AI Search</span>+ <span className="text-text-primary">AI Search</span></div></div></div>@@ -133,7 +133,7 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({<Buttonvariant="ghost"onClick={() => setShowDemo(true)}- className="text-muted-foreground"+ className="text-text-secondary hover:text-text-primary"><Play className="w-4 h-4 mr-2" />See Demo@@ -141,33 +141,33 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({<Buttonvariant="ghost"onClick={handleSkip}- className="text-muted-foreground"+ className="text-text-secondary hover:text-text-primary">Skip Setup</Button><RainbowButton onClick={handleNextSlide}>Get Started- <ArrowRight className="w-4 h-4 ml-2" />+ <ArrowRight className="w-4 w-4 ml-2" /></RainbowButton></div></>) : (<div className="max-w-2xl">- <div className="bg-black rounded-xl overflow-hidden shadow-2xl">- <div className="bg-gray-800 px-4 py-2 flex items-center space-x-2">+ <div className="bg-surface rounded-xl overflow-hidden shadow-2xl border border-border">+ <div className="bg-surface-secondary px-4 py-2 flex items-center space-x-2"><div className="w-3 h-3 bg-red-500 rounded-full"></div><div className="w-3 h-3 bg-yellow-500 rounded-full"></div><div className="w-3 h-3 bg-green-500 rounded-full"></div>- <span className="text-gray-300 text-sm ml-2">OpenRewind Demo</span>+ <span className="text-text-secondary text-sm ml-2">OpenRewind Demo</span></div>- <div className="p-6 h-64 bg-gradient-to-br from-gray-900 to-gray-800 relative overflow-hidden">+ <div className="p-6 h-64 bg-gradient-to-br from-surface to-surface-tertiary relative overflow-hidden"><motion.divclassName="absolute inset-0 flex items-center justify-center"initial={{ opacity: 0 }}animate={{ opacity: 1 }}transition={{ duration: 0.5 }}>- <div className="text-center text-white space-y-4">+ <div className="text-center text-text-primary space-y-4">{demoSteps.map((step, index) => (<motion.pkey={index}@@ -188,14 +188,14 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({<Buttonvariant="ghost"onClick={() => setShowDemo(false)}- className="text-muted-foreground"+ className="text-text-secondary hover:text-text-primary">Back</Button><Buttonvariant="ghost"onClick={handleSkip}- className="text-muted-foreground"+ className="text-text-secondary hover:text-text-primary">Skip Setup</Button>diff --git a/openrewind/components/onboarding/login.tsx b/openrewind/components/onboarding/login.tsxindex 52b31a697..0bc6b3844 100644--- a/openrewind/components/onboarding/login.tsx+++ b/openrewind/components/onboarding/login.tsx@@ -23,22 +23,22 @@ const OnboardingLogin: React.FC<OnboardingLoginProps> = ({<div className="w-full h-full flex flex-col items-center justify-center space-y-6 py-4"><div className="w-full max-w-md space-y-6"><div className="text-center space-y-2 mb-8">- <h1 className="text-3xl font-bold">login to openrewind</h1>- <p className="text-sm text-muted-foreground">+ <h1 className="text-3xl font-bold text-text-primary">login to openrewind</h1>+ <p className="text-sm text-text-secondary">connect your account to unlock all features</p></div>- <div className="p-6 border border-border/50 rounded-lg bg-background/50">+ <div className="p-6 border border-border rounded-lg bg-card"><div className="space-y-4">{settings?.user?.token ? (- <p className="text-sm text-muted-foreground flex items-center justify-center gap-2">- <span className="inline-flex h-2 w-2 rounded-full bg-green-500" />+ <p className="text-sm text-text-secondary flex items-center justify-center gap-2">+ <span className="inline-flex h-2 w-2 rounded-full bg-success" />logged in as {settings?.user?.email}</p>) : (- <p className="text-sm text-muted-foreground flex items-center justify-center gap-2">- <span className="inline-flex h-2 w-2 rounded-full bg-yellow-500" />+ <p className="text-sm text-text-secondary flex items-center justify-center gap-2">+ <span className="inline-flex h-2 w-2 rounded-full bg-warning" />not logged in - some features will be limited</p>)}diff --git a/openrewind/components/onboarding/shortcuts.tsx b/openrewind/components/onboarding/shortcuts.tsxnew file mode 100644index 000000000..f0e7ac648--- /dev/null+++ b/openrewind/components/onboarding/shortcuts.tsx@@ -0,0 +1,269 @@+import React, { useState, useEffect } from "react";+import { cn } from "@/lib/utils";+import { CommandShortcut } from "@/components/ui/command";+import { useSettings } from "@/lib/hooks/use-settings";+import { commands } from "@/lib/utils/tauri";+import { Switch } from "@/components/ui/switch";+import { Pencil } from "lucide-react";+import hotkeys from "hotkeys-js";+import { toast } from "@/components/ui/use-toast";++interface OnboardingShortcutsProps {+ className?: string;+ handleNextSlide: () => void;+ handlePrevSlide: () => void;+}++export default function OnboardingShortcuts({+ className,+ handleNextSlide,+ handlePrevSlide,+}: OnboardingShortcutsProps) {+ const { settings, updateSettings } = useSettings();+ const [recordingShortcut, setRecordingShortcut] = useState<string | null>(null);++ const shortcuts = [+ {+ id: "showScreenpipeShortcut",+ title: "Show/Hide Screenpipe",+ defaultShortcut: "Super+Alt+S",+ description: "Quickly toggle the Screenpipe interface",+ value: settings.showScreenpipeShortcut,+ },+ {+ id: "startRecordingShortcut",+ title: "Start Recording",+ defaultShortcut: "Super+Alt+U",+ description: "Begin screen recording",+ value: settings.startRecordingShortcut,+ },+ {+ id: "stopRecordingShortcut",+ title: "Stop Recording",+ defaultShortcut: "Super+Alt+X",+ description: "End screen recording",+ value: settings.stopRecordingShortcut,+ },+ ];++ useEffect(() => {+ if (!recordingShortcut) return;++ const handleKeyDown = (event: KeyboardEvent) => {+ event.preventDefault();++ const MODIFIER_KEYS = ["SUPER", "CTRL", "ALT", "SHIFT"] as const;+ const KEY_CODE_MAP: Record<number, string> = {+ 224: "SUPER", // Meta key on macOS+ 91: "SUPER", // Left Windows key+ 92: "SUPER", // Right Windows key+ 93: "SUPER", // Context menu key+ 16: "SHIFT",+ 17: "CTRL",+ 18: "ALT",+ };++ const pressedKeys = hotkeys+ .getPressedKeyCodes()+ .map((code) => {+ // Special handling for Shift key+ if (code === 16) {+ return "SHIFT";+ }+ return KEY_CODE_MAP[code] || String.fromCharCode(code).toUpperCase();+ })+ .filter((value, index, self) => self.indexOf(value) === index);++ const modifiers = pressedKeys.filter((k) =>+ MODIFIER_KEYS.includes(k as any)+ );+ const normalKeys = pressedKeys.filter(+ (k) => !MODIFIER_KEYS.includes(k as any)+ );+ const finalKeys = [...modifiers, ...normalKeys];++ if (normalKeys.length > 0) {+ handleEnableShortcut(recordingShortcut, finalKeys.join("+"));+ setRecordingShortcut(null);+ }+ };++ hotkeys.filter = () => true;+ hotkeys("*", handleKeyDown);++ return () => {+ setRecordingShortcut(null);+ hotkeys.unbind("*");+ hotkeys.filter = (event) => {+ const target = (event.target || event.srcElement) as any;+ return !(+ target.isContentEditable ||+ target.tagName === "INPUT" ||+ target.tagName === "TEXTAREA"+ );+ };+ };+ }, [recordingShortcut]);++ const handleEnableShortcut = async (shortcutId: string, keys: string) => {+ try {+ toast({+ title: "Shortcut updated",+ description: `${shortcutId.replace(/_/g, " ")} set to ${keys}`,+ });++ // Update settings+ updateSettings({ [shortcutId]: keys });++ // Sync with backend+ await commands.updateGlobalShortcuts(+ settings.showScreenpipeShortcut,+ settings.startRecordingShortcut,+ settings.stopRecordingShortcut,+ settings.startAudioShortcut,+ settings.stopAudioShortcut,+ settings.pipeShortcuts+ );+ } catch (error) {+ console.error("Error updating shortcut:", error);+ toast({+ title: "Error updating shortcut",+ description: "Failed to register shortcut. Please try a different combination.",+ variant: "destructive",+ });+ }+ };++ const handleDisableShortcut = async (shortcutId: string) => {+ try {+ toast({+ title: "Shortcut disabled",+ description: `${shortcutId.replace(/_/g, " ")} disabled`,+ });++ updateSettings({+ disabledShortcuts: Array.from(+ new Set([...settings.disabledShortcuts, shortcutId])+ ),+ });++ await commands.updateGlobalShortcuts(+ settings.showScreenpipeShortcut,+ settings.startRecordingShortcut,+ settings.stopRecordingShortcut,+ settings.startAudioShortcut,+ settings.stopAudioShortcut,+ settings.pipeShortcuts+ );+ } catch (error) {+ console.error("Error disabling shortcut:", error);+ toast({+ title: "Error disabling shortcut",+ description: "Failed to disable shortcut. Please try again.",+ variant: "destructive",+ });+ }+ };++ const isValueEmpty = (v: string | undefined): boolean =>+ !v || v.trim() === "";++ const getShortcutState = (shortcutId: string): "enabled" | "disabled" | "unassigned" => {+ if (isValueEmpty(settings[shortcutId as keyof typeof settings] as string)) {+ return "unassigned";+ }+ return settings.disabledShortcuts.includes(shortcutId)+ ? "disabled"+ : "enabled";+ };++ return (+ <div className={cn("space-y-8", className)}>+ <div className="space-y-3">+ <h1 className="text-3xl font-bold tracking-tight text-foreground">+ Keyboard Shortcuts+ </h1>+ <p className="text-muted-foreground text-lg">+ Customize your keyboard shortcuts to boost your productivity+ </p>+ </div>++ <div className="space-y-6">+ {shortcuts.map((shortcut) => {+ const currentKeys = isValueEmpty(shortcut.value)+ ? ["Unassigned"]+ : shortcut.value.split("+");++ return (+ <div key={shortcut.id} className="flex items-center justify-between">+ <div className="space-y-1">+ <h4 className="font-medium">{shortcut.title}</h4>+ <p className="text-sm text-muted-foreground">+ {shortcut.description}+ </p>+ </div>+ <div className="flex items-center gap-4">+ <button+ onClick={() => setRecordingShortcut(shortcut.id)}+ className={cn(+ "relative min-w-[140px] rounded-md border px-3 py-2 text-sm",+ "bg-muted/50 hover:bg-muted/70 transition-colors",+ "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-ring",+ recordingShortcut === shortcut.id && "border-primary",+ !shortcut.value && "text-muted-foreground"+ )}+ >+ {recordingShortcut === shortcut.id ? (+ <span className="animate-pulse">recording...</span>+ ) : (+ <span className="flex items-center justify-between gap-2">+ {currentKeys.map((key, i) => (+ <kbd+ key={i}+ className={cn(+ "px-1 rounded",+ shortcut.value ? "bg-background/50" : "bg-transparent"+ )}+ >+ {key}+ </kbd>+ ))}+ <Pencil className="h-3 w-3 opacity-50" />+ </span>+ )}+ </button>++ <Switch+ checked={getShortcutState(shortcut.id) === "enabled"}+ disabled={getShortcutState(shortcut.id) === "unassigned"}+ onCheckedChange={async (checked) => {+ if (checked && shortcut.value) {+ await handleEnableShortcut(shortcut.id, shortcut.value);+ } else {+ await handleDisableShortcut(shortcut.id);+ }+ }}+ />+ </div>+ </div>+ );+ })}+ </div>++ <div className="flex justify-between pt-6">+ <button+ onClick={handlePrevSlide}+ className="px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors"+ >+ Back+ </button>+ <button+ onClick={handleNextSlide}+ className="px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors"+ >+ Continue+ </button>+ </div>+ </div>+ );+}\ No newline at end of filediff --git a/openrewind/components/onboarding/single-codeblock.tsx b/openrewind/components/onboarding/single-codeblock.tsxindex d61b4b657..8daf9c312 100644--- a/openrewind/components/onboarding/single-codeblock.tsx+++ b/openrewind/components/onboarding/single-codeblock.tsx@@ -61,7 +61,7 @@ const CodeBlock: FC<Props> = memo(({ className, language, value }) => {};return (- <div className={` relative w-full font-sans codeblock backdrop-blur-sm bg-zinc-950 ${className}`}>+ <div className={` relative w-full font-sans codeblock bg-card ${className}`}><SyntaxHighlighterlanguage={language}style={coldarkDark}diff --git a/openrewind/components/onboarding/status.tsx b/openrewind/components/onboarding/status.tsxindex 804159eb9..d83d91066 100644--- a/openrewind/components/onboarding/status.tsx+++ b/openrewind/components/onboarding/status.tsx@@ -249,16 +249,16 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({<div className="w-32 h-32 flex items-center justify-center"><img className="w-32 h-32" src="/128x128.png" alt="screenpipe-logo" /></div>- <h1 className="text-center text-2xl">+ <h1 className="text-center text-2xl text-text-primary">setting up screenpipe</h1>- <p className="text-sm text-muted-foreground pt-2">+ <p className="text-sm text-text-secondary pt-2">100% local-first • your data never leaves your device</p>{isMacOS && (- <div className="mt-6 pt-4 border-t w-full flex flex-col items-center">- <h4 className="text-sm font-medium mb-3">check permissions</h4>+ <div className="mt-6 pt-4 border-t border-border w-full flex flex-col items-center">+ <h4 className="text-sm font-medium mb-3 text-text-primary">check permissions</h4><div className="space-y-2"><PermissionButtons type="screen" /><PermissionButtons type="audio" />@@ -267,7 +267,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({</div>)}- <Separator className="w-full my-2" />+ <Separator className="w-full my-2 bg-border" /><div className="flex items-center space-x-2 mt-4"><Switch@@ -314,7 +314,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({strokeLinecap="round"strokeLinejoin="round"xmlns="http://www.w3.org/2000/svg"- className="size-5 animate-spin stroke-zinc-400 mr-2"+ className="size-5 animate-spin text-text-secondary mr-2"><path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12"></path></svg>@@ -325,14 +325,14 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({</Button>) : status === "ok" ? (<div className="flex flex-col items-center mt-4">- <Check className="size-5 stroke-zinc-400" />- <p className="text-sm text-zinc-600 mt-2 text-center">+ <Check className="size-5 text-success" />+ <p className="text-sm text-text-secondary mt-2 text-center">screenpipe setup complete. <br />AI models downloaded.</p></div>) : (- <p className="text-center mt-4">{status}</p>+ <p className="text-center mt-4 text-text-primary">{status}</p>)}<LogFileButton />@@ -345,8 +345,8 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({id="screenshot-preview"><div className="flex items-center justify-between">- <h3 className="text-sm font-medium">live preview</h3>- <span className="text-xs text-muted-foreground">+ <h3 className="text-sm font-medium text-text-primary">live preview</h3>+ <span className="text-xs text-text-secondary">{visionEvent ? "streaming..." : "waiting for stream..."}</span></div>@@ -363,7 +363,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({priority/></div>- <div className="grid grid-cols-2 gap-2 text-xs text-muted-foreground">+ <div className="grid grid-cols-2 gap-2 text-xs text-text-secondary"><div><span className="font-medium">app:</span>{" "}{visionEvent.app_name || "unknown"}@@ -385,7 +385,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({</div></div>) : (- <div className="animate-pulse bg-gray-200 rounded-md w-full h-[250px]" />+ <div className="animate-pulse bg-muted rounded-md w-full h-[250px]" />)}</div>)}diff --git a/openrewind/components/pipe-store/pipe-card.tsx b/openrewind/components/pipe-store/pipe-card.tsxindex c28ee38f2..b6f43d5e5 100644--- a/openrewind/components/pipe-store/pipe-card.tsx+++ b/openrewind/components/pipe-store/pipe-card.tsx@@ -286,7 +286,7 @@ export const PipeCard: React.FC<PipeCardProps> = ({return (<motion.div- className="group border rounded-xl p-5 hover:bg-muted/40 has-[.no-card-hover:hover]:hover:bg-transparent transition-all duration-200 cursor-pointer backdrop-blur-sm relative"+ className="group border rounded-xl p-5 hover:bg-muted/40 has-[.no-card-hover:hover]:hover:bg-transparent transition-all duration-200 cursor-pointer bg-card relative"onClick={() => onClick(pipe)}initial={{ opacity: 0, scale: 0.95 }}animate={{ opacity: 1, scale: 1 }}diff --git a/openrewind/components/rewind/current-frame-timeline.tsx b/openrewind/components/rewind/current-frame-timeline.tsxindex 71a704e52..f4c54002b 100644--- a/openrewind/components/rewind/current-frame-timeline.tsx+++ b/openrewind/components/rewind/current-frame-timeline.tsx@@ -1,5 +1,5 @@import { StreamTimeSeriesResponse } from "@/components/rewind/timeline";-import { FC, useState } from "react";+import React, { FC, useState, useEffect, useRef } from "react";interface CurrentFrameTimelineProps {currentFrame: StreamTimeSeriesResponse;@@ -7,9 +7,9 @@ interface CurrentFrameTimelineProps {export const SkeletonLoader: FC = () => {return (- <div className="absolute inset-0 w-4/5 h-[75vh] mx-auto mt-20 border rounded-xl p-2 bg-gray-100 overflow-hidden">+ <div className="absolute inset-0 w-full h-full bg-gray-900/50 overflow-hidden"><div- className="w-full h-full bg-gradient-to-r from-gray-100 via-gray-200 to-gray-100 animate-shimmer"+ className="w-full h-full bg-gradient-to-r from-gray-800/30 via-gray-600/30 to-gray-800/30 animate-shimmer"style={{backgroundSize: "200% 100%",animation: "shimmer 1.5s infinite linear",@@ -24,25 +24,101 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({}) => {const [isLoading, setIsLoading] = useState(true);const [hasError, setHasError] = useState(false);+ const [retryCount, setRetryCount] = useState(0);+ const imageRef = useRef<HTMLImageElement>(null);++ const frameId = currentFrame?.devices?.[0]?.frame_id;+ // Simple image URL without cache busting+ const imageUrl = `http://localhost:3030/frames/${frameId}`;++ // Reset loading state when frame changes, but be smarter about it+ React.useEffect(() => {+ if (frameId && !imageRef.current?.complete) {+ setIsLoading(true);+ setHasError(false);+ setRetryCount(0);+ } }, [frameId ]);++ const handleRetry = () => {+ if (retryCount < 3) {+ setRetryCount(prev => prev + 1);+ setIsLoading(true);+ setHasError(false);+ }+ };++ if (!frameId) {+ return (+ <div className="absolute inset-0 flex items-center justify-center bg-gray-900">+ <div className="text-center text-muted-foreground">+ <h3 className="text-lg font-medium mb-2">No Frame ID</h3>+ <p className="text-sm">Frame data is missing or invalid</p>+ </div>+ </div>+ );+ }return (- <>- {(isLoading || hasError) && <SkeletonLoader />}+ <div className="absolute inset-0 w-full h-full bg-red-500/20">+ {/* Debug info */}+ {+ process.env.NODE_ENV === 'development' && (+ <div className="absolute top-4 left-4 z-50 bg-info text-info-foreground p-2 rounded text-xs">+ <div>Frame ID: {frameId}</div>+ <div>Loading: {isLoading ? 'Yes' : 'No'}</div>+ <div>Error: {hasError ? 'Yes' : 'No'}</div>+ <div>Image URL: {imageUrl}</div>+ </div>+ )+ }+ {isLoading && <SkeletonLoader />}<img- src={`http://localhost:3030/frames/${currentFrame.devices[0].frame_id}`}- className={`absolute inset-0 w-4/5 h-auto max-h-[75vh] object-contain mx-auto border rounded-xl p-2 mt-20 transition-opacity duration-300 ${- isLoading || hasError ? "opacity-0" : "opacity-100"- }`}+ src={imageUrl}+ ref={imageRef}+ className="absolute inset-0 w-full h-full object-cover"+ style={{+ zIndex: 1,+ display: hasError ? 'none' : 'block',+ opacity: isLoading ? 0 : 1,+ transition: 'opacity 0.2s ease-in-out',+ }}alt="Current frame"onLoad={() => {+ console.log('Image loaded successfully for frame:', frameId);setIsLoading(false);setHasError(false);}}onError={() => {+ console.log('Image failed to load for frame:', frameId);setIsLoading(false);setHasError(true);}}/>- </>+ {hasError && !isLoading && (+ <div className="absolute inset-0 flex items-center justify-center bg-gray-900/90 z-10">+ <div className="text-center text-muted-foreground">+ <h3 className="text-lg font-medium mb-2">Image Failed to Load</h3>+ <p className="text-sm">Could not load frame image</p>+ <p className="text-xs mt-2 opacity-50 font-mono">{frameId}</p>+ <div className="flex gap-2 mt-3">+ {retryCount < 3 && (+ <button+ onClick={handleRetry}+ className="px-3 py-1 bg-blue-600/80 hover:bg-blue-600 rounded text-xs transition-colors"+ >+ Retry ({retryCount}/3)+ </button>+ )}+ <button+ onClick={() => window.open(`http://localhost:3030/frames/${frameId}`, '_blank')}+ className="px-3 py-1 bg-white/10 hover:bg-white/20 rounded text-xs transition-colors"+ >+ Open in browser+ </button>+ </div>+ </div>+ </div>+ )}+ </div>);};diff --git a/openrewind/components/rewind/example-search-cards.tsx b/openrewind/components/rewind/example-search-cards.tsxindex 588be3870..0d6ebe395 100644--- a/openrewind/components/rewind/example-search-cards.tsx+++ b/openrewind/components/rewind/example-search-cards.tsx@@ -77,9 +77,9 @@ export function ExampleSearchCards({ onSelect }: ExampleSearchCardsProps) {isHealthError ? "opacity-50 cursor-not-allowed" : ""}`}>- <div className="absolute inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100 before:absolute before:inset-0 before:rounded-lg before:border-2 before:border-black dark:before:border-white before:opacity-0 before:scale-95 group-hover:before:opacity-100 group-hover:before:scale-100 before:transition-all before:duration-300 before:ease-out" />+ <div className="absolute inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100 before:absolute before:inset-0 before:rounded-lg before:border-2 before:border-foreground before:opacity-0 before:scale-95 group-hover:before:opacity-100 group-hover:before:scale-100 before:transition-all before:duration-300 before:ease-out" /><Card- className={`cursor-pointer relative bg-white dark:bg-gray-800 z-10 h-full transition-transform duration-300 ease-out ${+ className={`cursor-pointer relative bg-card border border-border z-10 h-full transition-transform duration-300 ease-out ${isHealthError ? "" : "group-hover:scale-[0.98]"}`}onClick={() => !isHealthError && onSelect(example)}diff --git a/openrewind/components/rewind/image-card.tsx b/openrewind/components/rewind/image-card.tsxindex 79523165c..cff31230e 100644--- a/openrewind/components/rewind/image-card.tsx+++ b/openrewind/components/rewind/image-card.tsx@@ -8,7 +8,7 @@ import { Loader2 } from "lucide-react";import { useKeywordParams } from "@/lib/hooks/use-keyword-params";export const SkeletonCard = () => (- <div className="flex flex-col shrink-0 w-56 h-full relative overflow-hidden rounded-lg bg-white shadow-sm">+ <div className="flex flex-col shrink-0 w-56 h-full relative overflow-hidden rounded-lg bg-card border border-border shadow-sm"><div className="aspect-video bg-neutral-200 animate-pulse" /><div className="p-3 space-y-2" style={{ direction: "ltr" }}><div className="h-4 bg-neutral-200 rounded animate-pulse" />@@ -183,7 +183,7 @@ export const ImageGrid = ({key={result.frame_id}data-timestamp={result.timestamp}className={cn(- "group flex flex-col shrink-0 w-56 h-full relative overflow-hidden rounded-lg bg-white shadow-sm transition-all duration-300 hover:shadow-md snap-center cursor-pointer",+ "group flex flex-col shrink-0 w-56 h-full relative overflow-hidden rounded-lg bg-card border border-border shadow-sm transition-all duration-300 hover:shadow-md snap-center cursor-pointer",currentResultIndex === index && "ring-2 ring-blue-500",)}onClick={() => setCurrentResultIndex(index)}@@ -191,7 +191,7 @@ export const ImageGrid = ({><div className="aspect-video overflow-hidden flex-1 relative"><div className="absolute inset-0 flex items-center justify-center bg-neutral-100">- <Loader2 className="h-5 w-5 animate-spin text-gray-400" />+ <Loader2 className="h-5 w-5 animate-spin text-muted-foreground" /></div><imgsrc={`http://localhost:3030/frames/${result.frame_id}`}@@ -282,7 +282,7 @@ export const MainImage = () => {className="relative aspect-auto w-full h-full overflow-hidden rounded-lg bg-neutral-100"><div className="absolute inset-0 flex items-center justify-center">- <Loader2 className="h-8 w-8 animate-spin text-gray-400" />+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" /></div><div className="relative"><imgdiff --git a/openrewind/components/rewind/search-bar.tsx b/openrewind/components/rewind/search-bar.tsxindex b59371e71..d6a0ddb2f 100644--- a/openrewind/components/rewind/search-bar.tsx+++ b/openrewind/components/rewind/search-bar.tsx@@ -15,7 +15,7 @@ export const SearchBar = ({<Inputtype="input"placeholder="Search..."- className="pl-10 h-full bg-white/80 backdrop-blur-sm border border-neutral-200 rounded-lg shadow-sm transition-all duration-200 focus:shadow-md"+ className="pl-10 h-full bg-card border border-border rounded-lg shadow-sm transition-all duration-200 focus:shadow-md"value={search || ""}onChange={(e) => {onSearchChange(e.target.value);diff --git a/openrewind/components/rewind/timeline.tsx b/openrewind/components/rewind/timeline.tsxindex 7e7d1b06e..b433b9474 100644--- a/openrewind/components/rewind/timeline.tsx+++ b/openrewind/components/rewind/timeline.tsx@@ -107,7 +107,7 @@ export default function Timeline() {const endTime = new Date(currentDate);if (endTime.getDate() === new Date().getDate()) {- endTime.setMinutes(endTime.getMinutes() - 5);+ endTime.setMinutes(endTime.getMinutes() + 5);} else {endTime.setHours(23, 59, 59, 999);}@@ -324,9 +324,9 @@ export default function Timeline() {<TimelineProvider><divref={containerRef}- className="inset-0 flex flex-col bg-background text-foreground relative"+ className="inset-0 flex flex-col text-foreground relative"style={{- height: "calc(100vh - 2rem)",+ height: "100vh",overscrollBehavior: "none",WebkitUserSelect: "none",userSelect: "none",@@ -334,92 +334,135 @@ export default function Timeline() {msUserSelect: "none",}}>- <div className="absolute z-50 top-4 w-full">- <div className="flex items-center gap-4">- <TimelineControls- currentDate={currentDate}- startAndEndDates={startAndEndDates}- onDateChange={handleDateChange}- onJumpToday={handleJumpToday}- />- {/* <TimelineSearch2- frames={frames}- onResultSelect={animateToIndex}- onSearchResults={setSearchResults}- /> */}- </div>- </div>-- <div className="flex-1 relative min-h-0 pt-4">- {isLoading && (- <div className="absolute inset-0 top-4 flex items-center justify-center backdrop-blur-sm">- <div className="bg-background/95 p-6 border rounded-xl shadow-lg text-center space-y-3 max-w-md mx-4">- <h3 className="font-medium">Loading Timeline</h3>+ {/* Main Image - Full Screen - Should fill entire viewport */}+ <div className="absolute inset-0 z-10">+ {currentFrame ? (+ <CurrentFrameTimeline currentFrame={currentFrame} />+ ) : (+ !isLoading && !error && frames.length === 0 && (+ <div className="absolute inset-0 flex items-center justify-center bg-background/90">+ <div className="text-center text-foreground p-8">+ <h3 className="text-lg font-medium mb-2">No Frame Available</h3><p className="text-sm text-muted-foreground">- Fetching your recorded frames...+ {isLoading ? 'Loading timeline data...' :+ error ? 'Failed to load timeline data' :+ frames.length === 0 ? 'No frames found for this date' :+ 'Select a frame from the timeline below'}</p>- <Loader2 className="h-5 w-5 animate-spin mx-auto mt-2" /></div></div>+ ))}+ </div>- {!error && message && (- <div className="absolute inset-0 flex items-center justify-center backdrop-blur-sm">- <div className="bg-background/95 p-6 border rounded-xl shadow-lg text-center space-y-3 max-w-md mx-4">- <h3 className="font-medium">Processing</h3>- <p className="text-sm text-muted-foreground">{message}</p>- <Loader2 className="h-5 w-5 animate-spin mx-auto mt-2" />- </div>- </div>- )}+ {/* Top Gradient Overlay - Very subtle */}+ <div className="absolute top-0 left-0 right-0 h-20 bg-gradient-to-b from-black/20 via-black/5 to-transparent z-30 pointer-events-none" />- {error && (- <div className="absolute inset-0 flex items-center justify-center backdrop-blur-sm">- <div className="bg-destructive/5 p-6 border-destructive/20 border rounded-xl text-center space-y-4 max-w-md mx-4">- <div className="flex flex-col items-center gap-2">- <AlertCircle className="h-6 w-6 text-destructive" />- <h3 className="font-medium text-destructive">- Connection Error- </h3>- </div>- <p className="text-sm text-muted-foreground">- Unable to reach your screenpipe data. Please verify that the- screenpipe turned on.- </p>- <button- onClick={handleRefresh}- className="flex items-center gap-2 px-4 py-2 bg-background hover:bg-muted transition-colors rounded-lg border border-input mx-auto"- >- <RotateCcw className="h-4 w-4" />- <span>Reload Timeline</span>- </button>+ {/* Bottom Gradient Overlay - Very subtle, only where timeline is */}+ <div className="absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-black/10 via-black/2 to-transparent z-30 pointer-events-none" />++ {/* Top Controls */}+ <div className="absolute top-0 left-0 right-0 z-40 p-4">+ <TimelineControls+ currentDate={currentDate}+ startAndEndDates={startAndEndDates}+ onDateChange={handleDateChange}+ onJumpToday={handleJumpToday}+ />+ </div>++ {/* Loading/Error States */}+ {isLoading && (+ <div className="absolute inset-0 z-50 flex items-center justify-center bg-background/90">+ <div className="bg-card text-foreground p-6 rounded-2xl text-center space-y-3 max-w-md mx-4">+ <h3 className="font-medium">Loading Timeline</h3>+ <p className="text-sm text-foreground">+ Fetching your recorded frames...+ </p>+ <Loader2 className="h-5 w-5 animate-spin mx-auto mt-2" />+ </div>+ </div>+ )}++ {!error && message && (+ <div className="absolute inset-0 z-50 flex items-center justify-center bg-background/90">+ <div className="bg-card text-foreground p-6 border border-border rounded-2xl shadow-2xl text-center space-y-3 max-w-md mx-4">+ <h3 className="font-medium">Processing</h3>+ <p className="text-sm text-foreground">+ {message}+ </p>+ <Loader2 className="h-5 w-5 animate-spin mx-auto mt-2" />+ </div>+ </div>+ )}++ {error && (+ <div className="absolute inset-0 z-50 flex items-center justify-center bg-background/90">+ <div className="bg-destructive/20 border border-destructive/30 text-foreground p-6 rounded-2xl text-center space-y-4 max-w-md mx-4">+ <div className="flex flex-col items-center gap-2">+ <AlertCircle className="h-6 w-6 text-destructive" />+ <h3 className="font-medium text-destructive">Connection Error</h3></div>+ <p className="text-sm text-foreground">+ Unable to reach your screenpipe data. Please verify that the+ screenpipe turned on.+ </p>+ <button+ onClick={handleRefresh}+ className="flex items-center gap-2 px-4 py-2 bg-card rounded-lg border border-border mx-auto bg-muted"+ >+ <RotateCcw className="h-4 w-4" />+ <span>Reload Timeline</span>+ </button></div>- )}- {currentFrame && <CurrentFrameTimeline currentFrame={currentFrame} />}- {currentFrame && (+ </div>+ )}++ {/* Audio Transcript Panel - Re-enabled and properly positioned */}+ {currentFrame && (+ <div className="absolute bottom-28 left-4 right-4 z-35"><AudioTranscriptframes={frames}currentIndex={currentIndex}groupingWindowMs={30000} // 30 seconds window/>+ </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 ? (+ <TimelineSlider+ frames={frames}+ currentIndex={currentIndex}+ onFrameChange={(index) => {+ setCurrentIndex(index);+ if (frames[index]) {+ setCurrentFrame(frames[index]);+ }+ }}+ fetchNextDayData={fetchNextDayData}+ currentDate={currentDate}+ startAndEndDates={startAndEndDates}+ />+ ) : (+ <div className="bg-card p-4 text-center border-t border-border">+ <div className="text-foreground text-sm">+ {isLoading ? (+ <div className="flex items-center justify-center gap-2">+ <div className="w-4 h-4 border-2 border-border border-t-foreground rounded-full animate-spin"></div>+ Loading timeline...+ </div>+ ) : error ? (+ <div className="text-destructive">Failed to load timeline data</div>+ ) : (+ <div>No timeline data available for this date</div>+ )}+ </div>+ </div>)}</div>- <TimelineSlider- frames={frames}- currentIndex={currentIndex}- onFrameChange={(index) => {- setCurrentIndex(index);- if (frames[index]) {- setCurrentFrame(frames[index]);- }- }}- fetchNextDayData={fetchNextDayData}- currentDate={currentDate}- startAndEndDates={startAndEndDates}- />-<AIPanelposition={aiPanelPosition}onPositionChange={setAiPanelPosition}@@ -432,10 +475,11 @@ export default function Timeline() {onExpandedChange={setIsAiPanelExpanded}/>- <div className="fixed left-12 top-1/2 -translate-y-1/2 text-xs text-muted-foreground">- <div className="flex flex-col items-center gap-1">+ {/* Scroll Indicator */}+ <div className="fixed left-6 top-1/2 -translate-y-1/2 text-xs text-foreground z-40">+ <div className="flex flex-col items-center gap-1 bg-card rounded-full p-2 border border-border"><span>▲</span>- <span>scroll</span>+ <span className="text-[10px]">scroll</span><span>▼</span></div></div>diff --git a/openrewind/components/rewind/timeline/ai-panel.tsx b/openrewind/components/rewind/timeline/ai-panel.tsxindex af0a95040..b0b447d35 100644--- a/openrewind/components/rewind/timeline/ai-panel.tsx+++ b/openrewind/components/rewind/timeline/ai-panel.tsx@@ -340,7 +340,7 @@ export function AIPanel({return (<divref={aiPanelRef}- className="ai-panel bg-background border border-muted-foreground rounded-lg shadow-lg transition-all duration-300 ease-in-out z-10"+ className="ai-panel bg-card border border-border rounded-lg shadow-lg transition-all duration-300 ease-in-out z-10"style={{position: "fixed",left: position.x,diff --git a/openrewind/components/rewind/timeline/audio-transcript.tsx b/openrewind/components/rewind/timeline/audio-transcript.tsxindex badd53cbf..b74f0352d 100644--- a/openrewind/components/rewind/timeline/audio-transcript.tsx+++ b/openrewind/components/rewind/timeline/audio-transcript.tsx@@ -198,11 +198,12 @@ export function AudioTranscript({width: windowSize.width,height: windowSize.height,cursor: isDragging ? "grabbing" : "default",+ pointerEvents: "auto",}}- className="audio-transcript-panel bg-background/80 backdrop-blur border border-muted-foreground rounded-lg shadow-lg z-[100] overflow-hidden"+ className="audio-transcript-panel bg-popover border border-border rounded-2xl shadow-2xl z-[100] overflow-hidden"><div- className="select-none cursor-grab active:cursor-grabbing p-2 border-b border-muted-foreground"+ className="select-none cursor-grab active:cursor-grabbing p-3 border-b border-border"onMouseDown={handlePanelMouseDown}onMouseMove={handlePanelMouseMove}onMouseUp={handlePanelMouseUp}@@ -216,7 +217,7 @@ export function AudioTranscript({<Buttonvariant="ghost"size="sm"- className="h-6 w-6 p-0"+ className="h-6 w-6 p-0 text-foreground hover:text-accent-foreground hover:bg-accent"onClick={handleClose}><X className="h-3 w-3" />@@ -225,18 +226,18 @@ export function AudioTranscript({</div><div- className="space-y-2 p-2 overflow-y-auto"+ className="space-y-2 p-3 overflow-y-auto"style={{- height: "calc(100% - 37px)",+ height: "calc(100% - 45px)",overscrollBehavior: "contain", // Prevent scroll chainingWebkitOverflowScrolling: "touch", // Smooth scrolling on iOS}}>{audioGroups.map((group, groupIndex) => (- <Card key={groupIndex} className="p-4 bg-background/80 backdrop-blur">+ <Card key={groupIndex} className="p-4 bg-card border border-border rounded-xl"><div className="text-xs text-muted-foreground mb-2">{group.deviceName} ({group.isInput ? "input" : "output"})- <div className="text-[10px]">+ <div className="text-[10px] text-muted-foreground">{formatTimeRange(calculateTimeRange(group.startTime,@@ -255,7 +256,7 @@ export function AudioTranscript({<Buttonvariant="ghost"size="sm"- className="h-6 w-6 p-0"+ className="h-6 w-6 p-0 text-foreground hover:text-accent-foreground hover:bg-accent"onClick={() => handlePlay(audio.audio_file_path)}>{playing === audio.audio_file_path ? (@@ -264,7 +265,7 @@ export function AudioTranscript({<Play className="h-3 w-3" />)}</Button>- <div className="flex items-center gap-1 text-xs">+ <div className="flex items-center gap-1 text-xs text-muted-foreground"><Volume2 className="h-3 w-3" /><span>{formatDurationHuman(Math.round(audio.duration_secs))}@@ -292,10 +293,10 @@ export function AudioTranscript({<divref={resizerRef}onMouseDown={handleResizeMouseDown}- className="absolute right-0 bottom-0 w-4 h-4 cursor-se-resize bg-transparent"+ className="absolute right-0 bottom-0 w-4 h-4 cursor-se-resize bg-white/10 hover:bg-white/20 transition-colors"style={{borderTopLeftRadius: "4px",- borderBottomRightRadius: "4px",+ borderBottomRightRadius: "12px",cursor: "se-resize",}}/>diff --git a/openrewind/components/rewind/timeline/timeline-controls.tsx b/openrewind/components/rewind/timeline/timeline-controls.tsxindex cba080f4d..1a8e34e45 100644--- a/openrewind/components/rewind/timeline/timeline-controls.tsx+++ b/openrewind/components/rewind/timeline/timeline-controls.tsx@@ -115,156 +115,73 @@ export function TimelineControls({return (<divclassName={cn(- "flex items-center justify-between w-full p-2 rounded-md",+ "flex items-center justify-center w-full",className,)}>- {/* Empty left section for balance */}- <div className="flex-1" />+{/* Center section - Timeline controls */}- <div className="flex items-center gap-2">- <div className="flex items-center gap-2 bg-muted/50 rounded-md p-2 shadow-lg">- <Button- variant="ghost"- size="icon"- onClick={() => jumpDay(-1)}- className="h-8 w-8"- disabled={canGoBack}- >- <ChevronLeft className="h-4 w-4" />- </Button>-- <AnimatePresence mode="wait">- <motion.div- key={currentDate.toISOString()}- initial={{ y: -20, opacity: 0 }}- animate={{ y: 0, opacity: 1 }}- exit={{ y: 20, opacity: 0 }}- transition={{- type: "spring",- stiffness: 500,- damping: 30,- duration: 0.2,- }}- className="bg-background border rounded px-3 py-1 text-sm font-mono"+ <div className="flex items-center gap-4">+ <div className="flex items-center gap-1 bg-card border border-border rounded-2xl p-1 shadow-2xl">+ <Button+ variant="ghost"+ size="icon"+ onClick={() => jumpDay(-1)}+ className="h-9 w-9 text-foreground hover:bg-accent hover:text-accent-foreground border-0 rounded-xl"+ disabled={canGoBack}>- {format(currentDate, "d MMM yyyy")}- </motion.div>- </AnimatePresence>+ <ChevronLeft className="h-5 w-5" />+ </Button>- <Button- variant="ghost"- size="icon"- onClick={() => jumpDay(1)}- className="h-8 w-8"- disabled={isAtToday}- >- <ChevronRight className="h-4 w-4" />- </Button>+ <AnimatePresence mode="wait">+ <motion.div+ key={currentDate.toISOString()}+ initial={{ y: -20, opacity: 0 }}+ animate={{ y: 0, opacity: 1 }}+ exit={{ y: 20, opacity: 0 }}+ transition={{+ type: "spring",+ stiffness: 500,+ damping: 30,+ duration: 0.2,+ }}+ className="bg-card border border-border rounded-xl px-4 py-2 text-sm font-medium text-foreground min-w-[120px] text-center"+ >+ {format(currentDate, "d MMM yyyy")}+ </motion.div>+ </AnimatePresence>++ <Button+ variant="ghost"+ size="icon"+ onClick={() => jumpDay(1)}+ className="h-9 w-9 text-foreground hover:bg-accent hover:text-accent-foreground border-0 rounded-xl"+ disabled={isAtToday}+ >+ <ChevronRight className="h-5 w-5" />+ </Button>- <div className="h-4 w-px bg-border mx-2" />+ <div className="h-5 w-px bg-white/20 mx-1" />- <Button- variant="ghost"- size="icon"- onClick={onJumpToday}- className="h-8 w-8"- disabled={isAtToday}- >- <RefreshCw className="h-4 w-4" />+ <Button+ variant="ghost"+ size="icon"+ onClick={onJumpToday}+ className="h-9 w-9 text-foreground hover:bg-accent hover:text-accent-foreground border-0 rounded-xl"+ disabled={isAtToday}+ >+ <RefreshCw className="h-5 w-5" /></Button></div>- <div>- <CommandShortcut>⌘K</CommandShortcut>{" "}- <span className="text-xs text-muted-foreground">to search</span>- </div>++ <div className="flex items-center gap-2 bg-card border border-border rounded-2xl px-3 py-2">+ <CommandShortcut className="text-muted-foreground">⌘K</CommandShortcut>+ <span className="text-xs text-muted-foreground">to search</span>+ </div></div>- {/* Right section - Header elements */}- <div className="flex items-center gap-2 flex-1 justify-end">- <Popover open={isFeedbackOpen} onOpenChange={setIsFeedbackOpen}>- <PopoverTrigger asChild>- <Button variant="outline" size="sm">- <Mail className="h-3.5 w-3.5 mr-2" />- feedback- </Button>- </PopoverTrigger>- <PopoverContent className="w-100 rounded-2xl">- <ShareLogsButton- showShareLink={false}- onComplete={() => setIsFeedbackOpen(false)}- />- </PopoverContent>- </Popover>-- <DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- variant="ghost"- size="icon"- className="cursor-pointer h-8 w-8 p-0"- >- <User className="h-4 w-4" />- <span className="sr-only">user menu</span>- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuLabel>account</DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuGroup>- <DropdownMenuItem- onSelect={async (e) => {- e.preventDefault();- await openSettingsWindow();- }}- className="cursor-pointer p-1.5"- >- <Settings2 className="mr-2 h-4 w-4" />- <span>settings</span>- </DropdownMenuItem>- </DropdownMenuGroup>- <DropdownMenuSeparator />- <DropdownMenuGroup>- <DropdownMenuItem- className="cursor-pointer"- onClick={() => open("https://docs.screenpi.pe")}- >- <Book className="mr-2 h-4 w-4" />- <span>check docs</span>- </DropdownMenuItem>- <DropdownMenuItem- className="cursor-pointer"- onClick={() =>- open(- "https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20..."- )- }- >- <Heart className="mr-2 h-4 w-4" />- <span>support us</span>- </DropdownMenuItem>- </DropdownMenuGroup>- <DropdownMenuSeparator />- <DropdownMenuGroup>- <DropdownMenuItem- className="cursor-pointer"- onClick={() => handleShowOnboarding()}- >- <Play className="mr-2 h-4 w-4" />- <span>show onboarding</span>- </DropdownMenuItem>- <DropdownMenuItem- className="cursor-pointer"- onClick={() => setShowChangelogDialog(true)}- >- <Folder className="mr-2 h-4 w-4" />- <span>show changelog</span>- </DropdownMenuItem>- </DropdownMenuGroup>- </DropdownMenuContent>- </DropdownMenu>- </div>+</div>);}\ No newline at end of filediff --git a/openrewind/components/rewind/timeline/timeline-dock-section.tsx b/openrewind/components/rewind/timeline/timeline-dock-section.tsxindex 9f83f4529..44a890cb6 100644--- a/openrewind/components/rewind/timeline/timeline-dock-section.tsx+++ b/openrewind/components/rewind/timeline/timeline-dock-section.tsx@@ -348,12 +348,7 @@ export function TimelineIconsSection({}}><div- className="w-4 h-4 flex items-center justify-center rounded-full bg-muted/50 backdrop-blur"- style={{- border: `1px solid ${- audio.isInput ? "rgba(0, 0, 0, 0.7)" : "rgba(0, 0, 0, 0.4)"- }`,- }}+ className="w-4 h-4 flex items-center justify-center rounded-full bg-muted border border-border"><Volume2className="w-2 h-2"diff --git a/openrewind/components/rewind/timeline/timeline-search-v2.tsx b/openrewind/components/rewind/timeline/timeline-search-v2.tsxindex 9063c9559..e73bb2eac 100644--- a/openrewind/components/rewind/timeline/timeline-search-v2.tsx+++ b/openrewind/components/rewind/timeline/timeline-search-v2.tsx@@ -255,7 +255,7 @@ export function TimelineSearch2({<Dialog open={open} onOpenChange={setOpen}><DialogPortal>- <DialogOverlay className="backdrop-blur-sm" />+ <DialogOverlay className="bg-background/50" /><DialogContent className="sm:max-w-[500px]"><DialogTitle>search your timeline</DialogTitle><div className="p-6">diff --git a/openrewind/components/rewind/timeline/timeline-search.tsx b/openrewind/components/rewind/timeline/timeline-search.tsxindex 356567b25..8a40e132a 100644--- a/openrewind/components/rewind/timeline/timeline-search.tsx+++ b/openrewind/components/rewind/timeline/timeline-search.tsx@@ -717,7 +717,7 @@ prioritize precision over recall - better to return no match than a wrong match.><DialogPortal><DialogOverlay- className="backdrop-blur-sm"+ className="bg-background/50"style={{opacity: isSearching ? 0 : 0.8,}}diff --git a/openrewind/components/rewind/timeline/timeline.tsx b/openrewind/components/rewind/timeline/timeline.tsxindex 3b0261f3b..53873cd14 100644--- a/openrewind/components/rewind/timeline/timeline.tsx+++ b/openrewind/components/rewind/timeline/timeline.tsx@@ -62,8 +62,8 @@ export const TimelineSlider = ({const visibleFrames = useMemo(() => {if (!frames || frames.length === 0) return [];- const start = Math.max(0, currentIndex - 100);- const end = Math.min(frames.length, currentIndex + 100);+ const start = Math.max(0, currentIndex - 200);+ const end = Math.min(frames.length, currentIndex + 200);return frames.slice(start, end);}, [frames, currentIndex]);@@ -204,31 +204,33 @@ export const TimelineSlider = ({return (<div className="relative w-full" dir="rtl"><motion.div- className="absolute top-0 h-1 bg-blue-500/0"+ className="absolute top-0 h-1 bg-blue-500/50"style={{ width: lineWidth }}/><divref={containerRef}- className="w-full overflow-x-auto scroll-smooth scrollbar-hide"+ className="w-full overflow-x-auto overflow-y-visible scroll-smooth scrollbar-hide bg-gradient-to-t from-black/50 to-black/0"style={{scrollBehavior: "auto",+ paddingTop: "80px", // Space for tooltips above+ paddingBottom: "0px",}}><motion.div- className="whitespace-nowrap flex flex-nowrap w-max justify-center px-[50vw] h-40 sticky right-0 scrollbar-hide"+ className="whitespace-nowrap flex flex-nowrap w-max justify-center px-[50vw] h-24 sticky right-0 scrollbar-hide"onMouseUp={handleDragEnd}onMouseLeave={handleDragEnd}>{appGroups.map((group, groupIndex) => (<divkey={`${group.appName}-${groupIndex}`}- className="flex flex-nowrap items-end h-full group pt-20 relative"+ className="flex flex-nowrap items-end h-full group pt-6 relative"dir="rtl">- <div className="absolute top-0 left-1/2 w-5 h-5 rounded-full -translate-x-1/2 bg-background/50 backdrop-blur p-0.5">+ <div className="absolute top-1 left-1/2 w-5 h-5 rounded-full -translate-x-1/2 bg-card border border-border p-0.5 z-10"><imgsrc={`http://localhost:11435/app-icon?name=${group.appName}`}- className="w-full h-full opacity-70"+ className="w-full h-full opacity-70 rounded-sm"alt={group.appName}loading="lazy"decoding="async"@@ -244,29 +246,36 @@ export const TimelineSlider = ({frameDate <= selectionRange.end;const hasAudio = Boolean(frame?.devices?.[0]?.audio?.length);+ const isCurrent = frameIndex === currentIndex;return (<motion.divkey={frame.timestamp}data-timestamp={frame.timestamp}- className={`flex-shrink-0 cursor-pointer w-2 mx-0.5 rounded-t relative group hover:z-50 ${+ className={`flex-shrink-0 cursor-pointer w-1.5 mx-0.5 rounded-t relative group hover:z-50 transition-all duration-200 ${isSelected || isInRange- ? "ring-2 ring-blue-500 ring-offset-1"+ ? "ring-2 ring-blue-400 ring-offset-1 ring-offset-black/20": ""}`}style={{- backgroundColor: group.color,- height:- frameIndex === currentIndex || isSelected || isInRange- ? "60%"- : "40%",- opacity:- frameIndex === currentIndex || isSelected || isInRange- ? 1- : 0.7,+ backgroundColor: isCurrent ? '#3b82f6' : group.color,+ height: isCurrent || isSelected || isInRange ? "80%" : "50%",+ opacity: isCurrent || isSelected || isInRange ? 1 : 0.8,direction: "ltr",+ boxShadow: isCurrent ? '0 0 15px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3)' : 'none',+ transform: isCurrent ? 'scale(1.1)' : 'scale(1)',+ transition: 'all 0.2s ease-out',+ }}+ whileHover={{+ height: "80%",+ opacity: 1,+ scale: 1.05,+ transition: { duration: 0.15 }+ }}+ whileTap={{+ scale: 0.95,+ transition: { duration: 0.1 }}}- whileHover={{ height: "60%", opacity: 1 }}onMouseDown={() => handleDragStart(frameIndex)}onMouseEnter={() => {setHoveredTimestamp(frame.timestamp);@@ -275,14 +284,14 @@ export const TimelineSlider = ({onMouseLeave={() => setHoveredTimestamp(null)}>{hasAudio && (- <div className="absolute -top-5 left-1/2 -translate-x-1/2 w-4 h-4 rounded-full ">- <AudioLinesIcon className="w-full h-full" />+ <div className="absolute -top-4 left-1/2 -translate-x-1/2 w-2.5 h-2.5 rounded-full bg-green-400/80">+ <AudioLinesIcon className="w-full h-full p-0.5" /></div>)}{(hoveredTimestamp === frame.timestamp ||frames[currentIndex]?.timestamp === frame.timestamp) && (- <div className="absolute bottom-full left-1/2 z-50 -translate-x-1/2 mb-6 w-max bg-background border rounded-md px-2 py-1 text-xs shadow-lg">- <p className="font-medium">+ <div className="absolute bottom-full left-1/2 z-50 -translate-x-1/2 mb-12 w-max bg-popover border border-border rounded-xl px-3 py-2 text-xs shadow-2xl">+ <p className="font-medium text-popover-foreground">{frame?.devices?.[0]?.metadata?.app_name || 'Unknown'}</p><p className="text-muted-foreground">diff --git a/openrewind/components/settings/general-settings.tsx b/openrewind/components/settings/general-settings.tsxindex 907e6c16c..f1fcd4bf1 100644--- a/openrewind/components/settings/general-settings.tsx+++ b/openrewind/components/settings/general-settings.tsx@@ -2,20 +2,44 @@import React from "react";import { useSettings } from "@/lib/hooks/use-settings";+import { useTheme } from "@/components/theme-provider";import { Switch } from "@/components/ui/switch";import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";import { Separator } from "@/components/ui/separator";-import { Rocket } from "lucide-react";+import { Rocket, Moon, Sun, Monitor } from "lucide-react";import { SettingsStore } from "@/lib/utils/tauri";export default function GeneralSettings() {const { settings, updateSettings } = useSettings();+ const { theme, setTheme } = useTheme();+const handleSettingsChange = (newSettings: Partial<SettingsStore>) => {if (settings) {updateSettings(newSettings);}};+ const themeOptions = [+ {+ value: "system" as const,+ label: "System",+ description: "Use system preference",+ icon: Monitor,+ },+ {+ value: "light" as const,+ label: "Light",+ description: "Light theme",+ icon: Sun,+ },+ {+ value: "dark" as const,+ label: "Dark",+ description: "Dark theme",+ icon: Moon,+ },+ ];+return (<div className="space-y-8"><div className="space-y-3">@@ -57,7 +81,66 @@ export default function GeneralSettings() {</CardContent></Card>-+ <Card className="border-border bg-card shadow-sm">+ <CardContent className="p-6">+ <div className="space-y-4">+ <div className="flex items-start space-x-4">+ <div className="p-2 bg-primary/10 rounded-lg">+ <Monitor className="h-5 w-5 text-primary" />+ </div>+ <div className="space-y-1 flex-1">+ <h3 className="text-lg font-semibold text-foreground">+ Theme+ </h3>+ <p className="text-sm text-muted-foreground leading-relaxed">+ Choose your preferred theme. System follows your device settings automatically.+ </p>+ </div>+ </div>++ <div className="space-y-3 ml-16">+ {themeOptions.map((option) => {+ const IconComponent = option.icon;+ return (+ <label+ key={option.value}+ className="flex items-center space-x-3 cursor-pointer group"+ >+ <input+ type="radio"+ name="theme"+ value={option.value}+ checked={theme === option.value}+ onChange={() => setTheme(option.value)}+ className="sr-only"+ />+ <div className={`+ flex items-center justify-center w-4 h-4 rounded-full border-2 transition-colors+ ${theme === option.value+ ? 'border-primary bg-primary'+ : 'border-muted-foreground group-hover:border-primary'+ }+ `}>+ {theme === option.value && (+ <div className="w-2 h-2 rounded-full bg-primary-foreground" />+ )}+ </div>+ <div className="flex items-center space-x-2">+ <IconComponent className="h-4 w-4 text-muted-foreground" />+ <span className="text-sm font-medium text-foreground">+ {option.label}+ </span>+ <span className="text-xs text-muted-foreground">+ {option.description}+ </span>+ </div>+ </label>+ );+ })}+ </div>+ </div>+ </CardContent>+ </Card></div><div className="pt-4">diff --git a/openrewind/components/settings/recording-settings.tsx b/openrewind/components/settings/recording-settings.tsxindex 94149671c..4860bde2d 100644--- a/openrewind/components/settings/recording-settings.tsx+++ b/openrewind/components/settings/recording-settings.tsx@@ -1550,6 +1550,7 @@ export function RecordingSettings() {</Label><MultiSelectoptions={createWindowOptions(windowItems || [], settings.ignoredWindows)}+ defaultValue={settings.ignoredWindows}value={settings.ignoredWindows}onValueChange={handleIgnoredWindowsChange}placeholder="Select windows to ignore..."@@ -1574,6 +1575,7 @@ export function RecordingSettings() {</Label><MultiSelectoptions={createWindowOptions(windowItems || [], settings.includedWindows)}+ defaultValue={settings.includedWindows}value={settings.includedWindows}onValueChange={handleIncludedWindowsChange}placeholder="Select windows to include (optional)..."diff --git a/openrewind/components/share-logs-button.tsx b/openrewind/components/share-logs-button.tsxindex 087e101b3..36c4e707a 100644--- a/openrewind/components/share-logs-button.tsx+++ b/openrewind/components/share-logs-button.tsx@@ -367,7 +367,7 @@ export const ShareLogsButton = ({</TooltipTrigger><TooltipContentside="bottom"- className="text-xs bg-secondary/80 backdrop-blur-sm border-secondary/30"+ className="text-xs bg-secondary border border-secondary/30">attach last 5 minutes of screen recording</TooltipContent>@@ -385,7 +385,7 @@ export const ShareLogsButton = ({<Buttonvariant="ghost"size="icon"- className="absolute top-2 right-2 h-7 w-7 rounded-full bg-background/80 hover:bg-background/95 backdrop-blur-sm"+ className="absolute top-2 right-2 h-7 w-7 rounded-full bg-background/80 hover:bg-background/95 border border-border"onClick={() => setScreenshot(null)}><X className="h-3.5 w-3.5" />diff --git a/openrewind/components/splash-screen.tsx b/openrewind/components/splash-screen.tsxindex 12a600e1f..2c99b8332 100644--- a/openrewind/components/splash-screen.tsx+++ b/openrewind/components/splash-screen.tsx@@ -4,7 +4,7 @@ import { motion } from "framer-motion";const SplashScreen: React.FC = () => {return (<div className="flex items-center justify-center h-screen bg-background">- <div className="flex flex-col items-center space-y-6">+ <div className="flex flex-col items-center space-y-6 rounded-3xl p-12 ">{/* Logo with subtle animation */}<motion.divinitial={{ scale: 0.8, opacity: 0 }}@@ -31,7 +31,7 @@ const SplashScreen: React.FC = () => {{/* Subtle glow effect */}<motion.div- className="absolute inset-0 rounded-full bg-gradient-to-r from-blue-500/20 to-purple-500/20 blur-xl"+ className="absolute inset-0 rounded-full bg-gradient-to-r from-blue-500/20 to-purple-500/20"animate={{opacity: [0.3, 0.6, 0.3],}}diff --git a/openrewind/components/theme-provider.tsx b/openrewind/components/theme-provider.tsxnew file mode 100644index 000000000..dd7594dcf--- /dev/null+++ b/openrewind/components/theme-provider.tsx@@ -0,0 +1,109 @@+"use client";++import React, { createContext, useContext, useEffect, useState } from "react";+import { type ColorTheme } from "@/lib/constants/colors";++interface ThemeProviderProps {+ children: React.ReactNode;+ defaultTheme?: ColorTheme;+ storageKey?: string;+}++interface ThemeProviderState {+ theme: ColorTheme;+ setTheme: (theme: ColorTheme) => void;+ toggleTheme: () => void;+}++const initialState: ThemeProviderState = {+ theme: "system",+ setTheme: () => null,+ toggleTheme: () => null,+};++const ThemeProviderContext = createContext<ThemeProviderState>(initialState);++export function ThemeProvider({+ children,+ defaultTheme = "system",+ storageKey = "openrewind-ui-theme",+ ...props+}: ThemeProviderProps) {+ const [theme, setTheme] = useState<ColorTheme | undefined>(undefined);+ const [isLoaded, setIsLoaded] = useState(false);++ useEffect(() => {+ const storedTheme = localStorage.getItem(storageKey) as ColorTheme;+ if (storedTheme) {+ setTheme(storedTheme);+ } else {+ setTheme("system");+ }+ setIsLoaded(true);+ }, [storageKey]);++ useEffect(() => {+ if (!theme || !isLoaded) return;++ const root = window.document.documentElement;++ // Remove all theme classes first+ root.classList.remove("light", "dark");++ // Determine the actual theme to apply+ let actualTheme: "light" | "dark";++ if (theme === "system") {+ actualTheme = window.matchMedia("(prefers-color-scheme: dark)").matches+ ? "dark"+ : "light";++ // Listen for system theme changes+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");+ const handleSystemThemeChange = () => {+ if (theme === "system") {+ const newActualTheme = mediaQuery.matches ? "dark" : "light";+ root.classList.remove("light", "dark");+ root.classList.add(newActualTheme);+ }+ };++ mediaQuery.addEventListener("change", handleSystemThemeChange);+ return () => mediaQuery.removeEventListener("change", handleSystemThemeChange);+ } else {+ actualTheme = theme;+ }++ // Add the actual theme class+ root.classList.add(actualTheme);+ }, [theme, isLoaded]);++ const value = {+ theme: theme || defaultTheme,+ setTheme: (theme: ColorTheme) => {+ localStorage.setItem(storageKey, theme);+ setTheme(theme);+ },+ toggleTheme: () => {+ const currentTheme = theme || defaultTheme;+ const newTheme = currentTheme === "light" ? "dark" : "light";+ localStorage.setItem(storageKey, newTheme);+ setTheme(newTheme);+ },+ };++ return (+ <ThemeProviderContext.Provider {...props} value={value}>+ {children}+ </ThemeProviderContext.Provider>+ );+}++export const useTheme = () => {+ const context = useContext(ThemeProviderContext);++ if (context === undefined)+ throw new Error("useTheme must be used within a ThemeProvider");++ return context;+};\ No newline at end of filediff --git a/openrewind/components/theme-toggle.tsx b/openrewind/components/theme-toggle.tsxnew file mode 100644index 000000000..35a43a49b--- /dev/null+++ b/openrewind/components/theme-toggle.tsx@@ -0,0 +1,66 @@+"use client";++import * as React from "react";+import { Moon, Sun } from "lucide-react";+import { Button } from "@/components/ui/button";+import { useTheme } from "@/components/theme-provider";++interface ThemeToggleProps {+ variant?: "default" | "ghost" | "outline";+ size?: "default" | "sm" | "lg" | "icon";+ className?: string;+}++export function ThemeToggle({+ variant = "ghost",+ size = "icon",+ className+}: ThemeToggleProps) {+ const { theme, toggleTheme } = useTheme();++ return (+ <Button+ variant={variant}+ size={size}+ onClick={toggleTheme}+ className={className}+ title={`Switch to ${theme === "light" ? "dark" : "light"} mode`}+ >+ {theme === "light" ? (+ <Moon className="h-4 w-4" />+ ) : (+ <Sun className="h-4 w-4" />+ )}+ <span className="sr-only">Toggle theme</span>+ </Button>+ );+}++export function ThemeToggleWithLabel({+ variant = "ghost",+ size = "default",+ className+}: ThemeToggleProps) {+ const { theme, toggleTheme } = useTheme();++ return (+ <Button+ variant={variant}+ size={size}+ onClick={toggleTheme}+ className={className}+ >+ {theme === "light" ? (+ <>+ <Moon className="h-4 w-4 mr-2" />+ Dark mode+ </>+ ) : (+ <>+ <Sun className="h-4 w-4 mr-2" />+ Light mode+ </>+ )}+ </Button>+ );+}\ No newline at end of filediff --git a/openrewind/components/ui/dock.tsx b/openrewind/components/ui/dock.tsxindex 2655d9979..d5ef86bb9 100644--- a/openrewind/components/ui/dock.tsx+++ b/openrewind/components/ui/dock.tsx@@ -18,7 +18,7 @@ const DEFAULT_MAGNIFICATION = 60;const DEFAULT_DISTANCE = 140;const dockVariants = cva(- "supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max gap-2 rounded-2xl border p-2 backdrop-blur-md",+ "bg-background/10 dark:bg-background/10 mx-auto mt-8 flex h-[58px] w-max gap-2 rounded-2xl border p-2",);const Dock = React.forwardRef<HTMLDivElement, DockProps>(diff --git a/openrewind/components/ui/multi-select.tsx b/openrewind/components/ui/multi-select.tsxindex ed4ff069d..cc21dc284 100644--- a/openrewind/components/ui/multi-select.tsx+++ b/openrewind/components/ui/multi-select.tsx@@ -123,6 +123,8 @@ interface MultiSelectProps/** Optional validation function for custom values */validateCustomValue?: (value: string) => boolean;++ value?: string[];}export const MultiSelect = React.forwardRef<@@ -135,6 +137,7 @@ export const MultiSelect = React.forwardRef<onValueChange,variant,defaultValue = [],+ value,placeholder = "Select options",animation = 0,maxCount = 3,@@ -147,8 +150,9 @@ export const MultiSelect = React.forwardRef<},ref) => {- const [selectedValues, setSelectedValues] =- React.useState<string[]>(defaultValue);+ const isControlled = typeof value !== "undefined";+ const [internalSelectedValues, setInternalSelectedValues] = React.useState<string[]>(defaultValue);+ const selectedValues = isControlled ? value! : internalSelectedValues;const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);const [isAnimating, setIsAnimating] = React.useState(false);const [inputValue, setInputValue] = React.useState("");@@ -173,7 +177,7 @@ export const MultiSelect = React.forwardRef<!allOptions.some((opt) => opt.value === value)) {const newSelectedValues = [...selectedValues, value];- setSelectedValues(newSelectedValues);+ if (!isControlled) setInternalSelectedValues(newSelectedValues);onValueChange(newSelectedValues);setInputValue("");}@@ -190,7 +194,7 @@ export const MultiSelect = React.forwardRef<} else if (event.key === "Backspace" && !event.currentTarget.value) {const newSelectedValues = [...selectedValues];newSelectedValues.pop();- setSelectedValues(newSelectedValues);+ if (!isControlled) setInternalSelectedValues(newSelectedValues);onValueChange(newSelectedValues);}};@@ -199,12 +203,12 @@ export const MultiSelect = React.forwardRef<const newSelectedValues = selectedValues.includes(option)? selectedValues.filter((value) => value !== option): [...selectedValues, option];- setSelectedValues(newSelectedValues);+ if (!isControlled) setInternalSelectedValues(newSelectedValues);onValueChange(newSelectedValues);};const handleClear = () => {- setSelectedValues([]);+ if (!isControlled) setInternalSelectedValues([]);onValueChange([]);};@@ -214,7 +218,7 @@ export const MultiSelect = React.forwardRef<const clearExtraOptions = () => {const newSelectedValues = selectedValues.slice(0, maxCount);- setSelectedValues(newSelectedValues);+ if (!isControlled) setInternalSelectedValues(newSelectedValues);onValueChange(newSelectedValues);};@@ -223,7 +227,7 @@ export const MultiSelect = React.forwardRef<handleClear();} else {const allValues = options.map((option) => option.value);- setSelectedValues(allValues);+ if (!isControlled) setInternalSelectedValues(allValues);onValueChange(allValues);}};diff --git a/openrewind/components/ui/rainbow-button.tsx b/openrewind/components/ui/rainbow-button.tsxindex 299fb03de..b78d5085a 100644--- a/openrewind/components/ui/rainbow-button.tsx+++ b/openrewind/components/ui/rainbow-button.tsx@@ -12,16 +12,15 @@ export function RainbowButton({return (<buttonclassName={cn(- "group relative inline-flex h-11 animate-rainbow cursor-pointer items-center justify-center rounded-xl border-0 bg-[length:200%] px-8 py-2 font-medium text-primary-foreground transition-colors [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.08*1rem)_solid_transparent] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",-+ "group relative inline-flex h-11 animate-rainbow cursor-pointer items-center justify-center rounded-xl border-0 bg-[length:200%] px-8 py-2 font-medium transition-colors [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.08*1rem)_solid_transparent] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",// before styles"before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))] before:bg-[length:200%] before:[filter:blur(calc(0.8*1rem))]",- // light mode colors- "bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]",+ // light mode colors - dark background with white text+ "text-white bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]",- // dark mode colors- "dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]",+ // dark mode colors - dark background with white text+ "dark:text-white dark:bg-[linear-gradient(#000,#000),linear-gradient(#000_50%,rgba(0,0,0,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]",className,)}diff --git a/openrewind/lib/constants/colors.ts b/openrewind/lib/constants/colors.tsnew file mode 100644index 000000000..9167113ba--- /dev/null+++ b/openrewind/lib/constants/colors.ts@@ -0,0 +1,193 @@+/**+ * Color constants for consistent theming throughout the application+ * These correspond to CSS custom properties defined in globals.css+ */++export const colors = {+ // Base colors+ background: 'hsl(var(--background))',+ foreground: 'hsl(var(--foreground))',++ // Surface colors for different elevation levels+ surface: {+ DEFAULT: 'hsl(var(--surface))',+ secondary: 'hsl(var(--surface-secondary))',+ tertiary: 'hsl(var(--surface-tertiary))',+ },++ // Primary brand colors+ primary: {+ DEFAULT: 'hsl(var(--primary))',+ foreground: 'hsl(var(--primary-foreground))',+ hover: 'hsl(var(--primary-hover))',+ muted: 'hsl(var(--primary-muted))',+ },++ // Secondary colors+ secondary: {+ DEFAULT: 'hsl(var(--secondary))',+ foreground: 'hsl(var(--secondary-foreground))',+ hover: 'hsl(var(--secondary-hover))',+ },++ // Semantic status colors+ success: {+ DEFAULT: 'hsl(var(--success))',+ foreground: 'hsl(var(--success-foreground))',+ muted: 'hsl(var(--success-muted))',+ },++ warning: {+ DEFAULT: 'hsl(var(--warning))',+ foreground: 'hsl(var(--warning-foreground))',+ muted: 'hsl(var(--warning-muted))',+ },++ error: {+ DEFAULT: 'hsl(var(--destructive))',+ foreground: 'hsl(var(--destructive-foreground))',+ hover: 'hsl(var(--destructive-hover))',+ muted: 'hsl(var(--destructive-muted))',+ },++ info: {+ DEFAULT: 'hsl(var(--info))',+ foreground: 'hsl(var(--info-foreground))',+ muted: 'hsl(var(--info-muted))',+ },++ // Text colors+ text: {+ primary: 'hsl(var(--text-primary))',+ secondary: 'hsl(var(--text-secondary))',+ tertiary: 'hsl(var(--text-tertiary))',+ disabled: 'hsl(var(--text-disabled))',+ },++ // UI element colors+ muted: {+ DEFAULT: 'hsl(var(--muted))',+ foreground: 'hsl(var(--muted-foreground))',+ },++ accent: {+ DEFAULT: 'hsl(var(--accent))',+ foreground: 'hsl(var(--accent-foreground))',+ hover: 'hsl(var(--accent-hover))',+ },++ card: {+ DEFAULT: 'hsl(var(--card))',+ foreground: 'hsl(var(--card-foreground))',+ hover: 'hsl(var(--card-hover))',+ },++ // Form elements+ border: 'hsl(var(--border))',+ input: {+ DEFAULT: 'hsl(var(--input))',+ focus: 'hsl(var(--input-focus))',+ },+ ring: 'hsl(var(--ring))',++ // Brand accent colors+ brand: {+ 1: 'hsl(var(--brand-1))',+ 2: 'hsl(var(--brand-2))',+ 3: 'hsl(var(--brand-3))',+ 4: 'hsl(var(--brand-4))',+ 5: 'hsl(var(--brand-5))',+ },+} as const;++/**+ * Status color mappings for consistent status indication+ */+export const statusColors = {+ success: colors.success.DEFAULT,+ warning: colors.warning.DEFAULT,+ error: colors.error.DEFAULT,+ info: colors.info.DEFAULT,+ loading: colors.warning.DEFAULT,+ idle: colors.text.tertiary,+} as const;++/**+ * Color utility functions+ */+export const colorUtils = {+ /**+ * Get status color based on status string+ */+ getStatusColor: (status: 'success' | 'warning' | 'error' | 'info' | 'loading' | 'idle') => {+ return statusColors[status] || statusColors.idle;+ },++ /**+ * Get appropriate text color for a given background+ */+ getContrastColor: (backgroundColor: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info') => {+ const colorMap = {+ primary: colors.primary.foreground,+ secondary: colors.secondary.foreground,+ success: colors.success.foreground,+ warning: colors.warning.foreground,+ error: colors.error.foreground,+ info: colors.info.foreground,+ };+ return colorMap[backgroundColor] || colors.foreground;+ },++ /**+ * Get brand color by index (1-5)+ */+ getBrandColor: (index: 1 | 2 | 3 | 4 | 5) => {+ return colors.brand[index];+ },+} as const;++/**+ * Tailwind CSS class name mappings for common color combinations+ */+export const colorClasses = {+ // Background classes+ bg: {+ primary: 'bg-primary hover:bg-primary-hover',+ secondary: 'bg-secondary hover:bg-secondary-hover',+ success: 'bg-success',+ warning: 'bg-warning',+ error: 'bg-destructive hover:bg-destructive-hover',+ info: 'bg-info',+ card: 'bg-card hover:bg-card-hover',+ surface: 'bg-surface',+ muted: 'bg-muted',+ },++ // Text classes+ text: {+ primary: 'text-text-primary',+ secondary: 'text-text-secondary',+ tertiary: 'text-text-tertiary',+ disabled: 'text-text-disabled',+ onPrimary: 'text-primary-foreground',+ onSecondary: 'text-secondary-foreground',+ success: 'text-success',+ warning: 'text-warning',+ error: 'text-destructive',+ info: 'text-info',+ },++ // Border classes+ border: {+ DEFAULT: 'border-border',+ primary: 'border-primary',+ success: 'border-success',+ warning: 'border-warning',+ error: 'border-destructive',+ info: 'border-info',+ },+} as const;++export type ColorTheme = 'light' | 'dark' | 'system';+export type StatusType = keyof typeof statusColors;+export type BrandColorIndex = 1 | 2 | 3 | 4 | 5;\ No newline at end of filediff --git a/openrewind/lib/hooks/use-current-frame.tsx b/openrewind/lib/hooks/use-current-frame.tsxindex 2928fd584..e5d002fce 100644--- a/openrewind/lib/hooks/use-current-frame.tsx+++ b/openrewind/lib/hooks/use-current-frame.tsx@@ -1,6 +1,8 @@import { StreamTimeSeriesResponse } from "@/components/rewind/timeline";import { useEffect, useRef, useState } from "react";import { useTimelineStore } from "./use-timeline-store";+import { listen } from "@tauri-apps/api/event";+import { getCurrentWindow } from "@tauri-apps/api/window";export const useCurrentFrame = (setCurrentIndex: (index: number) => void) => {const [currentFrame, setCurrentFrame] =@@ -17,6 +19,24 @@ export const useCurrentFrame = (setCurrentIndex: (index: number) => void) => {lastFramesLen.current = frames.length;}, [isLoading, frames]);+ useEffect(() => {+ const handleWindowFocused = (isFocused: boolean) => {+ if (isFocused) {+ window.location.reload();+ }+ };++ const unlisten = listen("window-focused", (event) => {+ console.log("window-focused", event.payload);+ handleWindowFocused(event.payload as boolean);+ });++ return () => {+ unlisten.then(unlisten => unlisten());+ };+ }, []);++return {currentFrame,setCurrentFrame,diff --git a/openrewind/src-tauri/Cargo.lock b/openrewind/src-tauri/Cargo.lockindex 745d66a88..43a182e15 100755--- a/openrewind/src-tauri/Cargo.lock+++ b/openrewind/src-tauri/Cargo.lock@@ -877,22 +877,6 @@ dependencies = ["objc",]-[[package]]-name = "cocoa"-version = "0.25.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c"-dependencies = [- "bitflags 1.3.2",- "block",- "cocoa-foundation 0.1.2",- "core-foundation 0.9.4",- "core-graphics 0.23.2",- "foreign-types 0.5.0",- "libc",- "objc",-]-[[package]]name = "cocoa"version = "0.26.0"@@ -3928,9 +3912,9 @@ dependencies = [[[package]]name = "objc2-encode"-version = "4.0.3"+version = "4.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"[[package]]name = "objc2-foundation"@@ -7692,14 +7676,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"[[package]]name = "window-vibrancy"-version = "0.5.0"+version = "0.5.3"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340"+checksum = "831ad7678290beae36be6f9fad9234139c7f00f3b536347de7745621716be82d"dependencies = [- "cocoa 0.25.0",- "objc",+ "objc2",+ "objc2-app-kit",+ "objc2-foundation","raw-window-handle",- "windows-sys 0.52.0",+ "windows-sys 0.59.0","windows-version",]diff --git a/openrewind/src-tauri/src/commands.rs b/openrewind/src-tauri/src/commands.rsindex c06117418..63b75961c 100644--- a/openrewind/src-tauri/src/commands.rs+++ b/openrewind/src-tauri/src/commands.rs@@ -1,9 +1,10 @@-use crate::{get_data_dir, window_api::{RewindWindowId, ShowRewindWindow}, store::{OnboardingStore, SettingsStore}};+use crate::{get_data_dir, window_api::{RewindWindowId, ShowRewindWindow}, store::OnboardingStore};use serde::Serialize;use specta::Type;use tauri::Manager;use tracing::{error, info};-use std::{fs, path::Path};++#[tauri::command]#[specta::specta]@@ -27,50 +28,15 @@ pub fn set_tray_health_icon(app_handle: tauri::AppHandle) {#[tauri::command]#[specta::specta]-pub fn show_main_window(app_handle: &tauri::AppHandle, overlay: bool) {- if let Some(window) = app_handle.get_webview_window("main") {- #[cfg(target_os = "macos")]- if overlay {- let _ = app_handle.set_activation_policy(tauri::ActivationPolicy::Accessory);- }-- let _ = window.set_visible_on_all_workspaces(overlay);- let _ = window.set_always_on_top(overlay);- let _ = window.show();-- if !overlay {- let _ = window.set_focus();- }-- // event listener for the window close event- let window_clone = window.clone();- window.on_window_event(move |event| {- if let tauri::WindowEvent::CloseRequested { api, .. } = event {- if window_clone.is_fullscreen().unwrap_or(false) {- let _ = window_clone.destroy().unwrap();- } else {- let _ = window_clone.hide().unwrap();- api.prevent_close();- }- }- });- } else {- let _ = tauri::WebviewWindowBuilder::new(- app_handle,- "main",- tauri::WebviewUrl::App("index.html".into()),- )- .title("Screenpipe")- .build();- }+pub fn show_main_window(app_handle: &tauri::AppHandle, _overlay: bool) {+ let window = ShowRewindWindow::Main.show(app_handle).unwrap();+ window.set_focus().unwrap();}#[tauri::command]#[specta::specta]pub fn hide_main_window(app_handle: &tauri::AppHandle) {- if let Some(window) = app_handle.get_webview_window("main") {- let _ = window.close();- }+ ShowRewindWindow::Main.close(app_handle).unwrap();}const DEFAULT_SHORTCUT: &str = "Super+Alt+S";@@ -251,6 +217,11 @@ pub async fn show_window(app_handle: tauri::AppHandle,window: ShowRewindWindow,) -> Result<(), String> {++ if window.id().label() != ShowRewindWindow::Main.id().label() {+ ShowRewindWindow::Main.close(&app_handle).map_err(|e| e.to_string())?;+ }+window.show(&app_handle).map_err(|e| e.to_string())?;Ok(())}@@ -261,18 +232,8 @@ pub async fn close_window(app_handle: tauri::AppHandle,window: ShowRewindWindow,) -> Result<(), String> {- let window_id = match window {- ShowRewindWindow::Main => RewindWindowId::Main,- ShowRewindWindow::Settings { .. } => RewindWindowId::Settings,- ShowRewindWindow::Onboarding => RewindWindowId::Onboarding,- ShowRewindWindow::Search => RewindWindowId::Search,- };-- if let Some(window) = window_id.get(&app_handle) {- window.close().map_err(|e| e.to_string())- } else {- Err(format!("Window {} not found", window_id.label()))- }+ window.close(&app_handle).map_err(|e| e.to_string())?;+ Ok(())}// Onboarding commands@@ -285,22 +246,45 @@ pub async fn get_onboarding_status(app_handle: tauri::AppHandle) -> Result<Onboa#[tauri::command]#[specta::specta]pub async fn complete_onboarding(app_handle: tauri::AppHandle) -> Result<(), String> {- // wait until onboarding is updated+ // Update the persistent storeOnboardingStore::update(&app_handle, |onboarding| {onboarding.complete();}).map_err(|e| e.to_string())?;++ // Update the managed state in memory+ if let Some(managed_store) = app_handle.try_state::<OnboardingStore>() {+ // Get the current state and create an updated version+ let mut updated_store = managed_store.inner().clone();+ updated_store.complete();+ // Replace the managed state with the updated version+ app_handle.manage(updated_store);+ }+tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;- show_window(app_handle.clone(), ShowRewindWindow::Main).await?;close_window(app_handle.clone(), ShowRewindWindow::Onboarding).await?;+ show_window(app_handle.clone(), ShowRewindWindow::Main).await?;+Ok(())}#[tauri::command]#[specta::specta]pub async fn reset_onboarding(app_handle: tauri::AppHandle) -> Result<(), String> {+ // Update the persistent storeOnboardingStore::update(&app_handle, |onboarding| {onboarding.reset();- })+ })?;++ // Update the managed state in memory+ if let Some(managed_store) = app_handle.try_state::<OnboardingStore>() {+ // Get the current state and create an updated version+ let mut updated_store = managed_store.inner().clone();+ updated_store.reset();+ // Replace the managed state with the updated version+ app_handle.manage(updated_store);+ }++ Ok(())}#[tauri::command]diff --git a/openrewind/src-tauri/src/main.rs b/openrewind/src-tauri/src/main.rsindex 3f848127c..d1ec82311 100755--- a/openrewind/src-tauri/src/main.rs+++ b/openrewind/src-tauri/src/main.rs@@ -5,6 +5,7 @@ use analytics::AnalyticsManager;use commands::show_main_window;use serde_json::json;use serde_json::Value;+use tauri_nspanel::ManagerExt;use std::env;use std::fs::File;use std::path::PathBuf;@@ -14,11 +15,10 @@ use tauri::Config;use tauri::Emitter;use tauri::Manager;use tauri_plugin_autostart::MacosLauncher;-use tauri_plugin_autostart::ManagerExt;+use tauri_plugin_autostart::ManagerExt as AutostartManagerExt;use tauri_plugin_global_shortcut::ShortcutState;#[allow(unused_imports)]use tauri_plugin_shell::process::CommandEvent;-use tauri_plugin_store::StoreBuilder;use tokio::sync::mpsc;use tokio::sync::Mutex;use tracing::{debug, error, info, warn};@@ -37,6 +37,7 @@ use tauri_specta::{collect_commands, Builder};mod analytics;mod icons;use crate::analytics::start_analytics;+use crate::store::SettingsStore;mod commands;mod disk_usage;@@ -92,33 +93,21 @@ struct ShortcutConfig {impl ShortcutConfig {async fn from_store(app: &AppHandle) -> Result<Self, String> {- let store = get_store(app, None).map_err(|e| e.to_string())?;+ let store = SettingsStore::get(app).unwrap_or_default().unwrap_or_default();Ok(Self {show: store- .get("showOpenRewindShortcut")- .and_then(|v| v.as_str().map(String::from))- .unwrap_or_else(|| "Super+Alt+S".to_string()),+ .show_screenpipe_shortcut,start: store- .get("startRecordingShortcut")- .and_then(|v| v.as_str().map(String::from))- .unwrap_or_else(|| "Super+Alt+U".to_string()),+ .start_recording_shortcut,stop: store- .get("stopRecordingShortcut")- .and_then(|v| v.as_str().map(String::from))- .unwrap_or_else(|| "Super+Alt+X".to_string()),+ .stop_recording_shortcut,start_audio: store- .get("startAudioShortcut")- .and_then(|v| v.as_str().map(String::from))- .unwrap_or_default(),+ .start_audio_shortcut,stop_audio: store- .get("stopAudioShortcut")- .and_then(|v| v.as_str().map(String::from))- .unwrap_or_default(),+ .stop_audio_shortcut,disabled: store- .get("disabledShortcuts")- .and_then(|v| serde_json::from_value(v.clone()).ok())- .unwrap_or_default(),+ .disabled_shortcuts,})}@@ -186,13 +175,13 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),// Register show shortcutregister_shortcut(app, &config.show, config.is_disabled("show"), |app| {info!("show shortcut triggered");- if let Some(window) = app.get_webview_window("main") {+ if let Ok(window) = app.get_webview_panel("main") {match window.is_visible() {- Ok(true) => {+ true => {info!("window is visible, hiding main window");hide_main_window(app)}- Ok(false) | Err(_) => {+ false => {info!("window is not visible or error checking visibility, showing main window");@@ -205,6 +194,12 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),}).await?;+ // register esc button to hide main window+ register_shortcut(app, "Escape", false, |app| {+ hide_main_window(app);+ })+ .await?;+// Register start shortcutregister_shortcut(app,@@ -678,6 +673,7 @@ async fn main() {.plugin(tauri_plugin_updater::Builder::new().build()).plugin(tauri_plugin_global_shortcut::Builder::new().build()).plugin(tauri_plugin_sentry::init(&sentry_guard))+ .plugin(tauri_nspanel::init()).manage(sidecar_state).invoke_handler(tauri::generate_handler![spawn_screenpipe,@@ -932,33 +928,17 @@ async fn main() {drop(server_shutdown_tx.send(()));}}- tauri::RunEvent::WindowEvent {- label,- event: tauri::WindowEvent::Focused(focused),- ..- } => {- if label == "main" && focused {- let window = app_handle.get_webview_window("main").unwrap();- window.show().unwrap();- window.set_focus().unwrap();- }- }+tauri::RunEvent::WindowEvent {label,event: tauri::WindowEvent::Destroyed,..} => {- if label == "main" {- let window = app_handle.get_webview_window("main").unwrap();- window.show().unwrap();- window.set_focus().unwrap();- }-if let Ok(window_id) = RewindWindowId::from_str(label.as_str()) {match window_id {RewindWindowId::Settings => {if let Some(window) = RewindWindowId::Main.get(&app_handle) {- let _ = window.show();+ let _ = window.destroy();}return;@@ -971,24 +951,11 @@ async fn main() {#[cfg(target_os = "macos")]tauri::RunEvent::Reopen {- has_visible_windows,..} => {- let has_window = app_handle- .webview_windows()- .iter()- .any(|(label, _)| label.as_str() == "settings");-- if has_window {- if let Some(window) = app_handle.get_webview_window("settings") {- let _ = window.show();- }- return;- }- if !has_visible_windows {- show_main_window(app_handle, false);- }++ let _ = ShowRewindWindow::Main.show(&app_handle);}_ => {}});diff --git a/openrewind/src-tauri/src/store.rs b/openrewind/src-tauri/src/store.rsindex 7d78c8cd3..1df164f91 100644--- a/openrewind/src-tauri/src/store.rs+++ b/openrewind/src-tauri/src/store.rs@@ -372,9 +372,9 @@ impl Default for SettingsStore {contact: None,cloud_subscribed: None,},- show_screenpipe_shortcut: "Super+Alt+S".to_string(),- start_recording_shortcut: "Super+Alt+U".to_string(),- stop_recording_shortcut: "Super+Alt+X".to_string(),+ show_screenpipe_shortcut: "Super+Ctrl+S".to_string(),+ start_recording_shortcut: "Super+Ctrl+U".to_string(),+ stop_recording_shortcut: "Super+Ctrl+X".to_string(),start_audio_shortcut: "".to_string(),stop_audio_shortcut: "".to_string(),pipe_shortcuts: HashMap::new(),diff --git a/openrewind/src-tauri/src/window_api.rs b/openrewind/src-tauri/src/window_api.rsindex 3b707b9cc..7739f77bf 100644--- a/openrewind/src-tauri/src/window_api.rs+++ b/openrewind/src-tauri/src/window_api.rs@@ -2,10 +2,14 @@ use std::{path::PathBuf, str::FromStr};use axum::{extract::State, http::StatusCode, Json};use serde::{Deserialize, Serialize};-use tauri::{AppHandle, LogicalSize, Manager, Size, WebviewUrl, WebviewWindow, WebviewWindowBuilder, Wry};+use tauri::{AppHandle, Emitter, LogicalSize, Manager, Size, WebviewUrl, WebviewWindow, WebviewWindowBuilder, Wry};+use tauri_nspanel::ManagerExt;use tracing::{error, info};+#[cfg(target_os = "macos")]+use tauri_nspanel::WebviewWindowExt;-use crate::ServerState;++use crate::{store::OnboardingStore, ServerState};#[derive(Deserialize, Debug)]pub struct OpenLocalPathPayload {@@ -263,9 +267,33 @@ impl ShowRewindWindow {pub fn show(&self, app: &AppHandle) -> tauri::Result<WebviewWindow> {let id = self.id();+ let onboarding_store = OnboardingStore::get(app)+ .unwrap_or_else(|_| None)+ .unwrap_or_default();if let Some(window) = id.get(app) {+++ if id.label() == RewindWindowId::Main.label() {+ info!("showing panel");+ let app_clone = app.clone();+ app.run_on_main_thread(move || {+ if let Ok(panel) = app_clone.get_webview_panel(RewindWindowId::Main.label()) {+ panel.show();+ }+ }).ok();+ return Ok(window);+ }++ if id.label() == RewindWindowId::Onboarding.label() {+ if onboarding_store.is_completed {+ return ShowRewindWindow::Main.show(app);+ }+ }++info!("showing window: {:?}", id.label());+window.show().ok();return Ok(window);}@@ -275,9 +303,87 @@ impl ShowRewindWindow {let window = match self {ShowRewindWindow::Main => {- let builder = self.window_builder(app, "/").hidden_title(true).focused(true);++ if !onboarding_store.is_completed {+ return ShowRewindWindow::Onboarding.show(app);+ }++ let monitor = app.primary_monitor().unwrap().unwrap();+ let size = monitor.size();+ let builder = self.window_builder(app, "/").hidden_title(true).visible_on_all_workspaces(true).always_on_top(true).decorations(false).skip_taskbar(true).focused(true).transparent(true).inner_size(size.width as f64, size.height as f64);let window = builder.build()?;+ #[cfg(target_os = "macos")]+ {+ // Convert to panel on macOS to prevent animations - do this after window creation+ if let Ok(_panel) = window.to_panel() {+ info!("Successfully converted main window to panel");++ // Set panel behaviors on main thread to avoid crashes+ let window_clone = window.clone();+ app.run_on_main_thread(move || {+ use tauri_nspanel::cocoa::appkit::{NSWindowCollectionBehavior};++ if let Ok(panel) = window_clone.to_panel() {+ panel.set_level(26);++ panel.released_when_closed(true);++ panel.set_style_mask(0);++ panel.set_collection_behaviour(+ NSWindowCollectionBehavior::NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehavior::NSWindowCollectionBehaviorIgnoresCycle | NSWindowCollectionBehavior::NSWindowCollectionBehaviorFullScreenAuxiliary+ );+ }+ }).ok();+ } else {+ error!("Failed to convert main window to panel");+ }+ }++ // Add event listener to hide window when it loses focus+ let app_clone = app.clone();+ window.on_window_event(move |event| {+ if let tauri::WindowEvent::Focused(is_focused) = event {+ if !is_focused {+ info!("Main window lost focus, hiding window");++ // #[cfg(target_os = "macos")]+ // {+ // let value = app_clone.clone();+ // app_clone.run_on_main_thread(move || {+ // if let Ok(panel) = value.get_webview_panel(RewindWindowId::Main.label()) {+ // panel.order_out(None);+ // }+++ // }).ok();+ // }++ // #[cfg(not(target_os = "macos"))]+ // {+ // let _ = window.hide();+ // }++ let _ = app_clone.emit("window-focused", false).ok();+ }else{+ let _ = app_clone.emit("window-focused", true).ok();+ }+ }+ });++ // #[cfg(target_os = "macos")]+ // {+ // use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial};+ // apply_vibrancy(&window, NSVisualEffectMaterial::ContentBackground, None, None).ok();+ // }++ // #[cfg(target_os = "windows")]+ // {+ // use window_vibrancy::apply_blur;+ // apply_blur(&window, Some((18, 18, 18, 125))).ok();+ // }+window}ShowRewindWindow::Settings { page: _ } => {@@ -291,17 +397,50 @@ impl ShowRewindWindow {window}ShowRewindWindow::Onboarding => {+ if onboarding_store.is_completed {+ return ShowRewindWindow::Main.show(app);+ }+let builder = self.window_builder(app, "/onboarding").visible_on_all_workspaces(true).always_on_top(true).inner_size(1000.0, 750.0);let window = builder.build()?;window}};+Ok(window)}pub fn close(&self, app: &AppHandle) -> tauri::Result<()> {let id = self.id();+ if id.label() == RewindWindowId::Main.label() {+ #[cfg(target_os = "macos")]+ {+ let app_clone = app.clone();+ app.run_on_main_thread(move || {+ if let Ok(panel) = app_clone.get_webview_panel(RewindWindowId::Main.label()) {+ panel.order_out(None);+ }+ }).ok();+ }++ #[cfg(not(target_os = "macos"))]+ {+ if let Some(window) = id.get(app) {+ window.close().ok();+ }+ }++ return Ok(());+ }++ // if id.label() == RewindWindowId::Onboarding.label() {+ // if let Some(window) = id.get(app) {+ // window.destroy().ok();+ // }+ // return Ok(());+ // }+if let Some(window) = id.get(app) {window.close().ok();}diff --git a/openrewind/tailwind.config.ts b/openrewind/tailwind.config.tsindex 4088bfe16..7215534e1 100644--- a/openrewind/tailwind.config.ts+++ b/openrewind/tailwind.config.ts@@ -22,44 +22,118 @@ module.exports = {mono: ["var(--font-geist-mono)"],},colors: {+ // Base colorsborder: "hsl(var(--border))",- input: "hsl(var(--input))",+ input: {+ DEFAULT: "hsl(var(--input))",+ focus: "hsl(var(--input-focus))",+ },ring: "hsl(var(--ring))",background: "hsl(var(--background))",foreground: "hsl(var(--foreground))",++ // Surface colors+ surface: {+ DEFAULT: "hsl(var(--surface))",+ secondary: "hsl(var(--surface-secondary))",+ tertiary: "hsl(var(--surface-tertiary))",+ },++ // Primary brand colorsprimary: {DEFAULT: "hsl(var(--primary))",foreground: "hsl(var(--primary-foreground))",+ hover: "hsl(var(--primary-hover))",+ muted: "hsl(var(--primary-muted))",},++ // Secondary colorssecondary: {DEFAULT: "hsl(var(--secondary))",foreground: "hsl(var(--secondary-foreground))",+ hover: "hsl(var(--secondary-hover))",+ },++ // Success colors+ success: {+ DEFAULT: "hsl(var(--success))",+ foreground: "hsl(var(--success-foreground))",+ muted: "hsl(var(--success-muted))",+ },++ // Warning colors+ warning: {+ DEFAULT: "hsl(var(--warning))",+ foreground: "hsl(var(--warning-foreground))",+ muted: "hsl(var(--warning-muted))",},++ // Error/Destructive colorsdestructive: {DEFAULT: "hsl(var(--destructive))",foreground: "hsl(var(--destructive-foreground))",+ hover: "hsl(var(--destructive-hover))",+ muted: "hsl(var(--destructive-muted))",},++ // Info colors+ info: {+ DEFAULT: "hsl(var(--info))",+ foreground: "hsl(var(--info-foreground))",+ muted: "hsl(var(--info-muted))",+ },++ // Muted colorsmuted: {DEFAULT: "hsl(var(--muted))",foreground: "hsl(var(--muted-foreground))",},++ // Accent colorsaccent: {DEFAULT: "hsl(var(--accent))",foreground: "hsl(var(--accent-foreground))",+ hover: "hsl(var(--accent-hover))",},++ // Card colors+ card: {+ DEFAULT: "hsl(var(--card))",+ foreground: "hsl(var(--card-foreground))",+ hover: "hsl(var(--card-hover))",+ },++ // Popover colorspopover: {DEFAULT: "hsl(var(--popover))",foreground: "hsl(var(--popover-foreground))",},- card: {- DEFAULT: "hsl(var(--card))",- foreground: "hsl(var(--card-foreground))",++ // Text colors+ text: {+ primary: "hsl(var(--text-primary))",+ secondary: "hsl(var(--text-secondary))",+ tertiary: "hsl(var(--text-tertiary))",+ disabled: "hsl(var(--text-disabled))",+ },++ // Brand accent colors+ brand: {+ 1: "hsl(var(--brand-1))",+ 2: "hsl(var(--brand-2))",+ 3: "hsl(var(--brand-3))",+ 4: "hsl(var(--brand-4))",+ 5: "hsl(var(--brand-5))",},- "color-1": "hsl(var(--color-1))",- "color-2": "hsl(var(--color-2))",- "color-3": "hsl(var(--color-3))",- "color-4": "hsl(var(--color-4))",- "color-5": "hsl(var(--color-5))",++ // Legacy color mappings for backward compatibility+ "color-1": "hsl(var(--brand-1))",+ "color-2": "hsl(var(--brand-2))",+ "color-3": "hsl(var(--brand-3))",+ "color-4": "hsl(var(--brand-4))",+ "color-5": "hsl(var(--brand-5))",++ // Sidebar colorssidebar: {DEFAULT: "hsl(var(--sidebar-background))",foreground: "hsl(var(--sidebar-foreground))",