From c488d8452c50f882a28b3f09224f3c6a30fb1b47 Mon Sep 17 00:00:00 2001 From: Tyler <109685178+tlongwell-block@users.noreply.github.com> Date: Fri, 19 Jun 2026 17:08:41 -0400 Subject: [PATCH] desktop: move global search into sidebar header and remove vestigial top band (#1150) Signed-off-by: Tyler Longwell Co-authored-by: Tyler Longwell --- desktop/src/app/AppShell.tsx | 16 +-- desktop/src/app/AppShellContext.tsx | 4 - desktop/src/app/AppTopChrome.tsx | 99 ------------------- desktop/src/app/routes/agents.tsx | 4 +- .../src/app/routes/projects.$projectId.tsx | 4 +- desktop/src/app/routes/projects.tsx | 4 +- .../src/app/routes/workflows.$workflowId.tsx | 4 +- desktop/src/app/routes/workflows.tsx | 4 +- .../src/features/agents/ui/AgentsScreen.tsx | 2 - desktop/src/features/agents/ui/AgentsView.tsx | 9 +- .../features/channels/ui/ChannelScreen.tsx | 7 -- .../channels/ui/RightAuxiliaryPane.tsx | 11 +-- .../src/features/home/ui/HomeLoadingState.tsx | 4 +- desktop/src/features/home/ui/HomeView.tsx | 7 +- .../src/features/home/ui/InboxDetailPane.tsx | 2 +- .../src/features/home/ui/InboxListPane.tsx | 2 +- .../projects/ui/ProjectDetailScreen.tsx | 11 ++- .../features/projects/ui/ProjectsScreen.tsx | 2 - .../src/features/projects/ui/ProjectsView.tsx | 9 +- .../src/features/search/ui/TopbarSearch.tsx | 18 +++- .../src/features/sidebar/ui/AppSidebar.tsx | 53 +++++++++- .../features/workflows/ui/WorkflowsView.tsx | 9 +- .../shared/layout/AuxiliaryPanelHeader.tsx | 3 +- .../shared/layout/TopChromeInsetHeader.tsx | 13 ++- desktop/src/shared/ui/ViewLoadingFallback.tsx | 31 +++--- desktop/tests/e2e/messaging.spec.ts | 7 +- desktop/tests/e2e/smoke.spec.ts | 35 +++++-- 27 files changed, 170 insertions(+), 204 deletions(-) diff --git a/desktop/src/app/AppShell.tsx b/desktop/src/app/AppShell.tsx index f8e29c7c87..548e9a86e9 100644 --- a/desktop/src/app/AppShell.tsx +++ b/desktop/src/app/AppShell.tsx @@ -101,8 +101,6 @@ export function AppShell() { const [isChannelManagementOpen, setIsChannelManagementOpen] = React.useState(false); const [searchFocusRequest, setSearchFocusRequest] = React.useState(0); - const [topbarSearchHidden, setTopbarSearchHidden] = React.useState(false); - const [topbarSearchLoading, setTopbarSearchLoading] = React.useState(false); const [browseDialogType, setBrowseDialogType] = React.useState(null); const [isNewDmOpen, setIsNewDmOpen] = React.useState(false); @@ -709,8 +707,6 @@ export function AppShell() { unfollowThread: handleUnfollowThread, isFollowingThread, isNotifiedForThread, - setTopbarSearchHidden, - setTopbarSearchLoading, threadActivityItems, }} > @@ -731,17 +727,8 @@ export function AppShell() { { - void goChannel(channelId); - }} - onOpenResult={handleOpenSearchResult} - searchHidden={topbarSearchHidden} - searchLoading={topbarSearchLoading} - searchFocusRequest={searchFocusRequest} /> ) : null} {settingsOpen ? ( @@ -876,6 +863,9 @@ export function AppShell() { onSelectChannel={(channelId) => void goChannel(channelId) } + onOpenSearchResult={handleOpenSearchResult} + searchChannels={channels} + searchFocusRequest={searchFocusRequest} onSelectHome={() => void goHome()} onSelectProjects={() => void goProjects()} onSelectPulse={() => void goPulse()} diff --git a/desktop/src/app/AppShellContext.tsx b/desktop/src/app/AppShellContext.tsx index bd27e3019f..3a34c881ce 100644 --- a/desktop/src/app/AppShellContext.tsx +++ b/desktop/src/app/AppShellContext.tsx @@ -31,8 +31,6 @@ type AppShellContextValue = { unfollowThread: (rootId: string) => void; isFollowingThread: (rootId: string) => boolean; isNotifiedForThread: (rootId: string) => boolean; - setTopbarSearchHidden: (hidden: boolean) => void; - setTopbarSearchLoading: (loading: boolean) => void; threadActivityItems: ThreadActivityItem[]; }; @@ -51,8 +49,6 @@ const AppShellContext = React.createContext({ unfollowThread: () => {}, isFollowingThread: () => false, isNotifiedForThread: () => false, - setTopbarSearchHidden: () => {}, - setTopbarSearchLoading: () => {}, threadActivityItems: [], }); diff --git a/desktop/src/app/AppTopChrome.tsx b/desktop/src/app/AppTopChrome.tsx index 29457553bf..1b010f2312 100644 --- a/desktop/src/app/AppTopChrome.tsx +++ b/desktop/src/app/AppTopChrome.tsx @@ -6,97 +6,16 @@ import { } from "lucide-react"; import * as React from "react"; -import { TopbarSearch } from "@/features/search/ui/TopbarSearch"; -import type { Channel, SearchHit } from "@/shared/api/types"; -import { cn } from "@/shared/lib/cn"; import { Button } from "@/shared/ui/button"; import { useOptionalSidebar } from "@/shared/ui/sidebar"; -import { Skeleton } from "@/shared/ui/skeleton"; type AppTopChromeProps = { canGoBack: boolean; canGoForward: boolean; - channels: Channel[]; - currentPubkey?: string; onGoBack: () => void; onGoForward: () => void; - onOpenChannel: (channelId: string) => void; - onOpenResult: (hit: SearchHit) => void; - searchHidden?: boolean; - searchFocusRequest: number; - searchLoading?: boolean; }; -function GlobalTopDivider() { - const sidebar = useOptionalSidebar(); - const state = sidebar?.state ?? "collapsed"; - - return ( -