Enable TUI voice conversations by default (#44921)

## What changed

Promote `realtime_conversation` to stable and enable it by default, removing its experimental announcement. Update popup and tooltip tests to use explicit experimental voice fixtures now that the feature is stable.

GitOrigin-RevId: 4e947189f41de465d1f343e95100b26d6200db24
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-09-11 21:59:01 +00:00
1 parent 3052bbcf8c
commit 3f59eb965a
3 files changed
+25 -15

No files matched your search

+3 -7
View File
@@ -348,7 +348,7 @@ pub enum Feature {
FastMode, FastMode,
/// Enable explicitly requested model changes for later step captures. /// Enable explicitly requested model changes for later step captures.
StepModelSwitching, StepModelSwitching,
/// Removed compatibility flag. Realtime sessions no longer require a per-thread opt-in. /// Enable voice conversations in the TUI.
RealtimeConversation, RealtimeConversation,
/// Prevent idle system sleep while a turn is actively running. /// Prevent idle system sleep while a turn is actively running.
PreventIdleSleep, PreventIdleSleep,
@@ -1692,12 +1692,8 @@ pub const FEATURES: &[FeatureSpec] = &[
FeatureSpec { FeatureSpec {
id: Feature::RealtimeConversation, id: Feature::RealtimeConversation,
key: "realtime_conversation", key: "realtime_conversation",
stage: Stage::Experimental { stage: Stage::Stable,
name: "Voice conversations", default_enabled: true,
menu_description: "Talk with Codex using /voice.",
announcement: "NEW: Voice conversations can now be enabled from /experimental. Restart Codex after enabling, then use /voice.",
},
default_enabled: false,
}, },
FeatureSpec { FeatureSpec {
id: Feature::RemoteControl, id: Feature::RemoteControl,
@@ -3038,7 +3038,6 @@ async fn apps_popup_for_not_installed_app_uses_install_only_selected_description
async fn experimental_features_popup_snapshot() { async fn experimental_features_popup_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await; let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
let voice = Feature::RealtimeConversation.stage();
let features = vec![ let features = vec![
ExperimentalFeatureItem { ExperimentalFeatureItem {
key: Feature::JsRepl.key().to_string(), key: Feature::JsRepl.key().to_string(),
@@ -3057,8 +3056,8 @@ async fn experimental_features_popup_snapshot() {
ExperimentalFeatureItem { ExperimentalFeatureItem {
key: Feature::RealtimeConversation.key().to_string(), key: Feature::RealtimeConversation.key().to_string(),
writable: true, writable: true,
name: voice.experimental_menu_name().unwrap().to_string(), name: "Voice conversations".to_string(),
description: voice.experimental_menu_description().unwrap().to_string(), description: "Talk with Codex using /voice.".to_string(),
enabled: false, enabled: false,
}, },
]; ];
+20 -5
View File
@@ -1,5 +1,6 @@
use codex_features::FEATURES; use codex_features::FEATURES;
use codex_features::Feature; use codex_features::Feature;
use codex_features::FeatureSpec;
use codex_protocol::account::PlanType; use codex_protocol::account::PlanType;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use rand::Rng; use rand::Rng;
@@ -38,14 +39,18 @@ lazy_static! {
let mut tips = Vec::new(); let mut tips = Vec::new();
tips.extend(TOOLTIPS.iter().copied()); tips.extend(TOOLTIPS.iter().copied());
tips.extend(experimental_tooltips( tips.extend(experimental_tooltips(
FEATURES,
codex_realtime_webrtc::RealtimeWebrtcSession::is_supported, codex_realtime_webrtc::RealtimeWebrtcSession::is_supported,
)); ));
tips tips
}; };
} }
fn experimental_tooltips(voice_supported: impl Fn() -> bool) -> Vec<&'static str> { fn experimental_tooltips(
FEATURES features: &[FeatureSpec],
voice_supported: impl Fn() -> bool,
) -> Vec<&'static str> {
features
.iter() .iter()
.filter(|spec| spec.id != Feature::RealtimeConversation || voice_supported()) .filter(|spec| spec.id != Feature::RealtimeConversation || voice_supported())
.filter_map(|spec| spec.stage.experimental_announcement()) .filter_map(|spec| spec.stage.experimental_announcement())
@@ -364,9 +369,19 @@ mod tests {
#[test] #[test]
fn experimental_voice_tooltip_requires_runtime_support() { fn experimental_voice_tooltip_requires_runtime_support() {
let unavailable = experimental_tooltips(|| false); let mut features = FEATURES.to_vec();
let available = experimental_tooltips(|| true); features
let voice_tip = FEATURES .iter_mut()
.find(|spec| spec.id == Feature::RealtimeConversation)
.unwrap()
.stage = codex_features::Stage::Experimental {
name: "Voice conversations",
menu_description: "Talk with Codex using /voice.",
announcement: "NEW: Voice conversations can now be enabled from /experimental. Restart Codex after enabling, then use /voice.",
};
let unavailable = experimental_tooltips(&features, || false);
let available = experimental_tooltips(&features, || true);
let voice_tip = features
.iter() .iter()
.find(|spec| spec.id == Feature::RealtimeConversation) .find(|spec| spec.id == Feature::RealtimeConversation)
.and_then(|spec| spec.stage.experimental_announcement()) .and_then(|spec| spec.stage.experimental_announcement())