cohorta/src
Vadym Samoilenko bc4138f332 Final pieces: decorators on LLM routes, usage self-service, billing page, WS events
Backend:
- @active_required + @with_user_context applied to all LLM-invoking routes
  in personas.py, focus_group_ai.py, ai_personas.py
- backend/app/routes/usage.py: GET /api/usage/me (MTD summary by feature),
  GET /api/usage/focus-groups/<id> (owner or admin)
- Registered usage_bp in app/__init__.py
- llm_service._record_usage now emits usage_update WS event to focus group room

Frontend:
- useMyUsage + useFocusGroupUsage hooks
- MyUsage.tsx: personal billing dashboard (cost cards + per-feature table)
- /billing route (ProtectedRoute) + Billing nav link
- FocusGroupSession: quota_warning amber banner with Progress bar,
  quota_exceeded + quota_warning WS events wired via websocketServiceNew

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:43:13 +01:00
..
components Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
config Remove console.log debug calls from frontend browser console 2026-03-23 14:30:56 +00:00
contexts Remove console.log debug calls from frontend browser console 2026-03-23 14:30:56 +00:00
hooks Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
lib Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
pages Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
services Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
styles changed permissions 2025-12-19 19:26:16 +00:00
types changed permissions 2025-12-19 19:26:16 +00:00
utils Remove console.log debug calls from frontend browser console 2026-03-23 14:30:56 +00:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
App.tsx Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
index.css changed permissions 2025-12-19 19:26:16 +00:00
main.tsx Switch to loginRedirect — popup blocked by server COOP header 2026-03-20 14:44:19 +00:00
vite-env.d.ts changed permissions 2025-12-19 19:26:16 +00:00