Releases: innFactory/librechat-admin-dashboard
Releases · innFactory/librechat-admin-dashboard
v1.1.1 — Performance Overhaul, Cost Estimation, Hydration Fix & Updated Dependencies
What's Changed
Performance Overhaul
- Eliminated all
$lookupaggregations — replaced with two-phase query pattern (pre-group + batch$in+ in-memory join), preventing full collection scans on Cosmos DB - Connection hardening —
maxPoolSize: 20,maxTimeMS: 60s, server/socket timeouts to prevent runaway queries - API caching — in-memory cache with 30s TTL across all 18 data routes, reducing duplicate DB hits on page load
- Retry logic —
useLoadableWithCachehook with 3 retries and exponential backoff for transient failures - Error boundary — React Error Boundary wrapping dashboard to gracefully handle component crashes
Cost Estimation Feature
- Estimated Cost card — shows total estimated USD cost derived from LibreChat's
tokenValue / 1,000,000formula - Cost by User table — sortable/searchable table with name, email, domain, cost, tokens, transactions, and cost percentage
- Cost by Domain pie chart — donut chart showing cost distribution across email domains
- TD Synnex link — direct link to real infrastructure + token pricing
Hydration Fix
- SSR guard in AuthGuard — returns
nullduring server-side rendering, preventing MUI theme mismatch (useColorScheme()returnsundefinedon server vs"dark"on client) - Client-only charts — replaced module-scope
typeof windowchecks withuseState+useEffectpattern in pie charts
Dependency Updates (0 vulnerabilities)
- Next.js 16.0.10 → 16.2.1 (8 security fixes)
- Jest 29 → 30, Biome 2.3 → 2.4
- MUI packages, jotai, mongodb, react, zod all updated to latest
- @types/node 22 → 25
- Fixed all npm audit vulnerabilities (diff, dompurify, jspdf, minimatch)
Code Quality
- Fixed
loadable()anti-pattern in 11 components (moved to module scope) - Security review: all DB access confirmed read-only (0 write operations, 0
$out/$mergestages) - 162 tests passing, 0 type errors, clean formatting
Stats
- 58 files changed, +2,903 / -887 lines
- 14 new files (cost feature: repository, API routes, atoms, components)
Full Compatibility: Tested against LibreChat MongoDB schema — no database modifications required.