aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/config.rs
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-09-08 17:51:59 +0300
committerGitHub <noreply@github.com>2026-09-08 17:51:59 +0300
commit68c7b78ec237034cbb0e21c8666842ed7991641d (patch)
tree3d5a63866fa785a3307959301f3022fa21bff5ed /src/client/shell/config.rs
parentffa0892ef87d927eef78fe8068de4d90201fb20b (diff)
fix: collapse worktree groups with saved machines (#3781)
* fix: collapse worktree groups with saved machines refs #3778 * fix: scope worktree collapse by machine refs #3778 * fix: collapse machines without switching focus refs #3778 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/client/shell/config.rs')
-rw-r--r--src/client/shell/config.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/shell/config.rs b/src/client/shell/config.rs
index e8a9b4bb..36e1051f 100644
--- a/src/client/shell/config.rs
+++ b/src/client/shell/config.rs
@@ -32,6 +32,22 @@ impl ClientShellState {
};
let mut collapsed_groups = self.collapsed_groups.iter().cloned().collect::<Vec<_>>();
collapsed_groups.sort();
+ let mut remote_collapsed_groups = self
+ .remote_collapsed_groups
+ .iter()
+ .filter_map(|(endpoint_id, groups)| {
+ let ClientEndpointId::Ssh(profile_id) = endpoint_id else {
+ return None;
+ };
+ let mut collapsed_groups = groups.iter().cloned().collect::<Vec<_>>();
+ collapsed_groups.sort();
+ (!collapsed_groups.is_empty()).then(|| preferences::ClientRemoteCollapsedGroups {
+ profile_id: profile_id.to_string(),
+ collapsed_groups,
+ })
+ })
+ .collect::<Vec<_>>();
+ remote_collapsed_groups.sort_by(|left, right| left.profile_id.cmp(&right.profile_id));
let preferences = preferences::ClientChromePreferences {
sidebar_width: self.sidebar_width_manual.then_some(self.sidebar_width),
sidebar_section_split: self
@@ -44,6 +60,7 @@ impl ClientShellState {
.agent_panel_sort_manual
.then_some(self.config.agent_panel_sort),
collapsed_groups,
+ remote_collapsed_groups,
};
if let Err(error) = preferences::store(path, preferences) {
self.endpoint_error = Some(error);