Antigravity f7dc3b3137 fix: resolve all 10 review items from PR #76 (#77)
## Summary

Resolves all 10 review recommendations from the review on PR #76.

## Review Items Addressed

| # | Item | Status |
|---|------|--------|
| 1 | Unit tests for query handler |  Already done (30 tests) |
| 2 | Log exceptions in handler |  `ILogger<GetContextualRecommendationsQueryHandler>` added |
| 3 | Guard empty embedding text |  Early return + empty vector guard in `VectorSearchStore` |
| 4 | Refine collection creation error handling |  Logs creation events and non-fatal errors |
| 5 | Replace `Console.WriteLine` with `ILogger` |  Fixed in 7 components/pages |
| 6 | Abstract HTTP calls behind a service |  `IRecommendationService` + `RecommendationService` |
| 7 | Verify CSS uses design tokens |  `ContextualRecommendationsWidget.razor.css` uses `var(--nexus-*)` |
| 8 | Add loading spinner |  Animated spinner in `ContextualRecommendationsWidget` |
| 9 | Document XML comments |  `<summary>` docs on handler, interface, service |
| 10 | Benchmark vector search latency |  `Stopwatch` around embedding and Qdrant search |

## New Files
- `IRecommendationService.cs` — Application-layer abstraction
- `RecommendationService.cs` — WASM HTTP implementation (AOT-safe)
- `ContextualRecommendationsWidget.razor` — Dashboard UI widget with spinner
- `ContextualRecommendationsWidget.razor.css` — Design-token CSS

## Build
 `dotnet build NexusReader.slnx --no-restore` — 0 errors, 5 pre-existing warnings

Closes review: #76 (comment)

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #77
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
2026-06-06 13:38:34 +00:00
2026-05-25 14:02:56 +02:00

📖 Nexus Reader

Nexus Reader is a state-of-the-art, cross-platform Blazor .NET 10 immersive e-book reader, powered by Native AOT, Clean Architecture, CQRS, and interactive D3.js Relationship Graphs built on vector-based AI semantics.


Features & Architecture Highlights

📁 Ingestion & Description persistence

  • Extracted and persistent book descriptions from EPUB package metadata during book ingestion.
  • The Description field propagates cleanly from the Ebook entity through Mapster to LastReadBookDto and UserProfileDto.
  • Implemented deep-link route activation: /reader/{bookId}?chapter=N.
  • Allows instant resume of reading session coordinates and loads the specific chapter chapter directly via URL query parameters.

🛡️ Downstream AI Resilience

  • Standard resilience engine in DependencyInjection.cs utilizing the Polly package (ai-retry).
  • Automatically intercepts, handles, and retries on both rate-limits (429 Too Many Requests) and downstream capacity overloads (503 ServiceUnavailable / high demand).

⚙️ Concurrent Request Deduplication

  • Multi-client InteractiveAuto Blazor circuit synchronization is backed by a thread-safe active task registry in KnowledgeService which ensures that identical concurrent requests await a single shared task instance, eliminating redundant LLM queries.

🛠️ Build & Verification Gate

Ensure the dotnet workload matches the active SDK, and compile the full solution utilizing:

dotnet build NexusReader.slnx --no-restore

Run test suite:

dotnet test --no-restore

🗄️ Database Migrations

Automatic database migrations at startup (MigrateAsync()) have been disabled to ensure compatibility with Native AOT compilation and prevent locking issues in multi-instance environments.

To apply database migrations locally, run the EF Core migration command from the solution root:

dotnet ef database update --project src/NexusReader.Infrastructure --startup-project src/NexusReader.Web
S
Description
No description provided
Readme 16 MiB
Languages
C# 46.2%
HTML 25.8%
CSS 23%
JavaScript 4.1%
Shell 0.8%
Other 0.1%