The Unlocks module provides users with a deep dive into their “digital checking” habits. Instead of focusing on time spent (duration), this module focuses on frequency—how many times an app was opened. It helps users identify compulsive behaviors by visualizing launch patterns through heatmaps and providing quick actions to set directly from the usage list.
UnlocksScreen: The primary entry point. It coordinates the display of the metric header, the interactive heatmap, and the scrollable list of app usage.
DashboardHeatmap: A visual representation of historical unlock counts, allowing users to select specific dates to filter the list.
AppOpenRow: A specialized list item that displays the app’s icon, name, open count, and a .
RemovedAppsCard: A specialized UI element that aggregates data for apps that have been uninstalled but still have historical usage data.
UnlocksViewModel: Manages the UnlocksUiState. It combines streams from four different repositories to create a cohesive view of the user’s data.
AppUiModelMapper: A specialized utility that converts raw database entities (DailyAppUsageRecord) into UI-ready models (AppOpenUiItem), handling the heavy lifting of merging icon files and limit information.
LimitViewModelDelegate: Encapsulates the logic for opening the “Set Limit” bottom sheet, ensuring that limit-setting logic is reusable across different dashboard screens.
The module features an integrated onboarding experience using TutorialScaffold. It checks the TutorialRepository to see if the user has completed the “dashboard_unlocks” tutorial. If not, it highlights key UI elements like the heatmap and the limit icons using a spotlight effect.