fix: split search into explicit keyword/mood modes (#1310)
the Cmd+K modal was firing keyword and semantic (mood) searches in
parallel whenever the vibe-search flag was on, then merging both lists
by score (#858). BM25 relevance and cosine similarity are on different
scales — the sort produced jarring interleaves where mediocre semantic
matches outranked solid keyword hits.
revert to the #848 interaction model: explicit mode toggle, one mode at
a time. keyword is the default. flagged users can flip to mood when
they want it; the toggle is hidden for everyone else so there's no
change for non-flagged users.
- search.svelte.ts: add mode state, setMode(), stale-mode guards on
in-flight fetches. activeResults returns just the active mode's list.
drop dedupedSemanticResults / semanticResultIds / semanticSimilarityMap.
- SearchModal.svelte: render a small keyword/mood chip toggle below the
input, gated on search.semanticEnabled. placeholder copy follows the
active mode. mood similarity % only renders in semantic mode.
arc for the record: toggle (#848) → parallel + separator (#851) →
score-merged interleave (#858) → toggle again. #851/#858 were the wrong
direction given how uneven semantic ranking still is.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
authored by