[Search] Ensure /search page works end-to-end with all content types
Task ID: f46fa52a-2cf9-41c0-ad2f-a99b50026bbc
Layer: UI/Search
Priority: 90
Goal
Verify and fix the /search page to return results for all content types: hypotheses, analyses, wiki pages, entities, experiments, targets, papers, debates, and knowledge gaps.
Current State
- /search page renders with interactive search (autocomplete, type filters, score filter, date filter)
- /api/search returns FTS5-ranked results for 8 content types
- Knowledge gaps (41 records) are NOT searched by the running API — gap search code is missing
- All other types (hypotheses, analyses, entities, experiments, targets, wiki_pages, papers, debates) work correctly
- Result links all resolve to 200
Acceptance Criteria
☑ Hypotheses appear in search results
☑ Analyses appear in search results
☑ Wiki pages appear in search results
☑ Entities appear in search results
☑ Experiments appear in search results
☑ Targets appear in search results
☑ Papers appear in search results
☑ Debates appear in search results
☑ Knowledge gaps appear in search results (fix: add gap search to api_search)
☑ Type filter dropdown works for all types
☑ Result links navigate to correct pages (all return 200)
☑ Search analytics sidebar loads
Work Log
2026-04-02 18:30 PT — Slot 14
- Tested all search endpoints and content types
- Found knowledge_gaps search missing from running API (present in worktree but not in main)
- Verified all 8 other content types work correctly with FTS5 + LIKE fallback
- Verified result links all return 200
- Verified search page JS handles type filters, score filters, URL params correctly
- Gap search code already in worktree api.py — will be added to main on merge