diff --git a/services/frontend/src/app/(dashboard)/analysis/view.tsx b/services/frontend/src/app/(dashboard)/analysis/view.tsx index 981ecd30..3b09aac1 100644 --- a/services/frontend/src/app/(dashboard)/analysis/view.tsx +++ b/services/frontend/src/app/(dashboard)/analysis/view.tsx @@ -116,16 +116,16 @@ export function AnalysisView() { return (
{/* Tactical HUD Header Bar */} -
+
- -

+ +

Deep Scan · Semantic Search & Telemetry Analysis

-
+
ENGINE: - + {query.trim().length >= 2 ? "SCANNING" : "STANDBY"}
@@ -134,14 +134,14 @@ export function AnalysisView() { {/* Hero Query Stage */}
- +

Cross-Guild Archive Intelligence

-

+

Query vectorized messages, heuristic flags, and user behavior

@@ -184,7 +184,7 @@ export function AnalysisView() { {(search.data ?? []).map((m) => (
@@ -224,8 +224,7 @@ export function AnalysisView() { eyebrow="engagement" title={ - Top - Reactors + Top Reactors } /> @@ -247,14 +246,14 @@ export function AnalysisView() { {r.username} -
+
+0 @@ -275,8 +274,7 @@ export function AnalysisView() { eyebrow="volume" title={ - Top Active - Channels + Top Active Channels } /> @@ -284,13 +282,13 @@ export function AnalysisView() { {(channels ?? []).slice(0, 6).map((c) => (
- + {c.channel_name ?? c.channel_id.slice(0, 10)} - + {c.total_messages.toLocaleString()} msgs
diff --git a/services/frontend/src/app/(dashboard)/dashboard/view.tsx b/services/frontend/src/app/(dashboard)/dashboard/view.tsx index cd0674ab..c8875240 100644 --- a/services/frontend/src/app/(dashboard)/dashboard/view.tsx +++ b/services/frontend/src/app/(dashboard)/dashboard/view.tsx @@ -102,17 +102,17 @@ export function DashboardView({ return (
- {/* Precision Sub-Header Bar */} -
+ {/* Tactical HUD Header Bar */} +
- -

+ +

Telemetry Overview · Node 01

-
+
SIGNAL: - + STABLE_STREAM
@@ -174,20 +174,16 @@ export function DashboardView({ />
-
+
-
- CLEAN -
-
+
CLEAN
+
{formatNumber(s.total_clean)}
-
- FLAGGED -
-
+
FLAGGED
+
{formatNumber(s.total_flagged)}
@@ -207,12 +203,12 @@ export function DashboardView({ {reactions.slice(0, 4).map((r) => (
- + {r.content || "[Media/Attachment]"} - + {formatNumber(r.reaction_count)} reactions
@@ -227,23 +223,23 @@ export function DashboardView({
- + Review Live Moderation Queue - + - + Inspect Active Voice Stages - +
diff --git a/services/frontend/src/app/(dashboard)/media/view.tsx b/services/frontend/src/app/(dashboard)/media/view.tsx index 67675ad7..be5859d6 100644 --- a/services/frontend/src/app/(dashboard)/media/view.tsx +++ b/services/frontend/src/app/(dashboard)/media/view.tsx @@ -98,26 +98,26 @@ export function MediaView({ initialStatus }: { initialStatus?: MediaState }) {
{/* Precision Sub-Header Bar */} -
+
-

+

Audio Engine · Media Gateway

- ENGINE: + ENGINE: {playing ? "STREAMING" : "IDLE"} @@ -130,16 +130,16 @@ export function MediaView({ initialStatus }: { initialStatus?: MediaState }) {
-
+
-
+
{current?.title ?? "No Active Media Stream"}
-
+
{current ? `${formatDuration(current.durationMs ?? 0)} · High Fidelity Stream` : "Queue a track via URL below"} @@ -153,9 +153,7 @@ export function MediaView({ initialStatus }: { initialStatus?: MediaState }) { variant="ghost" size="sm" onClick={() => loop.mutateAsync()} - className={ - media?.loop ? "border-[#7170ff] text-[#7170ff]" : "" - } + className={media?.loop ? "border-signal text-signal" : ""} > @@ -177,7 +175,7 @@ export function MediaView({ initialStatus }: { initialStatus?: MediaState }) {
{/* Quick URL Input */} -
+
{queueList.length === 0 ? ( -
+
QUEUE EMPTY
) : ( queueList.map((item, idx) => (
{item.title} - + {formatDuration(item.durationMs ?? 0)}
diff --git a/services/frontend/src/app/(dashboard)/messages/view.tsx b/services/frontend/src/app/(dashboard)/messages/view.tsx index 53ec9395..ed1574f8 100644 --- a/services/frontend/src/app/(dashboard)/messages/view.tsx +++ b/services/frontend/src/app/(dashboard)/messages/view.tsx @@ -227,16 +227,16 @@ export function MessagesView({ return (
{/* Tactical HUD Header Bar */} -
+
- -

+ +

Chat Log Stream · Ingestion Stream

-
+
MODE: - + {searching ? "SEARCH_ACTIVE" : viewMode.toUpperCase()}
@@ -266,14 +266,14 @@ export function MessagesView({ onChange={(e) => setQuery(e.target.value)} />
-
+
-
+
) : ( - + {loadedPages >= MAX_OLDER_PAGES ? `CAPPED AT ${MAX_OLDER_PAGES} PAGES` : "STREAM ROOT REACHED"} @@ -432,9 +432,9 @@ export function MessagesView({ node.type === "date" ? (
- + {node.label}
) : ( @@ -554,7 +554,7 @@ function MessageDetail({
-
+
{renderMessageContent(m.edited_content ?? m.content, m.metadata) || "(no text content)"}
@@ -562,7 +562,7 @@ function MessageDetail({ {m.ai_analysis && (
AI heuristic reasoning
-
+
{m.ai_analysis}
@@ -595,11 +595,11 @@ function MessageDetail({ href={a.discord_url ?? a.uploaded_url ?? "#"} target="_blank" rel="noreferrer" - className="flex items-center gap-2 rounded-[6px] border border-white/[0.06] bg-white/[0.02] px-3 py-2 text-xs text-[#d0d6e0] hover:border-white/[0.12] hover:text-[#f7f8f8]" + className="hud-card flex items-center gap-2 px-3 py-2 text-xs text-ink-soft hover:text-ink" > - + {a.filename} - + {formatBytes(a.size)} @@ -626,28 +626,28 @@ function MessageRow({ key={m.id} type="button" onClick={() => onSelect(m.id)} - className={`msg-feed-card flex w-full items-start gap-3 rounded-[6px] border p-2.5 text-left transition-all ${ + className={`msg-feed-card flex w-full items-start gap-3 rounded-[8px] border p-2.5 text-left transition-all ${ selected === m.id - ? "border-[#7170ff]/40 bg-[#7170ff]/10" - : "border-white/[0.06] bg-white/[0.02] hover:border-white/[0.12] hover:bg-white/[0.04]" + ? "border-signal/50 bg-signal/10 shadow-xs" + : "border-hairline bg-surface-2 hover:border-hairline-focus hover:bg-surface" }`} >
- + {m.username} - + {getMessageChannelLabel(m)} - + {formatRelativeTime(m.created_at)}
-
+
{renderMessageContent(m.content, m.metadata) || ( - (empty / embed) + (empty / embed) )}
diff --git a/services/frontend/src/app/(dashboard)/moderation/view.tsx b/services/frontend/src/app/(dashboard)/moderation/view.tsx index bf25db17..92d93e23 100644 --- a/services/frontend/src/app/(dashboard)/moderation/view.tsx +++ b/services/frontend/src/app/(dashboard)/moderation/view.tsx @@ -91,21 +91,21 @@ export function ModerationView({ return (
- {/* Precision Sub-Header Bar */} -
+ {/* Tactical HUD Header Bar */} +
0.1 - ? "bg-[#f43f5e] shadow-[0_0_8px_#f43f5e]" - : "bg-[#7170ff] shadow-[0_0_8px_#7170ff]" + ? "bg-vermilion shadow-[0_0_8px_var(--color-vermilion-glow)]" + : "bg-signal shadow-[0_0_8px_var(--color-signal-glow)]" }`} /> -

+

Moderation Intelligence Console

-
+
{(["all", "flagged", "clean"] as const).map((mode) => ( diff --git a/services/frontend/src/app/(dashboard)/voice/view.tsx b/services/frontend/src/app/(dashboard)/voice/view.tsx index 8aa4e968..e5a8bb97 100644 --- a/services/frontend/src/app/(dashboard)/voice/view.tsx +++ b/services/frontend/src/app/(dashboard)/voice/view.tsx @@ -116,26 +116,26 @@ export function VoiceView({
{/* Precision Sub-Header Bar */} -
+
-

+

Voice Spectrum & Stage Controls

- STAGE: + STAGE: {connected ? "LIVE_BRIDGE" : "OFFLINE"} @@ -203,12 +203,12 @@ export function VoiceView({
-
+
- + Mic Sensitivity - + {micVol}%
@@ -222,17 +222,17 @@ export function VoiceView({ setMicVol(v); mic.setVolume(v / 100); }} - className="mt-2 h-1.5 w-full appearance-none rounded-full bg-white/[0.08] accent-[#7170ff]" + className="mt-2 h-1.5 w-full appearance-none rounded-full bg-surface-2 accent-signal" />
-
+
- + Monitor Output - + {listenVol}%
@@ -246,14 +246,14 @@ export function VoiceView({ setListenVol(v); listen.setVolume(v / 100); }} - className="mt-2 h-1.5 w-full appearance-none rounded-full bg-white/[0.08] accent-[#10b981]" + className="mt-2 h-1.5 w-full appearance-none rounded-full bg-surface-2 accent-success" />
-
-
+
+
CODEC: OPUS 48KHZ · LOW_LATENCY
diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 642788e3..c72e1ae3 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -3,111 +3,131 @@ @custom-variant dark (&:is(.dark *)); /* - * GMW — Linear Precision Clean Dark Design System - * - * Inspired by Linear's ultra-precise, dark-mode native interface. - * Built on achromatic luminance hierarchy, near-black canvas (#08090a), - * ultra-crisp hairline borders, subtle indigo/violet accents (#5e6ad2 / #7170ff), - * and buttery smooth GSAP-driven micro-interactions. + * GMW — Command Center Tactical HUD Design System + * Engineered for high precision in both DARK and LIGHT modes. + * Uses semantic CSS variables for seamless theme switching, eliminating hardcoded hex clashes. */ +:root { + /* ── Light Mode Base Palette (Crisp High-Contrast Titanium HUD) ── */ + --canvas-base: #f0f2f5; + --canvas-subtle: #e5e8ed; + --panel-bg: rgba(255, 255, 255, 0.85); + --panel-bg-subtle: rgba(255, 255, 255, 0.6); + --panel-border: rgba(15, 23, 42, 0.08); + --panel-border-hover: rgba(94, 106, 210, 0.35); + + --text-primary: #0f172a; + --text-secondary: #334155; + --text-muted: #64748b; + --text-faint: #94a3b8; + + --accent-brand: #4f46e5; + --accent-signal: #6366f1; + --accent-signal-bg: rgba(99, 102, 241, 0.1); + --accent-signal-border: rgba(99, 102, 241, 0.25); + --accent-signal-glow: rgba(99, 102, 241, 0.25); + + --color-success: #059669; + --color-success-bg: rgba(5, 150, 105, 0.1); + --color-warning: #d97706; + --color-warning-bg: rgba(217, 119, 6, 0.1); + --color-danger: #e11d48; + --color-danger-bg: rgba(225, 29, 72, 0.1); + + --grid-pattern: rgba(15, 23, 42, 0.035); + --shadow-hud: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.05); +} + +.dark { + /* ── Dark Mode Base Palette (Stealth Obsidian Tactical HUD) ── */ + --canvas-base: #060709; + --canvas-subtle: #0c0e12; + --panel-bg: rgba(13, 16, 23, 0.75); + --panel-bg-subtle: rgba(255, 255, 255, 0.03); + --panel-border: rgba(255, 255, 255, 0.07); + --panel-border-hover: rgba(113, 112, 255, 0.45); + + --text-primary: #f8fafc; + --text-secondary: #cbd5e1; + --text-muted: #94a3b8; + --text-faint: #475569; + + --accent-brand: #5e6ad2; + --accent-signal: #7170ff; + --accent-signal-bg: rgba(113, 112, 255, 0.12); + --accent-signal-border: rgba(113, 112, 255, 0.3); + --accent-signal-glow: rgba(113, 112, 255, 0.35); + + --color-success: #10b981; + --color-success-bg: rgba(16, 185, 129, 0.12); + --color-warning: #f59e0b; + --color-warning-bg: rgba(245, 158, 11, 0.12); + --color-danger: #f43f5e; + --color-danger-bg: rgba(244, 63, 94, 0.15); + + --grid-pattern: rgba(255, 255, 255, 0.025); + --shadow-hud: 0 8px 32px -4px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); +} + @theme { - /* ── Canvas & Surface Stack (Luminance Stacking) ── */ - --color-canvas: #08090a; - --color-canvas-2: #0f1011; - --color-surface: rgba(255, 255, 255, 0.035); - --color-surface-2: rgba(255, 255, 255, 0.06); - --color-surface-elevated: #191a1b; - --color-surface-hover: rgba(255, 255, 255, 0.08); + --color-canvas: var(--canvas-base); + --color-canvas-2: var(--canvas-subtle); + --color-surface: var(--panel-bg); + --color-surface-2: var(--panel-bg-subtle); + --color-hairline: var(--panel-border); + --color-hairline-focus: var(--panel-border-hover); - /* ── Typography & Ink ── */ - --color-ink: #f7f8f8; - --color-ink-soft: #d0d6e0; - --color-ink-muted: #8a8f98; - --color-ink-faint: #62666d; + --color-ink: var(--text-primary); + --color-ink-soft: var(--text-secondary); + --color-ink-muted: var(--text-muted); + --color-ink-faint: var(--text-faint); - /* ── Hairline Structural Borders ── */ - --color-hairline: rgba(255, 255, 255, 0.08); - --color-hairline-subtle: rgba(255, 255, 255, 0.05); - --color-hairline-focus: rgba(255, 255, 255, 0.16); - --hairline-w: 1px; + --color-brand: var(--accent-brand); + --color-brand-accent: var(--accent-signal); + --color-signal: var(--accent-signal); + --color-signal-glow: var(--accent-signal-glow); - /* ── Brand & Accent Signals (Subdued Precision) ── */ - --color-brand: #5e6ad2; - --color-brand-accent: #7170ff; - --color-brand-hover: #828fff; - --color-brand-subtle: rgba(94, 106, 210, 0.15); + --color-status-success: var(--color-success); + --color-amber: var(--color-warning); + --color-vermilion: var(--color-danger); - --color-signal: #7170ff; - --color-signal-ink: #ffffff; - --color-signal-glow: rgba(113, 112, 255, 0.25); + --font-sans: var(--font-inter), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + --font-mono: var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo, monospace; + --font-display: var(--font-display), var(--font-inter), sans-serif; - /* Semantic status colors (crisp, purposeful) */ - --color-status-success: #10b981; - --color-status-success-subtle: rgba(16, 185, 129, 0.15); - --color-amber: #f59e0b; - --color-amber-subtle: rgba(245, 158, 11, 0.15); - --color-vermilion: #f43f5e; - --color-vermilion-subtle: rgba(244, 63, 94, 0.15); - --color-vermilion-glow: rgba(244, 63, 94, 0.3); - - --color-ring: var(--color-brand-accent); - - /* ── Typography Stack ── */ - --font-sans: var(--font-inter), "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; - --font-mono: var(--font-jetbrains-mono), "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; - --font-display: var(--font-inter), "Inter", -apple-system, BlinkMacSystemFont, sans-serif; - - /* ── Radii (Refined, tighter precision) ── */ - --radius-r: 10px; - --radius-r-panel: 8px; + --radius-r: 8px; + --radius-r-panel: 10px; --radius-r-control: 6px; --radius-r-pill: 9999px; } -/* ── Light Theme Fallbacks ── */ -.light { - color-scheme: light; - --color-canvas: #f7f8f8; - --color-canvas-2: #f3f4f5; - --color-surface: rgba(0, 0, 0, 0.03); - --color-surface-2: rgba(0, 0, 0, 0.05); - --color-surface-elevated: #ffffff; - --color-surface-hover: rgba(0, 0, 0, 0.06); - - --color-ink: #171717; - --color-ink-soft: #404040; - --color-ink-muted: #737373; - --color-ink-faint: #a3a3a3; - - --color-hairline: rgba(0, 0, 0, 0.08); - --color-hairline-subtle: rgba(0, 0, 0, 0.04); - --color-hairline-focus: rgba(0, 0, 0, 0.18); -} - @layer base { * { - @apply border-transparent; - font-feature-settings: "cv01", "ss03"; + border-color: var(--panel-border); } html { @apply font-sans antialiased scroll-smooth; - background-color: var(--color-canvas); - color: var(--color-ink); + background-color: var(--canvas-base); + color: var(--text-primary); } body { - @apply bg-canvas text-ink font-sans antialiased; min-height: 100dvh; + background-color: var(--canvas-base); + color: var(--text-primary); + background-image: + linear-gradient(to right, var(--grid-pattern) 1px, transparent 1px), + linear-gradient(to bottom, var(--grid-pattern) 1px, transparent 1px); + background-size: 32px 32px; } ::selection { - background: rgba(113, 112, 255, 0.28); - color: #ffffff; + background: var(--accent-signal-bg); + color: var(--accent-signal); } - /* Linear-style minimalist slim scrollbar */ ::-webkit-scrollbar { width: 6px; height: 6px; @@ -116,65 +136,69 @@ background: transparent; } ::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, 0.12); + background: var(--text-faint); + opacity: 0.4; border-radius: 9999px; } ::-webkit-scrollbar-thumb:hover { - background: rgba(255, 255, 255, 0.22); + background: var(--text-muted); } :focus-visible { - outline: 2px solid var(--color-brand-accent); + outline: 2px solid var(--accent-signal); outline-offset: 2px; } } @layer components { - /* Precision Surface Panel (Linear Card) */ + /* Tactical HUD Glass Panel */ .glass { - background: var(--color-surface); - border: 1px solid var(--color-hairline); - border-radius: var(--radius-r); - backdrop-filter: blur(12px); - -webkit-backdrop-filter: blur(12px); - box-shadow: - 0 1px 0 0 rgba(255, 255, 255, 0.03) inset, - 0 12px 32px -16px rgba(0, 0, 0, 0.7); - transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease; + background: var(--panel-bg); + border: 1px solid var(--panel-border); + border-radius: var(--radius-r-panel); + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + box-shadow: var(--shadow-hud); + transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease; + } + + .glass:hover { + border-color: var(--panel-border-hover); } .glass-2 { - background: var(--color-surface-2); - border: 1px solid var(--color-hairline-subtle); - border-radius: var(--radius-r-panel); - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); + background: var(--panel-bg-subtle); + border: 1px solid var(--panel-border); + border-radius: var(--radius-r); } - /* Linear-style subtle interactive hover card */ - .linear-card { - background: rgba(255, 255, 255, 0.02); - border: 1px solid rgba(255, 255, 255, 0.06); + /* HUD Tactical Card */ + .linear-card, + .hud-card { + position: relative; + background: var(--panel-bg); + border: 1px solid var(--panel-border); border-radius: var(--radius-r-panel); - transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1); + backdrop-filter: blur(12px); + box-shadow: var(--shadow-hud); + transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); } - .linear-card:hover { - background: rgba(255, 255, 255, 0.04); - border-color: rgba(255, 255, 255, 0.12); + + .linear-card:hover, + .hud-card:hover { + border-color: var(--panel-border-hover); transform: translateY(-1px); } - /* Precision Eyebrow Header */ .eyebrow { font-family: var(--font-mono); font-size: 0.68rem; - font-weight: 500; + font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; - color: var(--color-ink-muted); + color: var(--text-muted); } - /* Micro-Pill Tag */ .pill { display: inline-flex; align-items: center; @@ -182,10 +206,11 @@ padding: 0.18rem 0.55rem; border-radius: var(--radius-r-pill); font-size: 0.7rem; + font-family: var(--font-mono); font-weight: 500; - background: rgba(255, 255, 255, 0.04); - border: 1px solid var(--color-hairline); - color: var(--color-ink-soft); + background: var(--panel-bg-subtle); + border: 1px solid var(--panel-border); + color: var(--text-secondary); } .mono { @@ -193,77 +218,57 @@ font-variant-numeric: tabular-nums; } - /* Display Typography (Compressed Linear-style tracking) */ .display { - font-family: var(--font-sans); - font-weight: 600; + font-family: var(--font-display); + font-weight: 700; letter-spacing: -0.035em; - line-height: 1.05; + line-height: 1.1; } } @layer utilities { - .text-signal { color: var(--color-brand-accent); } - .text-brand { color: var(--color-brand-accent); } - .text-amber { color: var(--color-amber); } - .text-vermilion { color: var(--color-vermilion); } - .text-success { color: var(--color-status-success); } - .text-ink-soft { color: var(--color-ink-soft); } - .text-ink-muted { color: var(--color-ink-muted); } - .text-ink-faint { color: var(--color-ink-faint); } + .text-signal { color: var(--accent-signal); } + .text-brand { color: var(--accent-brand); } + .text-amber { color: var(--color-warning); } + .text-vermilion { color: var(--color-danger); } + .text-success { color: var(--color-success); } + .text-ink { color: var(--text-primary); } + .text-ink-soft { color: var(--text-secondary); } + .text-ink-muted { color: var(--text-muted); } + .text-ink-faint { color: var(--text-faint); } - .hero-clamp { - font-size: clamp(1.85rem, 1.2rem + 3.5vw, 2.5rem); - letter-spacing: -0.04em; - font-weight: 600; - } + .bg-canvas { background-color: var(--canvas-base); } + .bg-surface { background-color: var(--panel-bg); } + .bg-surface-2 { background-color: var(--panel-bg-subtle); } + .border-hairline { border-color: var(--panel-border); } .glow-signal { - text-shadow: 0 0 16px var(--color-signal-glow); - } - - .ring-focus { - transition: box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease; - } - .ring-focus:hover { - border-color: rgba(255, 255, 255, 0.16); - } - .ring-focus:focus-visible { - box-shadow: 0 0 0 2px var(--color-brand-accent); + text-shadow: 0 0 16px var(--accent-signal-glow); } } -/* ═══ Micro Navigation Elements ═══ */ -.nav-dock-item { - position: relative; - transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1); -} -.nav-dock-item:hover { - background: rgba(255, 255, 255, 0.05); - color: var(--color-ink); -} -.nav-dock-item.is-active { - background: rgba(255, 255, 255, 0.08); - color: #ffffff; - border: 1px solid rgba(255, 255, 255, 0.12); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); +/* ═══ Keyframes & Animations ═══ */ +@keyframes breathe { + 0%, 100% { opacity: 0.4; transform: scale(0.95); } + 50% { opacity: 1; transform: scale(1.05); } } -/* ── Keyframes ── */ @keyframes spin-disc { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } + @keyframes pulse-ring { - 0% { transform: scale(0.85); opacity: 0.8; } + 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } } +.animate-breathe { animation: breathe 2.5s ease-in-out infinite; } .animate-spin-disc { animation: spin-disc 10s linear infinite; } .animate-pulse-ring { animation: pulse-ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite; } -/* Respect reduced motion */ @media (prefers-reduced-motion: reduce) { + .animate-breathe, .animate-spin-disc, .animate-pulse-ring { animation: none !important; @@ -274,7 +279,5 @@ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; - scroll-behavior: auto !important; } - html { scroll-behavior: auto; } } diff --git a/services/frontend/src/components/ChannelCultureGlossary.tsx b/services/frontend/src/components/ChannelCultureGlossary.tsx index 9613d587..69c6e07a 100644 --- a/services/frontend/src/components/ChannelCultureGlossary.tsx +++ b/services/frontend/src/components/ChannelCultureGlossary.tsx @@ -63,7 +63,7 @@ export function ChannelCultureGlossary({ placeholder="Filter channels or culture topics..." value={filter} onChange={(e) => setFilter(e.target.value)} - className="w-full rounded-[6px] border border-white/[0.08] bg-white/[0.02] py-1.5 pl-9 pr-3 text-xs text-ink placeholder:text-ink-faint focus:border-[#7170ff] focus:outline-none" + className="w-full rounded-[6px] border border-hairline bg-surface-2 py-1.5 pl-9 pr-3 text-xs text-ink placeholder:text-ink-faint focus:border-signal focus:outline-none" />
@@ -80,9 +80,9 @@ export function ChannelCultureGlossary({ })), ) } - className="inline-flex items-center gap-1.5 rounded-[6px] border border-white/[0.08] bg-white/[0.02] px-3 py-1.5 font-mono text-[11px] text-ink-soft transition-colors hover:border-white/[0.16] hover:bg-white/[0.04] hover:text-ink" + className="inline-flex items-center gap-1.5 rounded-[6px] border border-hairline bg-surface-2 px-3 py-1.5 font-mono text-[11px] text-ink-soft transition-colors hover:bg-surface hover:text-ink" > - + EXPORT_CSV )} @@ -116,13 +116,13 @@ export function ChannelCultureGlossary({ return (
{/* Channel Card Header */} -
+
- + @@ -152,10 +152,10 @@ export function ChannelCultureGlossary({
{/* Signal Strength Bar & Timestamp */} -
+
- + INTEL RATIO @@ -164,9 +164,9 @@ export function ChannelCultureGlossary({ : "NEVER"}
-
+
diff --git a/services/frontend/src/components/LiveModerationFeed.tsx b/services/frontend/src/components/LiveModerationFeed.tsx index 5dc8d1f2..b3d00243 100644 --- a/services/frontend/src/components/LiveModerationFeed.tsx +++ b/services/frontend/src/components/LiveModerationFeed.tsx @@ -27,14 +27,14 @@ function actionIcon(type: string) { switch (type) { case "ban_user": case "kick_user": - return ; + return ; case "timeout_user": - return ; + return ; case "delete_message": case "warn_user": - return ; + return ; default: - return ; + return ; } } @@ -90,11 +90,11 @@ export function LiveModerationFeed({ return (
-
+
- - + + Live Stream Audit Log @@ -116,9 +116,9 @@ export function LiveModerationFeed({ return (
- + {actionIcon(a.action_type)} diff --git a/services/frontend/src/components/TermGlossary.tsx b/services/frontend/src/components/TermGlossary.tsx index e03030bc..42df084e 100644 --- a/services/frontend/src/components/TermGlossary.tsx +++ b/services/frontend/src/components/TermGlossary.tsx @@ -14,7 +14,7 @@ function GlossaryEntry({ t }: { t: GlossaryRow }) { const bodyRef = useRef(null); return ( -
+
)} @@ -141,7 +141,7 @@ export function TermGlossary({ terms }: { terms: GlossaryRow[] }) { eyebrow="knowledge directory" title="Slang & Definition Index" action={ - + {filtered.length} of {terms.length} terms } diff --git a/services/frontend/src/components/chatbot/chatbot.tsx b/services/frontend/src/components/chatbot/chatbot.tsx index 1f49f3b5..3b32e373 100644 --- a/services/frontend/src/components/chatbot/chatbot.tsx +++ b/services/frontend/src/components/chatbot/chatbot.tsx @@ -2,217 +2,259 @@ import { useGSAP } from "@gsap/react"; import gsap from "gsap"; -import { Bot, MessageSquare, Send, Trash2, X } from "lucide-react"; +import { + Bot, + Loader2, + Maximize2, + Minimize2, + Send, + Sparkles, + X, +} from "lucide-react"; import { useEffect, useRef, useState } from "react"; -import { Button, toast } from "@/components/primitives"; -import { MarkdownLite } from "@/components/shared"; +import { Button } from "@/components/primitives"; import { useChatbotUserId } from "@/hooks/use-chatbot-user"; import { chatbotApi } from "@/lib/api"; -import { cn } from "@/lib/utils"; +import { formatRelativeTime } from "@/lib/format"; if (typeof window !== "undefined") { gsap.registerPlugin(useGSAP); } -interface Msg { +interface ChatMessage { id: string; - role: "user" | "bot"; - content: string; - ts: number; -} - -function formatTime(ts: number): string { - try { - return new Date(ts).toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - }); - } catch { - return ""; - } + sender: "user" | "bot"; + text: string; + timestamp: number; } export function Chatbot() { - const userId = useChatbotUserId(); const [open, setOpen] = useState(false); - const [msgs, setMsgs] = useState([]); + const [expanded, setExpanded] = useState(false); + const [messages, setMessages] = useState([]); const [input, setInput] = useState(""); - const [loading, setLoading] = useState(false); - const panelRef = useRef(null); - const bottomRef = useRef(null); + const [sending, setSending] = useState(false); + const userId = useChatbotUserId(); - useGSAP( - () => { - if (!open || !panelRef.current) return; - gsap.fromTo( - panelRef.current, - { opacity: 0, y: 12, scale: 0.98 }, - { opacity: 1, y: 0, scale: 1, duration: 0.22, ease: "power2.out" }, - ); - }, - { dependencies: [open] }, - ); + const containerRef = useRef(null); + const scrollRef = useRef(null); + // Load history on mount useEffect(() => { - if (!open || !userId) return; chatbotApi - .getHistory(userId) + .getHistory(userId || undefined) .then((res) => { - setMsgs( - res.history.slice(-12).flatMap((h) => [ + if (res.history) { + const loaded: ChatMessage[] = res.history.flatMap((h) => [ { id: `${h.id}-u`, - role: "user" as const, - content: h.user_message, - ts: Date.parse(h.created_at) || Date.now(), + sender: "user", + text: h.user_message, + timestamp: new Date(h.created_at).getTime(), }, { id: `${h.id}-b`, - role: "bot" as const, - content: h.bot_response, - ts: Date.parse(h.created_at) || Date.now(), + sender: "bot", + text: h.bot_response, + timestamp: new Date(h.created_at).getTime() + 100, }, - ]), - ); + ]); + setMessages(loaded); + } }) .catch(() => {}); - }, [open, userId]); + }, [userId]); + // Auto-scroll to bottom on new messages useEffect(() => { - bottomRef.current?.scrollIntoView({ behavior: "smooth" }); - }, []); - - const send = async (text: string) => { - if (!text.trim() || loading || !userId) return; - setInput(""); - setMsgs((m) => [ - ...m, - { id: `u-${Date.now()}`, role: "user", content: text, ts: Date.now() }, - ]); - setLoading(true); - try { - const res = await chatbotApi.send(text, undefined, userId); - setMsgs((m) => [ - ...m, - { - id: `b-${Date.now()}`, - role: "bot", - content: res.response, - ts: Date.parse(res.timestamp) || Date.now(), - }, - ]); - } catch (e) { - toast({ title: "Chat error", description: String(e), tone: "vermilion" }); - } finally { - setLoading(false); + if (scrollRef.current) { + scrollRef.current.scrollTop = scrollRef.current.scrollHeight; } - }; + }); + + // GSAP animation for floating window + useGSAP( + () => { + if (!containerRef.current) return; + if (open) { + gsap.fromTo( + containerRef.current, + { opacity: 0, scale: 0.95, y: 15 }, + { opacity: 1, scale: 1, y: 0, duration: 0.25, ease: "power2.out" }, + ); + } + }, + { dependencies: [open], scope: containerRef }, + ); + + const handleSend = async (e: React.FormEvent) => { + e.preventDefault(); + const query = input.trim(); + if (!query || sending) return; + + const userMsg: ChatMessage = { + id: `u-${Date.now()}`, + sender: "user", + text: query, + timestamp: Date.now(), + }; + + setMessages((prev) => [...prev, userMsg]); + setInput(""); + setSending(true); - const clearAll = async () => { - if (!userId) return; - setMsgs([]); try { - await chatbotApi.clearHistory(userId); + const res = await chatbotApi.send(query, undefined, userId || "operator"); + const botMsg: ChatMessage = { + id: `b-${Date.now()}`, + sender: "bot", + text: res.response || "No response received.", + timestamp: Date.now(), + }; + setMessages((prev) => [...prev, botMsg]); } catch { - /* best-effort */ + const errMsg: ChatMessage = { + id: `err-${Date.now()}`, + sender: "bot", + text: "Signal telemetry fault. Failed to communicate with neural core.", + timestamp: Date.now(), + }; + setMessages((prev) => [...prev, errMsg]); + } finally { + setSending(false); } }; return ( <> - + {/* Floating Tactical Launcher Button */} + {!open && ( + + )} + {/* Neural Assistant Dialog */} {open && (
-
+ {/* Header */} +
- +
-
- Linear Assistant -
-
- active context -
-
-
- -
- -
- {msgs.length === 0 && !loading && ( -
- Ask anything about telemetry, moderation, or media. -
- )} - {msgs.map((m) => ( -
-
- {m.role === "bot" ? ( - - ) : ( - {m.content} - )} -
- - {formatTime(m.ts)} + + Neural Core Assistant + + + ● ACTIVE
- ))} -
+
+ +
+ + +
+ {/* Messages Body */} +
+ {messages.length === 0 ? ( +
+ + Neural Assistant ready. + + Ask about telemetry, moderation policies, or channel activity. + +
+ ) : ( + messages.map((m) => { + const isUser = m.sender === "user"; + return ( +
+
+ {m.text} +
+ + {formatRelativeTime(m.timestamp)} + +
+ ); + }) + )} + + {sending && ( +
+ + Processing vector inference... +
+ )} +
+ + {/* Input Footer */}
{ - e.preventDefault(); - send(input); - }} - className="flex items-center gap-1.5 border-t border-white/[0.06] p-2" + onSubmit={handleSend} + className="flex items-center gap-1.5 border-t border-hairline p-2" > setInput(e.target.value)} - placeholder="Ask command..." - className="flex-1 rounded-[5px] border border-white/[0.08] bg-white/[0.02] px-2.5 py-1.5 text-xs text-[#f7f8f8] placeholder:text-[#62666d] focus:border-[#7170ff] focus:outline-none" + className="flex-1 rounded-[6px] border border-hairline bg-surface-2 px-3 py-1.5 font-mono text-xs text-ink placeholder:text-ink-faint focus:border-signal focus:outline-none" /> -
diff --git a/services/frontend/src/components/primitives/badge.tsx b/services/frontend/src/components/primitives/badge.tsx index b9a762c1..983719ff 100644 --- a/services/frontend/src/components/primitives/badge.tsx +++ b/services/frontend/src/components/primitives/badge.tsx @@ -16,19 +16,19 @@ export function Badge({ ...props }: BadgeProps) { const tones = { - neutral: "bg-white/[0.04] text-[#d0d6e0] border-white/[0.08]", - signal: "bg-[#7170ff]/10 text-[#7170ff] border-[#7170ff]/25", - success: "bg-[#10b981]/10 text-[#10b981] border-[#10b981]/25", - amber: "bg-[#f59e0b]/10 text-[#f59e0b] border-[#f59e0b]/25", - vermilion: "bg-[#f43f5e]/10 text-[#f43f5e] border-[#f43f5e]/25", + neutral: "bg-surface-2 text-ink-soft border-hairline", + signal: "bg-signal/15 text-signal border-signal/30", + success: "bg-success/15 text-success border-success/30", + amber: "bg-amber/15 text-amber border-amber/30", + vermilion: "bg-vermilion/15 text-vermilion border-vermilion/30", }; const dots = { - neutral: "bg-[#8a8f98]", - signal: "bg-[#7170ff]", - success: "bg-[#10b981]", - amber: "bg-[#f59e0b]", - vermilion: "bg-[#f43f5e]", + neutral: "bg-ink-muted", + signal: "bg-signal", + success: "bg-success", + amber: "bg-amber", + vermilion: "bg-vermilion", }; const sizes = { diff --git a/services/frontend/src/components/primitives/button.tsx b/services/frontend/src/components/primitives/button.tsx index 7c6ce2cf..53d823b1 100644 --- a/services/frontend/src/components/primitives/button.tsx +++ b/services/frontend/src/components/primitives/button.tsx @@ -11,21 +11,20 @@ export const buttonVariants = ({ className?: string; }) => { const base = - "inline-flex items-center justify-center font-sans font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#7170ff] disabled:pointer-events-none disabled:opacity-40 cursor-pointer"; + "inline-flex items-center justify-center font-sans font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal disabled:pointer-events-none disabled:opacity-40 cursor-pointer"; const variants = { primary: - "bg-[#5e6ad2] text-white hover:bg-[#7170ff] shadow-sm active:scale-[0.98]", + "bg-signal text-white hover:opacity-90 shadow-xs active:scale-[0.98]", ghost: - "bg-white/[0.03] text-[#d0d6e0] border border-white/[0.08] hover:bg-white/[0.06] hover:text-[#f7f8f8] hover:border-white/[0.14] active:scale-[0.98]", + "bg-surface-2 text-ink-soft border border-hairline hover:bg-surface hover:text-ink hover:border-hairline-focus active:scale-[0.98]", outline: - "bg-transparent text-[#d0d6e0] border border-white/[0.12] hover:bg-white/[0.04] hover:text-[#f7f8f8] active:scale-[0.98]", + "bg-transparent text-ink-soft border border-hairline hover:bg-surface-2 hover:text-ink active:scale-[0.98]", secondary: - "bg-white/[0.06] text-[#f7f8f8] hover:bg-white/[0.1] border border-white/[0.08] active:scale-[0.98]", - subtle: - "bg-transparent text-[#8a8f98] hover:bg-white/[0.04] hover:text-[#f7f8f8]", + "bg-surface text-ink hover:bg-surface-2 border border-hairline active:scale-[0.98]", + subtle: "bg-transparent text-ink-muted hover:bg-surface-2 hover:text-ink", danger: - "bg-[#f43f5e]/15 text-[#f43f5e] border border-[#f43f5e]/30 hover:bg-[#f43f5e]/25 active:scale-[0.98]", + "bg-vermilion/15 text-vermilion border border-vermilion/30 hover:bg-vermilion/25 active:scale-[0.98]", }; const sizes = { diff --git a/services/frontend/src/components/shared/section.tsx b/services/frontend/src/components/shared/section.tsx index 9ff710f3..98a95229 100644 --- a/services/frontend/src/components/shared/section.tsx +++ b/services/frontend/src/components/shared/section.tsx @@ -19,12 +19,8 @@ export function SectionHeader({ )} >
- {eyebrow && ( -
- {eyebrow} -
- )} -

+ {eyebrow &&
{eyebrow}
} +

{title}

@@ -54,46 +50,44 @@ export function MetricTile({ className?: string; style?: React.CSSProperties; }) { - const toneColor = + const toneClass = tone === "vermilion" - ? "#f43f5e" + ? "text-vermilion" : tone === "amber" - ? "#f59e0b" + ? "text-amber" : tone === "signal" - ? "#7170ff" - : "#f7f8f8"; + ? "text-signal" + : "text-ink"; return (
-
- {label} -
- {icon && {icon}} +
{label}
+ {icon && {icon}}
{value}
{hint && ( -
{hint}
+
+ {hint} +
)} {spark && spark.length > 1 && (
-
+
diff --git a/services/frontend/src/components/shell/nav-rail.tsx b/services/frontend/src/components/shell/nav-rail.tsx index b705b2e0..75036164 100644 --- a/services/frontend/src/components/shell/nav-rail.tsx +++ b/services/frontend/src/components/shell/nav-rail.tsx @@ -30,17 +30,17 @@ function NavItem({ className={cn( "nav-dock-item group relative flex size-9 items-center justify-center rounded-[7px] transition-all duration-150", active - ? "is-active bg-white/[0.08] text-[#f7f8f8] shadow-sm border border-white/[0.12]" - : "text-[#8a8f98] hover:bg-white/[0.04] hover:text-[#d0d6e0]", + ? "is-active bg-signal/15 text-signal font-semibold shadow-xs border border-signal/30" + : "text-ink-muted hover:bg-surface-2 hover:text-ink", )} > {/* Precision Micro-Indicator */} {active && ( - + )} {/* Tooltip on hover */} - + {label} @@ -75,7 +75,7 @@ export function NavRail() { return (