Add journal#18
Conversation
- Mise à jour de Nuke.Common et Microsoft.Maui.Controls. - Remplacement de Microsoft.Data.Sqlite par sqlite-net-pcl et ajout de SQLitePCLRaw.bundle_green. - Suppression de System.ComponentModel.DataAnnotations.Schema dans les modèles JournalEntry et PomodoroSession. - Retrait de l'attribut [RelayCommand] sur certaines méthodes asynchrones des ViewModels.
Suppression de l'initialisation synchrone de la base dans MauiProgram.cs. Ajout d'une initialisation paresseuse, asynchrone et thread-safe dans DatabaseService avec gestion par sémaphore. Toutes les opérations sur la base vérifient désormais l'initialisation avant exécution. Ajout de SQLitePCL.Batteries_V2.Init() pour garantir l'initialisation de SQLite au démarrage. Améliore la robustesse et la fiabilité dans un contexte multi-threadé.
- Ajout de targets dédiés pour macOS (DMG), Windows (MSIX), Android (APK/AAB), iOS, et build combiné (BuildAll) - Détection automatique de la plateforme via RuntimeInformation - Paramètre de version configurable pour les artefacts - Utilisation de Serilog pour des logs colorés et lisibles - Organisation claire des dossiers d’artefacts par plateforme - Ajout de méthodes utilitaires (ex : calcul taille DMG) - Ajout des packages NuGet Serilog et Serilog.Sinks.Console - Documentation complète : guide rapide, résumé, tests, CI/CD, troubleshooting - Système prêt pour la distribution et l’intégration continue sur tous les stores majeurs
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive journal and task management system to the MReveil Pomodoro timer application. The update adds database-backed tracking of Pomodoro sessions, task management, and statistics visualization. The implementation follows MVVM architecture with proper dependency injection and includes extensive documentation.
Key changes:
- Added SQLite database integration for persistent storage of sessions, journal entries, and tasks
- Implemented task management system with Pomodoro session association
- Created statistics page with streak tracking and productivity metrics
- Upgraded to .NET 10 and updated all NuGet packages to latest versions
- Enhanced UI with new styles, colors, and improved user experience
- Added Nuke build system for multi-platform builds
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/MReveil/Models/TodoTask.cs |
New model for task management with computed properties |
src/MReveil/Models/PomodoroSession.cs |
New model for tracking Pomodoro sessions with task association |
src/MReveil/Models/JournalEntry.cs |
New model for daily journal entries |
src/MReveil/Services/DatabaseService.cs |
SQLite database service with thread-safe initialization |
src/MReveil/Services/TaskService.cs |
Service for task CRUD operations and business logic |
src/MReveil/Services/StatisticsService.cs |
Service for calculating productivity statistics |
src/MReveil/Services/PomodoroSessionService.cs |
Service managing Pomodoro session lifecycle |
src/MReveil/ViewModels/JournalViewModel.cs |
ViewModel for journal page with task management |
src/MReveil/ViewModels/StatisticsViewModel.cs |
ViewModel for statistics page |
src/MReveil/ViewModels/MainViewModel.cs |
Updated to integrate with new services |
src/MReveil/Views/JournalPage.xaml[.cs] |
New journal page UI and code-behind |
src/MReveil/Views/StatisticsPage.xaml[.cs] |
New statistics page UI and code-behind |
src/MReveil/Views/MainPage.xaml |
Updated UI with task display and improved styling |
src/MReveil/Views/SettingsPage.xaml |
Redesigned with modern UI |
src/MReveil/Converters/ValueConverters.cs |
New converters for UI bindings |
src/MReveil/Controls/CircularClock.xaml.cs |
Enhanced with better resource disposal |
src/MReveil/Drawables/CircularDrawable.cs |
Improved with multi-ring display support |
src/MReveil/Resources/Styles/ |
Added new button styles, colors, and label styles |
src/MReveil/MReveil.csproj |
Upgraded to .NET 10 with updated dependencies |
src/MReveil/MauiProgram.cs |
Registered new services and ViewModels |
src/MReveil/App.xaml |
Added value converters to resources |
src/MReveil/AppShell.xaml |
Added new pages to navigation |
build/Build.cs |
Comprehensive Nuke build system with multi-platform support |
build/build.csproj |
Updated to .NET 10 with new packages |
docs/* |
Extensive documentation including architecture, UML diagrams, specifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await _initSemaphore.WaitAsync(); | ||
| try | ||
| { | ||
| if (_initialized) |
There was a problem hiding this comment.
Condition is always false because of access to field _initialized.
|
|
||
| public async Task LoadMonthlyStatsAsync(int year, int month) | ||
| { | ||
| var monthlyStats = await _statisticsService.GetMonthlyStatisticsAsync(year, month); |
There was a problem hiding this comment.
This assignment to monthlyStats is useless, since its value is never read.
| private readonly TaskService _taskService; | ||
|
|
||
| [ObservableProperty] | ||
| private ObservableCollection<TodoTask> tasks = new ObservableCollection<TodoTask>(); |
There was a problem hiding this comment.
Field 'tasks' can be 'readonly'.
| private ObservableCollection<TodoTask> tasks = new ObservableCollection<TodoTask>(); | ||
|
|
||
| [ObservableProperty] | ||
| private DateTime selectedDate = DateTime.Now.Date; // ✅ Initialiser avec .Date |
There was a problem hiding this comment.
Field 'selectedDate' can be 'readonly'.
| private int tasksCompleted; | ||
|
|
||
| [ObservableProperty] | ||
| private string newTaskTitle = string.Empty; |
There was a problem hiding this comment.
Field 'newTaskTitle' can be 'readonly'.
| private string streakMessage = "🔥 Loading..."; | ||
|
|
||
| [ObservableProperty] | ||
| private List<string> weekDays = []; |
There was a problem hiding this comment.
Field 'weekDays' can be 'readonly'.
| private List<string> weekDays = []; | ||
|
|
||
| [ObservableProperty] | ||
| private List<int> weekPomodoros = []; |
There was a problem hiding this comment.
Field 'weekPomodoros' can be 'readonly'.
| if (session.Id == 0) | ||
| return await _connection!.InsertAsync(session); | ||
| else | ||
| return await _connection!.UpdateAsync(session); |
There was a problem hiding this comment.
Both branches of this 'if' statement return - consider using '?' to express intent better.
| if (entry.Id == 0) | ||
| return await _connection!.InsertAsync(entry); | ||
| else | ||
| return await _connection!.UpdateAsync(entry); |
There was a problem hiding this comment.
Both branches of this 'if' statement return - consider using '?' to express intent better.
| if (taskId.HasValue) | ||
| { | ||
| CurrentTask = await _taskService.GetTaskAsync(taskId.Value); | ||
| } | ||
| else | ||
| { | ||
| CurrentTask = null; | ||
| } |
There was a problem hiding this comment.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
No description provided.