feat(search/rag): implement NexusSearchBox, dynamic Qdrant collection auto-provisioning, batch vector ingestion, mobile Serilog logging, and resolve 401 auth handler error #51

Merged
mjasin merged 10 commits from feat/nexus-search-box into develop 2026-05-26 12:15:29 +00:00
Collaborator

Resolves #52

This Pull Request introduces the NexusSearchBox search feature with premium unified styling, implements a robust dynamic Qdrant collection auto-provisioning and batch-vector ingestion pipeline, integrates a unified Serilog logging infrastructure for the Blazor Hybrid environment (MAUI), and resolves the 401 Unauthorized API header propagation error inside mobile builds.

🚀 Key Implementations

1. Premium NexusSearchBox & Semantic Search UI

  • NexusSearchBox Component: Created an elegant search-as-you-type search box with smooth key navigation, quick-clearing, and seamless dynamic styling.
  • Unified Aesthetics: Refactored the search box isolated styling to align perfectly with the dashboard's design system using glassmorphism, --nexus-neon token gradients, and smooth pulse/fade animations.
  • Semantic Search Integration: Integrated semantic search query dispatching (SearchLibrarySemanticallyQuery) and wired up navigation seamlessly through the updated ReaderNavigationService.
  • Tests Hardening: Added/adapted query assertions in QueryTests.cs to guarantee safe parameterization and error boundary mapping.

2. Qdrant Collection Provisioning & Vector Ingestion

  • Dynamic Auto-Provisioning: Implemented dynamic checking and lazy-creation of the knowledge_units collection using 768 dimensions and Cosine distance.
  • High-Performance Ingestion: Optimized ProcessKnowledgeUnitsAsync with high-performance batch embedding generation using _embeddingGenerator and deterministic MD5 GUIDs for stable, duplicate-free upsertion.
  • Database Cache Clear Sync: Integrated Qdrant collection deletion in ClearCacheAsync to ensure absolute consistency between the PostgreSQL database cache and vector database indices.

3. Cross-Platform MAUI Logging (Serilog Infrastructure)

  • Serilog Integration: Configured cross-platform Serilog routing in SerilogConfiguration.cs, streaming diagnostic logs safely across native platforms and the Blazor Webview container.
  • Interop Bridge: Built BlazorLoggingBridge.cs to capture web console messages and pipe them directly to the native host logger.
  • Demo Interface: Added an interactive SerilogDemo.razor sandbox under Pages.

4. Resolving 401 Load Errors (Authentication Handler Flow)

  • Authentication Header Handler: Implemented the MobileAuthenticationHeaderHandler to correctly extract, validate, and inject bearer JWT tokens into outbound API requests.
  • Configuration-based API Host: Structured standard API URI routing to use clean configuration bindings in appsettings.json.

🧪 Verification & Build Status

  • Run dotnet build from the solution root: Successfully compiled the full multi-targeted solution (Liczba błędów: 0).
  • All unit and integration tests successfully executed and verified (dotnet test).
Resolves #52 This Pull Request introduces the **NexusSearchBox** search feature with premium unified styling, implements a robust **dynamic Qdrant collection auto-provisioning and batch-vector ingestion pipeline**, integrates a unified **Serilog logging infrastructure** for the Blazor Hybrid environment (MAUI), and resolves the **401 Unauthorized API header propagation error** inside mobile builds. ### 🚀 Key Implementations #### 1. Premium `NexusSearchBox` & Semantic Search UI * **NexusSearchBox Component:** Created an elegant search-as-you-type search box with smooth key navigation, quick-clearing, and seamless dynamic styling. * **Unified Aesthetics:** Refactored the search box isolated styling to align perfectly with the dashboard's design system using glassmorphism, `--nexus-neon` token gradients, and smooth pulse/fade animations. * **Semantic Search Integration:** Integrated semantic search query dispatching (`SearchLibrarySemanticallyQuery`) and wired up navigation seamlessly through the updated `ReaderNavigationService`. * **Tests Hardening:** Added/adapted query assertions in `QueryTests.cs` to guarantee safe parameterization and error boundary mapping. #### 2. Qdrant Collection Provisioning & Vector Ingestion * **Dynamic Auto-Provisioning:** Implemented dynamic checking and lazy-creation of the `knowledge_units` collection using 768 dimensions and Cosine distance. * **High-Performance Ingestion:** Optimized `ProcessKnowledgeUnitsAsync` with high-performance batch embedding generation using `_embeddingGenerator` and deterministic MD5 GUIDs for stable, duplicate-free upsertion. * **Database Cache Clear Sync:** Integrated Qdrant collection deletion in `ClearCacheAsync` to ensure absolute consistency between the PostgreSQL database cache and vector database indices. #### 3. Cross-Platform MAUI Logging (Serilog Infrastructure) * **Serilog Integration:** Configured cross-platform Serilog routing in `SerilogConfiguration.cs`, streaming diagnostic logs safely across native platforms and the Blazor Webview container. * **Interop Bridge:** Built `BlazorLoggingBridge.cs` to capture web console messages and pipe them directly to the native host logger. * **Demo Interface:** Added an interactive `SerilogDemo.razor` sandbox under Pages. #### 4. Resolving 401 Load Errors (Authentication Handler Flow) * **Authentication Header Handler:** Implemented the `MobileAuthenticationHeaderHandler` to correctly extract, validate, and inject bearer JWT tokens into outbound API requests. * **Configuration-based API Host:** Structured standard API URI routing to use clean configuration bindings in `appsettings.json`. --- ### 🧪 Verification & Build Status * Run `dotnet build` from the solution root: Successfully compiled the full multi-targeted solution (`Liczba błędów: 0`). * All unit and integration tests successfully executed and verified (`dotnet test`).
Antigravity added 3 commits 2026-05-23 17:54:16 +00:00
mjasin added 2 commits 2026-05-23 18:20:04 +00:00
Antigravity changed title from feat(ui/maui): implement NexusSearchBox, mobile Serilog logging, and resolve 401 auth handler error to feat(search/rag): implement NexusSearchBox, dynamic Qdrant collection auto-provisioning, batch vector ingestion, mobile Serilog logging, and resolve 401 auth handler error 2026-05-23 18:20:08 +00:00
mjasin added 1 commit 2026-05-23 18:30:23 +00:00
mjasin added 1 commit 2026-05-23 18:33:22 +00:00
mjasin added 1 commit 2026-05-26 11:43:59 +00:00
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>
mjasin added 1 commit 2026-05-26 11:44:26 +00:00
mjasin added 1 commit 2026-05-26 12:15:00 +00:00
mjasin merged commit a0bf6c15f4 into develop 2026-05-26 12:15:29 +00:00
mjasin deleted branch feat/nexus-search-box 2026-05-26 12:15:29 +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#51