feat: saved searches (bookmarks)
CI / lint-and-test (push) Successful in 23s

- Add saved_searches_collection to database.py with index on created_by+created_at
- New routes/saved_searches.py: GET /api/saved-searches, POST, DELETE
- Saved searches are scoped per user (created_by = token sub)
- Mount router in main.py
- Frontend: Save filters button, saved search pills with load/delete
- loadSavedSearches called on initApp
- applySavedSearch restores filters and validates services against current options
- Add CSS for saved-searches row
- Add tests for CRUD, delete 404, and name validation
This commit is contained in:
2026-04-22 07:04:07 +02:00
parent 05f5f07e7b
commit fb2386e190
7 changed files with 183 additions and 0 deletions
+2
View File
@@ -20,6 +20,7 @@ from routes.fetch import router as fetch_router
from routes.fetch import run_fetch
from routes.health import router as health_router
from routes.rules import router as rules_router
from routes.saved_searches import router as saved_searches_router
from routes.webhooks import router as webhooks_router
@@ -119,6 +120,7 @@ if AI_FEATURES_ENABLED:
from routes.mcp import mcp_asgi
app.mount("/mcp", mcp_asgi)
app.include_router(saved_searches_router, prefix="/api")
app.include_router(rules_router, prefix="/api")