Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(notes): add calendar participants and note linking

Gabriel Stein82cee8a76823
diff --git a/package-lock.json b/package-lock.json
index 47e9994cc..f1e5f9435 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -21,6 +21,7 @@
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7",
+ "@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.3",
@@ -4456,6 +4457,99 @@
}
}
},
+ "node_modules/@radix-ui/react-popover": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz",
+ "integrity": "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-popper": {
"version": "1.2.8",
"license": "MIT",
diff --git a/package.json b/package.json
index d3bd57df4..129cf7ac4 100644
--- a/package.json
+++ b/package.json
@@ -110,18 +110,19 @@
"@ai-sdk/google": "^3.0.43",
"@ai-sdk/groq": "^3.0.29",
"@ai-sdk/openai": "^3.0.41",
- "@qdrant/js-client-rest": "^1.12.0",
"@neondatabase/auth": "^0.2.0-beta.1",
"@neondatabase/neon-js": "^0.1.0-beta.22",
- "@tanstack/react-virtual": "^3.13.2",
+ "@qdrant/js-client-rest": "^1.12.0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7",
+ "@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.12",
+ "@tanstack/react-virtual": "^3.13.2",
"@tiptap/core": "^3.20.4",
"@tiptap/extension-placeholder": "^3.20.4",
"@tiptap/extension-task-item": "^3.20.4",
diff --git a/preload.js b/preload.js
index 747103e26..2d6eb7b5c 100644
--- a/preload.js
+++ b/preload.js
@@ -658,6 +658,11 @@ contextBridge.exposeInMainWorld("electronAPI", {
ipcRenderer.invoke("gcal-get-upcoming-events", windowMinutes),
gcalGetEvent: (eventId) => ipcRenderer.invoke("gcal-get-event", eventId),
+ // Contacts
+ searchContacts: (query) => ipcRenderer.invoke("search-contacts", query),
+ upsertContact: (contact) => ipcRenderer.invoke("upsert-contact", contact),
+ getMD5Hash: (text) => ipcRenderer.invoke("get-md5-hash", text),
+
// Google Calendar event listeners
onGcalMeetingStarting: registerListener(
"gcal-meeting-starting",
diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsx
index f8be1ec46..54399f028 100644
--- a/src/components/notes/NoteEditor.tsx
+++ b/src/components/notes/NoteEditor.tsx
@@ -34,6 +34,8 @@ import EmbeddedChat, { type EmbeddedChatMode } from "./EmbeddedChat";
import { useEmbeddedChat } from "../../hooks/useEmbeddedChat";
import { normalizeDbDate } from "../../utils/dateFormatting";
import { parseTranscriptSegments } from "../../utils/parseTranscriptSegments";
+import NoteParticipants from "./NoteParticipants";
+import type { CalendarAttendee } from "../../types/calendar";
function formatNoteDate(dateStr: string): string {
const date = normalizeDbDate(dateStr);
@@ -156,6 +158,14 @@ export default function NoteEditor({
const hasChatSegments = displaySegments.length > 0;
+ const parsedParticipants = useMemo<CalendarAttendee[]>(() => {
+ try {
+ return note.participants ? JSON.parse(note.participants) : [];
+ } catch {
+ return [];
+ }
+ }, [note.participants]);
+
const updateSegmentIndicator = useCallback(() => {
const container = segmentContainerRef.current;
if (!container) return;
@@ -329,6 +339,14 @@ export default function NoteEditor({
<span className="truncate max-w-40">{calendarEventName}</span>
</span>
)}
+ <NoteParticipants
+ participants={parsedParticipants}
+ onUpdate={async (updated) => {
+ await window.electronAPI.updateNote(note.id, {
+ participants: JSON.stringify(updated),
+ });
+ }}
+ />
{folders && onMoveToFolder && (
<DropdownMenu
onOpenChange={(open) => {
diff --git a/src/components/notes/NoteParticipants.tsx b/src/components/notes/NoteParticipants.tsx
new file mode 100644
index 000000000..ef02c8a3f
--- /dev/null
+++ b/src/components/notes/NoteParticipants.tsx
@@ -0,0 +1,235 @@
+import { useState, useEffect, useCallback, useMemo } from "react";
+import { useTranslation } from "react-i18next";
+import { Users, X } from "lucide-react";
+import { Popover, PopoverTrigger, PopoverContent } from "../ui/popover";
+import type { CalendarAttendee } from "../../types/calendar";
+
+function getInitials(displayName: string | null, email: string): string {
+ if (displayName) return displayName.charAt(0).toUpperCase();
+ return email.charAt(0).toUpperCase();
+}
+
+function getInitialColor(email: string): string {
+ let hash = 0;
+ for (let i = 0; i < email.length; i++) {
+ hash = email.charCodeAt(i) + ((hash << 5) - hash);
+ }
+ const h = Math.abs(hash) % 360;
+ return `hsl(${h}, 45%, 65%)`;
+}
+
+interface NoteParticipantsProps {
+ participants: CalendarAttendee[];
+ onUpdate: (participants: CalendarAttendee[]) => void;
+}
+
+export default function NoteParticipants({ participants, onUpdate }: NoteParticipantsProps) {
+ const { t } = useTranslation();
+ const [localParticipants, setLocalParticipants] = useState(participants);
+ const [search, setSearch] = useState("");
+ const [suggestions, setSuggestions] = useState<
+ Array<{ email: string; display_name: string | null }>
+ >([]);
+ const [gravatarHashes, setGravatarHashes] = useState<Record<string, string>>({});
+ const [failedGravatars, setFailedGravatars] = useState<Set<string>>(new Set());
+ const [open, setOpen] = useState(false);
+
+ useEffect(() => {
+ setLocalParticipants(participants);
+ }, [participants]);
+
+ useEffect(() => {
+ const emails = localParticipants.map((p) => p.email);
+ const missing = emails.filter((e) => !gravatarHashes[e]);
+ if (missing.length === 0) return;
+
+ Promise.all(
+ missing.map(async (email) => {
+ const hash = await window.electronAPI.getMD5Hash(email);
+ return { email, hash };
+ })
+ ).then((results) => {
+ setGravatarHashes((prev) => {
+ const next = { ...prev };
+ for (const { email, hash } of results) next[email] = hash;
+ return next;
+ });
+ });
+ }, [localParticipants]);
+
+ useEffect(() => {
+ if (!open) return;
+ const query = search.trim();
+ window.electronAPI.searchContacts(query).then((result) => {
+ if (result.success) {
+ const existing = new Set(localParticipants.map((p) => p.email));
+ setSuggestions(result.contacts.filter((c) => !existing.has(c.email)));
+ }
+ });
+ }, [search, open, localParticipants]);
+
+ const addParticipant = useCallback(
+ (email: string, displayName?: string | null) => {
+ const normalized = email.toLowerCase().trim();
+ if (!normalized || localParticipants.some((p) => p.email === normalized)) return;
+ const updated = [
+ ...localParticipants,
+ { email: normalized, displayName: displayName || null, responseStatus: null, self: false },
+ ];
+ setLocalParticipants(updated);
+ onUpdate(updated);
+ window.electronAPI.upsertContact({ email: normalized, displayName: displayName || null });
+ setSearch("");
+ },
+ [localParticipants, onUpdate]
+ );
+
+ const removeParticipant = useCallback(
+ (email: string) => {
+ const updated = localParticipants.filter((p) => p.email !== email);
+ setLocalParticipants(updated);
+ onUpdate(updated);
+ },
+ [localParticipants, onUpdate]
+ );
+
+ const handleKeyDown = useCallback(
+ (e: React.KeyboardEvent) => {
+ if (e.key === "Enter" && search.includes("@")) {
+ e.preventDefault();
+ addParticipant(search);
+ }
+ },
+ [search, addParticipant]
+ );
+
+ const grouped = useMemo(() => {
+ const groups = new Map<string, CalendarAttendee[]>();
+ for (const p of localParticipants) {
+ const domain = p.email.split("@")[1] || "other";
+ if (!groups.has(domain)) groups.set(domain, []);
+ groups.get(domain)!.push(p);
+ }
+ return Array.from(groups.entries());
+ }, [localParticipants]);
+
+ const chipLabel =
+ localParticipants.length > 0
+ ? `${localParticipants.length} ${localParticipants.length === 1 ? t("notes.participants.attendee", "attendee") : t("notes.participants.attendees", "attendees")}`
+ : t("notes.participants.addAttendees", "Add attendees");
+
+ return (
+ <Popover
+ open={open}
+ onOpenChange={(o) => {
+ setOpen(o);
+ if (!o) setSearch("");
+ }}
+ >
+ <PopoverTrigger asChild>
+ <button className="inline-flex items-center gap-1.5 text-[11px] px-1.5 py-0.5 rounded-md border border-border/70 dark:border-white/25 text-foreground/50 dark:text-foreground/35 hover:text-foreground/60 hover:border-border/60 hover:bg-foreground/3 dark:hover:text-foreground/40 dark:hover:border-white/10 dark:hover:bg-white/3 transition-all duration-150 cursor-pointer outline-none">
+ <Users size={11} className="shrink-0" />
+ {chipLabel}
+ </button>
+ </PopoverTrigger>
+ <PopoverContent className="w-72 p-0">
+ <div className="p-2 border-b border-border/50">
+ <input
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ onKeyDown={handleKeyDown}
+ placeholder={t("notes.participants.addPlaceholder", "Add attendees...")}
+ className="w-full px-2 py-1.5 rounded-md bg-transparent text-xs text-foreground placeholder:text-foreground/20 outline-none border-none appearance-none"
+ autoFocus
+ />
+ </div>
+
+ <div className="max-h-64 overflow-y-auto">
+ {search && suggestions.length > 0 && (
+ <div className="p-1 border-b border-border/30">
+ {suggestions.slice(0, 5).map((contact) => (
+ <button
+ key={contact.email}
+ onClick={() => addParticipant(contact.email, contact.display_name)}
+ className="flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-foreground/70 hover:bg-foreground/5 transition-colors cursor-pointer"
+ >
+ <span
+ className="shrink-0 w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-medium text-white"
+ style={{ backgroundColor: getInitialColor(contact.email) }}
+ >
+ {getInitials(contact.display_name, contact.email)}
+ </span>
+ <span className="truncate">{contact.display_name || contact.email}</span>
+ </button>
+ ))}
+ </div>
+ )}
+
+ {search && !search.includes("@") && suggestions.length === 0 && (
+ <div className="px-3 py-2 text-[11px] text-foreground/30">
+ {t("notes.participants.typeEmail", "Type an email to add...")}
+ </div>
+ )}
+
+ {grouped.map(([domain, members]) => (
+ <div key={domain} className="p-1">
+ <div className="px-2 py-1 text-[11px] font-medium text-muted-foreground">
+ {domain}
+ </div>
+ {members.map((p) => {
+ const hash = gravatarHashes[p.email];
+ const failed = failedGravatars.has(p.email);
+
+ return (
+ <div
+ key={p.email}
+ className="group flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-foreground/5 transition-colors"
+ >
+ {hash && !failed ? (
+ <img
+ src={`https://www.gravatar.com/avatar/${hash}?d=404&s=64`}
+ alt=""
+ loading="lazy"
+ className="shrink-0 w-6 h-6 rounded-full object-cover"
+ onError={() => setFailedGravatars((prev) => new Set(prev).add(p.email))}
+ />
+ ) : (
+ <span
+ className="shrink-0 w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-medium text-white"
+ style={{ backgroundColor: getInitialColor(p.email) }}
+ >
+ {getInitials(p.displayName, p.email)}
+ </span>
+ )}
+
+ <span className="flex-1 min-w-0 truncate text-xs text-foreground/70">
+ {p.displayName || p.email.split("@")[0]}
+ {p.self && (
+ <span className="ml-1 text-foreground/30">
+ {t("notes.participants.me", "(me)")}
+ </span>
+ )}
+ </span>
+
+ <button
+ onClick={() => removeParticipant(p.email)}
+ className="shrink-0 opacity-0 group-hover:opacity-100 p-0.5 rounded text-foreground/30 hover:text-foreground/60 transition-opacity cursor-pointer"
+ >
+ <X size={12} />
+ </button>
+ </div>
+ );
+ })}
+ </div>
+ ))}
+
+ {localParticipants.length === 0 && !search && (
+ <div className="px-3 py-4 text-center text-[11px] text-foreground/30">
+ {t("notes.participants.typeEmail", "Type an email to add...")}
+ </div>
+ )}
+ </div>
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx
new file mode 100644
index 000000000..b9b469a32
--- /dev/null
+++ b/src/components/ui/popover.tsx
@@ -0,0 +1,29 @@
+import * as React from "react";
+import * as PopoverPrimitive from "@radix-ui/react-popover";
+
+import { cn } from "../lib/utils";
+
+const Popover = PopoverPrimitive.Root;
+
+const PopoverTrigger = PopoverPrimitive.Trigger;
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef<typeof PopoverPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
+>(({ className, align = "start", sideOffset = 6, ...props }, ref) => (
+ <PopoverPrimitive.Portal>
+ <PopoverPrimitive.Content
+ ref={ref}
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ "z-50 min-w-[220px] rounded-lg border border-border bg-popover p-2 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ className
+ )}
+ {...props}
+ />
+ </PopoverPrimitive.Portal>
+));
+PopoverContent.displayName = PopoverPrimitive.Content.displayName;
+
+export { Popover, PopoverTrigger, PopoverContent };
diff --git a/src/helpers/database.js b/src/helpers/database.js
index de78bf70c..a84bdf2fa 100644
--- a/src/helpers/database.js
+++ b/src/helpers/database.js
@@ -363,6 +363,26 @@ class DatabaseManager {
if (!err.message.includes("duplicate column")) throw err;
}
+ try {
+ this.db.exec("ALTER TABLE calendar_events ADD COLUMN attendees TEXT");
+ } catch (err) {
+ if (!err.message.includes("duplicate column")) throw err;
+ }
+ try {
+ this.db.exec("ALTER TABLE notes ADD COLUMN participants TEXT");
+ } catch (err) {
+ if (!err.message.includes("duplicate column")) throw err;
+ }
+
+ this.db.exec(`
+ CREATE TABLE IF NOT EXISTS contacts (
+ email TEXT PRIMARY KEY,
+ display_name TEXT,
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
+ )
+ `);
+
return true;
} catch (error) {
debugLogger.error("Database initialization failed", { error: error.message }, "database");
@@ -626,6 +646,7 @@ class DatabaseManager {
"folder_id",
"transcript",
"calendar_event_id",
+ "participants",
];
const fields = [];
const values = [];
@@ -1147,7 +1168,7 @@ class DatabaseManager {
if (!this.db) throw new Error("Database not initialized");
const transaction = this.db.transaction((eventList) => {
const stmt = this.db.prepare(
- "INSERT OR REPLACE INTO calendar_events (id, calendar_id, summary, start_time, end_time, is_all_day, status, hangout_link, conference_data, organizer_email, attendees_count, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP)"
+ "INSERT OR REPLACE INTO calendar_events (id, calendar_id, summary, start_time, end_time, is_all_day, status, hangout_link, conference_data, organizer_email, attendees_count, attendees, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP)"
);
for (const e of eventList) {
stmt.run(
@@ -1161,7 +1182,8 @@ class DatabaseManager {
e.hangout_link || null,
e.conference_data || null,
e.organizer_email || null,
- e.attendees_count || 0
+ e.attendees_count || 0,
+ e.attendees || null
);
}
});
@@ -1237,6 +1259,40 @@ class DatabaseManager {
}
}
+ upsertContacts(contacts) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const transaction = this.db.transaction((list) => {
+ const stmt = this.db.prepare(
+ "INSERT INTO contacts (email, display_name, updated_at) VALUES (?, ?, CURRENT_TIMESTAMP) ON CONFLICT(email) DO UPDATE SET display_name = COALESCE(excluded.display_name, contacts.display_name), updated_at = CURRENT_TIMESTAMP"
+ );
+ for (const c of list) {
+ if (c.email) stmt.run(c.email.toLowerCase().trim(), c.displayName || null);
+ }
+ });
+ transaction(contacts);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error upserting contacts", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ searchContacts(query) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const pattern = `%${query || ""}%`;
+ return this.db
+ .prepare(
+ "SELECT * FROM contacts WHERE email LIKE ? OR display_name LIKE ? ORDER BY display_name ASC, email ASC LIMIT 20"
+ )
+ .all(pattern, pattern);
+ } catch (error) {
+ debugLogger.error("Error searching contacts", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
clearCalendarData() {
try {
if (!this.db) throw new Error("Database not initialized");
diff --git a/src/helpers/googleCalendarManager.js b/src/helpers/googleCalendarManager.js
index 3d5fc951f..7af92c262 100644
--- a/src/helpers/googleCalendarManager.js
+++ b/src/helpers/googleCalendarManager.js
@@ -227,6 +227,16 @@ class GoogleCalendarManager {
conference_data: item.conferenceData ? JSON.stringify(item.conferenceData) : null,
organizer_email: item.organizer?.email || null,
attendees_count: item.attendees?.length || 0,
+ attendees: item.attendees
+ ? JSON.stringify(
+ item.attendees.map((a) => ({
+ email: a.email,
+ displayName: a.displayName || null,
+ responseStatus: a.responseStatus || null,
+ self: a.self || false,
+ }))
+ )
+ : null,
});
}
@@ -234,6 +244,17 @@ class GoogleCalendarManager {
if (toRemove.length > 0) this.databaseManager.removeCalendarEvents(toRemove);
if (data.nextSyncToken)
this.databaseManager.updateCalendarSyncToken(calendar.id, data.nextSyncToken);
+
+ const contactsToUpsert = [];
+ for (const item of data.items || []) {
+ if (item.attendees) {
+ for (const a of item.attendees) {
+ if (a.email)
+ contactsToUpsert.push({ email: a.email, displayName: a.displayName || null });
+ }
+ }
+ }
+ if (contactsToUpsert.length > 0) this.databaseManager.upsertContacts(contactsToUpsert);
}
scheduleNextMeeting() {
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index 5d124a5c0..de595f725 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -4816,6 +4816,28 @@ class IPCHandlers {
}
});
+ ipcMain.handle("search-contacts", async (_event, query) => {
+ try {
+ const contacts = this.databaseManager.searchContacts(query);
+ return { success: true, contacts };
+ } catch (error) {
+ return { success: false, contacts: [] };
+ }
+ });
+
+ ipcMain.handle("upsert-contact", async (_event, contact) => {
+ try {
+ this.databaseManager.upsertContacts([contact]);
+ return { success: true };
+ } catch (error) {
+ return { success: false };
+ }
+ });
+
+ ipcMain.handle("get-md5-hash", (_event, text) => {
+ return crypto.createHash("md5").update(text.toLowerCase().trim()).digest("hex");
+ });
+
ipcMain.handle("meeting-detection-get-preferences", async () => {
try {
return { success: true, preferences: this.meetingDetectionEngine.getPreferences() };
diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.js
index b1199cbe0..5a79d529b 100644
--- a/src/helpers/meetingDetectionEngine.js
+++ b/src/helpers/meetingDetectionEngine.js
@@ -183,6 +183,20 @@ class MeetingDetectionEngine {
this.broadcastToWindows("note-added", noteResult.note);
+ const isRealEvent =
+ detection.event?.calendar_id &&
+ detection.event.calendar_id !== "__detected__" &&
+ detection.event.calendar_id !== "__manual__";
+
+ if (isRealEvent) {
+ const calEvent = this.databaseManager.getCalendarEventById(detection.event.id);
+ const updates = { calendar_event_id: detection.event.id };
+ if (calEvent?.attendees) {
+ updates.participants = calEvent.attendees;
+ }
+ this.databaseManager.updateNote(noteResult.note.id, updates);
+ }
+
await this.windowManager.createControlPanelWindow();
this.windowManager.snapControlPanelToMeetingMode();
this.windowManager.sendToControlPanel("navigate-to-meeting-note", {
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 35f89f9de..e22d0230a 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -1596,6 +1596,14 @@
"noFolder": "Kein Ordner",
"participants": "Teilnehmer"
},
+ "participants": {
+ "attendee": "Teilnehmer",
+ "attendees": "Teilnehmer",
+ "addAttendees": "Teilnehmer hinzufügen",
+ "addPlaceholder": "Teilnehmer hinzufügen...",
+ "typeEmail": "E-Mail eingeben zum Hinzufügen...",
+ "me": "(ich)"
+ },
"upload": {
"title": "Audio hochladen",
"using": "Verwendet {{model}}",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 41cfcc141..c7d3dabfb 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -1705,6 +1705,14 @@
"noFolder": "No folder",
"participants": "Participants"
},
+ "participants": {
+ "attendee": "attendee",
+ "attendees": "attendees",
+ "addAttendees": "Add attendees",
+ "addPlaceholder": "Add attendees...",
+ "typeEmail": "Type an email to add...",
+ "me": "(me)"
+ },
"upload": {
"title": "Upload Audio",
"using": "Using {{model}}",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index 74937c3d9..e52d33571 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -1596,6 +1596,14 @@
"noFolder": "Sin carpeta",
"participants": "Participantes"
},
+ "participants": {
+ "attendee": "asistente",
+ "attendees": "asistentes",
+ "addAttendees": "Agregar asistentes",
+ "addPlaceholder": "Agregar asistentes...",
+ "typeEmail": "Escribe un correo para agregar...",
+ "me": "(yo)"
+ },
"upload": {
"title": "Subir audio",
"using": "Usando {{model}}",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index a50039437..b5b4daf9d 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -1657,6 +1657,14 @@
"noFolder": "Aucun dossier",
"participants": "Participants"
},
+ "participants": {
+ "attendee": "participant",
+ "attendees": "participants",
+ "addAttendees": "Ajouter des participants",
+ "addPlaceholder": "Ajouter des participants...",
+ "typeEmail": "Saisissez un e-mail pour ajouter...",
+ "me": "(moi)"
+ },
"upload": {
"title": "Téléverser un fichier audio",
"using": "Utilisation de {{model}}",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index c19428aad..4b92d3229 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -1596,6 +1596,14 @@
"noFolder": "Nessuna cartella",
"participants": "Partecipanti"
},
+ "participants": {
+ "attendee": "partecipante",
+ "attendees": "partecipanti",
+ "addAttendees": "Aggiungi partecipanti",
+ "addPlaceholder": "Aggiungi partecipanti...",
+ "typeEmail": "Digita un'email per aggiungere...",
+ "me": "(io)"
+ },
"upload": {
"title": "Carica audio",
"using": "Utilizzando {{model}}",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 5bc01c408..d60108eb3 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -1506,6 +1506,14 @@
"saving": "保存中",
"startWriting": "書き始める..."
},
+ "participants": {
+ "attendee": "名の参加者",
+ "attendees": "名の参加者",
+ "addAttendees": "参加者を追加",
+ "addPlaceholder": "参加者を追加...",
+ "typeEmail": "メールアドレスを入力して追加...",
+ "me": "(自分)"
+ },
"context": {
"moveToFolder": "フォルダに移動",
"delete": "削除",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index 67cd92517..06cd3cbd5 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -1596,6 +1596,14 @@
"noFolder": "Sem pasta",
"participants": "Participantes"
},
+ "participants": {
+ "attendee": "participante",
+ "attendees": "participantes",
+ "addAttendees": "Adicionar participantes",
+ "addPlaceholder": "Adicionar participantes...",
+ "typeEmail": "Digite um e-mail para adicionar...",
+ "me": "(eu)"
+ },
"upload": {
"title": "Enviar áudio",
"using": "Usando {{model}}",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index 7642822ec..f7d303421 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -1596,6 +1596,14 @@
"noFolder": "Без папки",
"participants": "Участники"
},
+ "participants": {
+ "attendee": "участник",
+ "attendees": "участников",
+ "addAttendees": "Добавить участников",
+ "addPlaceholder": "Добавить участников...",
+ "typeEmail": "Введите email для добавления...",
+ "me": "(я)"
+ },
"upload": {
"title": "Загрузить аудио",
"using": "Используется {{model}}",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 18540b31a..fa4d5da88 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -1591,6 +1591,14 @@
"noFolder": "无文件夹",
"participants": "参与者"
},
+ "participants": {
+ "attendee": "位参会者",
+ "attendees": "位参会者",
+ "addAttendees": "添加参会者",
+ "addPlaceholder": "添加参会者...",
+ "typeEmail": "输入邮箱以添加...",
+ "me": "(我)"
+ },
"upload": {
"title": "上传音频",
"using": "使用 {{model}}",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index d91cd0772..66ff8fcf7 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -1591,6 +1591,14 @@
"noFolder": "無資料夾",
"participants": "參與者"
},
+ "participants": {
+ "attendee": "位與會者",
+ "attendees": "位與會者",
+ "addAttendees": "新增與會者",
+ "addPlaceholder": "新增與會者...",
+ "typeEmail": "輸入電子郵件以新增...",
+ "me": "(我)"
+ },
"upload": {
"title": "上傳音訊",
"using": "使用 {{model}}",
diff --git a/src/services/NotesService.ts b/src/services/NotesService.ts
index de8479281..5c9b78f04 100644
--- a/src/services/NotesService.ts
+++ b/src/services/NotesService.ts
@@ -9,6 +9,7 @@ interface NoteInput {
note_type?: "personal" | "meeting" | "upload";
source_file?: string | null;
audio_duration_seconds?: number | null;
+ participants?: string | null;
created_at?: string;
updated_at?: string;
}
diff --git a/src/types/calendar.ts b/src/types/calendar.ts
index 329c34763..51c0e7c7d 100644
--- a/src/types/calendar.ts
+++ b/src/types/calendar.ts
@@ -19,6 +19,7 @@ export interface CalendarEvent {
conference_data: string | null;
organizer_email: string | null;
attendees_count: number;
+ attendees: string | null;
}
export interface GoogleCalendarAccount {
@@ -45,3 +46,15 @@ export interface MeetingDetection {
};
imminentEvent?: CalendarEvent | null;
}
+
+export interface CalendarAttendee {
+ email: string;
+ displayName: string | null;
+ responseStatus: "needsAction" | "declined" | "tentative" | "accepted" | null;
+ self: boolean;
+}
+
+export interface Contact {
+ email: string;
+ display_name: string | null;
+}
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 3239790bb..b6207aaf3 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -29,6 +29,7 @@ export interface NoteItem {
folder_id: number | null;
transcript: string | null;
calendar_event_id: string | null;
+ participants: string | null;
cloud_id: string | null;
created_at: string;
updated_at: string;
@@ -391,6 +392,7 @@ declare global {
folder_id?: number | null;
transcript?: string | null;
calendar_event_id?: string | null;
+ participants?: string | null;
}
) => Promise<{ success: boolean; note?: NoteItem }>;
deleteNote: (id: number) => Promise<{ success: boolean }>;
@@ -1242,9 +1244,23 @@ declare global {
start_time: string;
end_time: string;
attendees_count: number;
+ attendees: string | null;
} | null;
}>;
+ // Contacts
+ searchContacts: (
+ query: string
+ ) => Promise<{
+ success: boolean;
+ contacts: Array<{ email: string; display_name: string | null }>;
+ }>;
+ upsertContact: (contact: {
+ email: string;
+ displayName?: string | null;
+ }) => Promise<{ success: boolean }>;
+ getMD5Hash: (text: string) => Promise<string>;
+
// Meeting chain transcription (BaseTen)
meetingTranscribeChain?: (
blobUrl: string,