Search Contacts by Name or Identifier
Coordinators manage large rosters of contacts and peer mentors across one or more chapters. Finding a specific person in a long list is time-consuming and error-prone. This story provides a dedicated search screen with a real-time, debounced search input that queries both online (Supabase) and offline (local cache) data sources, returning ranked results that match the query against name, phone, and other identifiable fields. Results are displayed in a consistent list with contact cards, allowing the coordinator to tap through to the full contact detail screen.
User Story
Acceptance Criteria
- Given the coordinator is on any tab, when they navigate to the search screen, then a search input field is focused and ready for input
- Given the coordinator types at least 2 characters, when 300ms have elapsed without further input (debounce), then results matching the query appear in the results list
- Given search results are returned, when displayed, then each result shows the contact's name, role badge, and chapter affiliation
- Given no results are found, when the results list is rendered, then an empty-state message is shown explaining no matches were found
- Given the device is offline, when the coordinator performs a search, then results are served from the local offline cache and a banner indicates offline mode
- Given a result is tapped, when navigating, then the full contact detail screen opens for that contact
Business Value
Coordinators across NHF, HLF, and Blindeforbundet manage large contact rosters. Fast, accurate search directly reduces friction in daily coordination work, enabling faster assignment of peer mentors, quicker follow-up on open tasks, and more responsive care — all of which directly improve the quality of the peer mentoring service delivered to end users.
Components
- Contact Search Screen ui
- Accessible Search Input Field ui
- Search Results List ui
- Contact Search Service service
- Supabase Contact Search Repository data
- Offline Contact Search Repository data
- Contact Cache Sync Repository data
- Search Debounce Utility infrastructure
- Contact Card Widget ui
- Peer Mentor Card Widget ui