From eb28a907ffe49b4f7a1a01e85d9b9b0294f408e2 Mon Sep 17 00:00:00 2001 From: anais Date: Sun, 21 Jun 2026 14:56:04 -0700 Subject: [PATCH] preserve legacy names in thread list --- codex-rs/rollout/src/recorder.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codex-rs/rollout/src/recorder.rs b/codex-rs/rollout/src/recorder.rs index d0222d7162..c9a26cbe2c 100644 --- a/codex-rs/rollout/src/recorder.rs +++ b/codex-rs/rollout/src/recorder.rs @@ -1809,12 +1809,20 @@ fn thread_item_from_state_list_item(item: codex_state::ThreadListItem) -> Thread let source = serde_json::from_str(item.source.as_str()) .or_else(|_| serde_json::from_value(Value::String(item.source))) .unwrap_or(SessionSource::Unknown); + let name = item + .name + .filter(|name| !name.trim().is_empty()) + .or_else(|| { + let title = item.title.trim(); + (!title.is_empty() && item.first_user_message.as_deref().map(str::trim) != Some(title)) + .then(|| item.title.clone()) + }); ThreadItem { path: item.rollout_path, thread_id: Some(item.id), first_user_message: item.first_user_message, preview: item.preview, - name: item.name, + name, cwd: Some(item.cwd), git_branch: item.git_branch, git_sha: item.git_sha,