From d77b111b1531a7f2992ab7b60edb975549707b4f Mon Sep 17 00:00:00 2001 From: thomaspblock Date: Fri, 29 May 2026 11:26:41 -0400 Subject: [PATCH] Update desktop navigation chrome and search (#779) Co-authored-by: Cursor --- bin/{.pnpm-11.1.3.pkg => .pnpm-11.4.0.pkg} | 0 bin/pnpm | 2 +- desktop/src/app/AppShell.tsx | 59 +--- desktop/src/app/AppShellOverlays.tsx | 26 +- desktop/src/app/AppTopChrome.tsx | 86 +++++ desktop/src/app/routes/index.tsx | 3 + .../src/features/agents/ui/AgentsScreen.tsx | 20 +- .../channels/ui/AgentSessionThreadPanel.tsx | 28 +- .../channels/ui/ChannelMembersBar.tsx | 28 +- .../channels/ui/ChannelScreenHeader.tsx | 4 +- desktop/src/features/chat/ui/ChatHeader.tsx | 55 ++- .../features/home/ui/HomeChannelActions.tsx | 34 ++ .../src/features/home/ui/HomeLoadingState.tsx | 32 ++ desktop/src/features/home/ui/HomeScreen.tsx | 45 +-- desktop/src/features/home/ui/HomeView.tsx | 45 +-- .../src/features/home/ui/InboxDetailPane.tsx | 28 +- .../src/features/home/ui/InboxListPane.tsx | 62 +++- .../messages/ui/MessageThreadPanel.tsx | 37 +- .../projects/ui/ProjectDetailScreen.tsx | 284 +++++++-------- .../features/projects/ui/ProjectsScreen.tsx | 16 +- desktop/src/features/pulse/ui/PulseScreen.tsx | 7 - desktop/src/features/pulse/ui/PulseTabBar.tsx | 2 +- .../src/features/search/ui/SearchDialog.tsx | 332 ------------------ .../src/features/search/ui/TopbarSearch.tsx | 307 ++++++++++++++++ .../src/features/search/useSearchResults.ts | 133 +++++++ .../src/features/sidebar/ui/AppSidebar.tsx | 160 ++++----- .../features/workflows/ui/WorkflowsScreen.tsx | 30 +- .../workspaces/ui/WorkspaceSwitcher.tsx | 233 +++++++----- desktop/tests/e2e/channels.spec.ts | 2 +- desktop/tests/e2e/integration.spec.ts | 4 +- desktop/tests/e2e/messaging.spec.ts | 4 +- desktop/tests/e2e/onboarding.spec.ts | 14 +- desktop/tests/e2e/profile.spec.ts | 16 +- desktop/tests/e2e/smoke.spec.ts | 100 +++--- desktop/tests/e2e/stream.spec.ts | 2 +- package.json | 2 +- 36 files changed, 1246 insertions(+), 996 deletions(-) rename bin/{.pnpm-11.1.3.pkg => .pnpm-11.4.0.pkg} (100%) create mode 100644 desktop/src/app/AppTopChrome.tsx create mode 100644 desktop/src/features/home/ui/HomeChannelActions.tsx create mode 100644 desktop/src/features/home/ui/HomeLoadingState.tsx delete mode 100644 desktop/src/features/search/ui/SearchDialog.tsx create mode 100644 desktop/src/features/search/ui/TopbarSearch.tsx create mode 100644 desktop/src/features/search/useSearchResults.ts diff --git a/bin/.pnpm-11.1.3.pkg b/bin/.pnpm-11.4.0.pkg similarity index 100% rename from bin/.pnpm-11.1.3.pkg rename to bin/.pnpm-11.4.0.pkg diff --git a/bin/pnpm b/bin/pnpm index aeb396c42..c89f2e268 120000 --- a/bin/pnpm +++ b/bin/pnpm @@ -1 +1 @@ -.pnpm-11.1.3.pkg \ No newline at end of file +.pnpm-11.4.0.pkg \ No newline at end of file diff --git a/desktop/src/app/AppShell.tsx b/desktop/src/app/AppShell.tsx index a126f2459..c791acdfe 100644 --- a/desktop/src/app/AppShell.tsx +++ b/desktop/src/app/AppShell.tsx @@ -1,4 +1,3 @@ -import { ChevronLeft, ChevronRight } from "lucide-react"; import * as React from "react"; import { getCurrentWindow } from "@tauri-apps/api/window"; import { useQueryClient } from "@tanstack/react-query"; @@ -9,6 +8,7 @@ import { AppShellOverlays, type BrowseDialogType, } from "@/app/AppShellOverlays"; +import { AppTopChrome } from "@/app/AppTopChrome"; import { useAppNavigation } from "@/app/navigation/useAppNavigation"; import { useBackForwardControls } from "@/app/navigation/useBackForwardControls"; import { useMarkAsReadShortcuts } from "@/app/useMarkAsReadShortcuts"; @@ -62,12 +62,7 @@ import type { Channel, RelayEvent, SearchHit } from "@/shared/api/types"; import { ChannelNavigationProvider } from "@/shared/context/ChannelNavigationContext"; import { hasPrimaryShortcutModifier } from "@/shared/lib/platform"; import { useMessageDeepLinks } from "@/shared/useMessageDeepLinks"; -import { Button } from "@/shared/ui/button"; -import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/shared/ui/sidebar"; +import { SidebarInset, SidebarProvider } from "@/shared/ui/sidebar"; type AppView = | "home" @@ -174,7 +169,7 @@ export function AppShell() { const [isChannelManagementOpen, setIsChannelManagementOpen] = React.useState(false); - const [isSearchOpen, setIsSearchOpen] = React.useState(false); + const [searchFocusRequest, setSearchFocusRequest] = React.useState(0); const [browseDialogType, setBrowseDialogType] = React.useState(null); const [isNewDmOpen, setIsNewDmOpen] = React.useState(false); @@ -365,7 +360,7 @@ export function AppShell() { void refetchChannels(); }, [refetchChannels]); const handleOpenSearch = React.useCallback(() => { - setIsSearchOpen(true); + setSearchFocusRequest((request) => request + 1); void refetchChannels(); }, [refetchChannels]); @@ -400,7 +395,6 @@ export function AppShell() { const handleOpenSettings = React.useCallback( (section: SettingsSection = DEFAULT_SETTINGS_SECTION) => { - setIsSearchOpen(false); setIsChannelManagementOpen(false); setSettingsSection(section); setSettingsOpen(true); @@ -659,36 +653,19 @@ export function AppShell() {
-