From 5278e17de7c50939cb1953d294ac23c73efada42 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Tue, 4 Aug 2026 11:51:11 -0600 Subject: [PATCH] project: Compare WorktreePaths by pairing, not by path sets (#62144) # Objective - Prevent changed main/folder associations from being skipped during thread metadata updates. ## Solution - Compare WorktreePaths as ordered main/folder pairs. - Keep PathList equality order-insensitive. ## Testing - cargo test -p project test_worktree_paths_equality_compares_pairings ## Self-Review Checklist: - [x] I have reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed UI standards - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - N/A --- crates/project/src/worktree_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/worktree_store.rs b/crates/project/src/worktree_store.rs index 89aeeb76c0..2158480bcc 100644 --- a/crates/project/src/worktree_store.rs +++ b/crates/project/src/worktree_store.rs @@ -50,7 +50,7 @@ pub struct WorktreePaths { impl PartialEq for WorktreePaths { fn eq(&self, other: &Self) -> bool { - self.paths == other.paths && self.main_paths == other.main_paths + self.ordered_pairs().eq(other.ordered_pairs()) } }