feat(search): add header global search (Phase A) — cases + precedents + docs
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 41s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 41s
Adds an always-visible debounced search input in the AppShell header that fans out to three independent sources in parallel and renders per-source result groups with their own loading/empty/error states: - /api/search/cases (NEW): SQL ILIKE on case_number, address, parties, title, subject. Returns small projections, no embeddings needed. - /api/precedent-library/search (existing): semantic over case-law halachot + passages. - /api/search (existing): semantic over case documents + past decisions. Cmd/Ctrl+K focuses the input; Esc and click-outside close the panel. This is Phase A of the header redesign — the bar layout itself is unchanged; row grouping + dynamic context follow in Phase B. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { GlobalSearch } from "@/components/global-search";
|
||||
|
||||
type AgentBoard = {
|
||||
prefix: string;
|
||||
@@ -83,7 +84,7 @@ export function AppShell({ children }: { children: ReactNode }) {
|
||||
</Link>
|
||||
|
||||
<nav
|
||||
className="me-auto flex items-center gap-1"
|
||||
className="flex items-center gap-1"
|
||||
aria-label="ניווט ראשי"
|
||||
>
|
||||
{NAV_ITEMS.map((item) => {
|
||||
@@ -114,6 +115,10 @@ export function AppShell({ children }: { children: ReactNode }) {
|
||||
})}
|
||||
</nav>
|
||||
|
||||
<div className="flex-1 min-w-0 max-w-[460px] mx-4 flex justify-center">
|
||||
<GlobalSearch />
|
||||
</div>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger
|
||||
className="
|
||||
|
||||
Reference in New Issue
Block a user