View and Browse Contact List with Role-Specific Perspectives
Coordinators need a comprehensive contact list screen that displays both regular contacts and peer mentors in a structured, scannable format. The list must support switching between a contacts view and a peer mentors view using a view switcher widget. Each card must show key status indicators such as assignment status, certification validity, and pause state. The list must be scoped to the coordinator's chapter via RLS, ensuring data isolation across chapters.
User Story
Acceptance Criteria
- Given I am logged in as a coordinator, when I navigate to the Contacts tab, then I see a paginated list of all contacts within my chapter
- Given I am on the contact list screen, when I tap the view switcher, then the list toggles between a contacts view showing all contacts and a peer mentors view showing only peer mentors
- Given the contact list is loaded, when I view each contact card, then I see the contact name, assignment status indicator, and any active pause or certification warning badges
- Given my chapter has RLS policies applied, when I view the contact list, then I only see contacts belonging to my chapter and not contacts from other chapters
- Given the list has more than 20 items, when I scroll to the bottom, then the next page of contacts is loaded automatically without a full screen reload
Business Value
Contact list browsing is the primary entry point for coordinators to manage their peer mentor network. Without an efficient, role-scoped list view, coordinators resort to manual spreadsheets and phone records, causing delays in follow-up and missed assignments. A performant, RLS-filtered contact list directly reduces coordination overhead and ensures data privacy compliance across multi-chapter organizations.
Components
- Contact List Screen ui
- Contact Card Widget ui
- Peer Mentor Card Widget ui
- Contact View Switcher ui
- Contact List Service service
- Contact Repository data
- Contact List Riverpod Provider data
- Contact RLS Query Builder infrastructure