diff --git a/desktop/src/features/home/lib/inbox.ts b/desktop/src/features/home/lib/inbox.ts index 83ccc019c8..2bca6ffa88 100644 --- a/desktop/src/features/home/lib/inbox.ts +++ b/desktop/src/features/home/lib/inbox.ts @@ -30,7 +30,6 @@ export type InboxItem = { latestActivityAt: number; mentionNames: string[]; preview: string; - searchableText: string; senderLabel: string; subject: string; timestampLabel: string; @@ -328,16 +327,6 @@ export function buildInboxItems({ latestActivityAt: group.latestActivityAt, mentionNames, preview, - searchableText: [ - senderLabel, - subject, - preview, - ...group.items.map(feedPreview), - channelLabel ?? "", - categoryLabel, - ] - .join(" ") - .toLowerCase(), senderLabel, subject, timestampLabel: formatInboxTimestamp(group.latestActivityAt), diff --git a/desktop/src/features/home/ui/HomeView.tsx b/desktop/src/features/home/ui/HomeView.tsx index e282c4a531..a9509aa3df 100644 --- a/desktop/src/features/home/ui/HomeView.tsx +++ b/desktop/src/features/home/ui/HomeView.tsx @@ -102,7 +102,6 @@ export function HomeView({ onRefresh, }: HomeViewProps) { const [filter, setFilter] = React.useState("all"); - const [searchValue, setSearchValue] = React.useState(""); const [selectedItemId, setSelectedItemId] = React.useState( null, ); @@ -171,17 +170,8 @@ 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; - }); - }, [filter, inboxItems, searchValue]); + return inboxItems.filter((item) => matchesInboxFilter(item, filter)); + }, [filter, inboxItems]); const selectedItem = filteredItems.find((item) => item.id === selectedItemId) ?? null; const contextMessages = React.useMemo(() => { @@ -299,12 +289,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 ab1a1a0716..ac94f0aa8c 100644 --- a/desktop/src/features/home/ui/InboxListPane.tsx +++ b/desktop/src/features/home/ui/InboxListPane.tsx @@ -1,9 +1,6 @@ -import { Search } from "lucide-react"; - import type { InboxFilter, InboxItem } 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 }> = [ @@ -19,9 +16,7 @@ type InboxListPaneProps = { filter: InboxFilter; items: InboxItem[]; onFilterChange: (filter: InboxFilter) => void; - onSearchChange: (value: string) => void; onSelect: (itemId: string) => void; - searchValue: string; selectedId: string | null; }; @@ -30,26 +25,13 @@ export function InboxListPane({ filter, items, onFilterChange, - onSearchChange, onSelect, - searchValue, selectedId, }: InboxListPaneProps) { return (
-
-
- - onSearchChange(event.target.value)} - placeholder="Search mail" - value={searchValue} - /> -
- -
+
+
{FILTER_OPTIONS.map((option) => (