Skip to content

feat: drift detection monitoring + animated hero dashboard#17

Merged
AlexLopezGomez merged 5 commits into
mainfrom
dev
Mar 23, 2026
Merged

feat: drift detection monitoring + animated hero dashboard#17
AlexLopezGomez merged 5 commits into
mainfrom
dev

Conversation

@AlexLopezGomez
Copy link
Copy Markdown
Owner

@AlexLopezGomez AlexLopezGomez commented Mar 23, 2026

Summary

  • Drift detection & production monitoring — statistical drift detector (rolling mean vs baseline window), DriftAlert model with 6-hour dedup cooldown, /api/monitoring and /api/sample routes, MonitoringDashboard.jsx with live score trend and alert history, unified SettingsPage with ServiceKeysManager
  • Animated hero dashboard — rewrote HeroDashboard.jsx with SVG scan beam that reveals chart lines via clipPath, rAF-driven smooth counters, staggered dot ripples, amber inflection beacon, staged alert reveal, reactive KPI card borders, tagline word stagger via motion/react — full 9s loop with seamless reset
  • README updated with Production Monitoring section (B+C product framing for portfolio/CV)

Test plan

  • Run npm run dev from frontend/ — landing page hero should show the 9s animation loop (beam draws green line → red drop → alert fires → counter drops 81→62 → tagline staggered in → reset)
  • Navigate to /settings — SettingsPage with API key management should load
  • Hit /api/monitoring/scores and /api/monitoring/alerts with a valid token — should return data
  • Hit /api/sample to seed a live evaluation and verify drift detector fires an alert after threshold is exceeded

…OC, a11y, and print CSS

- benchmarkResults.json: rewrite to honest n=5,000 results (Gemini Flash 82% wins, 3 domains)
- BenchmarksPage: replace hardcoded hex with CSS vars, reframe narrative to error-asymmetry
  choice, add /paper nav link, back-to-top button, a11y (role/tabIndex/aria on table rows
  and modal, focus trap on DomainModal)
- PaperPage: add sticky sidebar TOC with IntersectionObserver, mobile drawer, print CSS,
  skip-to-content link, cross-page /benchmarks nav link, back-to-top button
- index.css: add .sr-only utility class
- TODOS.md: remove completed items (data fix, sticky TOC, print CSS, a11y, design system/nav)
- Demo mode: users without API keys see a DemoWelcome onboarding screen
  ("Run the council.") that runs 10 pre-loaded test cases through mock judges
  (faithfulness/groundedness/context relevancy) without requiring real API keys
- Demo flag flows from validation → evaluate route → orchestrator → mock judge
  selection, bypassing real judges and the 409 active-evaluation conflict check
- Demo banner shown during streaming; post-completion CTA prompts key setup
- History rows show a "Demo" pill badge for demo evaluations
- Fixed non-deterministic mock scores: moved startTime before randomDelay in all
  4 mock functions; simplified mockAggregate token computation to testCase.input only
- Pre-submission key validation: TestCaseUpload shows an inline notice and disables
  "Run Evaluation" when hasKeys === false, with "Configure Keys" and "Run Demo" actions;
  fails open when key state is unknown (null/undefined)
- DriftAlert model (MongoDB) with 6-hour deduplication cooldown
- Statistical drift detector: rolling mean vs baseline window (latest 10 vs evals 11-30), fires warning at 10pt drop, critical at 20pt
- /api/monitoring/scores and /api/alerts routes (requireAnyAuth + service scope)
- /api/sample route for seeding live evaluations in dev/demo
- MonitoringDashboard.jsx: live score trend chart, KPI cards, alert history
- SettingsPage.jsx + ServiceKeysManager.jsx: unified settings view with API key management
- ApiKeysManager: improved UX with copy-to-clipboard and visibility toggle
- README: add Production Monitoring section with B+C product framing
- TODOS: updated with remaining monitoring tasks
Replaces static hero with a self-contained drift detection story:
- SVG clipPath scan beams reveal healthy (green) then drop (red) lines as a traveling glow sweeps left-to-right
- rAF-driven smooth number counter (81→62, easeInOutQuart) replaces discrete setTimeout steps
- Dot ripple animations stagger as beam passes each data point
- Amber inflection beacon pulses at the healthy/drop split after drop line completes
- Staged alert reveal: banner slides in → badge glows red → detail text fades (3 beats)
- KPI card borders transition green→amber→red reactively; Avg Score shakes on alert fire
- Area fills fade in after their respective beam completes (not during)
- Tagline words stagger in with motion/react (5 spans, 60ms stagger)
- heroFloat keyframe updated with 3-stop rotateY oscillation for living 3D feel
- Full loop: 9s with seamless crossfade reset
The stats endpoint used source: 'batch' which excluded all pre-existing
evaluations (MongoDB doesn't match missing fields). Changed to $ne 'live'
so legacy documents without a source field are included in stats.
@AlexLopezGomez AlexLopezGomez merged commit a4d86a1 into main Mar 23, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant