From 861ce73bd51a6f44505128311f107f090085f9e2 Mon Sep 17 00:00:00 2001 From: John Jeong Date: Sat, 5 Jul 2025 02:26:36 -0700 Subject: [PATCH 1/3] feat: Add session words check on stop session When the user stops the ongoing session, this change checks if the session has any words recorded. If the session has no words, it dismisses the "recording-consent-reminder" toast notification. This ensures that the toast is only shown when the user has actually recorded some words during the session. --- .../components/editor-area/note-header/listen-button.tsx | 6 ++++++ 1 file changed, 6 insertions(+) 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 037aa3cce..102cd9fd2 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 @@ -218,10 +218,12 @@ function WhenInactiveAndMeetingEndedOnboarding({ disabled, onClick }: { disabled } function WhenActive() { + const ongoingSessionId = useOngoingSession((s) => s.sessionId); const ongoingSessionStore = useOngoingSession((s) => ({ pause: s.pause, stop: s.stop, })); + const sessionWords = useSession(ongoingSessionId!, (s) => s.session.words); const [isPopoverOpen, setIsPopoverOpen] = useState(false); const handlePauseSession = () => { @@ -232,6 +234,10 @@ function WhenActive() { const handleStopSession = () => { ongoingSessionStore.stop(); setIsPopoverOpen(false); + + if (sessionWords.length === 0) { + sonnerToast.dismiss("recording-consent-reminder"); + } }; return ( From d27a865eb8bd35fd143aeccbf736570e882780ee Mon Sep 17 00:00:00 2001 From: John Jeong Date: Sat, 5 Jul 2025 02:26:43 -0700 Subject: [PATCH 2/3] feat: Add title generation based on transcript words Adds a check to only generate a title if the session has transcript words. This ensures that the title is only generated when there is sufficient content to do so, avoiding unnecessary API calls. --- apps/desktop/src/components/editor-area/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/components/editor-area/index.tsx b/apps/desktop/src/components/editor-area/index.tsx index 134547dc9..cc975fbdc 100644 --- a/apps/desktop/src/components/editor-area/index.tsx +++ b/apps/desktop/src/components/editor-area/index.tsx @@ -63,13 +63,16 @@ export default function EditorArea({ const generateTitle = useGenerateTitleMutation({ sessionId }); const preMeetingNote = useSession(sessionId, (s) => s.session.pre_meeting_memo_html) ?? ""; + const hasTranscriptWords = useSession(sessionId, (s) => s.session.words.length > 0); const enhance = useEnhanceMutation({ sessionId, preMeetingNote, rawContent, onSuccess: (content) => { - generateTitle.mutate({ enhancedContent: content }); + if (hasTranscriptWords) { + generateTitle.mutate({ enhancedContent: content }); + } }, }); From 49d4f9ba44564f1bafde3ba0a072bafcc19181f9 Mon Sep 17 00:00:00 2001 From: John Jeong Date: Sat, 5 Jul 2025 02:26:47 -0700 Subject: [PATCH 3/3] i18n --- apps/desktop/src/locales/en/messages.po | 6 +++--- apps/desktop/src/locales/ko/messages.po | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/desktop/src/locales/en/messages.po b/apps/desktop/src/locales/en/messages.po index 4940c19df..dcd971e86 100644 --- a/apps/desktop/src/locales/en/messages.po +++ b/apps/desktop/src/locales/en/messages.po @@ -881,7 +881,7 @@ msgstr "Optional for participant suggestions" msgid "Owner" msgstr "Owner" -#: src/components/editor-area/note-header/listen-button.tsx:302 +#: src/components/editor-area/note-header/listen-button.tsx:308 msgid "Pause" msgstr "Pause" @@ -967,7 +967,7 @@ msgstr "Search names or emails" msgid "Search templates..." msgstr "Search templates..." -#: src/components/search-bar.tsx:144 +#: src/components/search-bar.tsx:145 msgid "Search..." msgstr "Search..." @@ -1039,7 +1039,7 @@ msgstr "Start Monthly Plan" msgid "Start recording" msgstr "Start recording" -#: src/components/editor-area/note-header/listen-button.tsx:310 +#: src/components/editor-area/note-header/listen-button.tsx:316 msgid "Stop" msgstr "Stop" diff --git a/apps/desktop/src/locales/ko/messages.po b/apps/desktop/src/locales/ko/messages.po index 6d97881be..8b250cbee 100644 --- a/apps/desktop/src/locales/ko/messages.po +++ b/apps/desktop/src/locales/ko/messages.po @@ -881,7 +881,7 @@ msgstr "" msgid "Owner" msgstr "" -#: src/components/editor-area/note-header/listen-button.tsx:302 +#: src/components/editor-area/note-header/listen-button.tsx:308 msgid "Pause" msgstr "" @@ -967,7 +967,7 @@ msgstr "" msgid "Search templates..." msgstr "" -#: src/components/search-bar.tsx:144 +#: src/components/search-bar.tsx:145 msgid "Search..." msgstr "" @@ -1039,7 +1039,7 @@ msgstr "" msgid "Start recording" msgstr "" -#: src/components/editor-area/note-header/listen-button.tsx:310 +#: src/components/editor-area/note-header/listen-button.tsx:316 msgid "Stop" msgstr ""