feat(app): reportAppDebug — Live-Debug-Logs an Bridge ohne ADB
Stefan-Anforderung: Background-Wake-Word-Pipeline klappt noch nicht, ADB nicht zur Hand → Debug via RVS-Log-Pipeline. Logger: - reportAppDebug(scope, message) analog zu reportAppError aber level=info, kein console.error, fuer Live-Diagnose Strategische Log-Punkte: - wakeword.ts: start() emits 'wake.start armed' - wakeword.ts: onWakeDetected emits 'wake.detect state=X' beim Native-Trigger-Empfang - ChatScreen.tsx wake-callback: 'wake.cb callback fired', 'wake.cb startRecording=X', 'wake.cb gong played' - backgroundAudio.ts: 'bg.start slot=X', 'bg.stop service stopped', 'bg.start.fail msg' wenn Service nicht hochkommt Abruf live via curl http://172.0.2.33:3001/api/app-log?lines=100 Damit kann Stefan nach APK-Build (mit allen Native-Fixes + Logger) im Background-Test exakt sehen wo es klemmt: - Kommt 'wake.detect' im Hintergrund an? (WakeLock-Frage) - Kommt 'wake.cb callback fired'? (JS-Bridge-Frage) - Geht 'bg.start slot=wake' durch? (Service-Start-Frage) APK neu bauen. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1270,9 +1270,11 @@ const ChatScreen: React.FC = () => {
|
||||
useEffect(() => {
|
||||
const unsubWake = wakeWordService.onWakeWord(async () => {
|
||||
console.log('[Chat] Gespraechsmodus — starte Auto-Aufnahme');
|
||||
import('../services/logger').then(m => m.reportAppDebug('wake.cb', 'callback fired, calling startRecording')).catch(()=>{});
|
||||
// Conversation-Window: User hat X Sekunden um anzufangen, sonst Konversation aus
|
||||
const windowMs = await loadConvWindowMs();
|
||||
const started = await audioService.startRecording(true, windowMs);
|
||||
import('../services/logger').then(m => m.reportAppDebug('wake.cb', `startRecording returned ${started}`)).catch(()=>{});
|
||||
if (started) {
|
||||
// Erst JETZT signalisieren dass das Mikro wirklich offen ist —
|
||||
// vorher war's noch in der Init-Phase. So weiss der User exakt
|
||||
@@ -1280,6 +1282,7 @@ const ChatScreen: React.FC = () => {
|
||||
// ueber Settings → Wake-Word abschaltbar.
|
||||
ToastAndroid.show('🎤 Mikro offen — sprich jetzt', ToastAndroid.SHORT);
|
||||
playWakeReadySound().catch(() => {});
|
||||
import('../services/logger').then(m => m.reportAppDebug('wake.cb', 'gong played + recording started')).catch(()=>{});
|
||||
} else {
|
||||
// Mikrofon nicht verfuegbar, naechsten Versuch
|
||||
wakeWordService.resume();
|
||||
|
||||
Reference in New Issue
Block a user