From a66f09eb283a6a065f6d0c6d7a47ec74352770d5 Mon Sep 17 00:00:00 2001 From: Shane Maynard Date: Sat, 29 Aug 2026 12:19:00 -0400 Subject: [PATCH] fix: resolve agent crash and expand settings sheet - Move task_dir assignment before VoiceAssistant construction in handle_job; UnboundLocalError was crashing every agent job before it joined the room, leaving the UI stuck on 'Opening a secure room' - Make settings sheet full-window height (100dvh) to match tasks panel --- agent/agent.py | 7 ++++--- web/style.css | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/agent/agent.py b/agent/agent.py index 7411b38..7ddd1b4 100644 --- a/agent/agent.py +++ b/agent/agent.py @@ -652,6 +652,10 @@ async def handle_job(ctx: JobContext) -> None: return logger.info("Resolved voice user %s", user_id) + # Every room gets a private event directory. This prevents concurrent or + # reconnecting sessions from consuming and announcing each other's tasks. + task_dir = f"/tmp/tasks/{ctx.room.name}" + # Azure STT — streaming, reads AZURE_SPEECH_KEY / AZURE_SPEECH_REGION from env stt = azure.STT( speech_key=AZURE_KEY, @@ -799,9 +803,6 @@ async def handle_job(ctx: JobContext) -> None: logger.info("user state -> %s", ev.new_state) # ── Background task events → UI and spoken result ────────────────────── - # Every room gets a private event directory. This prevents concurrent or - # reconnecting sessions from consuming and announcing each other's tasks. - task_dir = f"/tmp/tasks/{ctx.room.name}" try: from agent.task_registry import TaskRegistry except ImportError: diff --git a/web/style.css b/web/style.css index 82a3b57..3116fdd 100644 --- a/web/style.css +++ b/web/style.css @@ -989,17 +989,16 @@ body[data-mode="text"] .mic-meter { .settings-sheet { position: fixed; + top: 0; left: 50%; - bottom: 0; z-index: var(--z-sheet); width: min(660px, 100%); - max-height: min(76vh, 680px); + height: 100dvh; padding: 0.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; border: 1px solid var(--line-strong); - border-bottom: 0; - border-radius: 16px 16px 0 0; + border-radius: 16px; background: #101e31; transform: translate(-50%, 102%); transition: transform 240ms var(--ease-out);