From a42241d8e5fafadaa1274de1479b15602b3a3cb4 Mon Sep 17 00:00:00 2001 From: Thomas Petersen Date: Mon, 4 May 2026 20:27:56 -0400 Subject: [PATCH] Refine inbox message list chrome Co-authored-by: Cursor --- desktop/src/features/home/ui/HomeView.tsx | 14 ++---------- .../src/features/home/ui/InboxListPane.tsx | 22 +++---------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/desktop/src/features/home/ui/HomeView.tsx b/desktop/src/features/home/ui/HomeView.tsx index f47186a535..8280e61796 100644 --- a/desktop/src/features/home/ui/HomeView.tsx +++ b/desktop/src/features/home/ui/HomeView.tsx @@ -79,7 +79,6 @@ export function HomeView({ onRefresh, }: HomeViewProps) { const [filter, setFilter] = React.useState("all"); - const [searchValue, setSearchValue] = React.useState(""); const [selectedItemId, setSelectedItemId] = React.useState(null); const [isDeletingMessage, setIsDeletingMessage] = React.useState(false); const [isSendingReply, setIsSendingReply] = React.useState(false); @@ -158,17 +157,10 @@ export function HomeView({ [currentPubkey, feed, feedProfiles], ); const filteredItems = React.useMemo(() => { - const normalizedQuery = searchValue.trim().toLowerCase(); - return inboxItems.filter((item) => { - const matchesFilter = matchesInboxFilter(item, filter); - const matchesQuery = - normalizedQuery.length === 0 || - item.searchableText.includes(normalizedQuery); - - return matchesFilter && matchesQuery; + return matchesInboxFilter(item, filter); }); - }, [filter, inboxItems, searchValue]); + }, [filter, inboxItems]); const selectedItem = filteredItems.find((item) => item.id === selectedItemId) ?? null; const threadReplies = React.useMemo( @@ -281,12 +273,10 @@ export function HomeView({ filter={filter} items={filteredItems} onFilterChange={setFilter} - onSearchChange={setSearchValue} onSelect={(itemId) => { setSelectedItemId(itemId); markDone(itemId); }} - searchValue={searchValue} selectedId={selectedItemId} /> diff --git a/desktop/src/features/home/ui/InboxListPane.tsx b/desktop/src/features/home/ui/InboxListPane.tsx index 7bc5a7cad9..fccfafe55f 100644 --- a/desktop/src/features/home/ui/InboxListPane.tsx +++ b/desktop/src/features/home/ui/InboxListPane.tsx @@ -1,10 +1,9 @@ -import { Inbox, Search } from "lucide-react"; +import { Inbox } from "lucide-react"; import type { InboxFilter, InboxItem } from "@/features/home/lib/inbox"; import { groupInboxItems } from "@/features/home/lib/inbox"; import { cn } from "@/shared/lib/cn"; import { Button } from "@/shared/ui/button"; -import { Input } from "@/shared/ui/input"; import { UserAvatar } from "@/shared/ui/UserAvatar"; const FILTER_OPTIONS: Array<{ label: string; value: InboxFilter }> = [ @@ -20,9 +19,7 @@ type InboxListPaneProps = { filter: InboxFilter; items: InboxItem[]; onFilterChange: (filter: InboxFilter) => void; - onSearchChange: (value: string) => void; onSelect: (itemId: string) => void; - searchValue: string; selectedId: string | null; }; @@ -31,9 +28,7 @@ export function InboxListPane({ filter, items, onFilterChange, - onSearchChange, onSelect, - searchValue, selectedId, }: InboxListPaneProps) { const groups = groupInboxItems(items); @@ -53,17 +48,6 @@ export function InboxListPane({ Inbox -
- - onSearchChange(event.target.value)} - placeholder="Search mail" - value={searchValue} - /> -
-
{FILTER_OPTIONS.map((option) => (
) : ( groups.map((group) => ( -
+

{group.label}