Add managed gates for in-app chat and dictation (#39045)

## What changed

- Register `in_app_chat` and `in_app_dictation` as stable, default-enabled feature gates for desktop apps.
- Allow requirements to disable either capability and expose both keys in the generated configuration schema.

## Testing

- Add configuration tests that verify enterprise requirements can disable each gate.

GitOrigin-RevId: 5bba35d710fb0b6924aa55df98b2e013fa288f6d
This commit is contained in:
Shijie Rao authored and copyberry committed 2026-08-17 18:41:50 +00:00
1 parent 0f21cb3413
commit 06418909a0
3 files changed
+76

No files matched your search

+44
View File
@@ -10655,6 +10655,50 @@ browser_use_full_cdp_access = false
Ok(())
}
#[tokio::test]
async fn in_app_chat_feature_requirements_are_valid() -> std::io::Result<()> {
let codex_home = TempDir::new()?;
let config = ConfigBuilder::without_managed_config_for_tests()
.codex_home(codex_home.path().to_path_buf())
.cloud_config_bundle(
CloudConfigBundleFixture::loader_with_enterprise_requirement(
r#"
[features]
in_app_chat = false
"#,
),
)
.build()
.await?;
assert!(!config.features.enabled(Feature::InAppChat));
Ok(())
}
#[tokio::test]
async fn in_app_dictation_feature_requirements_are_valid() -> std::io::Result<()> {
let codex_home = TempDir::new()?;
let config = ConfigBuilder::without_managed_config_for_tests()
.codex_home(codex_home.path().to_path_buf())
.cloud_config_bundle(
CloudConfigBundleFixture::loader_with_enterprise_requirement(
r#"
[features]
in_app_dictation = false
"#,
),
)
.build()
.await?;
assert!(!config.features.enabled(Feature::InAppDictation));
Ok(())
}
#[tokio::test]
async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Result<()> {
let codex_home = TempDir::new()?;