diff --git a/desktop/src/app/AppShell.tsx b/desktop/src/app/AppShell.tsx index 6e8882c0f2..79c0d6bcf9 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 ? ( @@ -875,6 +862,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 ( -