feat(ui/quiz): implement real-time global chapter quiz generation, submit results to database, and display dynamic statistics on dashboard (#53)

This PR fully implements the Global Chapter-Level Quiz Generation system in the NexusReader application.

### Key Accomplishments:
1. **SubmitQuizResultCommand**: Added MediatR command and handler to persist completed quiz results to the SQLite database securely, using our clean architecture result-pattern.
2. **Dynamic Dashboard Integration**: Re-engineered the user dashboard to fetch, calculate, and display real-time statistics (average score, total books read, total concept nodes mapped, and list of resolved quizzes with their dates and scores) directly from active database queries, eliminating static mockups.
3. **Haptic & Visual Feedback**: Enhanced the quiz flow with interactive CSS transitions, glowing hover feedback, and clear result visualization upon completion.
4. **Robust Verification**: Implemented comprehensive unit tests for `SubmitQuizResultCommandHandler` covering all success and failure/edge cases. Executed full `dotnet test` with 100% success rate.

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #53
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #53.
This commit is contained in:
2026-05-26 11:43:58 +00:00
committed by Marek Jaisński
parent 39717725ec
commit aa80c2ba3e
38 changed files with 3243 additions and 456 deletions
@@ -7,5 +7,6 @@ public interface ISyncService
Task<Result> InitializeAsync();
Task<Result> UpdateProgressAsync(string pageId, Guid ebookId, double progress, string? chapterTitle, int chapterIndex);
event Func<string, DateTime, Task> OnProgressReceived;
event Func<string, double, Task>? OnIngestionProgressReceived;
Task DisposeAsync();
}