mirror of
https://github.com/openai/codex.git
synced 2026-11-03 08:22:30 +00:00
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:
1 parent
9deb8ce3fc
commit
c850607129
9 files changed
+43
-44
No files matched your search
@@ -965,6 +965,7 @@ async fn spawn_child_completion_notifies_parent_history() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
#[ignore = "flaky on: rust-ci / Tests — windows-arm64 - aarch64-pc-windows-msvc"]
|
||||||
async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent() {
|
async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent() {
|
||||||
let harness = AgentControlHarness::new().await;
|
let harness = AgentControlHarness::new().await;
|
||||||
let (root_thread_id, _) = harness.start_thread().await;
|
let (root_thread_id, _) = harness.start_thread().await;
|
||||||
|
|||||||
@@ -15,14 +15,12 @@ use codex_app_server_protocol::PluginMarketplaceEntry;
|
|||||||
use codex_app_server_protocol::PluginReadResponse;
|
use codex_app_server_protocol::PluginReadResponse;
|
||||||
use codex_app_server_protocol::PluginSummary;
|
use codex_app_server_protocol::PluginSummary;
|
||||||
use codex_app_server_protocol::PluginUninstallResponse;
|
use codex_app_server_protocol::PluginUninstallResponse;
|
||||||
use codex_core::plugins::OPENAI_CURATED_MARKETPLACE_NAME;
|
|
||||||
use codex_features::Feature;
|
use codex_features::Feature;
|
||||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||||
use ratatui::style::Stylize;
|
use ratatui::style::Stylize;
|
||||||
use ratatui::text::Line;
|
use ratatui::text::Line;
|
||||||
|
|
||||||
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
|
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
|
||||||
const SUPPORTED_MARKETPLACE_NAME: &str = OPENAI_CURATED_MARKETPLACE_NAME;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub(super) enum PluginsCacheState {
|
pub(super) enum PluginsCacheState {
|
||||||
@@ -625,11 +623,7 @@ impl ChatWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
|
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
|
||||||
let marketplaces: Vec<&PluginMarketplaceEntry> = response
|
let marketplaces: Vec<&PluginMarketplaceEntry> = response.marketplaces.iter().collect();
|
||||||
.marketplaces
|
|
||||||
.iter()
|
|
||||||
.filter(|marketplace| marketplace.name == SUPPORTED_MARKETPLACE_NAME)
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let total: usize = marketplaces
|
let total: usize = marketplaces
|
||||||
.iter()
|
.iter()
|
||||||
@@ -644,7 +638,7 @@ impl ChatWidget {
|
|||||||
let mut header = ColumnRenderable::new();
|
let mut header = ColumnRenderable::new();
|
||||||
header.push(Line::from("Plugins".bold()));
|
header.push(Line::from("Plugins".bold()));
|
||||||
header.push(Line::from(
|
header.push(Line::from(
|
||||||
"Browse plugins from the ChatGPT marketplace.".dim(),
|
"Browse plugins from available marketplaces.".dim(),
|
||||||
));
|
));
|
||||||
header.push(Line::from(
|
header.push(Line::from(
|
||||||
format!("Installed {installed} of {total} available plugins.").dim(),
|
format!("Installed {installed} of {total} available plugins.").dim(),
|
||||||
@@ -697,9 +691,9 @@ impl ChatWidget {
|
|||||||
|
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
items.push(SelectionItem {
|
items.push(SelectionItem {
|
||||||
name: "No ChatGPT marketplace plugins available".to_string(),
|
name: "No marketplace plugins available".to_string(),
|
||||||
description: Some(
|
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,
|
is_disabled: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
+10
-7
@@ -1,17 +1,20 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 7289
|
||||||
expression: popup
|
expression: popup
|
||||||
---
|
---
|
||||||
Plugins
|
Plugins
|
||||||
Browse plugins from the ChatGPT marketplace.
|
Browse plugins from available marketplaces.
|
||||||
Installed 1 of 3 available plugins.
|
Installed 1 of 4 available plugins.
|
||||||
Using cached marketplace data: remote sync timed out
|
Using cached marketplace data: remote sync timed out
|
||||||
|
|
||||||
Type to search plugins
|
Type to search plugins
|
||||||
› Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
|
› Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
|
||||||
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
|
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
|
||||||
installed but disabled.
|
installed but disabled.
|
||||||
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
|
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
|
||||||
default.
|
default.
|
||||||
|
Hidden Repo Plugin · Repo Marketplace Can be installed · Repo Marketplace · Should not be shown
|
||||||
|
in /plugins.
|
||||||
|
|
||||||
Press esc to close.
|
Press esc to close.
|
||||||
+2
-1
@@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 7527
|
||||||
expression: popup
|
expression: popup
|
||||||
---
|
---
|
||||||
Plugins
|
Plugins
|
||||||
Browse plugins from the ChatGPT marketplace.
|
Browse plugins from available marketplaces.
|
||||||
Installed 0 of 3 available plugins.
|
Installed 0 of 3 available plugins.
|
||||||
|
|
||||||
sla
|
sla
|
||||||
|
|||||||
@@ -7239,7 +7239,7 @@ async fn plugins_popup_loading_state_snapshot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[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;
|
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||||
chat.set_feature_enabled(Feature::Plugins, true);
|
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);
|
let popup = render_loaded_plugins_popup(&mut chat, response);
|
||||||
assert_snapshot!("plugins_popup_curated_marketplace", popup);
|
assert_snapshot!("plugins_popup_curated_marketplace", popup);
|
||||||
assert!(
|
assert!(
|
||||||
!popup.contains("Hidden Repo Plugin"),
|
popup.contains("Hidden Repo Plugin"),
|
||||||
"expected /plugins to hide non-ChatGPT marketplaces, got:\n{popup}"
|
"expected /plugins to include non-curated marketplaces, got:\n{popup}"
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
plugins_test_popup_row_position(&popup, "Bravo Search")
|
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, "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}"
|
"expected /plugins rows to keep response order, got:\n{popup}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,14 +15,12 @@ use codex_app_server_protocol::PluginMarketplaceEntry;
|
|||||||
use codex_app_server_protocol::PluginReadResponse;
|
use codex_app_server_protocol::PluginReadResponse;
|
||||||
use codex_app_server_protocol::PluginSummary;
|
use codex_app_server_protocol::PluginSummary;
|
||||||
use codex_app_server_protocol::PluginUninstallResponse;
|
use codex_app_server_protocol::PluginUninstallResponse;
|
||||||
use codex_core::plugins::OPENAI_CURATED_MARKETPLACE_NAME;
|
|
||||||
use codex_features::Feature;
|
use codex_features::Feature;
|
||||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||||
use ratatui::style::Stylize;
|
use ratatui::style::Stylize;
|
||||||
use ratatui::text::Line;
|
use ratatui::text::Line;
|
||||||
|
|
||||||
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
|
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
|
||||||
const SUPPORTED_MARKETPLACE_NAME: &str = OPENAI_CURATED_MARKETPLACE_NAME;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub(super) enum PluginsCacheState {
|
pub(super) enum PluginsCacheState {
|
||||||
@@ -625,11 +623,7 @@ impl ChatWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
|
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
|
||||||
let marketplaces: Vec<&PluginMarketplaceEntry> = response
|
let marketplaces: Vec<&PluginMarketplaceEntry> = response.marketplaces.iter().collect();
|
||||||
.marketplaces
|
|
||||||
.iter()
|
|
||||||
.filter(|marketplace| marketplace.name == SUPPORTED_MARKETPLACE_NAME)
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let total: usize = marketplaces
|
let total: usize = marketplaces
|
||||||
.iter()
|
.iter()
|
||||||
@@ -644,7 +638,7 @@ impl ChatWidget {
|
|||||||
let mut header = ColumnRenderable::new();
|
let mut header = ColumnRenderable::new();
|
||||||
header.push(Line::from("Plugins".bold()));
|
header.push(Line::from("Plugins".bold()));
|
||||||
header.push(Line::from(
|
header.push(Line::from(
|
||||||
"Browse plugins from the ChatGPT marketplace.".dim(),
|
"Browse plugins from available marketplaces.".dim(),
|
||||||
));
|
));
|
||||||
header.push(Line::from(
|
header.push(Line::from(
|
||||||
format!("Installed {installed} of {total} available plugins.").dim(),
|
format!("Installed {installed} of {total} available plugins.").dim(),
|
||||||
@@ -697,9 +691,9 @@ impl ChatWidget {
|
|||||||
|
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
items.push(SelectionItem {
|
items.push(SelectionItem {
|
||||||
name: "No ChatGPT marketplace plugins available".to_string(),
|
name: "No marketplace plugins available".to_string(),
|
||||||
description: Some(
|
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,
|
is_disabled: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
+9
-7
@@ -3,15 +3,17 @@ source: tui_app_server/src/chatwidget/tests.rs
|
|||||||
expression: popup
|
expression: popup
|
||||||
---
|
---
|
||||||
Plugins
|
Plugins
|
||||||
Browse plugins from the ChatGPT marketplace.
|
Browse plugins from available marketplaces.
|
||||||
Installed 1 of 3 available plugins.
|
Installed 1 of 4 available plugins.
|
||||||
Using cached marketplace data: remote sync timed out
|
Using cached marketplace data: remote sync timed out
|
||||||
|
|
||||||
Type to search plugins
|
Type to search plugins
|
||||||
› Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
|
› Bravo Search · ChatGPT Marketplace Can be installed. Press Enter to view plugin details.
|
||||||
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
|
Alpha Sync · ChatGPT Marketplace Installed · Disabled · ChatGPT Marketplace · Already
|
||||||
installed but disabled.
|
installed but disabled.
|
||||||
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
|
Starter · ChatGPT Marketplace Available by default · ChatGPT Marketplace · Included by
|
||||||
default.
|
default.
|
||||||
|
Hidden Repo Plugin · Repo Marketplace Can be installed · Repo Marketplace · Should not be shown
|
||||||
|
in /plugins.
|
||||||
|
|
||||||
Press esc to close.
|
Press esc to close.
|
||||||
+1
-1
@@ -3,7 +3,7 @@ source: tui_app_server/src/chatwidget/tests.rs
|
|||||||
expression: popup
|
expression: popup
|
||||||
---
|
---
|
||||||
Plugins
|
Plugins
|
||||||
Browse plugins from the ChatGPT marketplace.
|
Browse plugins from available marketplaces.
|
||||||
Installed 0 of 3 available plugins.
|
Installed 0 of 3 available plugins.
|
||||||
|
|
||||||
sla
|
sla
|
||||||
|
|||||||
@@ -7836,7 +7836,7 @@ async fn plugins_popup_loading_state_snapshot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[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;
|
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||||
chat.set_feature_enabled(Feature::Plugins, true);
|
chat.set_feature_enabled(Feature::Plugins, true);
|
||||||
|
|
||||||
@@ -7885,14 +7885,16 @@ async fn plugins_popup_snapshot_filters_to_curated_marketplace_and_preserves_res
|
|||||||
let popup = render_loaded_plugins_popup(&mut chat, response);
|
let popup = render_loaded_plugins_popup(&mut chat, response);
|
||||||
assert_snapshot!("plugins_popup_curated_marketplace", popup);
|
assert_snapshot!("plugins_popup_curated_marketplace", popup);
|
||||||
assert!(
|
assert!(
|
||||||
!popup.contains("Hidden Repo Plugin"),
|
popup.contains("Hidden Repo Plugin"),
|
||||||
"expected /plugins to hide non-ChatGPT marketplaces, got:\n{popup}"
|
"expected /plugins to include non-curated marketplaces, got:\n{popup}"
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
plugins_test_popup_row_position(&popup, "Bravo Search")
|
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, "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}"
|
"expected /plugins rows to keep response order, got:\n{popup}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user