From 554ecaed62e00e9214035b1c8dd079341dcae3c1 Mon Sep 17 00:00:00 2001 From: Tyler Longwell Date: Fri, 19 Jun 2026 14:25:19 -0400 Subject: [PATCH 1/6] desktop: move global search into sidebar header and remove vestigial top band Move the global search out of the center-column topbar into the pinned sidebar header (search on top, Home/nav below, always visible above the scroll region), anchoring the results popover to the sidebar column. With search gone from the topbar, remove the now-empty ~40px chrome inset above the channel and thread/aux pane headers so they sit flush at the top. The macOS window-controls row and the sidebar's own top-chrome inset are preserved; window drag/maximize is unchanged (a window-global top-44px handler, untouched here). Home/inbox panes keep their inset via the default-off `flush` prop on TopChromeInsetHeader. Co-authored-by: Tyler Longwell Signed-off-by: Tyler Longwell --- desktop/src/app/AppShell.tsx | 16 +-- desktop/src/app/AppShellContext.tsx | 4 - desktop/src/app/AppTopChrome.tsx | 99 ------------------- .../features/channels/ui/ChannelScreen.tsx | 7 -- .../channels/ui/RightAuxiliaryPane.tsx | 11 +-- desktop/src/features/chat/ui/ChatHeader.tsx | 3 +- .../src/features/search/ui/TopbarSearch.tsx | 18 +++- .../src/features/sidebar/ui/AppSidebar.tsx | 53 +++++++++- .../shared/layout/AuxiliaryPanelHeader.tsx | 3 +- .../shared/layout/TopChromeInsetHeader.tsx | 13 ++- desktop/src/shared/ui/ViewLoadingFallback.tsx | 15 +-- desktop/tests/e2e/messaging.spec.ts | 7 +- desktop/tests/e2e/smoke.spec.ts | 35 +++++-- 13 files changed, 113 insertions(+), 171 deletions(-) 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 ( -