MEDIUM story-scenario-based-engagement-push-notifications-peer-mentor-004 3 pts

User Story

As a Peer Mentor (Likeperson)
I want to see a dismissible in-app notification banner at the top of the screen when a scenario prompt arrives while I am actively using the app
So that I do not miss important scenario prompts even when I already have the app open and push notifications are suppressed by the OS

Acceptance Criteria

  • Given the mentor is actively using the app and a new scenario notification record is inserted for their user ID, When the Supabase realtime subscription fires, Then the in-app notification banner appears at the top of the screen within 2 seconds
  • Given the in-app banner is displayed, When the mentor taps it, Then the scenario notification detail view opens and the banner dismisses
  • Given the in-app banner is displayed, When 5 seconds elapse without interaction, Then the banner dismisses automatically and the notification remains unread in the notification centre
  • Given the in-app banner is displayed, When the mentor swipes it up to dismiss, Then the banner dismisses and no navigation occurs
  • Given the mentor is on an active form screen (e.g., activity wizard), When a scenario banner appears, Then the banner does not block or interfere with the form inputs and is rendered above the keyboard if open

Business Value

In-app banners ensure scenario prompts are never silently missed due to OS notification permissions or Do Not Disturb mode. This fallback mechanism guarantees engagement prompt delivery for mentors who are already active in the app, maximising the reach of the scenario-based engagement system.