diff --git a/apps/desktop/src/components/command-palette.tsx b/apps/desktop/src/components/command-palette.tsx index 3eaf11bec0..083d47ec95 100644 --- a/apps/desktop/src/components/command-palette.tsx +++ b/apps/desktop/src/components/command-palette.tsx @@ -319,8 +319,8 @@ export function CommandPalette({ open, onOpenChange }: CommandPaletteProps) { const style = document.createElement("style"); style.textContent = ` [role="dialog"][aria-modal="true"] { - width: 800px !important; - max-width: 90vw !important; + width: 590px !important; + max-width: 80vw !important; } `; document.head.appendChild(style); diff --git a/apps/desktop/src/components/editor-area/note-header/listen-button.tsx b/apps/desktop/src/components/editor-area/note-header/listen-button.tsx index e6785acb47..45e2158021 100644 --- a/apps/desktop/src/components/editor-area/note-header/listen-button.tsx +++ b/apps/desktop/src/components/editor-area/note-header/listen-button.tsx @@ -18,6 +18,7 @@ import { z } from "zod"; import SoundIndicator from "@/components/sound-indicator"; import { useHypr } from "@/contexts"; import { useEnhancePendingState } from "@/hooks/enhance-pending"; +import { commands as analyticsCommands } from "@hypr/plugin-analytics"; import { commands as dbCommands } from "@hypr/plugin-db"; import { commands as listenerCommands } from "@hypr/plugin-listener"; import { commands as localSttCommands } from "@hypr/plugin-local-stt"; @@ -49,7 +50,7 @@ const showConsentNotification = () => { }; export default function ListenButton({ sessionId, isCompact = false }: { sessionId: string; isCompact?: boolean }) { - const { onboardingSessionId } = useHypr(); + const { onboardingSessionId, userId } = useHypr(); const isOnboarding = sessionId === onboardingSessionId; const ongoingSessionStatus = useOngoingSession((s) => s.status); @@ -100,6 +101,14 @@ export default function ListenButton({ sessionId, isCompact = false }: { session if (isOnboarding) { listenerCommands.setMicMuted(true); } + + if (!isOnboarding && userId) { + analyticsCommands.event({ + event: "recording_start_session", + distinct_id: userId, + properties: { session_id: sessionId }, + }); + } } }; @@ -234,6 +243,7 @@ function WhenInactiveAndMeetingEndedOnboarding({ disabled, onClick }: { disabled } function WhenActive({ sessionId }: { sessionId: string }) { + const { userId } = useHypr(); const ongoingSessionId = useOngoingSession((s) => s.sessionId); const ongoingSessionStore = useOngoingSession((s) => ({ stop: s.stop, @@ -249,6 +259,14 @@ function WhenActive({ sessionId }: { sessionId: string }) { if (sessionWords.length === 0) { sonnerToast.dismiss("recording-consent-reminder"); } + + if (userId) { + analyticsCommands.event({ + event: "recording_stop_session", + distinct_id: userId, + properties: { session_id: sessionId }, + }); + } }; return ( diff --git a/apps/desktop/src/components/right-panel/views/transcript-view.tsx b/apps/desktop/src/components/right-panel/views/transcript-view.tsx index 79eb3e7cf1..167ee1c2b5 100644 --- a/apps/desktop/src/components/right-panel/views/transcript-view.tsx +++ b/apps/desktop/src/components/right-panel/views/transcript-view.tsx @@ -9,7 +9,6 @@ import { ChevronDownIcon, ClipboardIcon, CopyIcon, - PencilIcon, TextSearchIcon, UploadIcon, } from "lucide-react"; @@ -18,6 +17,7 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ParticipantList } from "@/components/editor-area/note-header/chips/participants-chip"; import { useHypr } from "@/contexts"; import { useContainerWidth } from "@/hooks/use-container-width"; +import { commands as analyticsCommands } from "@hypr/plugin-analytics"; import { commands as dbCommands, Human, Word2 } from "@hypr/plugin-db"; import { commands as miscCommands } from "@hypr/plugin-misc"; import TranscriptEditor, { @@ -94,6 +94,7 @@ function RenderInMeeting({ words }: { words: Word2[] }) { } function RenderNotInMeeting({ sessionId, words }: { sessionId: string; words: Word2[] }) { + const { userId } = useHypr(); const queryClient = useQueryClient(); const [editable, setEditable] = useState(false); @@ -169,11 +170,18 @@ function RenderNotInMeeting({ sessionId, words }: { sessionId: string; words: Wo }); } }); + } else { + if (userId) { + analyticsCommands.event({ + event: "transcript_toggle_edit", + distinct_id: userId, + }); + } } return !v; }); - }, [editorWords]); + }, [editorWords, userId]); const handleUpdate = (words: Word2[]) => { setEditorWords(words); @@ -214,14 +222,14 @@ function RenderNotInMeeting({ sessionId, words }: { sessionId: string; words: Wo const EditToggle = () => { return ( ); }; @@ -231,7 +239,9 @@ function RenderNotInMeeting({ sessionId, words }: { sessionId: string; words: Wo

Transcript

- +
+ +