From 8b20b93b002bac7821a645ea2abc2964b7a6c9f7 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 26 Mar 2026 11:15:37 -0400 Subject: [PATCH] Remove sidebar whitespace churn --- crates/sidebar/Cargo.toml | 3 --- crates/sidebar/src/sidebar.rs | 8 -------- 2 files changed, 11 deletions(-) diff --git a/crates/sidebar/Cargo.toml b/crates/sidebar/Cargo.toml index d76651e9f2440c4810e9615c3c57b519d4765995..a1b621674955d1ef2e2a105c25be18b0861fdd56 100644 --- a/crates/sidebar/Cargo.toml +++ b/crates/sidebar/Cargo.toml @@ -23,7 +23,6 @@ agent_ui.workspace = true anyhow.workspace = true chrono.workspace = true db.workspace = true - editor.workspace = true feature_flags.workspace = true fs.workspace = true @@ -36,7 +35,6 @@ serde.workspace = true serde_json.workspace = true settings.workspace = true theme.workspace = true - ui.workspace = true util.workspace = true vim_mode_setting.workspace = true @@ -50,7 +48,6 @@ agent_ui = { workspace = true, features = ["test-support"] } assistant_text_thread = { workspace = true, features = ["test-support"] } db.workspace = true editor.workspace = true - language_model = { workspace = true, features = ["test-support"] } pretty_assertions.workspace = true prompt_store.workspace = true diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs index 25306c08e6c518bc56118bb1681ad975ce0f5f7e..d67ab7f4526422e4ad6a28739e6a61a6e7ebe23c 100644 --- a/crates/sidebar/src/sidebar.rs +++ b/crates/sidebar/src/sidebar.rs @@ -12,12 +12,10 @@ use chrono::Utc; use db::kvp::KeyValueStore; use editor::Editor; use feature_flags::{AgentV2FeatureFlag, FeatureFlagViewExt as _}; - use gpui::{ Action as _, AnyElement, App, Context, Entity, FocusHandle, Focusable, ListState, Pixels, Render, SharedString, Task, WeakEntity, Window, WindowHandle, list, prelude::*, px, }; - use menu::{ Cancel, Confirm, SelectChild, SelectFirst, SelectLast, SelectNext, SelectParent, SelectPrevious, }; @@ -28,7 +26,6 @@ use ui::utils::platform_title_bar_height; use serde::{Deserialize, Serialize}; use settings::Settings as _; use std::collections::{HashMap, HashSet}; - use std::mem; use std::path::Path; use std::rc::Rc; @@ -40,7 +37,6 @@ use ui::{ }; use util::path_list::PathList; use util::{ResultExt as _, TryFutureExt as _}; - use workspace::{ AddFolderToProject, FocusWorkspaceSidebar, MultiWorkspace, MultiWorkspaceEvent, Open, SerializedPathList, Sidebar as WorkspaceSidebar, ToggleWorkspaceSidebar, Workspace, @@ -258,7 +254,6 @@ fn load_collapsed_groups(kvp: &KeyValueStore) -> HashSet { } /// The sidebar re-derives its entire entry list from scratch on every - /// change via `update_entries` → `rebuild_contents`. Avoid adding /// incremental or inter-event coordination state — if something can /// be computed from the current world state, compute it in the rebuild. @@ -269,7 +264,6 @@ pub struct Sidebar { filter_editor: Entity, list_state: ListState, contents: SidebarContents, - /// The index of the list item that currently has the keyboard focus /// /// Note: This is NOT the same as the active item. @@ -285,7 +279,6 @@ pub struct Sidebar { collapsed_groups: HashSet, expanded_groups: HashMap, pending_serialization: Task>, - view: SidebarView, recent_projects_popover_handle: PopoverMenuHandle, project_header_menu_ix: Option, @@ -381,7 +374,6 @@ impl Sidebar { collapsed_groups, expanded_groups: HashMap::new(), pending_serialization: Task::ready(None), - view: SidebarView::default(), recent_projects_popover_handle: PopoverMenuHandle::default(), project_header_menu_ix: None,