Files
OpenHands/enterprise/server
openhands 93fe1613d7 feat: Add Usage dashboard for organization admins and owners
This PR adds a Usage page to the Settings menu that displays organization
usage statistics including:
- Total number of conversations
- Number of merged PRs
- Average cost per conversation
- A chart showing conversation counts over the last 90 days

The page is only visible to users with admin or owner roles in team organizations.

Backend changes:
- Add /api/organizations/{org_id}/usage endpoint in enterprise/server/routes/usage.py
- Register usage_router in enterprise/saas_server.py

Frontend changes:
- Add usage-service API client and types
- Add useUsageStats React Query hook
- Add Usage nav item to settings navigation (admin/owner only, team orgs only)
- Create usage-settings.tsx page with stat cards and conversation chart
- Add i18n translations for Usage page (all supported languages)
- Add route configuration for /settings/usage

Co-authored-by: openhands <openhands@all-hands.dev>
2026-03-19 16:32:20 +00:00
..