Description
Users cannot search for cases by keyword. The browse page has category and urgency filters but no text search.
Requirements
Backend
- Add a
search query parameter to GET /api/cases
- Search should match against case
title and description (case-insensitive)
- Also add to
GET /api/admin/cases
Frontend
- Add a search input at the top of the cases browse page (
frontend/src/app/cases/page.tsx)
- Debounce the search input (300ms) to avoid excessive API calls
- Add search to the admin dashboard list (
frontend/src/app/admin/page.tsx)
- Show "No results for 'query'" when search returns empty
Tech Notes
- Backend: Use SQLAlchemy's
ilike for case-insensitive search
- Frontend: Use
useEffect with a debounce timer or a useDebouncedValue hook
Acceptance Criteria
Description
Users cannot search for cases by keyword. The browse page has category and urgency filters but no text search.
Requirements
Backend
searchquery parameter toGET /api/casestitleanddescription(case-insensitive)GET /api/admin/casesFrontend
frontend/src/app/cases/page.tsx)frontend/src/app/admin/page.tsx)Tech Notes
ilikefor case-insensitive searchuseEffectwith a debounce timer or auseDebouncedValuehookAcceptance Criteria