Receive In-App Notification Banner for Scenario Prompt When App Is Open
When the Supabase realtime subscription service detects a new scenario notification record inserted for the current user, the in-app notification banner is triggered and displayed as an overlay at the top of the current screen. The banner displays the scenario type icon, a brief summary of the prompt, and a tap target that navigates to the scenario notification detail view. The banner auto-dismisses after 5 seconds or can be manually dismissed. This mechanism works independently of OS push delivery and ensures prompt visibility when the app is foregrounded.
User Story
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.
Components
- In-App Notification Banner ui
- Supabase Realtime Subscription Service infrastructure
- Notification BLoC service
- Notification Domain Model data
- Notification Repository data
- Scenario Notification Detail View ui
- Notification Accessibility Announcer infrastructure