Skip to content

Add Global Search with real-time streaming results#2087

Open
samuelclay wants to merge 3 commits intomainfrom
global-search
Open

Add Global Search with real-time streaming results#2087
samuelclay wants to merge 3 commits intomainfrom
global-search

Conversation

@samuelclay
Copy link
Copy Markdown
Owner

Summary

  • New top-level sidebar entry "Global Search" (staff-only) that searches across all feeds on NewsBlur using parallel Celery tasks streaming results back via Socket.IO
  • Three search modes: All words (exact keyword match with stemming false-positive filtering), Any word (OR matching), and Semantic (OpenAI embedding vector search)
  • Segmented controls for feed scope (all feeds / your feeds), match type, and sort order (relevance / date), with search query persisted in URL

Test plan

  • Log in as staff user, verify "Global Search" appears in sidebar with "Staff Only" badge
  • Click Global Search, verify banner with search input and segmented controls renders
  • Search a term, verify results stream in progressively with status updates
  • Verify story content loads when clicking search results
  • Verify search term highlighting in story content
  • Toggle between All words / Any word / Semantic and verify re-search
  • Toggle All feeds / Your feeds and verify scoping
  • Toggle By relevance / By date and verify sort order
  • Verify URL updates with query and reloading the page re-executes search
  • Verify end-of-results indicator shows after search completes
  • Verify non-staff users cannot see the Global Search sidebar entry
  • Test dark mode styling

Generated with Claude Code

samuelclay and others added 3 commits March 14, 2026 22:03
… (Premium Pro)

New top-level sidebar entry for searching across all feeds on NewsBlur.
Kicks off parallel Celery tasks (keyword + vector/semantic) that stream
results back via Redis pub/sub and Socket.IO as they're discovered.

Features:
- Large search banner with integrated Search button at top of story titles
- Segmented controls: All feeds/Your feeds, All words/Any word/Semantic, By relevance/By date
- Progressive results via Socket.IO streaming from background Celery tasks
- OpenAI embedding-based semantic search via DiscoverStory vector queries
- Post-filtering to eliminate stemming false positives on exact keyword matches
- Search query persisted in URL for bookmarking and back/forward navigation
- Search term highlighting in story content and titles
- Full dark mode support
- Staff-only visibility gating

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level `import redis` in tasks.py caused the test mock of time.sleep
to count Redis connection retry sleeps during test collection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* main:
  Fix AttributeError in folder RSS feed when folder slug doesn't match
  Allow crawlers to access /media/img/ for OG image previews
  Add publish date to story clustering draft and enable incremental Jekyll builds
  Fix Open Graph and Twitter Card image previews on all static pages
  Rebuild blog _site with theme toggle fix
  Fix blog theme toggle not switching back to dark mode
  Use restart policy 'always' for node-exporter so it survives daemon restarts
  DRY up Docker container config for web and task deploys
  Fix AttributeError on MongoEngine queryset in feed limit notification task
  Fix ValueError from bracketed URLs in feed fetcher qurl() calls
  Fix ValueError from CRLF injection scans on /reader/feeds/ version param
  Fix MultiValueDictKeyError in rename_feed endpoint
  Fix UTF-8 encoding for web feed titles and allow link-free subscriptions
  Retry HAProxy delegated tasks on transient SSH failures during deploy
  Replace all MapReduce with aggregation pipelines to prevent JS lock cascade
  Disable Sentry tracing in flask_metrics to fix memory leak
  Skip attack detection on newsletter and push endpoints
  Add attack payload detection middleware with auto-ban
  Fix ValueError in URL normalization for malformed OPML imports
  Drop the mutable default in canonical_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant