From 04e7fb1a998b9794a949dae828c5df0711ed757f Mon Sep 17 00:00:00 2001 From: Developer Date: Mon, 6 Apr 2026 16:54:55 -0700 Subject: [PATCH] Fix macOS sidecar build and blank window on startup macOS sidecar: `uv run` re-resolves dependencies using CUDA sources even after `uv sync --no-sources`. Use UV_NO_SOURCES=1 env var instead so it applies to all uv commands in the step. Blank window: When the Tauri app starts without the Python backend running, it showed a completely blank window. Now shows a "Connecting to backend..." spinner, or an error state with instructions to start the backend manually. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build-sidecar.yml | 11 ++- src/App.svelte | 131 ++++++++++++++++++++++++----- 2 files changed, 117 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/build-sidecar.yml b/.gitea/workflows/build-sidecar.yml index 954c327..66babee 100644 --- a/.gitea/workflows/build-sidecar.yml +++ b/.gitea/workflows/build-sidecar.yml @@ -365,11 +365,14 @@ jobs: run: brew install portaudio - name: Build sidecar (CPU) + env: + UV_NO_SOURCES: "1" run: | - # --no-sources bypasses pyproject.toml's [tool.uv.sources] which forces - # torch from the CUDA index (no macOS ARM wheels there) - # Default PyPI torch includes MPS (Apple Silicon GPU) support - uv sync --no-sources + # UV_NO_SOURCES bypasses pyproject.toml's [tool.uv.sources] which forces + # torch from the CUDA index (no macOS ARM wheels there). + # Applies to both uv sync AND uv run (which re-resolves). + # Default PyPI torch includes MPS (Apple Silicon GPU) support. + uv sync uv run pyinstaller local-transcription-headless.spec - name: Package sidecar (CPU) diff --git a/src/App.svelte b/src/App.svelte index b7d0aa1..eef989b 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -12,6 +12,8 @@ let obsDisplayUrl = $derived(backendStore.obsUrl); let syncDisplayUrl = $derived(backendStore.syncUrl); + let isConnected = $derived(backendStore.connectionState === "connected"); + let connectionState = $derived(backendStore.connectionState); function openSettings() { showSettings = true; @@ -31,33 +33,120 @@ }); -
-
- +{#if !isConnected} +
+
+
+ {#if connectionState === "error"} + + + + + + {:else} +
+ {/if} +
+

Local Transcription

+ {#if connectionState === "error"} +

Cannot connect to backend

+

Make sure the Python backend is running:
+ uv run python -m backend.main_headless

+ {:else} +

Connecting to backend...

+ {/if} +
+
+{:else} +
+
+ - - - - -
v{backendStore.version}
-
- -{#if showSettings} - + {#if showSettings} + + {/if} {/if}