Spaces:
Running
Running
Commit ·
5d26dc5
1
Parent(s): 1f9f517
feat(ui): restore info modal overlay and limit category select to user-defined options
Browse files- frontend-next/app/page.tsx +57 -5
frontend-next/app/page.tsx
CHANGED
|
@@ -12,7 +12,8 @@ import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
| 12 |
import {
|
| 13 |
Brain, Search, PanelLeftClose, PanelLeft, PanelLeftOpen, Plus,
|
| 14 |
Send, Settings2, Trash2, Copy, Check, Star, ThumbsUp, ThumbsDown,
|
| 15 |
-
Pin, Edit2, Check as CheckIcon, ArrowDown
|
|
|
|
| 16 |
} from "lucide-react";
|
| 17 |
|
| 18 |
// Config
|
|
@@ -241,6 +242,7 @@ export default function App() {
|
|
| 241 |
// UI Enhancements
|
| 242 |
const [desktopSidebarCollapsed, setDesktopSidebarCollapsed] = useState(false);
|
| 243 |
const [showScrollDown, setShowScrollDown] = useState(false);
|
|
|
|
| 244 |
const mainChatRef = useRef<HTMLDivElement>(null);
|
| 245 |
|
| 246 |
const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {
|
|
@@ -579,13 +581,64 @@ export default function App() {
|
|
| 579 |
)}
|
| 580 |
</AnimatePresence>
|
| 581 |
{/* Header API Status */}
|
| 582 |
-
<div className="top-api-status">
|
|
|
|
|
|
|
|
|
|
| 583 |
<div className="nav-status">
|
| 584 |
<div className={`status-dot ${apiStatus === 'online' ? 'status-online' : 'status-offline'}`} />
|
| 585 |
{apiStatus === 'online' ? 'API Online' : apiStatus === 'connecting' ? 'Connecting...' : 'API Offline'}
|
| 586 |
</div>
|
| 587 |
</div>
|
| 588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 589 |
<div className="chat-container">
|
| 590 |
{currentMessages.length === 0 ? (
|
| 591 |
<motion.div initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} style={{ margin: 'auto', textAlign: 'center', opacity: 0.8, maxWidth: '400px' }}>
|
|
@@ -672,11 +725,10 @@ export default function App() {
|
|
| 672 |
<option value="All">All Topics</option>
|
| 673 |
<option value="cs.LG">cs.LG (Machine Learning)</option>
|
| 674 |
<option value="cs.AI">cs.AI (Artificial Intelligence)</option>
|
| 675 |
-
<option value="
|
| 676 |
<option value="cs.CL">cs.CL (Computation & Language)</option>
|
| 677 |
-
<option value="cs.
|
| 678 |
<option value="cs.RO">cs.RO (Robotics)</option>
|
| 679 |
-
<option value="cs.CR">cs.CR (Cryptography & Security)</option>
|
| 680 |
</select>
|
| 681 |
<select style={{ background: '#000', border: '1px solid #333', color: '#fff', padding: '6px 12px', borderRadius: '6px' }} value={filterYear} onChange={(e) => setFilterYear(e.target.value)}>
|
| 682 |
<option value="All">All Years</option>
|
|
|
|
| 12 |
import {
|
| 13 |
Brain, Search, PanelLeftClose, PanelLeft, PanelLeftOpen, Plus,
|
| 14 |
Send, Settings2, Trash2, Copy, Check, Star, ThumbsUp, ThumbsDown,
|
| 15 |
+
Pin, Edit2, Check as CheckIcon, ArrowDown,
|
| 16 |
+
Info, X, Server, Activity, Layers, Rocket
|
| 17 |
} from "lucide-react";
|
| 18 |
|
| 19 |
// Config
|
|
|
|
| 242 |
// UI Enhancements
|
| 243 |
const [desktopSidebarCollapsed, setDesktopSidebarCollapsed] = useState(false);
|
| 244 |
const [showScrollDown, setShowScrollDown] = useState(false);
|
| 245 |
+
const [showInfo, setShowInfo] = useState(false);
|
| 246 |
const mainChatRef = useRef<HTMLDivElement>(null);
|
| 247 |
|
| 248 |
const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {
|
|
|
|
| 581 |
)}
|
| 582 |
</AnimatePresence>
|
| 583 |
{/* Header API Status */}
|
| 584 |
+
<div className="top-api-status" style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
|
| 585 |
+
<button onClick={() => setShowInfo(true)} className="nav-icon-btn" aria-label="Project Info" style={{ background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(255,255,255,0.1)', padding: '6px', borderRadius: '50%', color: 'var(--text-muted)', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
| 586 |
+
<Info size={16} />
|
| 587 |
+
</button>
|
| 588 |
<div className="nav-status">
|
| 589 |
<div className={`status-dot ${apiStatus === 'online' ? 'status-online' : 'status-offline'}`} />
|
| 590 |
{apiStatus === 'online' ? 'API Online' : apiStatus === 'connecting' ? 'Connecting...' : 'API Offline'}
|
| 591 |
</div>
|
| 592 |
</div>
|
| 593 |
|
| 594 |
+
<AnimatePresence>
|
| 595 |
+
{showInfo && (
|
| 596 |
+
<div className="info-modal-backdrop" onClick={() => setShowInfo(false)} style={{ position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.6)', zIndex: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
| 597 |
+
<motion.div
|
| 598 |
+
initial={{ opacity: 0, scale: 0.95, y: 20 }}
|
| 599 |
+
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 600 |
+
exit={{ opacity: 0, scale: 0.95, y: 20 }}
|
| 601 |
+
onClick={(e) => e.stopPropagation()}
|
| 602 |
+
className="cyber-panel info-modal"
|
| 603 |
+
style={{ background: 'var(--bg-panel)', border: '1px solid var(--border)', padding: '32px', borderRadius: '16px', maxWidth: '600px', width: '90%', position: 'relative', maxHeight: '80vh', overflowY: 'auto' }}
|
| 604 |
+
>
|
| 605 |
+
<button className="modal-close" onClick={() => setShowInfo(false)} style={{ position: 'absolute', top: '16px', right: '16px', background: 'transparent', border: 'none', color: 'var(--text-muted)', cursor: 'pointer' }}>
|
| 606 |
+
<X size={18} />
|
| 607 |
+
</button>
|
| 608 |
+
<h2 style={{ margin: '0 0 16px 0' }}>ResearchPilot Console</h2>
|
| 609 |
+
<div style={{ display: "flex", alignItems: "center", gap: "12px", marginTop: "16px" }}>
|
| 610 |
+
<div style={{ background: "rgba(138, 43, 226, 0.15)", border: "1px solid rgba(138, 43, 226, 0.4)", padding: "6px 14px", borderRadius: "99px", fontSize: "0.75rem", color: "var(--accent-2)", fontWeight: 700, letterSpacing: "0.05em", textTransform: "uppercase" }}>
|
| 611 |
+
Lead Architect
|
| 612 |
+
</div>
|
| 613 |
+
<span style={{ fontFamily: "'Dancing Script', cursive", fontSize: "1.8rem", fontWeight: 700, background: "linear-gradient(135deg, #fff 20%, var(--accent-2) 100%)", WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent", letterSpacing: "0.05em", transform: "translateY(-2px)" }}>Subhadip Hensh</span>
|
| 614 |
+
</div>
|
| 615 |
+
<hr style={{ border: 'none', borderTop: '1px solid var(--border)', margin: '24px 0' }} />
|
| 616 |
+
<h3><Server size={18} style={{ display: 'inline', verticalAlign: 'middle', marginRight: '8px' }} /> System Overview</h3>
|
| 617 |
+
<p style={{ fontSize: "0.95rem", lineHeight: 1.7, marginBottom: "16px", color: 'var(--text-muted)' }}>ResearchPilot is a high-performance RAG engine tailored for Machine Learning literature. It features hybrid sparse-dense searching, advanced cross-encoder reranking, and GPU-driven vector indexing via Qdrant.</p>
|
| 618 |
+
<h3><Activity size={18} style={{ display: 'inline', verticalAlign: 'middle', marginRight: '8px' }} /> Current Operational Capacity</h3>
|
| 619 |
+
<ul style={{ fontSize: "0.95rem", lineHeight: 1.7, color: 'var(--text-muted)', paddingLeft: '20px' }}>
|
| 620 |
+
<li style={{ marginBottom: '8px' }}><strong>Current Index</strong> Synthesizing 51,019 dense embeddings isolated from ~700 major AI & ML papers.</li>
|
| 621 |
+
<li><strong>Data Categories</strong> Fully indexed on core Machine Learning (cs.LG) and AI (cs.AI).</li>
|
| 622 |
+
</ul>
|
| 623 |
+
<h3><Layers size={18} style={{ display: 'inline', verticalAlign: 'middle', marginRight: '8px' }} /> Core Technology Stack</h3>
|
| 624 |
+
<ul style={{ fontSize: "0.95rem", lineHeight: 1.7, color: 'var(--text-muted)', paddingLeft: '20px' }}>
|
| 625 |
+
<li style={{ marginBottom: '8px' }}><strong>Frontend Application</strong> Next.js 16 (App Router), React, Framer Motion, Vanilla CSS.</li>
|
| 626 |
+
<li style={{ marginBottom: '8px' }}><strong>Backend Environment</strong> Python, FastAPI, Uvicorn, Pydantic.</li>
|
| 627 |
+
<li style={{ marginBottom: '8px' }}><strong>Vector Database Engine</strong> Qdrant (GPU Accelerated Dense Vectors).</li>
|
| 628 |
+
<li style={{ marginBottom: '8px' }}><strong>RAG Processing Pipeline</strong> SentenceTransformers (BGE-base), BM25 Sparse Search, Cross-Encoder Reranking, Groq LLM (LLaMA 3.3).</li>
|
| 629 |
+
<li><strong>Mathematics Engine</strong> KaTeX & React-Markdown for fully dynamic native LaTeX equations.</li>
|
| 630 |
+
</ul>
|
| 631 |
+
<h3><Rocket size={18} style={{ display: 'inline', verticalAlign: 'middle', marginRight: '8px' }} /> Phase 2: In-Progress Architecture</h3>
|
| 632 |
+
<ul style={{ fontSize: "0.95rem", lineHeight: 1.7, color: 'var(--text-muted)', paddingLeft: '20px' }}>
|
| 633 |
+
<li style={{ marginBottom: '8px' }}><strong>Massive Data Expansion</strong> Scaling dataset soon to 10,000+ — 20,000+ ML papers spanning NLP, Computer Vision, and Robotics.</li>
|
| 634 |
+
<li style={{ marginBottom: '8px' }}><strong>Distributed Hardware Execution</strong> Scaling ingestion logic to cloud-based GPU clusters for extreme speed.</li>
|
| 635 |
+
<li><strong>Multi-modal Analysis</strong> Soon integrating visual graph and chart processing abilities into the synthesis engine.</li>
|
| 636 |
+
</ul>
|
| 637 |
+
</motion.div>
|
| 638 |
+
</div>
|
| 639 |
+
)}
|
| 640 |
+
</AnimatePresence>
|
| 641 |
+
|
| 642 |
<div className="chat-container">
|
| 643 |
{currentMessages.length === 0 ? (
|
| 644 |
<motion.div initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} style={{ margin: 'auto', textAlign: 'center', opacity: 0.8, maxWidth: '400px' }}>
|
|
|
|
| 725 |
<option value="All">All Topics</option>
|
| 726 |
<option value="cs.LG">cs.LG (Machine Learning)</option>
|
| 727 |
<option value="cs.AI">cs.AI (Artificial Intelligence)</option>
|
| 728 |
+
<option value="stat.ML">stat.ML (Machine Learning Stats)</option>
|
| 729 |
<option value="cs.CL">cs.CL (Computation & Language)</option>
|
| 730 |
+
<option value="cs.CV">cs.CV (Computer Vision)</option>
|
| 731 |
<option value="cs.RO">cs.RO (Robotics)</option>
|
|
|
|
| 732 |
</select>
|
| 733 |
<select style={{ background: '#000', border: '1px solid #333', color: '#fff', padding: '6px 12px', borderRadius: '6px' }} value={filterYear} onChange={(e) => setFilterYear(e.target.value)}>
|
| 734 |
<option value="All">All Years</option>
|