fix: remove panics and unblock flows
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

This commit is contained in:
2026-11-25 03:20:40 +07:00
parent 0fd8ea12fb
commit 3f64b36ff4
52 changed files with 753 additions and 567 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
mod profile;
use gpui::{App, AppContext};
pub use profile::{Profile, ProfileDirectory, ProfileEvent, ProfileStore};
pub use profile::{Profile, ProfileDirectory, ProfileStore};
/// Initialize the global profile store.
pub fn init(cx: &mut App) {
+7
View File
@@ -320,6 +320,7 @@ impl ProfileDirectory {
Ok::<_, anyhow::Error>(Profile::latest_profiles(events))
});
self.tasks.retain(|task| !task.is_ready());
self.tasks.push(cx.spawn(async move |this, cx| {
let loaded = work.await;
@@ -335,6 +336,12 @@ impl ProfileDirectory {
}
Err(e) => {
log::warn!("failed to load profiles from the database: {e}");
// A failed query must not pin these keys forever.
this.with_pending(|pending| {
for key in &keys {
pending.remove(key);
}
});
keys
}
};