mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
85d3447ccc
Root cause 1: Notification.requestPermission() on startup (3s delay) opened a browser permission dialog while JARVIS was still speaking the welcome greeting. This aborted the SpeechRecognition session. Because isSpeaking=true at that moment, onend did not reschedule a restart — mic went permanently silent. Fix: removed the startup requestPermission() call entirely. Root cause 2: Same requestPermission() inside _focusWindow() called on every enterVoiceMode() — could abort the recognition session on each wake. Fix: only create notification when permission already granted, never request. Root cause 3: SLEEP_CMDS matched bare words like offline and sleep that appear in normal commands (check if server is offline, put device to sleep, etc.) Fix: tightened to require explicit phrasing — go offline, sleep mode, shut down jarvis, good night jarvis, etc.