Access Annual Summary Offline
The annual summary is cached locally on the device after the first successful load. When the peer mentor opens the summary screen without internet connectivity, the cached version is displayed with a subtle indicator noting the data was last updated on a specific date. The offline cache is structured to store the full rendered summary data including badge information, stat cards, and period comparison data. Cache invalidation occurs when new activity data is synced — specifically when the peer mentor completes a new activity registration or when the app reconnects after a period offline. The cache is stored securely and respects the same data isolation rules as the online version.
User Story
Acceptance Criteria
- Given I have previously loaded my annual summary with an internet connection, when I open the summary screen without connectivity, then the cached version is displayed with a 'Last updated: [date]' indicator
- Given I am viewing the offline cached summary, when I attempt to share it, then the screenshot capture and share sheet still function correctly using the cached data
- Given I am offline and my cached data is more than 30 days old, when I view the summary, then a banner prompts me to connect to the internet to refresh my summary
- Given I reconnect to the internet after being offline, when new activity data has been synced, then the summary cache is automatically invalidated and I am prompted to refresh
- Given I clear my app cache or reinstall the app, when I open the summary screen without connectivity, then a helpful empty state is shown explaining that connectivity is needed for the first load
- Given the offline cache contains sensitive aggregated data, when it is stored, then it is stored in the device's secure storage and not accessible to other applications
Business Value
Peer mentors frequently work in settings with unreliable internet access — home visits, community centers, rural areas. The ability to view and share the summary offline ensures that the motivational and recruitment value of the Wrapped feature is not limited to users with consistent connectivity. This is particularly important for organizations like NHF and Blindeforbundet that serve geographically dispersed members. Offline-first design also reduces the perceived fragility of the app, building trust among less digitally confident users.
Components
- Summary Offline Cache data
- Wrapped Summary Screen ui
- Wrapped Summary BLoC service
- Annual Summary Repository data
- Summary Cache Repository data
- Screenshot Capture Utility infrastructure