kaitranntt
824c3baecf
feat(ui): replace anomaly alert badge with usage insights card
2025-12-10 02:59:00 -05:00
kaitranntt
d81a5e6266
feat(usage-analytics): implement token cost breakdown and anomaly detection
2025-12-10 02:36:43 -05:00
kaitranntt
9506327343
refactor(analytics): inline sessions table component
2025-12-09 22:46:10 -05:00
kaitranntt
f255a20a93
feat(analytics): refactor model color management and fix UI display issues
...
- Extract getModelColor utility to lib/utils.ts with improved FNV-1a hash algorithm
- Replace hardcoded color palette with vibrant tones palette
- Remove color constants from model-breakdown-chart.tsx
- Fix truncated model names in analytics display
- Update project roadmap with analytics enhancements
2025-12-09 14:44:56 -05:00
kaitranntt
69e6a32224
perf(analytics): add cache pre-warming and SWR pattern for instant page load
...
- Add server-side cache pre-warming on startup (non-blocking)
- Implement stale-while-revalidate pattern (1hr stale window)
- Add /api/usage/status endpoint for cache status
- Remove full-page blocking skeleton, use per-component loading
- Add "Updated X ago" timestamp indicator in UI header
- Export AnalyticsSkeleton component for potential future use
2025-12-08 23:09:01 -05:00
kaitranntt
a721af3cf3
feat(analytics): add usage analytics page with caching layer
...
- Add Analytics page with usage trends, model breakdown, sessions table
- Add server-side caching layer for better-ccusage data (TTL-based)
- Add request coalescing to prevent duplicate concurrent API calls
- Add /api/usage/refresh endpoint to manually clear cache
- Add date-range filter, summary cards, trend charts components
- Fix API parameter mismatch (since/until in YYYYMMDD format)
- Wire up Refresh button with loading state animation
2025-12-08 21:47:36 -05:00