Show voice answers settings in all desktop builds#6248
Conversation
Greptile SummaryThis PR removes the Key issues:
Confidence Score: 3/5Not safe to merge as-is: the settings UI is now exposed to all users but the underlying service still silently no-ops in production builds. There is a clear P1 defect: the UI guard was removed but the matching service-layer guard (guard AnalyticsManager.isDevBuild else { return } in FloatingBarVoicePlaybackService.swift) was left in place. Production users will configure Voice Answers settings that never activate, producing silent failures with no feedback. desktop/Desktop/Sources/FloatingControlBar/FloatingBarVoicePlaybackService.swift — the isDevBuild guard on line 21 of playResponseIfEnabled must also be removed. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SettingsPage
participant ShortcutSettings
participant SettingsSyncManager
participant FloatingBarVoicePlaybackService
participant ElevenLabsAPI
User->>SettingsPage: Enable Voice Answers toggle
SettingsPage->>ShortcutSettings: floatingBarVoiceAnswersEnabled = true
SettingsPage->>SettingsSyncManager: pushPartialUpdate(voiceAnswersEnabled: true)
User->>SettingsPage: Enter ElevenLabs API Key
SettingsPage->>SettingsSyncManager: pushPartialUpdate(elevenLabsApiKey: key)
Note over FloatingBarVoicePlaybackService: User triggers a floating-bar reply
FloatingBarVoicePlaybackService->>FloatingBarVoicePlaybackService: playResponseIfEnabled()
Note over FloatingBarVoicePlaybackService: guard AnalyticsManager.isDevBuild else return ❌ (still present — silently exits in production)
FloatingBarVoicePlaybackService-->>User: no audio, no error
Reviews (1): Last reviewed commit: "Show voice answers settings in all deskt..." | Re-trigger Greptile |
| @@ -4329,22 +4327,20 @@ struct SettingsContentView: View { | |||
| value: $devAnthropicKey | |||
| ) | |||
|
|
|||
| if AnalyticsManager.isDevBuild { | |||
| developerKeyField( | |||
| title: "ElevenLabs API Key", | |||
| subtitle: "For experimental floating-bar voice answers", | |||
| settingId: "advanced.devkeys.elevenlabs", | |||
| value: syncedElevenLabsKeyBinding | |||
| ) | |||
| developerKeyField( | |||
| title: "ElevenLabs API Key", | |||
| subtitle: "For experimental floating-bar voice answers", | |||
| settingId: "advanced.devkeys.elevenlabs", | |||
| value: syncedElevenLabsKeyBinding | |||
| ) | |||
|
|
|||
| developerTextField( | |||
| title: "ElevenLabs Voice ID", | |||
| subtitle: "Optional override. Leave blank to use the default Rachel voice.", | |||
| placeholder: "21m00Tcm4TlvDq8ikWAM", | |||
| settingId: "advanced.devkeys.elevenlabsvoice", | |||
| value: syncedElevenLabsVoiceIDBinding | |||
| ) | |||
| } | |||
| developerTextField( | |||
| title: "ElevenLabs Voice ID", | |||
| subtitle: "Optional override. Leave blank to use the default Rachel voice.", | |||
| placeholder: "21m00Tcm4TlvDq8ikWAM", | |||
| settingId: "advanced.devkeys.elevenlabsvoice", | |||
| value: syncedElevenLabsVoiceIDBinding | |||
| ) | |||
There was a problem hiding this comment.
Feature silently disabled in production builds
The UI guard has been removed so these settings now appear for all users, but FloatingBarVoicePlaybackService.playResponseIfEnabled still contains a hard early-exit for non-dev builds:
// FloatingBarVoicePlaybackService.swift – line 21
func playResponseIfEnabled(_ message: ChatMessage?) {
guard AnalyticsManager.isDevBuild else { return } // ← still present
...
}A production user who sees this new section, enables the toggle, and enters their ElevenLabs API key will get zero voice output and zero error feedback — the service returns immediately before doing anything. This mismatch between a visible, fully-interactive UI and a silently no-op backend is the main issue with this PR.
The guard AnalyticsManager.isDevBuild else { return } line in FloatingBarVoicePlaybackService.swift needs to be removed (or replaced with the existing floatingBarVoiceAnswersEnabled guard that already follows it) for the intent of this PR to be realised.
| Text("Voice Answers (Experimental)") | ||
| .scaledFont(size: 16, weight: .semibold) | ||
| .foregroundColor(OmiColors.textPrimary) | ||
| Text("Speak shortcut-based floating-bar replies aloud. Saves your ElevenLabs settings to your backend profile so the app reconnects automatically.") |
## Summary - remove the dev-build visibility gate around Voice Answers in Advanced > Developer API Keys - show the ElevenLabs API key and voice ID fields in normal desktop builds too - update the copy so it no longer refers to a dev-only build ## Testing - desktop SwiftUI settings change only - compile verification was started locally via
Summary
Testing