Epic: Notification Management System - #71
Merged
Merged
Conversation
Issues completados: #48, #49, #50, #51 (Epic #47) Cambios principales: - Fix FAB duplicado en TagsScreen (#48) Solo mostrar FAB cuando hay tags existentes - Stats Card con datos reales (#49) Conectar StatsPreviewCard a StatsRepository Agregar empty state cuando no hay datos - Simplificar onboarding (#50) Remover paso de selección de apps (redundante) Ajustar SuccessScreen con nuevo mensaje Agregar completeOnboardingSimple() al ViewModel - FirstProfilePromptCard en HomeScreen (#51) Mostrar card prominente para crear primer perfil Agregar hasProfiles al HomeUiState Navegar a crear perfil desde el card También: - Archivar epic advanced-features completado - Agregar PRD y Epic para ux-polish-v1
- Created 5 Room entities with @ColumnInfo annotations - Created 5 DAOs with CRUD and specific queries - Implemented ExpeditionRepository with all operations - Added business logic for progress, companions, locations, achievements - All queries use snake_case column names - Repository includes duplicate prevention and validation logic
…ration - Created package structure for expedition module - Added 5 entity classes (Companion, Location, Progress, Achievement, Decoration) - Created DAO interfaces for all entities - Implemented Migration_3_4 with 5 new tables - Updated UmbralDatabase to version 4 with new entities and DAOs - Added Lottie Compose dependency for animations - Created ExpeditionModule for Hilt DI configuration
- Updated ExpeditionRepository interface to return Int from unlockAchievement - Modified ExpeditionRepositoryImpl to return stars earned - Fixes compilation error in CheckAchievementsUseCase
- Create ForestBiomeData with 15 locations and map positions - Implement ExpeditionMapViewModel with discovery flow - Add BiomeMapCanvas with pan/zoom gestures and fog of war - Create LocationDetailSheet for discovery UI - Add EnergyChip component for energy display - Implement ExpeditionMapScreen with full integration - All UI text in Spanish per project requirements
- Created CompanionAnimationState enum (IDLE, HAPPY, EVOLVING) - Implemented LottieAnimations registry for animation paths - Created CompanionAnimation composable with Lottie integration - Added EvolutionDialog with confirmation and animation views - Added CaptureSuccessDialog with celebration animation - Updated CompanionDetailScreen with Lottie animations - Updated CompanionListScreen to show capture dialog - Created placeholder Lottie JSON files for all 8 companions - All UI text in Spanish, code in English - Smooth transitions between animation states - Fallback to static icons if Lottie fails
- Add Coil image loading library - Create ExpeditionAssets helper for centralized asset management - Create CompanionImage.kt with AsyncImage support - Create LocationImage.kt with fog overlay support - Add placeholder vector drawables for companions and locations - Fix LottieAnimations to use correct CompanionType enums - Add expedition-related strings to strings.xml - Replace all hardcoded Spanish strings with string resources - All UI components now use MaterialTheme consistently
- Add ExpeditionMapScreen, CompanionListScreen, CompanionDetailScreen to navigation - Add AchievementsScreen to navigation - Wire up onNavigateToExpedition callback from HomeScreen - Add navigation routes for all expedition screens - Complete end-to-end navigation flow
- Add missing imports for translate/scale in BiomeMapCanvas - Fix navigation parameter names for expedition screens - Add missing preview parameters in HomeScreen
- Created BlockedNotificationEntity with all required fields - Created BlockedNotificationDao with CRUD operations - Added Migration_4_5 to create blocked_notifications table - Updated UmbralDatabase to version 5 - Added BlockedNotificationDao provider in AppModule - Added indices for efficient queries on session_id, package_name, and timestamp
- Created UmbralNotificationService extending NotificationListenerService - Implemented onNotificationPosted() and onNotificationRemoved() callbacks - Added basic logging for intercepted notifications - Created NotificationPermissionManager utility for permission checks - Added NotificationsModule for Hilt dependency injection - Registered service in AndroidManifest.xml with proper permissions - Added Spanish strings for notification access permission UI - Service compiles and builds successfully
- Created domain models: BlockedNotification and NotificationSummary - Created NotificationMapper for Entity<->Domain conversion - Implemented NotificationRepository interface and implementation - Created UseCases: Save, GetSummary, GetHistory, ClearOld - Updated NotificationsModule to bind repository via Hilt - All domain models use Instant for type-safe timestamps
- Created SystemWhitelist with hardcoded system apps (calls, SMS, alarms) - Created NotificationPreferences for user-configurable whitelist via DataStore - Implemented NotificationWhitelistChecker with priority-based filtering - Updated UmbralNotificationService to use whitelist checker - Support for critical notifications: battery low, system alerts - Multilingual keyword detection for battery notifications
- Created SessionSummaryDialog.kt with Material Design 3 dialog - Shows notification summary, top 5 apps, and bonus energy - Animated entrance with staggered animations - Created SessionSummaryViewModel with Hilt integration - Loads data using GetNotificationSummaryUseCase - Calculates bonus energy (+1 per 5 notifications) - Created SessionSummaryState for UI state management - Added 3 preview composables for different scenarios - All UI text in Spanish as per project guidelines - Follows existing patterns from SessionRewardDialog
…to-delete - Add NotificationHistoryState with filter options - Add NotificationHistoryViewModel with filtering logic - Add InstantExtensions for time formatting - Add FilterChips component for app/period filtering - Add SessionHeader component for grouping - Add NotificationItem with swipe-to-delete and context menu - Add NotificationHistoryScreen with loading/empty states - Include comprehensive Preview composables for all components - All UI text in Spanish as per project requirements
- Add SessionEndedEvent to BlockingManager for session tracking - Add sessionId to BlockingState for notification correlation - BlockingManagerImpl emits sessionEndedEvent when sessions end - UmbralNotificationService observes blockingManager.blockingState - Service caches current sessionId and blockedApps - Notifications only blocked during active sessions - Blocked notifications saved with correct sessionId - Remove duplicate BlockedNotificationDao provider from NotificationsModule
- Add 3 new notification achievements to AchievementDefinitions: - shield_mind (100 notifications) -> 50 stars - fortress (500 notifications) -> 100 stars - immune (1000 notifications) -> 200 stars - Add NOTIFICATIONS category to achievements enum - Add gamification queries to BlockedNotificationDao: - getTotalCountFlow, getCountSince, getTopBlockedApps - getTopBlockedAppsSince, getDailyBlockedCounts - Add NotificationStats and AppNotificationStats domain models - Extend NotificationRepository with gamification methods: - getTotalBlockedCountFlow, getCountForSession - getTopBlockedApps, getNotificationStats, getCountForLastDays - Create GrantNotificationRewardsUseCase: - Grants +1 energy per 5 notifications blocked in session - Updates notification achievement progress - Update StatsScreen with NotificationStatsCard: - Shows total blocked, last 7 days, top apps - Update StatsViewModel to load notification stats in parallel - Add Spanish UI strings for notification stats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementa un sistema completo de gestión de notificaciones que intercepta, almacena y resume las notificaciones de apps bloqueadas durante sesiones de enfoque activas.
Features Principales
UmbralNotificationServicecaptura notificaciones de apps bloqueadasSessionSummaryDialogal terminar sesiónNotificationHistoryScreencon filtros y swipe-to-deleteIssues Resueltos
Arquitectura
Test plan