Feature/saved searches - #172
Open
HereIsMuhammad wants to merge 9 commits into
Open
Conversation
Implement POST endpoint to run saved searches and update seen logins.
|
@HereIsMuhammad is attempting to deploy a commit to the sajeetharan's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #166
Summary
Adds saved developer searches with opt-in, per-search new-match alerts.
Signed-in users can save a search using a free-text query and/or structured filters such as country, language, and minimum score. They can re-run, rename, or delete saved searches.
See
docs/prd/saved-searches.mdfor the full spec and API contract.What's included
lib/saved-search.js— criteria validation/normalization, structured + text filtering, privacy guard, and incremental deduplicated new-match detection (diffNewMatches)lib/saved-search-store.js— Cosmos-backed CRUD store with in-memory fallback, followinglib/watchlist-store.jsconventionslib/saved-search-run.js— executes saved searches using text/vector/hybrid mode against live data, reusing/api/search's existing Cosmos/embedding patternsGET/POST /api/saved-searches— list and createPATCH/DELETE /api/saved-searches/[id]— rename, update alert frequency, deletePOST /api/saved-searches/[id]/run— run now, return results + deduplicated new matches, and update the persisted seen-settests/saved-search.test.js— 21 tests covering validation, structured/text filtering, privacy exclusion, and incremental dedupAcceptance criteria covered
Out of scope
Testing
node --test tests/saved-search.test.js— 21/21 passing, covering validation, structured/text filtering, privacy exclusion, and incremental dedup.API routes follow the same auth/Cosmos/fallback pattern used by
lib/watchlist-store.jsandlib/feed-store.js.The GitHub OAuth flow was not verified locally because it requires a separately configured OAuth app. Happy to have this checked on a deploy preview if useful.