this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide search input until search is rebuilt on the SDK

The current SearchResults filters useDocumentsStore.items, which only
contains the currently-loaded directory's entries. Full-tree and inbox
search were stripped in the WASM security-boundary migration and have
not been reinstated, so the feature ships half-working. Drop the search
inputs from TopBar and Sidebar until a proper SDK-backed search lands.

Route, component, store, and hook are retained — un-hiding is a
three-line revert to these two files.

+5 -58
+2 -28
apps/web/src/components/cabinet/Sidebar.tsx
··· 3 3 UsersIcon, 4 4 BookOpenIcon, 5 5 GearIcon, 6 - MagnifyingGlassIcon, 7 - XIcon, 8 6 PlusIcon, 9 7 ArrowsClockwiseIcon, 10 8 } from "@phosphor-icons/react"; ··· 12 10 import { OpakeLogo } from "../OpakeLogo"; 13 11 import { useAppStore } from "@/stores/app"; 14 12 import { useWorkspaceStore } from "@/stores/workspace"; 15 - import { useSearchInput } from "@/hooks/useSearchInput"; 16 13 import { SidebarItem } from "./SidebarItem"; 17 14 import { rkeyFromUri } from "@/lib/atUri"; 18 15 ··· 37 34 const workspaces = useWorkspaceStore((s) => s.workspaces); 38 35 const workspaceError = useWorkspaceStore((s) => s.error); 39 36 const matchRoute = useMatchRoute(); 40 - const { 41 - query: searchQuery, 42 - handleChange: handleSearchChange, 43 - handleClear: handleSearchClear, 44 - } = useSearchInput(); 45 37 46 38 const workspaceEntries = Object.values(workspaces); 47 39 ··· 54 46 </Link> 55 47 </div> 56 48 57 - {/* Search — mobile only */} 58 - <label className="input input-bordered border-base-300/50 bg-base-100/80 text-ui mb-3 flex items-center gap-2 rounded-lg py-1.75 md:hidden"> 59 - <MagnifyingGlassIcon size={13} className="text-text-faint" /> 60 - <input 61 - type="text" 62 - placeholder="Search…" 63 - value={searchQuery} 64 - onChange={(e) => handleSearchChange(e.target.value)} 65 - className="text-secondary grow bg-transparent" 66 - /> 67 - {searchQuery && ( 68 - <button 69 - onClick={handleSearchClear} 70 - className="btn btn-ghost btn-xs text-text-faint p-0" 71 - aria-label="Clear search" 72 - > 73 - <XIcon size={12} /> 74 - </button> 75 - )} 76 - </label> 49 + {/* Search input: hidden until full-tree/inbox search is rebuilt on the 50 + SDK (current implementation only filters the loaded directory). */} 77 51 78 52 {/* Main nav */} 79 53 <nav className="flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto">
+3 -30
apps/web/src/components/cabinet/TopBar.tsx
··· 1 1 import { useCallback, useEffect, useRef, useState } from "react"; 2 2 import { createPortal } from "react-dom"; 3 - import { 4 - MagnifyingGlassIcon, 5 - XIcon, 6 - BellIcon, 7 - KeyIcon, 8 - GearIcon, 9 - SignOutIcon, 10 - } from "@phosphor-icons/react"; 3 + import { BellIcon, KeyIcon, GearIcon, SignOutIcon } from "@phosphor-icons/react"; 11 4 import { Link } from "@tanstack/react-router"; 12 5 import { DropdownMenu } from "@/components/DropdownMenu"; 13 6 import { OpakeLogo } from "@/components/OpakeLogo"; 14 7 import { MobileMenuIcon } from "./MobileMenuIcon"; 15 8 import { useAuthStore } from "@/stores/auth"; 16 9 import { useAppStore } from "@/stores/app"; 17 - import { useSearchInput } from "@/hooks/useSearchInput"; 18 10 import { truncateDid } from "@/lib/format"; 19 11 20 12 interface TopBarProps { ··· 23 15 } 24 16 25 17 export function TopBar({ onMenuToggle, menuOpen = false }: TopBarProps) { 26 - const { 27 - query: searchQuery, 28 - handleChange: handleSearchChange, 29 - handleClear: handleSearchClear, 30 - } = useSearchInput(); 31 18 const session = useAuthStore((s) => s.session); 32 19 const logout = useAuthStore((s) => s.logout); 33 20 ··· 71 58 </div> 72 59 )} 73 60 74 - {/* Search — hidden on mobile (lives in sidebar instead) */} 75 - <label className="input input-bordered border-base-300/50 bg-base-100/80 text-ui hidden max-w-90 flex-1 items-center gap-2 rounded-lg py-1.75 md:flex"> 76 - <MagnifyingGlassIcon size={13} className="text-text-faint" /> 77 - <input 78 - type="text" 79 - placeholder="Search your cabinet…" 80 - value={searchQuery} 81 - onChange={(e) => handleSearchChange(e.target.value)} 82 - className="text-secondary grow bg-transparent" 83 - /> 84 - {searchQuery && ( 85 - <button onClick={handleSearchClear} className="btn btn-ghost btn-xs text-text-faint p-0"> 86 - <XIcon size={12} /> 87 - </button> 88 - )} 89 - </label> 61 + {/* Search input: hidden until full-tree/inbox search is rebuilt on the 62 + SDK (current implementation only filters the loaded directory). */} 90 63 91 64 <div className="flex-1" /> 92 65