From 54f12d1ae1af9f19e3fb2e15512a306b992bd89e Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Mon, 23 Mar 2026 17:57:12 +0100 Subject: [PATCH] Log when migrating thread metadata in `ThreadMetadataStore` (#52230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Context This will make it easier to diagnose issues if any come up when migrating thread metadata for the sidebar ## How to Review ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --- crates/agent_ui/src/thread_metadata_store.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/agent_ui/src/thread_metadata_store.rs b/crates/agent_ui/src/thread_metadata_store.rs index ee34305e946284629b72f979a3967956ffe0af96..ae6c5b0b74240b95e61a3c1a6ee9f0533aaed5bb 100644 --- a/crates/agent_ui/src/thread_metadata_store.rs +++ b/crates/agent_ui/src/thread_metadata_store.rs @@ -83,12 +83,16 @@ fn migrate_thread_metadata(cx: &mut App) { .collect::>() }); + log::info!("Migrating {} thread store entries", metadata.len()); + // Manually save each entry to the database and call reload, otherwise // we'll end up triggering lots of reloads after each save for entry in metadata { db.save(entry).await?; } + log::info!("Finished migrating thread store entries"); + let _ = store.update(cx, |store, cx| store.reload(cx)); Ok(()) })