diff --git a/web/app/arith/page.tsx b/web/app/arith/page.tsx index 392e95aca..3ce4d4d33 100644 --- a/web/app/arith/page.tsx +++ b/web/app/arith/page.tsx @@ -1,6 +1,7 @@ "use client"; -import { useEffect, useMemo, useRef, useState } from "react"; +import { Suspense, useEffect, useMemo, useRef, useState } from "react"; +import { useSearchParams } from "next/navigation"; import { loadArithCorpus, arithmeticTopK, type ArithCorpus, type Term } from "@/lib/arith"; const DEFAULT_TERMS: Term[] = [ @@ -36,11 +37,19 @@ const EXAMPLES: { label: string; terms: Term[] }[] = [ const ARITH_YEAR = 2025; -export default function ArithPage() { +function ArithPageInner() { + const searchParams = useSearchParams(); + const w = searchParams.get("w"); const [terms, setTerms] = useState(DEFAULT_TERMS); const [corpus, setCorpus] = useState(null); const [error, setError] = useState(null); + useEffect(() => { + if (w) { + setTerms([{ sign: 1, word: w }]); + } + }, [w]); + useEffect(() => { loadArithCorpus().then((c) => { if (!c) setError("corpus not available — run scripts/precompute_arithmetic.py"); @@ -358,3 +367,19 @@ function WordInput({ ); } + +export default function ArithPage() { + return ( + +
+ loading math space… +
+ + } + > + +
+ ); +} diff --git a/web/app/explore/page.tsx b/web/app/explore/page.tsx index 24d4b6f93..1b2ce4dd0 100644 --- a/web/app/explore/page.tsx +++ b/web/app/explore/page.tsx @@ -88,6 +88,17 @@ function ExplorePageInner() { style={{ height: `${nYears * 100}vh` }} >
+ {/* background atmosphere */} +
+
+
+ {data ? ( onHoverChip(i) : undefined} onMouseLeave={onHoverChip ? () => onHoverChip(null) : undefined} - className="group flex items-center gap-2 backdrop-blur-md bg-black/35 hover:bg-black/55 border border-white/10 rounded px-2 py-1.5 text-xs font-mono transition-colors" + className="group flex items-center gap-2 backdrop-blur-md bg-black/35 hover:bg-black/55 border border-white/10 rounded-lg px-2.5 py-1.5 text-xs font-mono transition-all duration-200" > {w} +
+ + + + + + + + + + + + +
+ + {/* Dropdown menu */} + + {dropdownOpen && ( + - {l.label} - - - ); - })} - +
+ {TOOL_LINKS.map((tool) => { + const active = pathname === tool.href; + return ( + + + {tool.label} + + + {tool.desc} + + + ); + })} +
+
+ )} +
+
+
+ + {/* Mobile menu toggle */} + + + {/* Mobile Drawer Menu */} + + {mobileMenuOpen && ( + +
+
+
core space
+ {MAIN_LINKS.map((l) => { + const active = + l.href === "/" + ? pathname === "/" + : pathname === l.href || pathname.startsWith(l.href + "/"); + return ( + + {l.label} + + ); + })} +
+
+
analysis & tools
+ {TOOL_LINKS.map((tool) => { + const active = pathname === tool.href; + return ( + + {tool.label} + + {tool.desc} + + + ); + })} +
+
+
+ )} +
); }