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(timeline): brand style alignment for speaker UI
Louis Beaumont05c703c10da9
diff --git a/screenpipe-app-tauri/components/conversation-bubble.tsx b/screenpipe-app-tauri/components/conversation-bubble.tsxindex ac6bcbb4d..c5fb2ff43 100644--- a/screenpipe-app-tauri/components/conversation-bubble.tsx+++ b/screenpipe-app-tauri/components/conversation-bubble.tsx@@ -2,29 +2,10 @@import { cn } from "@/lib/utils";import { Button } from "@/components/ui/button";-import { Play, Pause, Volume2 } from "lucide-react";+import { Play, Pause, Mic, Speaker } from "lucide-react";import { SpeakerAssignPopover } from "@/components/speaker-assign-popover";import { VideoComponent } from "@/components/rewind/video";-// Consistent color palette for speakers-const SPEAKER_COLORS = [- { bg: "bg-blue-500/10", border: "border-l-blue-500", text: "text-blue-600 dark:text-blue-400" },- { bg: "bg-emerald-500/10", border: "border-l-emerald-500", text: "text-emerald-600 dark:text-emerald-400" },- { bg: "bg-violet-500/10", border: "border-l-violet-500", text: "text-violet-600 dark:text-violet-400" },- { bg: "bg-amber-500/10", border: "border-l-amber-500", text: "text-amber-600 dark:text-amber-400" },- { bg: "bg-rose-500/10", border: "border-l-rose-500", text: "text-rose-600 dark:text-rose-400" },- { bg: "bg-cyan-500/10", border: "border-l-cyan-500", text: "text-cyan-600 dark:text-cyan-400" },- { bg: "bg-fuchsia-500/10", border: "border-l-fuchsia-500", text: "text-fuchsia-600 dark:text-fuchsia-400" },- { bg: "bg-lime-500/10", border: "border-l-lime-500", text: "text-lime-600 dark:text-lime-400" },-];--function getSpeakerColor(speakerId: number | undefined) {- if (speakerId === undefined) {- return { bg: "bg-muted/50", border: "border-l-muted-foreground/30", text: "text-muted-foreground" };- }- return SPEAKER_COLORS[speakerId % SPEAKER_COLORS.length];-}-function formatTime(date: Date): string {return date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });}@@ -67,10 +48,6 @@ export function ConversationBubble({onPlay,onSpeakerAssigned,}: ConversationBubbleProps) {- const colors = getSpeakerColor(speakerId);- const isUnknown = !speakerName;- const displayName = speakerName || `Unknown #${speakerId ?? "?"}`;-return (<divclassName={cn(@@ -80,17 +57,15 @@ export function ConversationBubble({><divclassName={cn(- "max-w-[85%] rounded-2xl border-l-4 transition-all",- colors.bg,- colors.border,+ "max-w-[85%] border border-border bg-background transition-all",isFirstInGroup ? "mt-3" : "mt-1",- // Subtle animation on mount- "animate-in fade-in-0 slide-in-from-bottom-2 duration-200"+ // Brand style: sharp corners, 150ms transitions+ "animate-in fade-in-0 slide-in-from-bottom-2 duration-150")}>- {/* Header - only show for first in group or if different speaker */}+ {/* Header - only show for first in group */}{isFirstInGroup && (- <div className="flex items-center gap-2 px-3 pt-2 pb-1">+ <div className="flex items-center gap-2 px-3 pt-2 pb-1 border-b border-border"><SpeakerAssignPopoveraudioChunkId={audioChunkId}speakerId={speakerId}@@ -101,16 +76,25 @@ export function ConversationBubble({<span className="text-[10px] text-muted-foreground">{formatTime(timestamp)}</span>- {!isInput && (- <span className="text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground">- remote- </span>- )}+ {/* Audio source indicator: mic = your voice, speaker = system audio */}+ <span className="text-[10px] px-1.5 py-0.5 border border-border text-muted-foreground inline-flex items-center gap-1">+ {isInput ? (+ <>+ <Mic className="h-2.5 w-2.5" />+ mic+ </>+ ) : (+ <>+ <Speaker className="h-2.5 w-2.5" />+ output+ </>+ )}+ </span></div>)}{/* Content */}- <div className="px-3 pb-2">+ <div className="px-3 pb-2 pt-2">{transcription ? (<p className="text-sm leading-relaxed text-foreground">{transcription}@@ -124,11 +108,11 @@ export function ConversationBubble({{/* Audio controls */}<div className="flex items-center gap-2 mt-2"><Button- variant="ghost"+ variant="outline"size="sm"className={cn(- "h-7 px-2 gap-1.5 text-xs",- isPlaying && "bg-accent"+ "h-7 px-2 gap-1.5 text-xs border-border",+ isPlaying && "bg-foreground text-background")}onClick={onPlay}>@@ -143,7 +127,7 @@ export function ConversationBubble({{/* Audio player */}{isPlaying && (- <div className="mt-2 rounded-lg overflow-hidden">+ <div className="mt-2 overflow-hidden border border-border"><VideoComponent filePath={audioFilePath} /></div>)}@@ -177,21 +161,17 @@ export function ParticipantsSummary({timeRange: { start: Date; end: Date };}) {return (- <div className="px-3 py-2 border-b border-border bg-muted/30">+ <div className="px-3 py-2 border-b border-border"><div className="flex items-center justify-between text-xs"><div className="flex items-center gap-2 flex-wrap">{participants.map((p) => {- const colors = getSpeakerColor(p.id);const percentage = Math.round((p.duration / totalDuration) * 100);return (<divkey={p.id}- className={cn(- "flex items-center gap-1 px-2 py-0.5 rounded-full",- colors.bg- )}+ className="flex items-center gap-1 px-2 py-0.5 border border-border">- <span className={cn("font-medium", colors.text)}>+ <span className="font-medium text-foreground">{p.name || `Unknown #${p.id}`}</span><span className="text-muted-foreground text-[10px]">diff --git a/screenpipe-app-tauri/components/speaker-assign-popover.tsx b/screenpipe-app-tauri/components/speaker-assign-popover.tsxindex e7fb70392..4d333fc42 100644--- a/screenpipe-app-tauri/components/speaker-assign-popover.tsx+++ b/screenpipe-app-tauri/components/speaker-assign-popover.tsx@@ -168,9 +168,9 @@ export function SpeakerAssignPopover({/></span></PopoverTrigger>- <PopoverContent className="w-80 p-3" align="start">+ <PopoverContent className="w-80 p-3 z-[9999] border border-border rounded-none shadow-none" align="start"><div className="space-y-3">- <div className="text-sm font-medium">Assign speaker</div>+ <div className="text-sm font-medium lowercase">assign speaker</div>{/* Search input */}<div className="relative">@@ -194,7 +194,7 @@ export function SpeakerAssignPopover({{/* Suggestions list */}{(speakers.length > 0 || showCreateOption) && (- <div className="max-h-[150px] overflow-y-auto border rounded-md">+ <div className="max-h-[150px] overflow-y-auto border border-border">{/* Existing speakers */}{speakers.map((speaker) => (<buttondiff --git a/screenpipe-app-tauri/components/speaker-badge.tsx b/screenpipe-app-tauri/components/speaker-badge.tsxindex fb441e13e..b842d03c3 100644--- a/screenpipe-app-tauri/components/speaker-badge.tsx+++ b/screenpipe-app-tauri/components/speaker-badge.tsx@@ -3,22 +3,6 @@import { cn } from "@/lib/utils";import { User } from "lucide-react";-// Color palette for speakers (works in light/dark mode)-const SPEAKER_COLORS = [- "bg-blue-500/20 text-blue-700 dark:text-blue-300 border-blue-500/30",- "bg-green-500/20 text-green-700 dark:text-green-300 border-green-500/30",- "bg-purple-500/20 text-purple-700 dark:text-purple-300 border-purple-500/30",- "bg-orange-500/20 text-orange-700 dark:text-orange-300 border-orange-500/30",- "bg-pink-500/20 text-pink-700 dark:text-pink-300 border-pink-500/30",- "bg-cyan-500/20 text-cyan-700 dark:text-cyan-300 border-cyan-500/30",- "bg-yellow-500/20 text-yellow-700 dark:text-yellow-300 border-yellow-500/30",- "bg-red-500/20 text-red-700 dark:text-red-300 border-red-500/30",-];--function getSpeakerColor(speakerId: number): string {- return SPEAKER_COLORS[speakerId % SPEAKER_COLORS.length];-}-export interface SpeakerBadgeProps {speakerId?: number;speakerName?: string;@@ -35,18 +19,16 @@ export function SpeakerBadge({const isUnknown = !speakerName;const displayName = speakerName || `Unknown #${speakerId || "?"}`;- const colorClass = speakerId ? getSpeakerColor(speakerId) : "";-return (<buttontype="button"onClick={onClick}className={cn(- "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium transition-all",- "hover:ring-2 hover:ring-offset-1 hover:ring-offset-background",- isUnknown- ? "border border-dashed border-muted-foreground/50 text-muted-foreground hover:ring-muted-foreground/50"- : cn("border", colorClass, "hover:ring-current"),+ // Brand style: sharp corners, black/white only, 1px border+ "inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium transition-all duration-150",+ "border border-border bg-background text-foreground",+ "hover:bg-foreground hover:text-background",+ isUnknown && "border-dashed",onClick && "cursor-pointer",className)}