fix(voice): show realtime voice mode toggle by default in all builds - #5441
Conversation
VOICE_MODE_FLAG_ENABLED gated the Settings voice-mode toggle on a build-time VITE_VOICE_MODE env var that was never wired into the desktop build (build-desktop.yml). As a result the realtime voice mode section never rendered in local, staging, or production builds — it only showed in unit tests that mock the flag on. Flip the flag to default-on with a kill switch (set VITE_VOICE_MODE=false to hide it), matching the existing CHAT_ATTACHMENTS_ENABLED / DERIVED_TRANSCRIPT_ENABLED default-on idiom in the same file. Document the switch in app/.env.example. The realtime code paths still gate on the persisted mascot.voiceMode, so the feature stays dark until the user opts in via the now-visible toggle.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 26 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Summary
VOICE_MODE_FLAG_ENABLEDfrom opt-in (Boolean(VITE_VOICE_MODE)) to default-on with a kill switch (VITE_VOICE_MODE=false), matching theCHAT_ATTACHMENTS_ENABLED/DERIVED_TRANSCRIPT_ENABLEDidiom in the same file.VITE_VOICE_MODEkill switch inapp/.env.example.Problem
The realtime voice mode section (#5399) was gated on
VOICE_MODE_FLAG_ENABLED, which resolves toBoolean(import.meta.env.VITE_VOICE_MODE)— a build-time Vite env var.VITE_VOICE_MODEis not injected anywhere in the build pipeline: it is absent from theVITE_*env block in.github/workflows/build-desktop.yml(the single injection point bothrelease-staging.ymlandrelease-production.ymlreuse), and from every.envfile. It therefore baked in asfalsein every shipped bundle, so the toggle never rendered in local, staging, or production — only in unit tests that mock the flag on. Wiring the backend relay flags (the ElevenLabs Voice Agent identity-token / keepalive fixes) has no effect on this UI gate, since it is a compile-timeimport.meta.envconstant.Solution
app/src/utils/config.ts:VOICE_MODE_FLAG_ENABLED = (…VITE_VOICE_MODE…)?.trim() !== 'false'. Undefined (the shipped case) → on; explicitVITE_VOICE_MODE=false→ off. No CI/env wiring required, so the toggle appears in all three build environments by default.mascot.voiceMode(HumanPage.tsx), so the feature ships dark until the user flips the now-visible toggle — no behaviour change for users who do not opt in.app/.env.example: documented the kill switch next to the siblingVITE_CHAT_ATTACHMENTSentry.pnpm typecheckclean; focused suitesHumanPage.realtimeMode.test.tsx+RealtimeVoiceControls.test.tsxpass (9/9).Submission Checklist
HumanPage.realtimeMode.test.tsxandRealtimeVoiceControls.test.tsx. No new branch to cover. The global test mock (app/src/test/setup.ts) intentionally keeps the flag off for determinism..env.exampleand comment lines are non-executable. Ran focused tests + typecheck locally, not the fulltest:coveragemerge.## Related.Impact
VITE_VOICE_MODE=false.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling