[codex] Fix dashboard chat and browser voice over Tailscale#20871
[codex] Fix dashboard chat and browser voice over Tailscale#20871Julientalbot wants to merge 5 commits into
Conversation
7f61baf to
678bf85
Compare
|
Hey @Julientalbot — I missed this PR when I did my dashboard-host-allowlist landscape review earlier today (the duplicate-detector bot didn't flag it on the others, so I didn't widen my search like I should have). Apologies for the late notice. Your Host-validator change is the closest comparator to my #29195 — same env var name ( Differences worth noting:
For the host-allowlist piece specifically the maintainer can pick either — placement logic is equivalent. The voice endpoints are an orthogonal capability nobody else is tackling. If splitting helps land them, the voice piece could be its own PR. |
Summary
Fixes the dashboard Chat tab for remote Tailscale usage and adds browser-based voice paths that work from the device running the dashboard, not only from the machine hosting Hermes.
HERMES_DASHBOARD_ALLOWED_HOSTSproxy-host allowlist when the dashboard is bound to loopback behind a trusted local HTTPS proxy./api/voice/transcribeso the browser can upload recorded microphone audio and reuse the existing server-side STT pipeline./api/voice/synthesizeso dashboard responses can reuse the configured Hermes TTS provider and play back in the browser.MediaRecorder, sends the transcript into the embedded PTY, and restores terminal focus/layout on failures.message.complete, synthesizes the answer, plays it in the browser, then returns to listening.Root Cause
The dashboard could be served through Tailscale HTTPS while the embedded Chat WebSockets were still treated as non-loopback clients and rejected. Browser microphone APIs also require a secure context, so the old HTTP/Tailscale-IP access path was insufficient for remote voice usage. The classic voice/TTS flow also records and plays audio on the host machine, which breaks the expected dashboard model when the user is on a MacBook, iPhone, or other Tailscale-connected device.
Validation
npx eslint src/pages/ChatPage.tsx/Users/ergonomia_mac_mini/.hermes/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_web_server.py -k dashboard_voicenpm run buildgit diff --check hermes_cli/web_server.py tests/hermes_cli/test_web_server.py web/src/pages/ChatPage.tsx/chatloads fromhttps://mac-mini-de-ergonomia-mac-mini.taild069eb.ts.net/chatand classic browser voice works remotely.CI Note
The
Lint (ruff + ty)workflow can report failure on this fork PR because its final GitHub Script step tries to create/update a PR comment with a read-onlyGITHUB_TOKEN. The actual lint diff summary for commit678bf8514reportsruffnew issues: none, andtynew issues: none.Notes
This PR intentionally excludes unrelated local changes in
gateway/*, the xAI video tool files, andweb/public/voice/*.