[UI] Add universal search bar with autocomplete to navigation
Task ID: f949d28f-175e-4e2e-8e00-96ad096f8453
Type: One-shot
Priority: 90
Goal
Add a search bar to the global navigation so users can quickly search for hypotheses, genes, wiki pages, and analyses from any page.
Acceptance Criteria
☑ Search input in top navigation bar
☑ Autocomplete dropdown with debounced queries (250ms)
☑ Results show type (color-coded), title, and link
☑ Enter key navigates to /search?q=...
☑ "View all results" link at bottom of dropdown
☑ Mobile responsive (search bar fills available width)
Work Log
2026-04-02 10:45 PT — Slot 20
- Added search bar between SciDEX logo and nav links in nav_html()
- Uses /api/search endpoint with limit=8 for autocomplete
- Color-coded result types (hypothesis=green, analysis=blue, wiki=purple, entity=yellow, paper=red)
- Debounced 250ms input handler, minimum 2 chars
- Enter key submits full search
- Mobile: search bar fills width, results dropdown stretches near full-width
- Syntax verified OK