Remove filter from plugins/list result (#15580)

Show all plugin marketplaces in the /plugins popup by removing the
`openai-curated` marketplace filter, and update plugin popup
copy/tests/snapshots to match the new behavior in both TUI codepaths.
This commit is contained in:
canvrno-oai
2026-03-23 23:41:01 -07:00
committed by GitHub
parent 9deb8ce3fc
commit c850607129
9 changed files with 43 additions and 44 deletions

View File

@@ -15,14 +15,12 @@ use codex_app_server_protocol::PluginMarketplaceEntry;
use codex_app_server_protocol::PluginReadResponse;
use codex_app_server_protocol::PluginSummary;
use codex_app_server_protocol::PluginUninstallResponse;
use codex_core::plugins::OPENAI_CURATED_MARKETPLACE_NAME;
use codex_features::Feature;
use codex_utils_absolute_path::AbsolutePathBuf;
use ratatui::style::Stylize;
use ratatui::text::Line;
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
const SUPPORTED_MARKETPLACE_NAME: &str = OPENAI_CURATED_MARKETPLACE_NAME;
#[derive(Debug, Clone, Default)]
pub(super) enum PluginsCacheState {
@@ -625,11 +623,7 @@ impl ChatWidget {
}
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
let marketplaces: Vec<&PluginMarketplaceEntry> = response
.marketplaces
.iter()
.filter(|marketplace| marketplace.name == SUPPORTED_MARKETPLACE_NAME)
.collect();
let marketplaces: Vec<&PluginMarketplaceEntry> = response.marketplaces.iter().collect();
let total: usize = marketplaces
.iter()
@@ -644,7 +638,7 @@ impl ChatWidget {
let mut header = ColumnRenderable::new();
header.push(Line::from("Plugins".bold()));
header.push(Line::from(
"Browse plugins from the ChatGPT marketplace.".dim(),
"Browse plugins from available marketplaces.".dim(),
));
header.push(Line::from(
format!("Installed {installed} of {total} available plugins.").dim(),
@@ -697,9 +691,9 @@ impl ChatWidget {
if items.is_empty() {
items.push(SelectionItem {
name: "No ChatGPT marketplace plugins available".to_string(),
name: "No marketplace plugins available".to_string(),
description: Some(
"This first pass only surfaces the ChatGPT plugin marketplace.".to_string(),
"No plugins are available in the discovered marketplaces.".to_string(),
),
is_disabled: true,
..Default::default()

View File

@@ -1,17 +1,20 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 7289
expression: popup
---
Plugins
Browse plugins from the ChatGPT marketplace.
Installed 1 of 3 available plugins.
Browse plugins from available marketplaces.
Installed 1 of 4 available plugins.
Using cached marketplace data: remote sync timed out
Type to search plugins
Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
installed but disabled.
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
default.
Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
installed but disabled.
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
default.
Hidden Repo Plugin · Repo Marketplace Can be installed · Repo Marketplace · Should not be shown
in /plugins.
Press esc to close.

View File

@@ -1,9 +1,10 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 7527
expression: popup
---
Plugins
Browse plugins from the ChatGPT marketplace.
Browse plugins from available marketplaces.
Installed 0 of 3 available plugins.
sla

View File

@@ -7239,7 +7239,7 @@ async fn plugins_popup_loading_state_snapshot() {
}
#[tokio::test]
async fn plugins_popup_snapshot_filters_to_curated_marketplace_and_preserves_response_order() {
async fn plugins_popup_snapshot_shows_all_marketplaces_and_preserves_response_order() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
chat.set_feature_enabled(Feature::Plugins, true);
@@ -7288,14 +7288,16 @@ async fn plugins_popup_snapshot_filters_to_curated_marketplace_and_preserves_res
let popup = render_loaded_plugins_popup(&mut chat, response);
assert_snapshot!("plugins_popup_curated_marketplace", popup);
assert!(
!popup.contains("Hidden Repo Plugin"),
"expected /plugins to hide non-ChatGPT marketplaces, got:\n{popup}"
popup.contains("Hidden Repo Plugin"),
"expected /plugins to include non-curated marketplaces, got:\n{popup}"
);
assert!(
plugins_test_popup_row_position(&popup, "Bravo Search")
< plugins_test_popup_row_position(&popup, "Alpha Sync")
&& plugins_test_popup_row_position(&popup, "Alpha Sync")
< plugins_test_popup_row_position(&popup, "Starter"),
< plugins_test_popup_row_position(&popup, "Starter")
&& plugins_test_popup_row_position(&popup, "Starter")
< plugins_test_popup_row_position(&popup, "Hidden Repo Plugin"),
"expected /plugins rows to keep response order, got:\n{popup}"
);
}