From 64b6e8ba0fd47828b6cf2917f520ca9962c15df5 Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Fri, 5 Sep 2025 23:35:28 +0200 Subject: [PATCH] debugger: Fix allow showing more than 1 compact session item (#37036) Closes #36978 This PR fixes an issue that we would only show the first `root -> child` session in compact mode, but the session that came after it, we would only show the child session label instead of also adding the parent label due to compact mode. ## Before Screenshot 2025-08-27 at 22 18 39 ## After Screenshot 2025-08-27 at 21 57 16 With 3 parent + child sessions and one parent session only. Screenshot 2025-08-27 at 22 22 13 cc @cole-miller I know we hacked on this some while ago, so figured you might be the best guy to ask for a review. Release Notes: - Debugger: Fix to allow showing more than 1 compact session item --------- Co-authored-by: Anthony --- crates/debugger_ui/src/dropdown_menus.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/crates/debugger_ui/src/dropdown_menus.rs b/crates/debugger_ui/src/dropdown_menus.rs index c611d5d44f36b4eafb578a400da615bbd96b4cd2..376a4a41ce7b03cd07f578d85f641a6ddfc4ebe8 100644 --- a/crates/debugger_ui/src/dropdown_menus.rs +++ b/crates/debugger_ui/src/dropdown_menus.rs @@ -113,23 +113,6 @@ impl DebugPanel { } }; session_entries.push(root_entry); - - session_entries.extend( - sessions_with_children - .by_ref() - .take_while(|(session, _)| { - session - .read(cx) - .session(cx) - .read(cx) - .parent_id(cx) - .is_some() - }) - .map(|(session, _)| SessionListEntry { - leaf: session.clone(), - ancestors: vec![], - }), - ); } let weak = cx.weak_entity();