Contact & Notes Search
Feature Detail
Description
Basic search functionality across contacts and associated notes, available to all organizations and all roles. Users can search by name, organization affiliation, or keywords within notes. Results are presented in a filtered list view using the same ContactCard and PeerMentorCard widgets as the main contact list. Search must be accessible via screen readers (VoiceOver/JAWS), with proper semantic labeling on the search input and results list. For Blindeforbundet, voice-to-text input should be supported in the search field as a progressive enhancement.
Analysis
MUST HAVE across all four organizations. Enables fast lookup in large contact lists without manual scrolling. Reduces coordinator time-on-task for routine lookups, especially for HLF where a single peer mentor may have 380+ activity records.
Implement as a debounced Supabase ilike query on name and notes fields. For offline-first resilience, cache last-fetched contacts in local SQLite via drift and search locally when offline. Ensure the TextField has a11y label and results list uses Semantics widgets for screen reader compatibility.
Components (204)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (18)
As a As a Peer Mentor (Likeperson)
I want to see recently viewed or frequently accessed contacts at the top of the search screen before I start typing
So that I can navigate to my most-used contacts in one tap without needing to type a query each time
- Given the coordinator opens the search screen with no query entered, when the screen renders, then up to 5 recently viewed contacts are shown in a 'Recent' section
- Given a recent contact is tapped, when navigating, then the contact detail screen opens directly without requiring a search query
- Given the coordinator has viewed fewer than 5 contacts, when the recent section is shown, then only the contacts actually viewed are listed (no placeholder entries)
- +2 more
As a As a Coordinator
I want to see recently viewed or frequently accessed contacts at the top of the search screen before I start typing
So that I can navigate to my most-used contacts in one tap without needing to type a query each time
- Given the coordinator opens the search screen with no query entered, when the screen renders, then up to 5 recently viewed contacts are shown in a 'Recent' section
- Given a recent contact is tapped, when navigating, then the contact detail screen opens directly without requiring a search query
- Given the coordinator has viewed fewer than 5 contacts, when the recent section is shown, then only the contacts actually viewed are listed (no placeholder entries)
- +2 more
As a As a Organization Administrator
I want to see recently viewed or frequently accessed contacts at the top of the search screen before I start typing
So that I can navigate to my most-used contacts in one tap without needing to type a query each time
- Given the coordinator opens the search screen with no query entered, when the screen renders, then up to 5 recently viewed contacts are shown in a 'Recent' section
- Given a recent contact is tapped, when navigating, then the contact detail screen opens directly without requiring a search query
- Given the coordinator has viewed fewer than 5 contacts, when the recent section is shown, then only the contacts actually viewed are listed (no placeholder entries)
- +2 more
As a As a Peer Mentor (Likeperson)
I want to filter search results by contact type (peer mentor or contact person) and by chapter affiliation
So that I can narrow large result sets to exactly the relevant subset, especially when managing contacts across multiple chapters or organizational units
- Given the coordinator is on the search screen, when they tap a filter control, then filter options appear for contact type (peer mentor / contact) and chapter affiliation
- Given a chapter filter is selected, when the search query is executed, then only contacts affiliated with that chapter appear in results
- Given a contact type filter is selected, when results are displayed, then only the selected contact type appears, and the active filter is visually indicated
- +3 more
As a As a Peer Mentor (Likeperson)
I want to search within notes and activity report content associated with contacts
So that I can find specific interactions, follow-up items, or contextual history without opening each contact record individually
- Given the coordinator enters a search query, when results include contacts with matching note content, then note-matched results are visually distinguished from name-matched results
- Given a note result is returned, when displayed in the results list, then a short excerpt of the matching note text is shown beneath the contact name
- Given the coordinator's RLS scope covers only their chapter's contacts, when search results are returned, then only contacts within their permitted scope appear
- +2 more
As a As a Peer Mentor (Likeperson)
I want to search my contact list even when the device has no internet connection
So that I can continue working during field visits, travel, or poor-connectivity situations without losing access to critical contact information
- Given the device has no internet connection, when the coordinator searches for a contact by name, then results are returned from the local cache within 500ms
- Given offline search results are displayed, when the list is rendered, then a persistent banner or indicator communicates that results are from local cache and may not be fully up to date
- Given the device regains internet connectivity, when the cache sync service runs, then the local cache is updated with any server-side changes since the last sync
- +2 more
As a As a Coordinator
I want to filter search results by contact type (peer mentor or contact person) and by chapter affiliation
So that I can narrow large result sets to exactly the relevant subset, especially when managing contacts across multiple chapters or organizational units
- Given the coordinator is on the search screen, when they tap a filter control, then filter options appear for contact type (peer mentor / contact) and chapter affiliation
- Given a chapter filter is selected, when the search query is executed, then only contacts affiliated with that chapter appear in results
- Given a contact type filter is selected, when results are displayed, then only the selected contact type appears, and the active filter is visually indicated
- +3 more
As a As a Coordinator
I want to search within notes and activity report content associated with contacts
So that I can find specific interactions, follow-up items, or contextual history without opening each contact record individually
- Given the coordinator enters a search query, when results include contacts with matching note content, then note-matched results are visually distinguished from name-matched results
- Given a note result is returned, when displayed in the results list, then a short excerpt of the matching note text is shown beneath the contact name
- Given the coordinator's RLS scope covers only their chapter's contacts, when search results are returned, then only contacts within their permitted scope appear
- +2 more
As a As a Coordinator
I want to search my contact list even when the device has no internet connection
So that I can continue working during field visits, travel, or poor-connectivity situations without losing access to critical contact information
- Given the device has no internet connection, when the coordinator searches for a contact by name, then results are returned from the local cache within 500ms
- Given offline search results are displayed, when the list is rendered, then a persistent banner or indicator communicates that results are from local cache and may not be fully up to date
- Given the device regains internet connectivity, when the cache sync service runs, then the local cache is updated with any server-side changes since the last sync
- +2 more
As a As a Organization Administrator
I want to filter search results by contact type (peer mentor or contact person) and by chapter affiliation
So that I can narrow large result sets to exactly the relevant subset, especially when managing contacts across multiple chapters or organizational units
- Given the coordinator is on the search screen, when they tap a filter control, then filter options appear for contact type (peer mentor / contact) and chapter affiliation
- Given a chapter filter is selected, when the search query is executed, then only contacts affiliated with that chapter appear in results
- Given a contact type filter is selected, when results are displayed, then only the selected contact type appears, and the active filter is visually indicated
- +3 more
As a As a Organization Administrator
I want to search within notes and activity report content associated with contacts
So that I can find specific interactions, follow-up items, or contextual history without opening each contact record individually
- Given the coordinator enters a search query, when results include contacts with matching note content, then note-matched results are visually distinguished from name-matched results
- Given a note result is returned, when displayed in the results list, then a short excerpt of the matching note text is shown beneath the contact name
- Given the coordinator's RLS scope covers only their chapter's contacts, when search results are returned, then only contacts within their permitted scope appear
- +2 more
As a As a Organization Administrator
I want to search my contact list even when the device has no internet connection
So that I can continue working during field visits, travel, or poor-connectivity situations without losing access to critical contact information
- Given the device has no internet connection, when the coordinator searches for a contact by name, then results are returned from the local cache within 500ms
- Given offline search results are displayed, when the list is rendered, then a persistent banner or indicator communicates that results are from local cache and may not be fully up to date
- Given the device regains internet connectivity, when the cache sync service runs, then the local cache is updated with any server-side changes since the last sync
- +2 more
As a As a Peer Mentor (Likeperson)
I want to search for contacts and peer mentors by name, phone number, or other identifying information from a unified search screen
So that I can quickly locate the right person without scrolling through long lists, enabling faster response and assignment decisions
- 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
- +3 more
As a As a Peer Mentor (Likeperson)
I want the search screen and all search interactions to be fully accessible via screen readers (VoiceOver, TalkBack) and keyboard/switch access navigation
So that coordinators and peer mentors who rely on assistive technology can use search equally effectively without encountering inaccessible barriers
- Given a screen reader is active, when the search screen opens, then the search input field is announced with a descriptive label (e.g., 'Search contacts and notes')
- Given search results update, when new results are rendered, then a live region announces the result count (e.g., '5 results found')
- Given the results list is navigated via screen reader, when each result is focused, then the contact name, type (peer mentor or contact), and chapter are announced
- +3 more
As a As a Coordinator
I want to search for contacts and peer mentors by name, phone number, or other identifying information from a unified search screen
So that I can quickly locate the right person without scrolling through long lists, enabling faster response and assignment decisions
- 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
- +3 more
As a As a Coordinator
I want the search screen and all search interactions to be fully accessible via screen readers (VoiceOver, TalkBack) and keyboard/switch access navigation
So that coordinators and peer mentors who rely on assistive technology can use search equally effectively without encountering inaccessible barriers
- Given a screen reader is active, when the search screen opens, then the search input field is announced with a descriptive label (e.g., 'Search contacts and notes')
- Given search results update, when new results are rendered, then a live region announces the result count (e.g., '5 results found')
- Given the results list is navigated via screen reader, when each result is focused, then the contact name, type (peer mentor or contact), and chapter are announced
- +3 more
As a As a Organization Administrator
I want to search for contacts and peer mentors by name, phone number, or other identifying information from a unified search screen
So that I can quickly locate the right person without scrolling through long lists, enabling faster response and assignment decisions
- 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
- +3 more
As a As a Organization Administrator
I want the search screen and all search interactions to be fully accessible via screen readers (VoiceOver, TalkBack) and keyboard/switch access navigation
So that coordinators and peer mentors who rely on assistive technology can use search equally effectively without encountering inaccessible barriers
- Given a screen reader is active, when the search screen opens, then the search input field is announced with a descriptive label (e.g., 'Search contacts and notes')
- Given search results update, when new results are rendered, then a live region announces the result count (e.g., '5 results found')
- Given the results list is navigated via screen reader, when each result is focused, then the contact name, type (peer mentor or contact), and chapter are announced
- +3 more