mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 20:32:27 +00:00
Audit found the search pipeline largely real (token parser, local + NIP-50 relay search, enforced author/tag/date/has/nsfw/kind filters, wired modal) with dead spots, now fixed: - sort: offered in the modal but never applied. New pure sortSearchResults — recent (default), views (shared view-count cache), trending (views weighted by recency), longest — applied in searchView. - duration filter only read nip71.duration, so bitvid's OWN kind-30078 videos (top-level duration) never matched. Both video types now satisfy duration filters; same shapes cover the planned live (30311) / shorts kinds. - textScope now enforced in the local title/description match (all|title|description). - relay: now scopes the video relay-search to that relay (was parsed-but-unused). - FEATURE_SEARCH_FILTERS removed: dev-only flag consumed by NOTHING while the filter UI ships and works everywhere (plumbing + setter deleted, no consumers). Tests (tests/search-filters.test.mjs, 4 — surface previously had zero): parser tokens; matcher enforces tags/date/has:magnet/duration for BOTH duration shapes; views/longest/recent sorts (no input mutation); trending ranks fresh-riser above stale-hit. Lint + build green. Co-Authored-By: Claude Opus 4.8 <[email protected]>