[apps] Improve app listing filtering. (#11697)

- [x] If an installed app is not on the app listing, remove it from the
final list.
This commit is contained in:
Matthew Zeng
2026-02-13 11:54:16 -08:00
committed by GitHub
parent c54a4ec078
commit 8468871e2b
5 changed files with 67 additions and 9 deletions
+1 -1
View File
@@ -3387,7 +3387,7 @@ mod tests {
let mut app = make_test_app().await;
let codex_home = tempdir()?;
app.config.codex_home = codex_home.path().to_path_buf();
let app_id = "connector_1".to_string();
let app_id = "unit_test_refresh_in_memory_config_connector".to_string();
assert_eq!(app_enabled_in_effective_config(&app.config, &app_id), None);
+2
View File
@@ -4582,6 +4582,7 @@ impl ChatWidget {
let connectors = connectors::merge_connectors_with_accessible(
all_connectors,
accessible_connectors,
true,
);
Ok(ConnectorsSnapshot { connectors })
}
@@ -6736,6 +6737,7 @@ impl ChatWidget {
snapshot.connectors = connectors::merge_connectors_with_accessible(
Vec::new(),
snapshot.connectors,
false,
);
}
snapshot.connectors =
+10 -6
View File
@@ -3868,11 +3868,13 @@ async fn apps_popup_refreshes_when_connectors_snapshot_updates() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
chat.config.features.enable(Feature::Apps);
chat.bottom_pane.set_connectors_enabled(true);
let notion_id = "unit_test_apps_popup_refresh_connector_1";
let linear_id = "unit_test_apps_popup_refresh_connector_2";
chat.on_connectors_loaded(
Ok(ConnectorsSnapshot {
connectors: vec![codex_chatgpt::connectors::AppInfo {
id: "connector_1".to_string(),
id: notion_id.to_string(),
name: "Notion".to_string(),
description: Some("Workspace docs".to_string()),
logo_url: None,
@@ -3905,7 +3907,7 @@ async fn apps_popup_refreshes_when_connectors_snapshot_updates() {
Ok(ConnectorsSnapshot {
connectors: vec![
codex_chatgpt::connectors::AppInfo {
id: "connector_1".to_string(),
id: notion_id.to_string(),
name: "Notion".to_string(),
description: Some("Workspace docs".to_string()),
logo_url: None,
@@ -3916,7 +3918,7 @@ async fn apps_popup_refreshes_when_connectors_snapshot_updates() {
is_enabled: true,
},
codex_chatgpt::connectors::AppInfo {
id: "connector_2".to_string(),
id: linear_id.to_string(),
name: "Linear".to_string(),
description: Some("Project tracking".to_string()),
logo_url: None,
@@ -3947,10 +3949,12 @@ async fn apps_refresh_failure_keeps_existing_full_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
chat.config.features.enable(Feature::Apps);
chat.bottom_pane.set_connectors_enabled(true);
let notion_id = "unit_test_apps_refresh_failure_connector_1";
let linear_id = "unit_test_apps_refresh_failure_connector_2";
let full_connectors = vec![
codex_chatgpt::connectors::AppInfo {
id: "connector_1".to_string(),
id: notion_id.to_string(),
name: "Notion".to_string(),
description: Some("Workspace docs".to_string()),
logo_url: None,
@@ -3961,7 +3965,7 @@ async fn apps_refresh_failure_keeps_existing_full_snapshot() {
is_enabled: true,
},
codex_chatgpt::connectors::AppInfo {
id: "connector_2".to_string(),
id: linear_id.to_string(),
name: "Linear".to_string(),
description: Some("Project tracking".to_string()),
logo_url: None,
@@ -3982,7 +3986,7 @@ async fn apps_refresh_failure_keeps_existing_full_snapshot() {
chat.on_connectors_loaded(
Ok(ConnectorsSnapshot {
connectors: vec![codex_chatgpt::connectors::AppInfo {
id: "connector_1".to_string(),
id: notion_id.to_string(),
name: "Notion".to_string(),
description: Some("Workspace docs".to_string()),
logo_url: None,