HIGH story-contact-detail-edit-screen-peer-mentor-006 5 pts
5
Story Points
High
Priority
Contact Detail & Edit Screen
Feature

User Story

As a Peer Mentor (Likeperson)
I want to seamlessly switch between the general contact detail view and the dedicated peer mentor detail view for contacts who have the peer mentor role
So that I can access both generic contact information and peer mentor-specific information such as certification status, assigned contacts list, and mentor activity summary from a single entry point

Audience Summaries

This story directly addresses a documented retention problem: HLF data shows 40% of peer mentors were dissatisfied with coordinator follow-up quality. The root cause is friction — coordinators cannot assess a mentor's certification status, assignment load, or activity engagement without navigating multiple disconnected screens. By surfacing a dedicated peer mentor profile view inside the existing contact detail flow, this story eliminates that friction entirely. Coordinators can proactively identify mentors whose certifications are lapsing, who are overloaded with contacts, or whose engagement has dropped — and act on those signals immediately.

Faster, better-targeted follow-up increases mentor retention and satisfaction scores, which in turn improves the quality of peer mentoring delivered to program participants. This is a high-leverage investment: retaining experienced, certified peer mentors avoids the cost of recruitment and recertification cycles while sustaining program quality.

This high-priority story has moderate-to-high delivery complexity due to the number of coordinated data sources and UI state transitions involved. The peer mentor detail bloc must load from three repositories in parallel — peer mentor profile, certification records, and mentor activity logs — which requires careful async coordination and loading state management. A tab or segmented control must be implemented at the top of the contact detail screen, with state preserved when switching between tabs to avoid redundant server calls (per the acceptance criteria). Key dependencies include the contact detail edit screen story (story-contact-detail-edit-screen-coordinator-1), which must be completed or progressing in parallel.

Testing requirements include: expiry date banner logic (30-day threshold), assigned contact list rendering with assignment start dates, and tab-switch state preservation. Rollout risk is low as this is an additive feature visible only for contacts with the peer mentor role. QA should prioritize the tab-switching state-preservation criterion as it is the most likely source of regression.

Implementation requires adding a role-conditional tab or segmented control to the existing contact detail screen — the control is only rendered when the contact's role is peer mentor. The peer mentor detail view is a new screen widget backed by a dedicated PeerMentorDetailBloc. The bloc must orchestrate parallel async calls to three repositories: PeerMentorRepository (profile, certification status), CertificationRecordRepository (expiry date for banner logic), and MentorActivityLogRepository (aggregate session stats). The certification alert banner renders conditionally when expiry is within 30 days, requiring a date-diff comparison at build time.

The assigned contacts list must query the contact assignment table filtered by mentor ID, returning name and assignment start date. Tab-switching must preserve bloc state — use a PageView or IndexedStack to keep both views mounted and avoid re-fetching on switch. Edge cases: contact has peer mentor role but no certification record (handle gracefully), mentor has zero assigned contacts (show empty state), activity log is empty (show zero stats, not null). No data migration required; this is purely additive UI backed by existing repository interfaces.

Acceptance Criteria

  • Given I am on the contact detail screen for a contact with the peer mentor role, When the screen loads, Then a 'Peer Mentor Profile' tab or button is visible in addition to the standard contact detail tab
  • Given I tap the peer mentor profile tab, When the peer mentor detail screen loads, Then I see the peer mentor profile header showing name, photo placeholder, and current certification status badge
  • Given the peer mentor's certification expires within 30 days, When the peer mentor detail view loads, Then a certification alert banner is displayed at the top with the expiry date and a prompt to renew
  • Given I am on the peer mentor detail view, When I scroll to the assigned contacts section, Then a list of contacts currently assigned to this mentor is shown with each contact's name and assignment start date
  • Given I am on the peer mentor detail view, When I view the mentor activity summary panel, Then I see aggregate statistics: total sessions this year, total hours, and activity type breakdown
  • Given I tap the contact detail tab, When switching back from the peer mentor view, Then the contact detail content is immediately visible without reloading data from the server

Business Value

HLF reported that 40% of peer mentors were dissatisfied with the level of follow-up they received from coordinators. A key reason for inadequate follow-up is that coordinators lack quick visibility into a peer mentor's certification status and assignment load when viewing their profile. By integrating peer mentor-specific views directly into the contact detail flow, coordinators can instantly see whether a mentor needs certification renewal reminders, whether they are overloaded with assigned contacts, or whether their activity engagement has dropped — enabling timely and targeted follow-up without navigating multiple separate screens.