fix: resolve all 10 review items from PR #76 #77

Merged
mjasin merged 1 commits from fix/pr76-review-recommendations into feature/global-intelligence-qa 2026-06-06 13:38:35 +00:00
Collaborator

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)

## 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: https://git.archimap.cloud/mjasin/Nexus.Reader/pulls/76#issuecomment-473
mjasin changed target branch from main to feature/global-intelligence-qa 2026-06-06 13:38:03 +00:00
mjasin added 1 commit 2026-06-06 13:38:03 +00:00
- Add ILogger<GetContextualRecommendationsQueryHandler> with structured logging
- Guard empty embedding text in VectorSearchStore (return empty vector, skip search)
- Benchmark vector search and embedding latency with Stopwatch (LogDebug/LogInfo)
- Refine EnsureCollectionExistsAsync: log creation events and non-fatal errors
- Replace all Console.WriteLine with ILogger in UI components (AiAssistantBubble,
  AiResponseRenderer, IntelligenceToolbar, SelectionAiPanel, Catalog, Intelligence, MyBooks)
- Create IRecommendationService abstraction + RecommendationService WASM implementation
- Register IRecommendationService in Web.Client DI
- Add ContextualRecommendationsWidget component with loading spinner and design tokens
- Add ContextualRecommendationsWidget to Dashboard.razor
- Update test constructor with ILogger mock for GetContextualRecommendationsQueryHandler

Closes review items: 2, 3, 4, 5, 6, 7, 8, 9, 10
Item 1 (unit tests) was already completed in previous session
mjasin merged commit f7dc3b3137 into feature/global-intelligence-qa 2026-06-06 13:38:35 +00:00
mjasin deleted branch fix/pr76-review-recommendations 2026-06-06 13:38:35 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mjasin/Nexus.Reader#77