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

ux(meeting-notes): coherent active-meeting state across the list

Louis Beaumont5cefb9da6408
diff --git a/apps/screenpipe-app-tauri/components/meeting-notes/index.tsx b/apps/screenpipe-app-tauri/components/meeting-notes/index.tsx
index 4fc48d91a..6ea0505cf 100644
--- a/apps/screenpipe-app-tauri/components/meeting-notes/index.tsx
+++ b/apps/screenpipe-app-tauri/components/meeting-notes/index.tsx
@@ -123,13 +123,19 @@ export function MeetingNotesSection({
const active = meetingState.activeMeetingId ?? null;
if (active !== lastActiveIdRef.current) {
lastActiveIdRef.current = active;
+ // Refresh both the meetings list and the upcoming-events list:
+ // a freshly-consumed Coming up event needs to disappear, and a
+ // freshly-stopped one may re-surface in the picker.
void fetchPage(0, false).then(() => {
if (active !== null && intendingToFocusRef.current) {
intendingToFocusRef.current = false;
setSelectedId(active);
}
});
+ void refreshUpcoming();
}
+ // refreshUpcoming is stable
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [meetingState.activeMeetingId, fetchPage]);
// Notify host of focus-mode transitions so it can collapse the sidebar.
@@ -281,6 +287,7 @@ export function MeetingNotesSection({
excludeOverlappingActive: meetingState.active === true,
activeMeetingStartIso: activeMeeting?.meeting_start ?? null,
activeMeetingEndIso: activeMeeting?.meeting_end ?? null,
+ activeMeetingTitle: activeMeeting?.title ?? null,
}),
[upcoming, meetingState.active, activeMeeting],
);
@@ -331,8 +338,10 @@ export function MeetingNotesSection({
<ListView
meetings={meetings}
activeId={activeId}
+ activeMeeting={activeMeeting}
onSelect={setSelectedId}
onStart={() => handleStart()}
+ onStop={handleStop}
onStartFromEvent={handleStartFromEvent}
starting={meetingLoading}
loadingMore={loadingMore}
diff --git a/apps/screenpipe-app-tauri/components/meeting-notes/list-view.tsx b/apps/screenpipe-app-tauri/components/meeting-notes/list-view.tsx
index fa3109794..b55a8e811 100644
--- a/apps/screenpipe-app-tauri/components/meeting-notes/list-view.tsx
+++ b/apps/screenpipe-app-tauri/components/meeting-notes/list-view.tsx
@@ -4,9 +4,12 @@
"use client";
import React, { useEffect, useRef } from "react";
-import { Loader2, Plus, Phone } from "lucide-react";
+import { Loader2, Plus, Phone, Square, ArrowUpRight } from "lucide-react";
import { Button } from "@/components/ui/button";
-import type { MeetingRecord } from "@/lib/utils/meeting-format";
+import {
+ formatDuration,
+ type MeetingRecord,
+} from "@/lib/utils/meeting-format";
import type { CalendarEvent } from "@/lib/utils/calendar";
import { ComingUp } from "./coming-up";
import { PastMeetings } from "./past-meetings";
@@ -14,8 +17,10 @@ import { PastMeetings } from "./past-meetings";
interface ListViewProps {
meetings: MeetingRecord[];
activeId: number | null;
+ activeMeeting: MeetingRecord | null;
onSelect: (id: number) => void;
onStart: () => void | Promise<void>;
+ onStop: () => void | Promise<void>;
onStartFromEvent: (event: CalendarEvent) => void | Promise<void>;
starting: boolean;
loadingMore: boolean;
@@ -30,8 +35,10 @@ interface ListViewProps {
export function ListView({
meetings,
activeId,
+ activeMeeting,
onSelect,
onStart,
+ onStop,
onStartFromEvent,
starting,
loadingMore,
@@ -66,27 +73,34 @@ export function ListView({
return (
<div className="h-full overflow-y-auto">
<div className="max-w-3xl mx-auto px-12 py-10">
- <header className="flex items-center justify-end mb-8">
- {!trulyEmpty && (
- <Button
- variant="outline"
- size="sm"
- onClick={() => void onStart()}
- disabled={starting || activeId !== null}
- className="gap-2"
- title={
- activeId !== null
- ? "a meeting is already active"
- : "start a manual meeting"
- }
- >
- {starting ? (
- <Loader2 className="h-3.5 w-3.5 animate-spin" />
- ) : (
- <Plus className="h-3.5 w-3.5" />
- )}
- new meeting
- </Button>
+ <header className="mb-8">
+ {meetingActive && activeMeeting ? (
+ <RecordingStrip
+ meeting={activeMeeting}
+ onOpen={() => onSelect(activeMeeting.id)}
+ onStop={onStop}
+ stopping={starting}
+ />
+ ) : (
+ !trulyEmpty && (
+ <div className="flex items-center justify-end">
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => void onStart()}
+ disabled={starting}
+ className="gap-2"
+ title="start a manual meeting"
+ >
+ {starting ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Plus className="h-3.5 w-3.5" />
+ )}
+ new meeting
+ </Button>
+ </div>
+ )
)}
</header>
@@ -139,6 +153,65 @@ export function ListView({
);
}
+function RecordingStrip({
+ meeting,
+ onOpen,
+ onStop,
+ stopping,
+}: {
+ meeting: MeetingRecord;
+ onOpen: () => void;
+ onStop: () => void | Promise<void>;
+ stopping: boolean;
+}) {
+ const title = meeting.title?.trim() || "untitled meeting";
+ const duration = formatDuration(meeting.meeting_start, meeting.meeting_end);
+ return (
+ <div className="border border-foreground/30 bg-muted/20 px-4 py-3 flex items-center gap-3">
+ <span
+ className="h-2 w-2 rounded-full bg-foreground animate-pulse shrink-0"
+ aria-label="recording"
+ />
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2 min-w-0">
+ <span className="text-[10px] uppercase tracking-[0.18em] text-foreground/80 shrink-0">
+ recording
+ </span>
+ <span className="text-muted-foreground/60" aria-hidden>·</span>
+ <span className="text-sm text-foreground truncate">{title}</span>
+ </div>
+ <div className="text-[11px] text-muted-foreground tabular-nums mt-0.5">
+ {duration}
+ </div>
+ </div>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={onOpen}
+ className="gap-1.5 h-8 px-2 normal-case tracking-normal shrink-0"
+ title="open notes"
+ >
+ <ArrowUpRight className="h-3.5 w-3.5" />
+ open
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => void onStop()}
+ disabled={stopping}
+ className="gap-1.5 h-8 px-3 shrink-0"
+ >
+ {stopping ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Square className="h-3.5 w-3.5" />
+ )}
+ stop
+ </Button>
+ </div>
+ );
+}
+
function ListEmpty({
onStart,
starting,
diff --git a/apps/screenpipe-app-tauri/lib/utils/calendar.ts b/apps/screenpipe-app-tauri/lib/utils/calendar.ts
index 47dbad804..f62a47752 100644
--- a/apps/screenpipe-app-tauri/lib/utils/calendar.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/calendar.ts
@@ -148,15 +148,26 @@ export async function fetchUpcomingCalendarEvents(opts?: {
*/
export function pickComingUp(
events: CalendarEvent[],
- opts?: { now?: number; excludeOverlappingActive?: boolean; activeMeetingStartIso?: string | null; activeMeetingEndIso?: string | null },
+ opts?: {
+ now?: number;
+ excludeOverlappingActive?: boolean;
+ activeMeetingStartIso?: string | null;
+ activeMeetingEndIso?: string | null;
+ /** Hide a cal event whose title matches the currently-recording meeting
+ * — covers the "user clicked Coming up to start a meeting; the source
+ * event would otherwise still show up in the list" case. */
+ activeMeetingTitle?: string | null;
+ },
): CalendarEvent[] {
const now = opts?.now ?? Date.now();
+ const activeTitle = opts?.activeMeetingTitle?.trim().toLowerCase() ?? "";
const result: CalendarEvent[] = [];
for (const e of events) {
if (e.is_all_day) continue;
const startMs = Date.parse(e.start);
const endMs = Date.parse(e.end);
if (!Number.isFinite(endMs) || endMs <= now) continue;
+ if (activeTitle && e.title.trim().toLowerCase() === activeTitle) continue;
if (
opts?.excludeOverlappingActive &&
opts.activeMeetingStartIso &&