Fix IPC stdout corruption, dark window background, overlay timing
- Redirect sys.stdout to stderr in Python sidecar so library print() calls don't corrupt the JSON-line IPC stream - Save real stdout fd for exclusive IPC use via init_ipc() - Skip non-JSON lines in Rust reader instead of failing with parse error - Set Tauri window background color to match dark theme (#0a0a23) - Add inline dark background on html/body to prevent white flash - Use Svelte tick() to ensure progress overlay renders before invoke - Improve ProgressOverlay with spinner, better styling, z-index 9999 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="en" style="margin:0;padding:0;background:#0a0a23;height:100%;">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
@@ -7,7 +7,7 @@
|
||||
<title>Voice to Notes</title>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<body data-sveltekit-preload-data="hover" style="margin:0;padding:0;background:#0a0a23;overflow:hidden;">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import { segments, speakers } from '$lib/stores/transcript';
|
||||
import { settings, loadSettings } from '$lib/stores/settings';
|
||||
import type { Segment, Speaker } from '$lib/types/transcript';
|
||||
import { onMount } from 'svelte';
|
||||
import { onMount, tick } from 'svelte';
|
||||
|
||||
let waveformPlayer: WaveformPlayer;
|
||||
let audioUrl = $state('');
|
||||
@@ -87,12 +87,15 @@
|
||||
audioUrl = convertFileSrc(filePath);
|
||||
waveformPlayer?.loadAudio(audioUrl);
|
||||
|
||||
// Start pipeline (transcription + diarization)
|
||||
// Start pipeline — show overlay immediately before heavy processing
|
||||
isTranscribing = true;
|
||||
transcriptionProgress = 0;
|
||||
transcriptionStage = 'Starting...';
|
||||
transcriptionMessage = 'Initializing pipeline...';
|
||||
|
||||
// Flush DOM so the progress overlay renders before the blocking invoke
|
||||
await tick();
|
||||
|
||||
// Listen for progress events from the sidecar
|
||||
const unlisten = await listen<{
|
||||
percent: number;
|
||||
|
||||
Reference in New Issue
Block a user