From 89208f09f819c0ff00c2608a33422a5f6b885c76 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sat, 5 Sep 2026 15:44:01 +0000 Subject: [PATCH] Avoid filesystem scans when seeding the agents overview (#43043) ## Why Seeding recent history for the agents overview should not trigger a startup filesystem scan for unindexed rollouts. ## What changed Set `use_state_db_only` to `true` on the overview's initial recent-thread list requests so they use only the state database. ## Testing Extend the shared overview regression test with a newer, unindexed rollout and verify that the overview still contains the expected indexed history and loaded threads. GitOrigin-RevId: b20861bef5b49fa2aa2a3b0953f069528b6f0c4f --- codex-rs/tui/src/app/agents_overview_tests.rs | 11 +++++++++++ codex-rs/tui/src/app/agents_overview_threads.rs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/codex-rs/tui/src/app/agents_overview_tests.rs b/codex-rs/tui/src/app/agents_overview_tests.rs index 52d2f9fffe..485a40fb7e 100644 --- a/codex-rs/tui/src/app/agents_overview_tests.rs +++ b/codex-rs/tui/src/app/agents_overview_tests.rs @@ -462,6 +462,17 @@ async fn shared_overview_seeds_once_and_retains_locally_resumed_history() -> Res ) .await?; } + // A newer rollout missing from the index must not trigger a startup filesystem scan. + app_test_support::create_fake_rollout_with_source( + &app.config.codex_home, + "2025-01-23T12-00-00", + "2025-01-23T12:00:00Z", + "Unindexed task", + Some(&app.config.model_provider_id), + /*git_info*/ None, + codex_protocol::protocol::SessionSource::Cli, + ) + .expect("materialize unindexed session"); app.app_server_target = AppServerTarget::LocalDaemon { endpoint: crate::RemoteAppServerEndpoint::UnixSocket { socket_path: test_path_buf("/tmp/unused.sock").abs(), diff --git a/codex-rs/tui/src/app/agents_overview_threads.rs b/codex-rs/tui/src/app/agents_overview_threads.rs index e0d3e6d087..c7d69d11ea 100644 --- a/codex-rs/tui/src/app/agents_overview_threads.rs +++ b/codex-rs/tui/src/app/agents_overview_threads.rs @@ -197,7 +197,7 @@ impl App { parent_thread_id: None, ancestor_thread_id: None, cwd: None, - use_state_db_only: false, + use_state_db_only: true, search_term: None, }, })