Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: disable unmaintained beta feature, feat: add audio icons on tineline

Louis Beaumont69bcd61dc4f7
diff --git a/screenpipe-app-tauri/components/recording-settings.tsx b/screenpipe-app-tauri/components/recording-settings.tsx
index e25cba2a6..bb74b63a3 100644
--- a/screenpipe-app-tauri/components/recording-settings.tsx
+++ b/screenpipe-app-tauri/components/recording-settings.tsx
@@ -562,37 +562,40 @@ export function RecordingSettings({
const handleUiMonitoringToggle = async (checked: boolean) => {
try {
- if (checked) {
- // Check accessibility permissions first
- const hasPermission = await invoke('check_accessibility_permissions');
- if (!hasPermission) {
- toast({
- title: "accessibility permission required",
- description: "please grant accessibility permission in system preferences",
- action: (
- <ToastAction altText="open preferences" onClick={() => invoke('open_accessibility_preferences')}>
- open preferences
- </ToastAction>
- ),
- variant: "destructive",
- });
- return;
- }
+ if (checked) {
+ // Check accessibility permissions first
+ const hasPermission = await invoke("check_accessibility_permissions");
+ if (!hasPermission) {
+ toast({
+ title: "accessibility permission required",
+ description:
+ "please grant accessibility permission in system preferences",
+ action: (
+ <ToastAction
+ altText="open preferences"
+ onClick={() => invoke("open_accessibility_preferences")}
+ >
+ open preferences
+ </ToastAction>
+ ),
+ variant: "destructive",
+ });
+ return;
}
-
- // Just update the local setting - the update button will handle the restart
- setLocalSettings({
- ...localSettings,
- enableUiMonitoring: checked
- });
-
+ }
+
+ // Just update the local setting - the update button will handle the restart
+ setLocalSettings({
+ ...localSettings,
+ enableUiMonitoring: checked,
+ });
} catch (error) {
- console.error("failed to toggle ui monitoring:", error);
- toast({
- title: "error checking accessibility permissions",
- description: "please try again or check the logs",
- variant: "destructive",
- });
+ console.error("failed to toggle ui monitoring:", error);
+ toast({
+ title: "error checking accessibility permissions",
+ description: "please try again or check the logs",
+ variant: "destructive",
+ });
}
};
@@ -1331,7 +1334,7 @@ export function RecordingSettings({
</TooltipProvider>
</Label>
</div>
- {isMacOS && (
+ {/* {isMacOS && (
<div className="flex items-center space-x-2">
<Switch
id="enable-beta-toggle"
@@ -1383,7 +1386,7 @@ export function RecordingSettings({
</TooltipProvider>
</Label>
</div>
- )}
+ )} */}
<div className="flex flex-col space-y-2">
<div className="flex items-center justify-between">
<div className="flex items-center space-x-2">
@@ -1414,16 +1417,6 @@ export function RecordingSettings({
</TooltipProvider>
</Label>
</div>
- {localSettings.enableFrameCache && (
- <Button
- variant="outline"
- size="sm"
- onClick={handleShowTimeline}
- className="ml-2"
- >
- show timeline
- </Button>
- )}
</div>
</div>
{isMacOS && (
@@ -1438,7 +1431,9 @@ export function RecordingSettings({
className="flex items-center space-x-2"
>
<span>enable UI monitoring</span>
- <Badge variant="outline" className="ml-2">accessibility permissions</Badge>
+ <Badge variant="outline" className="ml-2">
+ accessibility permissions
+ </Badge>
<TooltipProvider>
<Tooltip>
<TooltipTrigger>
@@ -1446,11 +1441,11 @@ export function RecordingSettings({
</TooltipTrigger>
<TooltipContent side="right">
<p>
- enables monitoring of UI elements and their interactions.
+ enables monitoring of UI elements and their
+ interactions.
<br />
this allows for better context in search results
- <br />
- * requires accessibility permission
+ <br />* requires accessibility permission
</p>
</TooltipContent>
</Tooltip>
diff --git a/screenpipe-app-tauri/components/timeline/timeline-dock-section.tsx b/screenpipe-app-tauri/components/timeline/timeline-dock-section.tsx
index 9774c88d1..0a9289834 100644
--- a/screenpipe-app-tauri/components/timeline/timeline-dock-section.tsx
+++ b/screenpipe-app-tauri/components/timeline/timeline-dock-section.tsx
@@ -13,7 +13,7 @@ import {
import { ScrollArea } from "@/components/ui/scroll-area";
import { useTimelineSelection } from "@/lib/hooks/use-timeline-selection";
import { Button } from "@/components/ui/button";
-import { MessageSquarePlus } from "lucide-react";
+import { MessageSquarePlus, Volume2 } from "lucide-react";
// Add this near the top of the file, after imports
const GAP_THRESHOLD = 3 * 60 * 1000; // 5 minutes in milliseconds
@@ -46,10 +46,36 @@ export function TimelineIconsSection({
return { start: startTime, end: endTime };
}, [blocks]);
- // Memoize processed blocks with position calculations
- const processedBlocks = useMemo<ProcessedBlock[]>(() => {
- if (!timeRange) return [];
+ // Combine both computations into one useMemo
+ const { processedBlocks, processedAudioGroups } = useMemo(() => {
+ if (!timeRange) return { processedBlocks: [], processedAudioGroups: [] };
+ // Process audio groups first
+ const audioGroups = blocks
+ .flatMap(frame =>
+ frame.devices.flatMap(device =>
+ device.audio.map(audio => ({
+ deviceName: audio.device_name,
+ isInput: audio.is_input,
+ timestamp: new Date(frame.timestamp),
+ duration: audio.duration_secs,
+ percentThroughDay:
+ ((new Date(frame.timestamp).getTime() - timeRange.start.getTime()) /
+ (timeRange.end.getTime() - timeRange.start.getTime())) * 100
+ }))
+ )
+ )
+ .filter(audio => {
+ const timestamp = audio.timestamp;
+ return timestamp >= timeRange.start && timestamp <= timeRange.end;
+ })
+ .filter((audio, index, array) => {
+ if (index === 0) return true;
+ const prevAudio = array[index - 1];
+ return Math.abs(audio.percentThroughDay - prevAudio.percentThroughDay) > 0.25;
+ });
+
+ // Process app blocks (existing logic)
const appGroups: {
[key: string]: Array<{
timestamp: Date;
@@ -131,16 +157,16 @@ export function TimelineIconsSection({
});
});
- // Changed from 0.1% to 0.25% for better spacing while still showing more icons
- return b
- .sort((a, b) => a.percentThroughDay - b.percentThroughDay)
- .filter((block, index, array) => {
- if (index === 0) return true;
- const prevBlock = array[index - 1];
- return (
- Math.abs(block.percentThroughDay - prevBlock.percentThroughDay) > 0.25
- );
- });
+ return {
+ processedBlocks: b
+ .sort((a, b) => a.percentThroughDay - b.percentThroughDay)
+ .filter((block, index, array) => {
+ if (index === 0) return true;
+ const prevBlock = array[index - 1];
+ return Math.abs(block.percentThroughDay - prevBlock.percentThroughDay) > 0.25;
+ }),
+ processedAudioGroups: audioGroups
+ };
}, [blocks, iconCache, timeRange]);
const loadAppIcon = useCallback(
@@ -238,6 +264,38 @@ export function TimelineIconsSection({
</motion.div>
);
})}
+
+ {/* Add this new section for audio markers */}
+ {processedAudioGroups.map((audio, i) => (
+ <div
+ key={`audio-${i}`}
+ className="absolute h-full pointer-events-auto "
+ style={{
+ left: `${audio.percentThroughDay}%`,
+ transform: "translateX(-50%)",
+ zIndex: 40,
+ top: "-16px", // Moved higher
+ }}
+ >
+ <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)"
+ }`,
+ }}
+ >
+ <Volume2
+ className="w-2 h-2"
+ style={{
+ color: audio.isInput
+ ? "rgba(0, 0, 0, 0.7)"
+ : "rgba(0, 0, 0, 0.4)",
+ }}
+ />
+ </div>
+ </div>
+ ))}
</div>
<Dialog
diff --git a/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/screenpipe-app-tauri/lib/hooks/use-settings.tsx
index 9b0b1d96e..9352e208d 100644
--- a/screenpipe-app-tauri/lib/hooks/use-settings.tsx
+++ b/screenpipe-app-tauri/lib/hooks/use-settings.tsx
@@ -276,7 +276,8 @@ export function useSettings() {
? savedIgnoredWindows
: defaultIgnoredWindows;
- let savedEnableBeta = await store!.get<boolean>("enableBeta");
+ // TODO: temporary
+ let savedEnableBeta = false; // await store!.get<boolean>("enableBeta");
if (savedEnableBeta === null) {
savedEnableBeta = false;
}
@@ -294,7 +295,8 @@ export function useSettings() {
const savedEnableFrameCache =
(await store!.get<boolean>("enableFrameCache")) || false;
- const savedEnableUiMonitoring = await store!.get<boolean>("enableUiMonitoring") || false;
+ const savedEnableUiMonitoring =
+ (await store!.get<boolean>("enableUiMonitoring")) || false;
setSettings({
openaiApiKey: savedKey,
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 1c6f235be..d5d8ba463 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.10.7"
+version = "0.10.8"
description = ""
authors = ["you"]
license = ""