Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/desktop/src/components/editor-area/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -232,6 +234,10 @@ function WhenActive() {
const handleStopSession = () => {
ongoingSessionStore.stop();
setIsPopoverOpen(false);

if (sessionWords.length === 0) {
sonnerToast.dismiss("recording-consent-reminder");
}
};

return (
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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..."

Expand Down Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down Expand Up @@ -967,7 +967,7 @@ msgstr ""
msgid "Search templates..."
msgstr ""

#: src/components/search-bar.tsx:144
#: src/components/search-bar.tsx:145
msgid "Search..."
msgstr ""

Expand Down Expand Up @@ -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 ""

Expand Down