diff --git a/apps/desktop/src/routes/editor/ShareButton.tsx b/apps/desktop/src/routes/editor/ShareButton.tsx index bebe10b5a3..a53fc08a6a 100644 --- a/apps/desktop/src/routes/editor/ShareButton.tsx +++ b/apps/desktop/src/routes/editor/ShareButton.tsx @@ -29,6 +29,13 @@ function ShareButton() { mutationFn: async () => { setUploadState({ type: "idle" }); + if (!navigator.onLine) { + await commands.globalMessageDialog( + "You appear to be offline. Please check your internet connection and try again.", + ); + return; + } + console.log("Starting upload process..."); // Check authentication first diff --git a/apps/desktop/src/routes/recordings-overlay.tsx b/apps/desktop/src/routes/recordings-overlay.tsx index ab0a71a1ac..a9848daeaf 100644 --- a/apps/desktop/src/routes/recordings-overlay.tsx +++ b/apps/desktop/src/routes/recordings-overlay.tsx @@ -719,6 +719,14 @@ function createRecordingMutations( return; } + // Check connectivity first — prevent hanging on network calls when offline + if (!navigator.onLine) { + await commands.globalMessageDialog( + "You appear to be offline. Please check your internet connection and try again.", + ); + return; + } + // Check authentication first const existingAuth = await authStore.get(); if (!existingAuth) {