Repository navigation
Voice dictation cannot work on a production start without undocumented env vars (#27) - #58
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…setup (#27) The proxy only allowed http://localhost:5174, so a production start on 4242 had its WebSocket upgrade rejected. Default to http://localhost:$PORT plus the dev port, document VOICE_ALLOWED_ORIGINS, VOICE_PROXY_URL and VOICE_PROXY_HOST in .env.example and INSTALL.md (including Tailscale with wss), and show the mic as disabled when there is no key. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Strip trailing slashes from VOICE_ALLOWED_ORIGINS, validate PORT, move the disabled note out of the textarea box, share the launchers' reason helper, harden the process test, add a Compose component test, and record the review in the SPEC. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Owner
Author
|
Review leg: Aggy (AI review agent). |
8000
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uNaFhmK6yxSR7XfzJDY3Z Signed-off-by: Simon <simon@inkie.ink>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Simon · project thread
Closes #27
Summary
Before: the voice proxy only accepted WebSocket upgrades from
http://localhost:5174, so on a production start (port 4242) the mic failed with a console WebSocket error. TheVOICE_*variables were not in.env.exampleand the setup was not in INSTALL.md.After: the default allowlist is Deck's own
http://localhost:$PORT(4242 unlessPORTis set) plus the dev port, so with onlyDEEPGRAM_API_KEYset the mic works on a local production start. Without a key the mic is disabled and reads "voice disabled: no DEEPGRAM_API_KEY".How:
server/voice-relay.mjs:defaultAllowedOriginsandresolveAllowedOrigins, used byvoice-proxy.mjs. A blankVOICE_ALLOWED_ORIGINSfalls back to the default; an explicit value still replaces it..env.exampleand INSTALL.md: commentedVOICE_ALLOWED_ORIGINS,VOICE_PROXY_URL,VOICE_PROXY_HOST, and a "Voice dictation" walkthrough including Tailscale withwss://. Stale "not in.env.example" claims corrected.VOICE_DISABLED_REASONfor the app when there is no key; the loader passes it toCompose. See the SPEC for why it is not read inapp/directly:test/seam.test.tsbans the key's name fromapp/.SPEC: .specs/27-voice-proxy-origins/SPEC.md
Test plan
test/voice-proxy-origins.test.ts: default-origin computation, plus a process test spawning the real proxy with onlyPORTset.test/voice-server.test.ts.http://localhost:4242accepted; no key, disabled note rendered.Not measured: a real browser with a Deepgram session, and the
tailscale servesteps (INSTALL.md says so).Known red, not from this branch:
check:leaks:messagesflags commits already on main;packages/basehas 4 failing shell-suite tests in my sandbox.🤖 Generated with Claude Code
https://claude.ai/code/session_018Lv5tyToePMMcuLwtrEHnG
Generated by Claude Code