Skip to content

Commit e358f97

Browse files
feat(listen-button): Improve recording failure notification
The changes made in this commit improve the user experience when recording fails. Instead of displaying a generic error message, the app now shows a more specific notification with a clear call to action for the user to try the recording again. Additionally, the notification is now displayed using the desktop notification API, providing a more seamless and native experience for the user.
1 parent 2f7c301 commit e358f97

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/desktop/src/components/editor-area/note-header/listen-button.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,19 @@ export default function ListenButton({ sessionId }: { sessionId: string }) {
8686
toast({
8787
id: "recording-failed",
8888
title: "Recording Failed",
89-
content: "Unable to start recording. Please check your microphone settings.",
89+
content: "Unable to start recording. Try it again.",
9090
dismissible: true,
9191
duration: 3000,
9292
});
9393
} else {
9494
const permission = await notificationCommands.checkNotificationPermission();
9595
if (permission === "Granted") {
96-
// TODO: Popup notification
96+
await notificationCommands.sendNotification({
97+
title: "Recording Failed",
98+
message: "Unable to start recording. Try it again.",
99+
url: null,
100+
timeout: { secs: 3, nanos: 0 },
101+
});
97102
}
98103
}
99104
}

0 commit comments

Comments
 (0)