From 3ec0f5dae2f929e461215ef7cb352db32a2e4c56 Mon Sep 17 00:00:00 2001 From: Sergei Date: Thu, 29 Jan 2026 09:08:11 -0800 Subject: [PATCH] Fix 3 critical bugs: WebView navbar, Android STT, Speaker icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. WebView Dashboard Navbar - Add `localStorage.setItem('is_mobile', '1')` to hide nav bar - Fixes issue where web dashboard shows full navigation 2. Android STT Restart After TTS - Reduce delay from 300ms to 50ms for Android - Android Audio Focus releases immediately after TTS ends - iOS keeps 300ms delay for smooth audio fade - File: app/(tabs)/_layout.tsx:208 3. Remove Speaker Icon from Chat Header - Remove TTS Stop button (volume-high icon) from chat.tsx - Not needed in Lite version - File: app/(tabs)/chat.tsx:500-508 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/(tabs)/_layout.tsx | 5 ++++- app/(tabs)/chat.tsx | 9 --------- app/(tabs)/index.tsx | 4 ++++ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index c36e1c9..ead68ab 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -203,11 +203,14 @@ export default function TabLayout() { } // Delay to let TTS fully release audio focus, then restart STT + // iOS: 300ms for smooth audio fade + // Android: 50ms (Audio Focus releases immediately) + const delay = Platform.OS === 'android' ? 50 : 300; const timer = setTimeout(() => { if (sessionActiveRef.current) { safeStartSTT(); } - }, 300); // 300ms to ensure TTS audio fully fades + }, delay); return () => clearTimeout(timer); } diff --git a/app/(tabs)/chat.tsx b/app/(tabs)/chat.tsx index 0db1e6c..87e68e4 100644 --- a/app/(tabs)/chat.tsx +++ b/app/(tabs)/chat.tsx @@ -497,15 +497,6 @@ export default function ChatScreen() { - {/* TTS Stop button - only visible when speaking */} - {isSpeaking && ( - - - - )} setSortNewestFirst(prev => !prev)} diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 47abf3b..447dfbb 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -149,6 +149,10 @@ export default function HomeScreen() { user_id: ${userId || 'null'} }; localStorage.setItem('auth2', JSON.stringify(authData)); + + // Set is_mobile flag to hide navigation bar + localStorage.setItem('is_mobile', '1'); + console.log('Auth injected:', authData.username); // Monitor page content for session expired messages