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
fix(ui): improve top bar UX and audio transcript close button
Louis Beaumont6552613e06f7
diff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsxindex a6d1401b3..242204c8e 100644--- a/screenpipe-app-tauri/app/page.tsx+++ b/screenpipe-app-tauri/app/page.tsx@@ -17,18 +17,10 @@ import { ModelDownloadTracker } from "../components/model-download-tracker";import Timeline from "@/components/rewind/timeline";import { Button } from "@/components/ui/button";import { Separator } from "@/components/ui/separator";-import {- Popover,- PopoverContent,- PopoverTrigger,-} from "@/components/ui/popover";-import { RefreshCw, AlertTriangle, Settings, Mail } from "lucide-react";+import { RefreshCw, AlertTriangle } from "lucide-react";import { PermissionButtons } from "@/components/status/permission-buttons";import { usePlatform } from "@/lib/hooks/use-platform";import SplashScreen from "@/components/splash-screen";-import { openSettingsWindow } from "@/lib/utils/window";-import HealthStatus from "@/components/screenpipe-status";-import { ShareLogsButton } from "@/components/share-logs-button";import { SearchCommand } from "@/components/rewind/search-command";export default function Home() {@@ -38,7 +30,6 @@ export default function Home() {const { isServerDown } = useHealthCheck();const { isMac } = usePlatform();const [isRestarting, setIsRestarting] = useState(false);- const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);const isProcessingRef = useRef(false);// Load onboarding status on mount@@ -139,31 +130,7 @@ 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-gradient-to-b from-black/15 to-transparent w-full fixed top-0 left-0 z-[1000]" data-tauri-drag-region>- <div className="flex items-center justify-between gap-2">- <div/>- <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="link" size="icon">- <Mail className="h-4 w-4" />- </Button>- </PopoverTrigger>- <PopoverContent className="w-100 rounded-2xl bg-background border border-border">- <ShareLogsButton- showShareLink={false}- onComplete={() => setIsFeedbackOpen(false)}- />- </PopoverContent>- </Popover>- <Button variant="link" size="icon" onClick={() => openSettingsWindow()}>- <Settings className="h-4 w-4" />- </Button>- </div>- </div>- </div>+ <div className="h-8 bg-gradient-to-b from-black/15 to-transparent w-full fixed top-0 left-0 z-[1000]" data-tauri-drag-region /><NotificationHandler />{/* Only render content after settings are loaded */}diff --git a/screenpipe-app-tauri/components/rewind/search-command.tsx b/screenpipe-app-tauri/components/rewind/search-command.tsxindex 28255d81b..afee54d5d 100644--- a/screenpipe-app-tauri/components/rewind/search-command.tsx+++ b/screenpipe-app-tauri/components/rewind/search-command.tsx@@ -42,10 +42,16 @@ export function SearchCommand() {e.preventDefault();setOpen((open) => !open);}+ // Always close on escape when dialog is open+ if (e.key === "Escape" && open) {+ e.preventDefault();+ e.stopPropagation();+ setOpen(false);+ }};- document.addEventListener("keydown", down);- return () => document.removeEventListener("keydown", down);- }, []);+ document.addEventListener("keydown", down, true); // Use capture phase+ return () => document.removeEventListener("keydown", down, true);+ }, [open]);const handleKeyDown = (e: React.KeyboardEvent) => {if (e.key === "Enter") {diff --git a/screenpipe-app-tauri/components/rewind/timeline.tsx b/screenpipe-app-tauri/components/rewind/timeline.tsxindex 0d56b6c6f..58972667d 100644--- a/screenpipe-app-tauri/components/rewind/timeline.tsx+++ b/screenpipe-app-tauri/components/rewind/timeline.tsx@@ -60,6 +60,7 @@ const easeOutCubic = (x: number): number => {export default function Timeline() {const [currentIndex, setCurrentIndex] = useState(0);const [isAiPanelExpanded, setIsAiPanelExpanded] = useState(false);+ const [showAudioTranscript, setShowAudioTranscript] = useState(true);const containerRef = useRef<HTMLDivElement | null>(null);const [aiPanelPosition, setAiPanelPosition] = useState({ x: 0, y: 0 });// const [searchResults, setSearchResults] = useState<number[]>([]);@@ -429,12 +430,13 @@ export default function Timeline() {)}{/* Audio Transcript Panel - Re-enabled and properly positioned */}- {currentFrame && (+ {currentFrame && showAudioTranscript && (<div className="absolute bottom-28 left-4 right-4 z-35"><AudioTranscriptframes={frames}currentIndex={currentIndex}groupingWindowMs={30000} // 30 seconds window+ onClose={() => setShowAudioTranscript(false)}/></div>)}diff --git a/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx b/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsxindex 1a8e34e45..f04695003 100644--- a/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx+++ b/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx@@ -1,7 +1,7 @@"use client";import { Button } from "@/components/ui/button";-import { ChevronLeft, ChevronRight, RefreshCw, Mail, User, Settings2, Book, Heart, Play, Folder } from "lucide-react";+import { ChevronLeft, ChevronRight, RefreshCw } from "lucide-react";import {endOfDay,format,@@ -11,50 +11,13 @@ import {} from "date-fns";import { cn } from "@/lib/utils";import { motion, AnimatePresence } from "framer-motion";-import { useMemo, useState } from "react";-import {- Popover,- PopoverContent,- PopoverTrigger,-} from "@/components/ui/popover";-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuGroup,- DropdownMenuItem,- DropdownMenuLabel,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from "@/components/ui/dropdown-menu";-import { open } from "@tauri-apps/plugin-shell";-import HealthStatus from "@/components/screenpipe-status";-import { ShareLogsButton } from "@/components/share-logs-button";-import { useOnboarding } from "@/lib/hooks/use-onboarding";-import { useChangelogDialog } from "@/lib/hooks/use-changelog-dialog";-import { openSettingsWindow } from "@/lib/utils/window";-import { commands } from "@/lib/utils/tauri";--import { CommandShortcut } from "@/components/ui/command";+import { useMemo } from "react";interface TimeRange {start: Date;end: Date;}-interface InboxMessageAction {- label: string;- action: string;-}--interface Message {- id: string;- title: string;- body: string;- date: string;- read: boolean;- actions?: InboxMessageAction[];-}-interface TimelineControlsProps {startAndEndDates: TimeRange;currentDate: Date;@@ -70,18 +33,6 @@ export function TimelineControls({onJumpToday,className,}: TimelineControlsProps) {- const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);-- const { setShowChangelogDialog } = useChangelogDialog();-- const handleShowOnboarding = async () => {- try {- await commands.showWindow("Onboarding");- } catch (error) {- console.error("Failed to show onboarding window:", error);- }- };-const jumpDay = async (days: number) => {const today = new Date();@@ -122,31 +73,31 @@ export function TimelineControls({{/* Center section - Timeline controls */}- <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">+ <div className="flex items-center gap-2 mt-8">+ <div className="flex items-center h-10 bg-card/80 backdrop-blur-sm border border-border rounded-full px-1 shadow-lg"><Buttonvariant="ghost"size="icon"onClick={() => jumpDay(-1)}- className="h-9 w-9 text-foreground hover:bg-accent hover:text-accent-foreground border-0 rounded-xl"+ className="h-8 w-8 text-foreground/70 hover:text-foreground hover:bg-accent/50 rounded-full transition-colors"disabled={canGoBack}>- <ChevronLeft className="h-5 w-5" />+ <ChevronLeft className="h-4 w-4" /></Button><AnimatePresence mode="wait"><motion.divkey={currentDate.toISOString()}- initial={{ y: -20, opacity: 0 }}+ initial={{ y: -10, opacity: 0 }}animate={{ y: 0, opacity: 1 }}- exit={{ y: 20, opacity: 0 }}+ exit={{ y: 10, opacity: 0 }}transition={{type: "spring",stiffness: 500,damping: 30,- duration: 0.2,+ duration: 0.15,}}- className="bg-card border border-border rounded-xl px-4 py-2 text-sm font-medium text-foreground min-w-[120px] text-center"+ className="px-2 text-sm font-medium text-foreground min-w-[100px] text-center">{format(currentDate, "d MMM yyyy")}</motion.div>@@ -156,28 +107,26 @@ export function TimelineControls({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"+ className="h-8 w-8 text-foreground/70 hover:text-foreground hover:bg-accent/50 rounded-full transition-colors"disabled={isAtToday}>- <ChevronRight className="h-5 w-5" />+ <ChevronRight className="h-4 w-4" /></Button>- <div className="h-5 w-px bg-white/20 mx-1" />-<Buttonvariant="ghost"size="icon"onClick={onJumpToday}- className="h-9 w-9 text-foreground hover:bg-accent hover:text-accent-foreground border-0 rounded-xl"+ className="h-8 w-8 text-foreground/70 hover:text-foreground hover:bg-accent/50 rounded-full transition-colors"disabled={isAtToday}>- <RefreshCw className="h-5 w-5" />+ <RefreshCw className="h-4 w-4" /></Button></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 className="flex items-center h-10 gap-1.5 bg-card/80 backdrop-blur-sm border border-border rounded-full px-4 shadow-lg">+ <span className="text-xs text-muted-foreground">⌘K</span>+ <span className="text-xs text-muted-foreground">search</span></div></div>