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: meeting detection — filter all-day events, reduce buffer to 5min, show "starts in Xm"
Louis Beaumontef470d9e138b
diff --git a/apps/screenpipe-app-tauri/components/settings/meetings-section.tsx b/apps/screenpipe-app-tauri/components/settings/meetings-section.tsxindex c26937113..d54b1ce43 100644--- a/apps/screenpipe-app-tauri/components/settings/meetings-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/meetings-section.tsx@@ -27,7 +27,15 @@ interface EditState {}function formatDuration(start: string, end: string | null): string {- if (!end) return "ongoing";+ if (!end) {+ const startMs = new Date(start).getTime();+ const nowMs = Date.now();+ if (nowMs < startMs) {+ const minsUntil = Math.ceil((startMs - nowMs) / 60000);+ return minsUntil <= 1 ? "starts in <1m" : `starts in ${minsUntil}m`;+ }+ return "ongoing";+ }const ms = new Date(end).getTime() - new Date(start).getTime();if (ms < 0) return "—";const totalMinutes = Math.floor(ms / 60000);@@ -381,7 +389,7 @@ export function MeetingsSection() {formatTime(meeting.meeting_end)) : (<span className="text-primary font-medium">- ongoing+ {formatDuration(meeting.meeting_start, null)}</span>)}<span className="ml-1.5 text-muted-foreground/60">diff --git a/crates/screenpipe-audio/src/meeting_detector.rs b/crates/screenpipe-audio/src/meeting_detector.rsindex f9504496f..6ceb3562f 100644--- a/crates/screenpipe-audio/src/meeting_detector.rs+++ b/crates/screenpipe-audio/src/meeting_detector.rs@@ -31,7 +31,7 @@ const APP_CONFIRMATION_WINDOW: Duration = Duration::from_secs(300); // 5 minutes/// Buffer before a calendar event's start time to handle early joins./// Most people join meetings 5-15 min early — this ensures calendar-based/// detection activates even when you join before the scheduled time.-const CALENDAR_EARLY_JOIN_BUFFER: Duration = Duration::from_secs(15 * 60); // 15 minutes+const CALENDAR_EARLY_JOIN_BUFFER: Duration = Duration::from_secs(5 * 60); // 5 minutes/// A calendar event signal fed into the meeting detector./// Contains only the fields needed for meeting detection — no serde/chrono deps.@@ -386,7 +386,10 @@ impl MeetingDetector {|| (last_output > 0 && (now - last_output) < window)}- /// Returns the first active calendar event overlapping now (with 15-min early-join buffer).+ /// Returns the first active calendar event overlapping now (with early-join buffer).+ ///+ /// Filters out all-day / long events (> 4 hours) — these are typically OOO,+ /// focus blocks, or reminders, not actual meetings.////// For native calendar events: requires 2+ attendees (filters out "focus time" blocks)./// For ICS events: accepts any non-all-day event, because many ICS feeds strip@@ -398,7 +401,12 @@ impl MeetingDetector {now: i64,) -> Option<&'a CalendarSignal> {let buffer_ms = CALENDAR_EARLY_JOIN_BUFFER.as_millis() as i64;+ let max_duration_ms: i64 = 4 * 60 * 60 * 1000; // 4 hoursstate.calendar_events.iter().find(|e| {+ // Skip all-day or very long events (> 4h)+ if e.end_epoch_ms - e.start_epoch_ms > max_duration_ms {+ return false;+ }let in_time_window = (e.start_epoch_ms - buffer_ms) <= now && e.end_epoch_ms > now;if !in_time_window {return false;