Skip to content

Add journal#18

Open
oliver254 wants to merge 14 commits into
devfrom
Add-journal
Open

Add journal#18
oliver254 wants to merge 14 commits into
devfrom
Add-journal

Conversation

@oliver254
Copy link
Copy Markdown
Owner

No description provided.

- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condition is always false because of access to field _initialized.

Copilot uses AI. Check for mistakes.

public async Task LoadMonthlyStatsAsync(int year, int month)
{
var monthlyStats = await _statisticsService.GetMonthlyStatisticsAsync(year, month);
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment to monthlyStats is useless, since its value is never read.

Copilot uses AI. Check for mistakes.
private readonly TaskService _taskService;

[ObservableProperty]
private ObservableCollection<TodoTask> tasks = new ObservableCollection<TodoTask>();
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'tasks' can be 'readonly'.

Copilot uses AI. Check for mistakes.
private ObservableCollection<TodoTask> tasks = new ObservableCollection<TodoTask>();

[ObservableProperty]
private DateTime selectedDate = DateTime.Now.Date; // ✅ Initialiser avec .Date
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'selectedDate' can be 'readonly'.

Copilot uses AI. Check for mistakes.
private int tasksCompleted;

[ObservableProperty]
private string newTaskTitle = string.Empty;
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'newTaskTitle' can be 'readonly'.

Copilot uses AI. Check for mistakes.
private string streakMessage = "🔥 Loading...";

[ObservableProperty]
private List<string> weekDays = [];
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'weekDays' can be 'readonly'.

Copilot uses AI. Check for mistakes.
private List<string> weekDays = [];

[ObservableProperty]
private List<int> weekPomodoros = [];
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'weekPomodoros' can be 'readonly'.

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +51
if (session.Id == 0)
return await _connection!.InsertAsync(session);
else
return await _connection!.UpdateAsync(session);
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement return - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment on lines +107 to +110
if (entry.Id == 0)
return await _connection!.InsertAsync(entry);
else
return await _connection!.UpdateAsync(entry);
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement return - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment on lines +82 to +89
if (taskId.HasValue)
{
CurrentTask = await _taskService.GetTaskAsync(taskId.Value);
}
else
{
CurrentTask = null;
}
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants