From f56595f4bc5a067bb0c4fc59424ca667182a1db2 Mon Sep 17 00:00:00 2001 From: Brent Traut Date: Wed, 8 Jul 2026 02:42:54 -0700 Subject: [PATCH] fix(thread-store): refine metadata catalog visibility --- codex-rs/thread-store/src/local/mod.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/codex-rs/thread-store/src/local/mod.rs b/codex-rs/thread-store/src/local/mod.rs index 57ec68788a..e21dc7f8f8 100644 --- a/codex-rs/thread-store/src/local/mod.rs +++ b/codex-rs/thread-store/src/local/mod.rs @@ -128,9 +128,14 @@ impl LocalThreadStore { } async fn publish_catalog_upsert_if_visible(&self, thread_id: ThreadId, thread: &StoredThread) { - if let Some(rollout_path) = thread.rollout_path.as_ref() - && self.rollout_is_catalog_visible(rollout_path).await - { + let visible = if !thread.preview.is_empty() { + true + } else if let Some(rollout_path) = thread.rollout_path.as_ref() { + self.rollout_is_catalog_visible(rollout_path).await + } else { + false + }; + if visible { self.publish_catalog_change(ThreadCatalogChange::Upsert { thread_id }); } } @@ -366,6 +371,12 @@ impl ThreadStore for LocalThreadStore { Err(err) => { if changed && may_partially_apply + && !matches!( + &err, + ThreadStoreError::Unsupported { + operation: "paginated_threads" + } + ) && let Ok(thread) = read_thread::read_thread( self, ReadThreadParams {