Skip to content

Show voice answers settings in all desktop builds#6248

Merged
kodjima33 merged 1 commit into
mainfrom
nik/show-voice-answers-to-everyone
Apr 1, 2026
Merged

Show voice answers settings in all desktop builds#6248
kodjima33 merged 1 commit into
mainfrom
nik/show-voice-answers-to-everyone

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

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

@kodjima33 kodjima33 merged commit 05a1e27 into main Apr 1, 2026
3 checks passed
@kodjima33 kodjima33 deleted the nik/show-voice-answers-to-everyone branch April 1, 2026 07:23
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 1, 2026

Greptile Summary

This PR removes the AnalyticsManager.isDevBuild visibility gates around the Voice Answers card (toggle + description) and the ElevenLabs API Key / Voice ID input fields in the Advanced → Developer API Keys settings section, and updates the in-UI copy to no longer reference a "dev-only build." The intent is to make this experimental feature accessible to all desktop users.

Key issues:

  • P1 – Feature silently broken in production: FloatingBarVoicePlaybackService.playResponseIfEnabled (line 21) still contains guard AnalyticsManager.isDevBuild else { return }. Production users will see the settings, be able to interact with them, and receive no voice output — with no error message. The service guard must be removed alongside the UI guard for this change to be complete.
  • P2 – Stale doc comment: The floatingBarVoiceAnswersEnabled property in ShortcutSettings.swift still says "spoken aloud in development builds"; it should be updated to reflect the expanded scope.

Confidence Score: 3/5

Not 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

Filename Overview
desktop/Desktop/Sources/MainWindow/Pages/SettingsPage.swift Removes isDevBuild UI gates around Voice Answers toggle and ElevenLabs key/voice-ID fields, and updates copy — but the underlying service (FloatingBarVoicePlaybackService.playResponseIfEnabled) still early-exits on non-dev builds, so the newly exposed settings silently have no effect in production.

Sequence Diagram

sequenceDiagram
    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
Loading

Reviews (1): Last reviewed commit: "Show voice answers settings in all deskt..." | Re-trigger Greptile

Comment on lines 4287 to +4343
@@ -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
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +4290 to +4293
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.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stale doc comment in ShortcutSettings

The property doc comment in ShortcutSettings.swift (line 352) still says "spoken aloud in development builds", which contradicts the stated goal of this PR. Worth updating in the same pass to keep the comment accurate.

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant