From afd59a99af3a87e165fdade29b70d34b2690f145 Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Sun, 2 Nov 2025 12:15:46 -0800 Subject: [PATCH] remove order from thread/list --- codex-rs/app-server-protocol/src/protocol/v2.rs | 2 -- codex-rs/app-server/src/codex_message_processor.rs | 1 - codex-rs/app-server/tests/suite/v2/thread_list.rs | 10 ++++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 88b6b9f083..8b489b219c 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -245,8 +245,6 @@ pub struct ThreadListParams { pub cursor: Option, /// Optional page size; defaults to a reasonable server-side value. pub limit: Option, - /// Optional sort order; defaults to descending. - pub order: Option, /// Optional provider filter; when set, only sessions recorded under these /// providers are returned. When present but empty, includes all providers. pub model_providers: Option>, diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index f53b5eab90..3603f823b0 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -1114,7 +1114,6 @@ impl CodexMessageProcessor { let ThreadListParams { cursor, limit, - order: _, model_providers, } = params; diff --git a/codex-rs/app-server/tests/suite/v2/thread_list.rs b/codex-rs/app-server/tests/suite/v2/thread_list.rs index b2ccbcb88c..957b8bbc55 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_list.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_list.rs @@ -25,7 +25,6 @@ async fn thread_list_basic_empty() -> Result<()> { .send_thread_list_request(ThreadListParams { cursor: None, limit: Some(10), - order: None, model_providers: None, }) .await?; @@ -140,7 +139,6 @@ async fn thread_list_pagination_next_cursor_none_on_last_page() -> Result<()> { .send_thread_list_request(ThreadListParams { cursor: None, limit: Some(2), - order: None, model_providers: None, }) .await?; @@ -161,7 +159,6 @@ async fn thread_list_pagination_next_cursor_none_on_last_page() -> Result<()> { .send_thread_list_request(ThreadListParams { cursor: Some(cursor1), limit: Some(2), - order: None, model_providers: None, }) .await?; @@ -204,7 +201,8 @@ async fn thread_list_respects_provider_filter() -> Result<()> { .join("02"); std::fs::create_dir_all(&dir)?; let file_path = dir.join(format!("rollout-2025-01-02T11-00-00-{uuid}.jsonl")); - let lines = [json!({ + let lines = [ + json!({ "timestamp": "2025-01-02T11:00:00Z", "type": "session_meta", "payload": { @@ -230,7 +228,8 @@ async fn thread_list_respects_provider_filter() -> Result<()> { "type":"event_msg", "payload": {"type":"user_message","message":"X","kind":"plain"} }) - .to_string()]; + .to_string(), + ]; std::fs::write(file_path, lines.join("\n") + "\n")?; let mut mcp = McpProcess::new(codex_home.path()).await?; @@ -241,7 +240,6 @@ async fn thread_list_respects_provider_filter() -> Result<()> { .send_thread_list_request(ThreadListParams { cursor: None, limit: Some(10), - order: None, model_providers: Some(vec!["other_provider".to_string()]), }) .await?;