Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
fix: no blank main area after discarding a recording - the discard/finalize paths restore the open recording's detail view (or null), and the empty-state gate renders whenever neither sibling view does instead of only when nothing is selected
Murtaza Nasira96e1fb69039
diff --git a/static/js/modules/composables/audio.js b/static/js/modules/composables/audio.jsindex a4f9e0c3..bc7aade0 100644--- a/static/js/modules/composables/audio.js+++ b/static/js/modules/composables/audio.js@@ -1296,7 +1296,7 @@ export function useAudio(state, utils) {// panel so the queued recording appears immediately, the same// way a drag-drop upload does (instead of only after a manual// page refresh).- currentView.value = null;+ currentView.value = selectedRecording.value ? 'detail' : null;showUploadModal.value = false;try { await utils.onServerRecordingQueued?.(); } catch (_) { /* non-fatal */ }return result;@@ -1369,7 +1369,10 @@ export function useAudio(state, utils) {await hideRecordingNotification();// Return to upload modal so the user can finish the upload form.- currentView.value = null;+ // Behind the modal, land on the open recording's detail view when one+ // is selected (a bare null left a blank main area if the user then+ // cancelled the modal).+ currentView.value = selectedRecording.value ? 'detail' : null;showUploadModal.value = true;// Start upload immediately@@ -1667,7 +1670,10 @@ export function useAudio(state, utils) {await hideRecordingNotification();// Return to upload modal so the user can finish the upload form.- currentView.value = null;+ // Behind the modal, land on the open recording's detail view when one+ // is selected (a bare null left a blank main area if the user then+ // cancelled the modal).+ currentView.value = selectedRecording.value ? 'detail' : null;showUploadModal.value = true;};diff --git a/templates/components/detail/empty-state.html b/templates/components/detail/empty-state.htmlindex a5d7b0c2..44a8809d 100644--- a/templates/components/detail/empty-state.html+++ b/templates/components/detail/empty-state.html@@ -15,7 +15,10 @@explicit child-stretching context — without this the flex-1collapsed to 0 height on phones (visible as a blank screenunder the global header when no recording is selected). -->-<div v-if="!selectedRecording && currentView !== 'recording'"+{# Render whenever neither sibling surface does: not just "nothing+ selected", but also any state mismatch (a selected recording with no+ active view) — the prompt is always better than a blank main area. #}+<div v-if="currentView !== 'recording' && !(currentView === 'detail' && selectedRecording)"class="flex-1 flex items-center justify-center p-6 min-h-[60vh]"><div class="max-w-md w-full text-center"><!-- TRULY EMPTY (no recordings at all) -->