From 9bde08c2d5f2ffee7adcadf463365494bca2e754 Mon Sep 17 00:00:00 2001 From: Tristan Michael Date: Fri, 3 Apr 2026 16:57:45 -0700 Subject: [PATCH] feat: sort workspaces and prevent redundant switches Sort workspace names alphabetically in the drawer for better organization. Add a check to prevent switching to the currently active workspace, avoiding unnecessary operations and improving user experience. --- apps/tauri/src/lib/screens/TasksScreen.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tauri/src/lib/screens/TasksScreen.svelte b/apps/tauri/src/lib/screens/TasksScreen.svelte index f22d91f..a21a39a 100644 --- a/apps/tauri/src/lib/screens/TasksScreen.svelte +++ b/apps/tauri/src/lib/screens/TasksScreen.svelte @@ -204,7 +204,7 @@ if (isDesktop) appWindow.startDragging(); } - let workspaceNames = $derived(app.config ? Object.keys(app.config.workspaces) : []); + let workspaceNames = $derived(app.config ? Object.keys(app.config.workspaces).sort((a, b) => a.localeCompare(b)) : []); let translateX = $derived(showDrawer ? '0' : '-80cqi'); @@ -244,7 +244,7 @@ {@const ws = app.config?.workspaces[name]}