Files
Nexus.Reader/src/NexusReader.UI.Shared/Components/Organisms/KnowledgeGraph.razor.css
T
Antigravity 541e9e1fb5 feat(ai-ux): deduplicate AI queries, handle ServiceUnavailable retries, and optimize reader canvas graph prerendering (#44)
This Pull Request encapsulates all outstanding AI, Blazor InteractiveAuto lifecycle, pgvector, and Firefox authorization/session compatibility fixes.

### Key Accomplishments:
1. **Concurrent Request Deduplication (Option B):** Implemented a thread-safe active task registry in `KnowledgeService` that groups concurrent graph extraction queries for the same content, preventing duplicate AI calls completely.
2. **Resilience Strategy for Downstream Demands:** Extended the `ai-retry` resilience pipeline to automatically intercept and retry on temporary Google API `503 ServiceUnavailable` / `high demand` spikes.
3. **Interactive Graph Generation Guard (Option A):** Prevented server-side prerender-phase graph requests in the reader canvas component.
4. **Firefox Compatibility & Cookie Handler:** Implemented an authentication endpoint and hybrid hidden-form submission flow to solve login, registration, and logout redirections and cookies securely.
5. **Autoscrolling & Graph Exclusions:** Added concept-to-block smooth scrolling, active block badging, and filtered out markdown code blocks from being extracted as nodes.

All unit tests compiled and passed 100% cleanly.

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #44
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
2026-05-18 17:53:36 +00:00

135 lines
3.1 KiB
CSS

.knowledge-graph-container {
width: 100%;
height: 50vh;
min-height: 400px;
display: flex;
align-items: center;
justify-content: center;
background-color: transparent;
overflow: hidden;
position: relative;
}
.knowledge-graph-container.loading > ::deep svg {
display: none !important;
}
.graph-controls {
position: absolute;
bottom: 1.5rem;
right: 1.5rem;
display: flex;
flex-direction: row;
gap: 0.25rem;
background: rgba(20, 20, 20, 0.4);
backdrop-filter: blur(12px);
padding: 0.35rem;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
z-index: 10;
}
.zoom-btn {
width: 32px;
height: 32px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 6px;
color: #aaa;
font-size: 1.1rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.zoom-btn:hover {
background: rgba(255, 255, 255, 0.1);
color: var(--nexus-neon);
border-color: var(--nexus-neon);
}
.zoom-btn.reset {
font-size: 0.8rem;
}
.loading-state {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.25rem;
color: #fff;
text-align: center;
z-index: 20;
background: rgba(13, 13, 13, 0.8);
backdrop-filter: blur(8px);
padding: 2rem 1.5rem;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
width: 85%;
max-width: 280px;
box-sizing: border-box;
}
.preloader-robot {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.neon-pulse {
color: var(--nexus-neon);
filter: drop-shadow(0 0 10px var(--nexus-neon));
animation: robot-pulse 2s infinite ease-in-out;
}
@keyframes robot-pulse {
0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--nexus-neon)); }
50% { transform: scale(1.1); filter: drop-shadow(0 0 25px var(--nexus-neon)); }
100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--nexus-neon)); }
}
.scan-line {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 2px;
background: var(--nexus-neon);
box-shadow: 0 0 15px var(--nexus-neon);
animation: scan 2s infinite linear;
opacity: 0.8;
}
@keyframes scan {
0% { top: 0; }
50% { top: 100%; }
100% { top: 0; }
}
::deep .nexus-node-active {
stroke: var(--nexus-neon) !important;
stroke-width: 2px !important;
filter: drop-shadow(0 0 12px var(--nexus-neon));
transition: all 0.3s ease;
}
::deep @keyframes neon-flash {
0% { filter: brightness(1) drop-shadow(0 0 0px var(--nexus-neon)); }
50% { filter: brightness(3) drop-shadow(0 0 30px var(--nexus-neon)); }
100% { filter: brightness(1) drop-shadow(0 0 0px var(--nexus-neon)); }
}
::deep .neon-flash-node {
animation: neon-flash 0.8s ease-out;
}