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
chore: make the data-table 10x more clean, make identify-speakers free
Louis Beaumonte058f6c860a0
diff --git a/pipes/data-table/package.json b/pipes/data-table/package.jsonindex 2a0c8cc96..f49e2eef6 100644--- a/pipes/data-table/package.json+++ b/pipes/data-table/package.json@@ -1,6 +1,6 @@{"name": "data-table",- "version": "0.1.2",+ "version": "0.1.3","private": true,"scripts": {"dev": "next dev --turbopack",diff --git a/pipes/data-table/src/app/page.tsx b/pipes/data-table/src/app/page.tsxindex 19b9af3ac..1c96d1fce 100644--- a/pipes/data-table/src/app/page.tsx+++ b/pipes/data-table/src/app/page.tsx@@ -5,7 +5,7 @@ import DataPage from "@/components/page";export default function SearchPage() {return (- <div className="flex flex-col gap-4 items-center justify-center h-full mt-12">+ <div className="flex flex-col gap-2 items-center justify-center h-full mt-4"><p className="text-xl font-bold">where pixels become magic</p><DataPage /></div>diff --git a/pipes/data-table/src/components/audio-transcriptions-table.tsx b/pipes/data-table/src/components/audio-transcriptions-table.tsxindex 118250c8a..5c132da28 100644--- a/pipes/data-table/src/components/audio-transcriptions-table.tsx+++ b/pipes/data-table/src/components/audio-transcriptions-table.tsx@@ -13,8 +13,13 @@ import {import {ArrowUpDown,ChevronDown,+ ChevronLeft,+ ChevronRight,MoreHorizontal,RefreshCw,+ Search,+ Mic2,+ Users,} from "lucide-react";import { Button } from "@/components/ui/button";@@ -55,6 +60,7 @@ interface AudioTranscription {device: string;is_input_device: boolean;speaker_id: number | null;+ speaker_name: string | null;transcription_engine: string;}interface AudioDevice {@@ -117,22 +123,40 @@ const columns: ColumnDef<AudioTranscription>[] = [{accessorKey: "device",header: "Device",- cell: ({ row }) => (- <Badge variant="outline">- {row.getValue("device")}- {row.original.is_input_device ? " (input)" : " (output)"}- </Badge>- ),+ cell: ({ row }) => {+ const deviceName = `${row.getValue("device")}${+ row.original.is_input_device ? " (input)" : " (output)"+ }`;+ return (+ <div className="relative group">+ <Badge variant="outline" className="max-w-[200px] truncate">+ {deviceName}+ </Badge>+ <div className="absolute z-50 hidden group-hover:block bg-popover text-popover-foreground px-2 py-1 rounded-md text-sm -top-8 left-0 whitespace-nowrap shadow-md">+ {deviceName}+ </div>+ </div>+ );+ },},{accessorKey: "speaker_id",- header: "Speaker",+ header: "Speaker ID",cell: ({ row }) => (<Badge variant="secondary">{row.getValue("speaker_id") ?? "unknown"}</Badge>),},+ {+ accessorKey: "speaker_name",+ header: "Speaker Name",+ cell: ({ row }) => (+ <Badge variant="outline">+ {row.getValue("speaker_name") ?? "unnamed"}+ </Badge>+ ),+ },{accessorKey: "transcription_engine",header: "Engine",@@ -184,15 +208,19 @@ export function AudioTranscriptionsTable() {const [isLoading, setIsLoading] = React.useState(false);const [error, setError] = React.useState<string | null>(null);- const [pageSize, setPageSize] = React.useState(10);+ const [pageSize, setPageSize] = React.useState(9);const [pageIndex, setPageIndex] = React.useState(0);const [totalRows, setTotalRows] = React.useState(0);const [transcriptionFilter, setTranscriptionFilter] = React.useState("");const [deviceFilter, setDeviceFilter] = React.useState("");+ const [speakerFilter, setSpeakerFilter] = React.useState("");const [availableAudioDevices, setAvailableAudioDevices] = React.useState<AudioDevice[]>([]);+ const [availableSpeakers, setAvailableSpeakers] = React.useState<+ { id: number; name: string }[]+ >([]);const fetchData = async () => {setIsLoading(true);@@ -210,6 +238,9 @@ export function AudioTranscriptionsTable() {.toLowerCase().replace(/'/g, "''")}%'`: null,+ speakerFilter+ ? `s.name = '${speakerFilter.replace(/'/g, "''")}'`+ : null,].filter(Boolean).join(" AND ");@@ -223,7 +254,8 @@ export function AudioTranscriptionsTable() {body: JSON.stringify({query: `SELECT COUNT(*) as total- FROM audio_transcriptions+ FROM audio_transcriptions at+ LEFT JOIN speakers s ON at.speaker_id = s.idWHERE ${filterClauses}`,}),@@ -245,18 +277,20 @@ export function AudioTranscriptionsTable() {body: JSON.stringify({query: `SELECT- id,- audio_chunk_id,- offset_index,- timestamp,- transcription,- device,- is_input_device,- speaker_id,- transcription_engine- FROM audio_transcriptions+ at.id,+ at.audio_chunk_id,+ at.offset_index,+ at.timestamp,+ at.transcription,+ at.device,+ at.is_input_device,+ at.speaker_id,+ s.name as speaker_name,+ at.transcription_engine+ FROM audio_transcriptions at+ LEFT JOIN speakers s ON at.speaker_id = s.idWHERE ${filterClauses}- ORDER BY timestamp DESC+ ORDER BY at.timestamp DESCLIMIT ${pageSize}OFFSET ${pageIndex * pageSize}`,@@ -303,18 +337,42 @@ export function AudioTranscriptionsTable() {console.error("Failed to load devices:", error);}};+ const loadSpeakers = async () => {+ try {+ const response = await fetch("http://localhost:3030/raw_sql", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify({+ query: `SELECT DISTINCT id, name FROM speakers WHERE name IS NOT NULL ORDER BY name`,+ }),+ });+ if (!response.ok) {+ throw new Error("Failed to fetch speakers");+ }+ const speakers = await response.json();+ setAvailableSpeakers(speakers);+ } catch (error) {+ console.error("Failed to load speakers:", error);+ }+ };React.useEffect(() => {const timer = setTimeout(() => {fetchData();}, 300);return () => clearTimeout(timer);- }, [transcriptionFilter, deviceFilter, pageIndex, pageSize]);+ }, [transcriptionFilter, deviceFilter, speakerFilter, pageIndex, pageSize]);React.useEffect(() => {loadDevices();}, []);+ React.useEffect(() => {+ loadSpeakers();+ }, []);+const table = useReactTable({data,columns,@@ -349,15 +407,19 @@ export function AudioTranscriptionsTable() {<div className="w-full"><div className="flex items-center justify-between py-4"><div className="flex items-center space-x-4">- <Input- placeholder="filter transcription..."- value={transcriptionFilter}- onChange={(event) => {- setTranscriptionFilter(event.target.value);- setPageIndex(0);- }}- className="max-w-sm"- />+ <div className="relative">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="filter transcription..."+ value={transcriptionFilter}+ onChange={(event) => {+ setTranscriptionFilter(event.target.value);+ setPageIndex(0);+ }}+ className="max-w-sm pl-8"+ />+ </div>+{availableAudioDevices.length > 0 && (<Selectvalue={deviceFilter}@@ -367,6 +429,7 @@ export function AudioTranscriptionsTable() {}}><SelectTrigger className="w-[200px]">+ <Mic2 className="mr-2 h-4 w-4" /><SelectValue placeholder="filter by device..." /></SelectTrigger><SelectContent>@@ -382,9 +445,35 @@ export function AudioTranscriptionsTable() {</Select>)}+ {availableSpeakers.length > 0 && (+ <Select+ value={speakerFilter}+ onValueChange={(value) => {+ setSpeakerFilter(value);+ setPageIndex(0);+ }}+ >+ <SelectTrigger className="w-[200px]">+ <Users className="mr-2 h-4 w-4" />+ <SelectValue placeholder="filter by speaker..." />+ </SelectTrigger>+ <SelectContent>+ <SelectGroup>+ <SelectLabel>speakers</SelectLabel>+ {availableSpeakers.map((speaker) => (+ <SelectItem key={speaker.id} value={speaker.name}>+ {speaker.name}+ </SelectItem>+ ))}+ </SelectGroup>+ </SelectContent>+ </Select>+ )}+<Buttonvariant="outline"size="icon"+ className="w-12"onClick={fetchData}disabled={isLoading}>@@ -483,22 +572,26 @@ export function AudioTranscriptionsTable() {</Table></div>)}- <div className="flex items-center justify-end space-x-2 py-4">+ <div className="flex items-center justify-center space-x-2 py-4"><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.previousPage()}disabled={!table.getCanPreviousPage()}>+ <ChevronLeft className="h-4 w-4" />previous</Button><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.nextPage()}disabled={!table.getCanNextPage()}>next+ <ChevronRight className="h-4 w-4" /></Button></div></div>diff --git a/pipes/data-table/src/components/database-sidebar.tsx b/pipes/data-table/src/components/database-sidebar.tsxindex 5a632701f..554fe6ded 100644--- a/pipes/data-table/src/components/database-sidebar.tsx+++ b/pipes/data-table/src/components/database-sidebar.tsx@@ -1,28 +1,48 @@-"use client"+"use client";-import { Button } from "@/components/ui/button"-import { cn } from "@/lib/utils"-import { Database } from "lucide-react"-import { JSX } from "react"+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { Database } from "lucide-react";+import { JSX } from "react";interface TableItem {- name: string- icon: JSX.Element+ name: string;+ displayName: string;+ icon: JSX.Element;}const tables: TableItem[] = [- { name: "ui_monitoring", icon: <Database className="h-4 w-4" /> },- { name: "video_chunks", icon: <Database className="h-4 w-4" /> },- { name: "ocr_text", icon: <Database className="h-4 w-4" /> },- { name: "audio_transcriptions", icon: <Database className="h-4 w-4" /> },-]+ {+ name: "ui_monitoring",+ displayName: "UI monitoring",+ icon: <Database className="h-4 w-4" />,+ },+ {+ name: "video_chunks",+ displayName: "Video chunks",+ icon: <Database className="h-4 w-4" />,+ },+ {+ name: "ocr_text",+ displayName: "OCR text",+ icon: <Database className="h-4 w-4" />,+ },+ {+ name: "audio_transcriptions",+ displayName: "Audio transcriptions",+ icon: <Database className="h-4 w-4" />,+ },+];interface DatabaseSidebarProps {- currentTable: string- onTableSelect: (table: string) => void+ currentTable: string;+ onTableSelect: (table: string) => void;}-export function DatabaseSidebar({ currentTable, onTableSelect }: DatabaseSidebarProps) {+export function DatabaseSidebar({+ currentTable,+ onTableSelect,+}: DatabaseSidebarProps) {return (<div className="pb-12 w-64 border-r"><div className="space-y-4 py-4">@@ -40,12 +60,12 @@ export function DatabaseSidebar({ currentTable, onTableSelect }: DatabaseSidebaronClick={() => onTableSelect(table.name)}>{table.icon}- <span className="ml-2">{table.name}</span>+ <span className="ml-2">{table.displayName}</span></Button>))}</div></div></div></div>- )-}\ No newline at end of file+ );+}diff --git a/pipes/data-table/src/components/ocr-data-table.tsx b/pipes/data-table/src/components/ocr-data-table.tsxindex 2aab69a63..42a132d29 100644--- a/pipes/data-table/src/components/ocr-data-table.tsx+++ b/pipes/data-table/src/components/ocr-data-table.tsx@@ -14,8 +14,11 @@ import {AppWindow,ArrowUpDown,ChevronDown,+ ChevronLeft,+ ChevronRight,MoreHorizontal,RefreshCw,+ Search,} from "lucide-react";import { Button } from "@/components/ui/button";@@ -44,9 +47,9 @@ interface OcrText {text: string;text_json: string | null;app_name: string;- ocr_engine: string;+ // ocr_engine: string;window_name: string | null;- focused: boolean;+ // focused: boolean;}const columns: ColumnDef<OcrText>[] = [@@ -119,22 +122,22 @@ const columns: ColumnDef<OcrText>[] = [</div>),},- {- accessorKey: "ocr_engine",- header: "Engine",- cell: ({ row }) => (- <Badge variant="secondary">{row.getValue("ocr_engine")}</Badge>- ),- },- {- accessorKey: "focused",- header: "Focused",- cell: ({ row }) => (- <Badge variant={row.getValue("focused") ? "default" : "outline"}>- {row.getValue("focused") ? "yes" : "no"}- </Badge>- ),- },+ // {+ // accessorKey: "ocr_engine",+ // header: "Engine",+ // cell: ({ row }) => (+ // <Badge variant="secondary">{row.getValue("ocr_engine")}</Badge>+ // ),+ // },+ // {+ // accessorKey: "focused",+ // header: "Focused",+ // cell: ({ row }) => (+ // <Badge variant={row.getValue("focused") ? "default" : "outline"}>+ // {row.getValue("focused") ? "yes" : "no"}+ // </Badge>+ // ),+ // },{id: "actions",cell: ({ row }) => {@@ -184,7 +187,7 @@ export function OcrDataTable() {const [isLoading, setIsLoading] = React.useState(false);const [error, setError] = React.useState<string | null>(null);- const [pageSize, setPageSize] = React.useState(10);+ const [pageSize, setPageSize] = React.useState(9);const [pageIndex, setPageIndex] = React.useState(0);const [totalRows, setTotalRows] = React.useState(0);@@ -315,15 +318,18 @@ export function OcrDataTable() {<div className="w-full"><div className="flex items-center justify-between py-4"><div className="flex items-center space-x-4">- <Input- placeholder="filter by text content..."- value={textFilter}- onChange={(event) => {- setTextFilter(event.target.value);- setPageIndex(0);- }}- className="max-w-sm"- />+ <div className="relative">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="filter by text content..."+ value={textFilter}+ onChange={(event) => {+ setTextFilter(event.target.value);+ setPageIndex(0);+ }}+ className="max-w-sm pl-8"+ />+ </div><SqlAutocompleteInputid="appFilter"type="app"@@ -339,6 +345,7 @@ export function OcrDataTable() {<Buttonvariant="outline"size="icon"+ className="w-12"onClick={fetchData}disabled={isLoading}>@@ -437,22 +444,26 @@ export function OcrDataTable() {</Table></div>)}- <div className="flex items-center justify-end space-x-2 py-4">+ <div className="flex items-center justify-center space-x-2 py-4"><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.previousPage()}disabled={!table.getCanPreviousPage()}>+ <ChevronLeft className="h-4 w-4" />previous</Button><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.nextPage()}disabled={!table.getCanNextPage()}>next+ <ChevronRight className="h-4 w-4" /></Button></div></div>diff --git a/pipes/data-table/src/components/page.tsx b/pipes/data-table/src/components/page.tsxindex 9202e858b..92493b5c5 100644--- a/pipes/data-table/src/components/page.tsx+++ b/pipes/data-table/src/components/page.tsx@@ -24,7 +24,11 @@ export default function DataPage() {case "audio_transcriptions":return <AudioTranscriptionsTable />;case "ui_monitoring":- return <UiMonitoringTable />;+ return navigator.userAgent.toLowerCase().includes("mac") ? (+ <UiMonitoringTable />+ ) : (+ <div></div>+ );default:return <div>select a table</div>;}diff --git a/pipes/data-table/src/components/ui-monitoring-table.tsx b/pipes/data-table/src/components/ui-monitoring-table.tsxindex da05cad36..e1b761210 100644--- a/pipes/data-table/src/components/ui-monitoring-table.tsx+++ b/pipes/data-table/src/components/ui-monitoring-table.tsx@@ -14,8 +14,11 @@ import {AppWindow,ArrowUpDown,ChevronDown,+ ChevronLeft,+ ChevronRight,MoreHorizontal,RefreshCw,+ Search,} from "lucide-react";import { Button } from "@/components/ui/button";@@ -180,7 +183,7 @@ export function UiMonitoringTable() {const [isLoading, setIsLoading] = React.useState(false);const [error, setError] = React.useState<string | null>(null);- const [pageSize, setPageSize] = React.useState(10);+ const [pageSize, setPageSize] = React.useState(9);const [pageIndex, setPageIndex] = React.useState(0);const [totalRows, setTotalRows] = React.useState(0);@@ -308,15 +311,18 @@ export function UiMonitoringTable() {<div className="w-full"><div className="flex items-center justify-between py-4"><div className="flex items-center space-x-4">- <Input- placeholder="filter by text content..."- value={textFilter}- onChange={(event) => {- setTextFilter(event.target.value);- setPageIndex(0);- }}- className="max-w-sm"- />+ <div className="relative">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="filter by text content..."+ value={textFilter}+ onChange={(event) => {+ setTextFilter(event.target.value);+ setPageIndex(0);+ }}+ className="max-w-sm pl-8"+ />+ </div><SqlAutocompleteInputid="appFilter"type="app"@@ -332,6 +338,7 @@ export function UiMonitoringTable() {<Buttonvariant="outline"size="icon"+ className="w-12"onClick={fetchData}disabled={isLoading}>@@ -430,22 +437,26 @@ export function UiMonitoringTable() {</Table></div>)}- <div className="flex items-center justify-end space-x-2 py-4">+ <div className="flex items-center justify-center space-x-2 py-4"><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.previousPage()}disabled={!table.getCanPreviousPage()}>+ <ChevronLeft className="h-4 w-4" />previous</Button><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.nextPage()}disabled={!table.getCanNextPage()}>next+ <ChevronRight className="h-4 w-4" /></Button></div></div>diff --git a/pipes/data-table/src/components/video-chunks-table.tsx b/pipes/data-table/src/components/video-chunks-table.tsxindex 284d537fc..3f96521dc 100644--- a/pipes/data-table/src/components/video-chunks-table.tsx+++ b/pipes/data-table/src/components/video-chunks-table.tsx@@ -14,8 +14,12 @@ import {import {ArrowUpDown,ChevronDown,+ ChevronLeft,+ ChevronRight,MoreHorizontal,RefreshCw,+ Search,+ Monitor,} from "lucide-react";import { Button } from "@/components/ui/button";@@ -142,15 +146,13 @@ const columns: ColumnDef<VideoChunk>[] = [export function VideoChunksTable() {const [data, setData] = React.useState<VideoChunk[]>([]);const [sorting, setSorting] = React.useState<SortingState>([]);- const [columnFilters] = React.useState<ColumnFiltersState>(- []- );+ const [columnFilters] = React.useState<ColumnFiltersState>([]);const [columnVisibility, setColumnVisibility] =React.useState<VisibilityState>({});const [isLoading, setIsLoading] = React.useState(false);const [error, setError] = React.useState<string | null>(null);- const [pageSize, setPageSize] = React.useState(10);+ const [pageSize, setPageSize] = React.useState(9);const [pageIndex, setPageIndex] = React.useState(0);const [totalRows, setTotalRows] = React.useState(0);const [filePathFilter] = React.useState("");@@ -229,7 +231,11 @@ export function VideoChunksTable() {const response = await fetch("http://localhost:3030/vision/list", {method: "POST",});- if (!response.ok) throw new Error("failed to fetch monitors");+ if (!response.ok) {+ const error = await response.text();+ console.warn("failed to fetch monitors:", error);+ return;+ }const monitors: MonitorDevice[] = await response.json();setAvailableMonitors(monitors);} catch (error) {@@ -283,16 +289,19 @@ export function VideoChunksTable() {<div className="w-full"><div className="flex items-center justify-between py-4"><div className="flex items-center space-x-4">- <Input- placeholder="filter by file path..."- value={- (table.getColumn("file_path")?.getFilterValue() as string) ?? ""- }- onChange={(event) =>- table.getColumn("file_path")?.setFilterValue(event.target.value)- }- className="max-w-sm"- />+ <div className="relative">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="filter by file path..."+ value={+ (table.getColumn("file_path")?.getFilterValue() as string) ?? ""+ }+ onChange={(event) =>+ table.getColumn("file_path")?.setFilterValue(event.target.value)+ }+ className="max-w-sm pl-8"+ />+ </div>{availableMonitors.length > 0 && (<Selectvalue={deviceFilter}@@ -302,13 +311,17 @@ export function VideoChunksTable() {}}><SelectTrigger className="w-[200px]">+ <Monitor className="mr-2 h-4 w-4" /><SelectValue placeholder="filter by device..." /></SelectTrigger><SelectContent><SelectGroup><SelectLabel>monitors</SelectLabel>{availableMonitors.map((monitor) => (- <SelectItem key={monitor.id} value={`monitor_${monitor.id}`}>+ <SelectItem+ key={monitor.id}+ value={`monitor_${monitor.id}`}+ >{monitor.name} {monitor.is_default && "(default)"}</SelectItem>))}@@ -320,6 +333,7 @@ export function VideoChunksTable() {<Buttonvariant="outline"size="icon"+ className="w-12"onClick={fetchData}disabled={isLoading}>@@ -418,22 +432,26 @@ export function VideoChunksTable() {</Table></div>)}- <div className="flex items-center justify-end space-x-2 py-4">+ <div className="flex items-center justify-center space-x-2 py-4"><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.previousPage()}disabled={!table.getCanPreviousPage()}>+ <ChevronLeft className="h-4 w-4" />previous</Button><Buttonvariant="outline"- size="sm"+ size="lg"+ className="w-32"onClick={() => table.nextPage()}disabled={!table.getCanNextPage()}>next+ <ChevronRight className="h-4 w-4" /></Button></div></div>diff --git a/pipes/identify-speakers/bun.lockb b/pipes/identify-speakers/bun.lockbindex 8af43bdca..b6db42c3f 100755Binary files a/pipes/identify-speakers/bun.lockb and b/pipes/identify-speakers/bun.lockb differdiff --git a/pipes/identify-speakers/package.json b/pipes/identify-speakers/package.jsonindex ef0498a9a..bf1111f06 100644--- a/pipes/identify-speakers/package.json+++ b/pipes/identify-speakers/package.json@@ -1,6 +1,6 @@{"name": "identify-speakers",- "version": "0.1.1",+ "version": "0.1.2","private": true,"scripts": {"dev": "next dev --turbopack",