feat(search): add content-finding filters, saved searches, and text quality to Search view

- Add tags, sender, text_quality filters to search API and Meilisearch client
- Add sender and ocr_text_length to Meilisearch filterable attributes
- Expand saved search allowed filter keys to include q, document_type, language, sender, text_quality
- Add filters panel and saved searches UI to the Search view template
- Add tests for new search filters, saved search keys, and search view elements

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-01 13:46:15 +00:00
parent e797832561
commit 5bf0a4c0b9
7 changed files with 468 additions and 34 deletions
+30
View File
@@ -39,3 +39,33 @@ class TestSearchPage:
long_query = "a" * 600
response = client.get(f"/search?q={long_query}")
assert response.status_code == 422
def test_search_page_contains_filter_elements(self, client):
"""GET /search contains content-finding filter UI elements."""
response = client.get("/search")
assert response.status_code == 200
assert 'id="filter-document-type"' in response.text
assert 'id="filter-tags"' in response.text
assert 'id="filter-sender"' in response.text
assert 'id="filter-language"' in response.text
assert 'id="filter-text-quality"' in response.text
assert 'id="filter-date-from"' in response.text
assert 'id="filter-date-to"' in response.text
def test_search_page_contains_saved_searches(self, client):
"""GET /search contains saved searches UI elements."""
response = client.get("/search")
assert response.status_code == 200
assert 'id="saved-searches-list"' in response.text
assert 'id="save-search-btn"' in response.text
assert "/api/saved-searches" in response.text
def test_search_page_text_quality_options(self, client):
"""GET /search contains text quality filter with expected options."""
response = client.get("/search")
assert response.status_code == 200
text = response.text
assert 'value="high"' in text
assert 'value="medium"' in text
assert 'value="low"' in text
assert 'value="no_text"' in text