Files
CatoandClaude Opus 5.5 2aab6374d0 feat(search): one grouped index with instant results, typo tolerance and highlights (#79)
* feat(search): one grouped index with instant results, typo tolerance and highlights

- lib/search.ts: one index over every entity plus events, evidence
  candidates and glossary terms; ranks name > aliases > body with
  prefix matching and edit-distance correction for unknown words;
  highlighted titles and snippets; per-type counts.
- /api/search for the header's instant results; header box becomes a
  combobox (up/down, Enter, Esc, '/' to focus).
- /search: live as you type, grouped by type, clickable type filters.
- Events get anchors so a search hit can land on the event.
- test/search.test.ts: 21 query -> top-result pairs from the real corpus.

lib/research-index.ts and chat retrieval are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(search): rank half-typed words by their common completion; no URLs in snippets

A prefix is weighted as its commonest completion, so 'gallium ch' finds
China before Chalco. Source URLs are stripped from the search text, and a
hit whose name already matched shows its description, not a passage.
Keyboard hints only show where there is a keyboard.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 02:08:43 -07:00
..