Browse Role-Scoped Contact and Peer Mentor List
Both coordinators and peer mentors access the Contacts screen, but the data shown is scoped to their organizational role. Coordinators see the full contact roster across their organizational unit, while peer mentors see only contacts linked to their active assignments. The list is rendered with SliverList for performant scrolling through large datasets, and each entry displays name, status badge, area, and role-relevant action shortcuts via the Contact Card Widget. Role-based scoping is enforced both client-side via the Contact List BLoC and server-side via Supabase RLS policies, ensuring no data leakage between roles.
User Story
Acceptance Criteria
- Given a coordinator is authenticated, when they open the Contacts screen, then they see all contacts and peer mentors within their organizational scope
- Given a peer mentor is authenticated, when they open the Contacts screen, then they see only contacts linked to their active assignments
- Given a large contact list (100+ entries), when the screen loads, then items render progressively without blocking the UI using SliverList
- Given any user opens the Contacts screen, when the list loads, then each contact card displays name, status badge, area, and relevant action shortcuts
- Given Supabase RLS policies are active, when the Contact Repository fetches data, then only records matching the user's organisation membership are returned
Business Value
The contacts list is the most-used screen for both roles and is the operational backbone of daily peer mentor management. For organisations like NHF with 1,400 local branches, a fast and correctly scoped contact list is essential to prevent information overload and ensure coordinators and peer mentors can locate the right person without delay. Role-scoped data also protects sensitive personal information by ensuring users only see contacts they are authorised to interact with.
Components
- Contacts List Screen ui
- Contact Card Widget ui
- Contact List BLoC service
- Contact Repository data
- Contact Search Service service